CORRECT TEXTProblem Scenario 28 : You need to implement near real time solutions for collecting information when submitted in file with belowDataecho "IBM, 100, 20160104" >> /tmp/spooldir2/.bb.txtecho "IBM, 103, 20160105" >> /tmp/spooldir2/.bb.txtmv /tmp/spooldir2/.bb.txt /tmp/spooldir2/bb.txtAfter few minsecho "IBM, 100.2, 20160104" >> /tmp/spooldir2/.dr.txtecho "IBM, 103.1, 20160105" >> /tmp/spooldir2/.dr.txtmv /tmp/spooldir2/.dr.txt /tmp/spooldir2/dr.txtYou have been given below directory location (if not available than create it) /tmp/spooldir2 .As soon as file committed in this directory that needs to be available in hdfs in /tmp/flume/primary as well as /tmp/flume/secondary location.However, note that/tmp/flume/secondary is optional, if transaction failed which writes in this directory need not to be rollback.Write a flume configuration file named flumeS.conf and use it to load data in hdfs with following additional properties .1. Spool /tmp/spooldir2 directory2. File prefix in hdfs sholuld be events3. File suffix should be .log4. If file is not committed and in use than it should have _ as prefix.5. Data should be written as text to hdfs
Answer(s): A
Solution :Step 1: Create directory mkdir /tmp/spooldir2Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume8.conf.agent1 .sources = source1agent1.sinks = sink1a sink1bagent1.channels = channel1a channel1bagent1.sources.source1.channels = channel1a channel1b agent1.sources.source1.selector.type = replicatingagent1.sources.source1.selector.optional = channel1b agent1.sinks.sink1a.channel = channel1aagent1 .sinks.sink1b.channel = channel1bagent1.sources.source1.type = spooldiragent1 .sources.sourcel.spoolDir = /tmp/spooldir2agent1.sinks.sink1a.type = hdfsagent1 .sinks, sink1a.hdfs. path = /tmp/flume/primary agent1 .sinks.sink1a.hdfs.tilePrefix = eventsagent1 .sinks.sink1a.hdfs.fileSuffix = .logagent1 .sinks.sink1a.hdfs.fileType = Data Streamagent1 .sinks.sink1b.type = hdfsagent1 .sinks.sink1b.hdfs.path = /tmp/flume/secondary agent1 .sinks.sink1b.hdfs.filePrefix = eventsagent1.sinks.sink1b.hdfs.fileSuffix = .logagent1 .sinks.sink1b.hdfs.fileType = Data Streamagent1.channels.channel1a.type = fileagent1.channels.channel1b.type = memorystep 4 : Run below command which will use this configuration file and append data in hdfs.Start flume service:flume-ng agent -conf /home/cloudera/flumeconf -conf-file /home/cloudera/flumeconf/flume8.conf --name ageStep 5: Open another terminal and create a file in /tmp/spooldir2/echo "IBM, 100, 20160104" » /tmp/spooldir2/.bb.txtecho "IBM, 103, 20160105" » /tmp/spooldir2/.bb.txt mv /tmp/spooldir2/.bb.txt /tmp/spooldir2/bb.txtAfter few minsecho "IBM.100.2, 20160104" »/tmp/spooldir2/.dr.txtecho "IBM, 103.1, 20160105" » /tmp/spooldir2/.dr.txt mv /tmp/spooldir2/.dr.txt /tmp/spooldir2/dr.txt
Problem Scenario 83 : In Continuation of previous question, please accomplish following activities.1. Select all the records with quantity >= 5000 and name starts with 'Pen'2. Select all the records with quantity >= 5000, price is less than 1.24 and name starts with'Pen'3. Select all the records witch does not have quantity >= 5000 and name does not startswith 'Pen'4. Select all the products which name is 'Pen Red', 'Pen Black'5. Select all the products which has price BETWEEN 1.0 AND 2.0 AND quantityBETWEEN 1000 AND 2000.
Solution :Step 1: Select all the records with quantity >= 5000 and name starts with 'Pen' val results = sqlContext.sql(......SELECT * FROM products WHERE quantity >= 5000 AND name LIKE 'Pen %.......)results.show()Step 2: Select all the records with quantity >= 5000 , price is less than 1.24 and name starts with 'Pen'val results = sqlContext.sql(......SELECT * FROM products WHERE quantity >= 5000 AND price < 1.24 AND name LIKE 'Pen %.......)results. showQStep 3: Select all the records witch does not have quantity >= 5000 and name does not starts with 'Pen'val results = sqlContext.sql('.....SELECT * FROM products WHERE NOT (quantity >= 5000 AND name LIKE 'Pen %')......)results. showQStep 4: Select all the products wchich name is 'Pen Red', 'Pen Black' val results = sqlContext.sql('.....SELECT' FROM products WHERE name IN ('Pen Red', 'Pen Black')......)results. showQStep 5: Select all the products which has price BETWEEN 1.0 AND 2.0 AND quantity BETWEEN 1000 AND 2000.val results = sqlContext.sql(......SELECT * FROM products WHERE (price BETWEEN 1.0 AND 2.0) AND (quantity BETWEEN 1000 AND 2000)......) results. show()
Problem Scenario 82 : You have been given table in Hive with following structure (Which you have created in previous exercise).productid int code string name string quantity int price floatUsing SparkSQL accomplish following activities.1. Select all the products name and quantity having quantity <= 20002. Select name and price of the product having code as 'PEN'3. Select all the products, which name starts with PENCIL4. Select all products which "name" begins with 'P\ followed by any two characters,followed by space, followed by zero or more characters
Solution :Step 1: Copy following tile (Mandatory Step in Cloudera QuickVM) if you have not done it.sudo su rootcp /usr/lib/hive/conf/hive-site.xml /usr/lib/sparkVconf/Step 2: Now start spark-shellStep 3 ; Select all the products name and quantity having quantity <= 2000 val results = sqlContext.sql(......SELECT name, quantity FROM products WHERE quantity <= 2000......)results.showQStep 4: Select name and price of the product having code as 'PEN' val results = sqlContext.sql(......SELECT name, price FROM products WHERE code = 'PEN.......)results. showQStep 5: Select all the products , which name starts with PENCIL val results = sqlContext.sql(......SELECT name, price FROM products WHERE upper(name) LIKE 'PENCIL%.......}results. showQStep 6: select all products which "name" begins with 'P', followed by any two characters, followed by space, followed byzero or more characters -- "name" begins with 'P', followed by any two characters, - followed by space, followed by zero or more characters val results = sqlContext.sql(......SELECT name, price FROM products WHERE name LIKE 'P_ %.......)results. show()
Problem Scenario 20 : You have been given MySQL DB with following details.user=retail_dbapassword=clouderadatabase=retail_dbtable=retail_db.categoriesjdbc URL = jdbc:mysql://quickstart:3306/retail_dbPlease accomplish following activities.1. Write a Sqoop Job which will import "retaildb.categories" table to hdfs, in a directoryname "categories_targetJob".
Solution :Step 1: Connecting to existing MySQL Database mysql -user=retail_dba -- password=cloudera retail_dbStep 2: Show all the available tables show tables;Step 3: Below is the command to create Sqoop Job (Please note that - import space is mandatory)sqoop job -create sqoopjob \ -- import \-connect "jdbc:mysql://quickstart:3306/retail_db" \-username=retail_dba \-password=cloudera \-table categories \-target-dir categories_targetJob \-fields-terminated-by '|' \-lines-terminated-by '\n'Step 4: List all the Sqoop Jobs sqoop job --listStep 5: Show details of the Sqoop Job sqoop job --show sqoopjobStep 6: Execute the sqoopjob sqoopjob --exec sqoopjobStep 7: Check the output of import jobhdfs dfs -Is categories_target_jobhdfs dfs -cat categories_target_job/part*
Problem Scenario 59 : You have been given below code snippet.val x = sc.parallelize(1 to 20)val y = sc.parallelize(10 to 30) operationlz.collectWrite a correct code snippet for operationl which will produce desired output, shown below. Array[lnt] = Array(16, 12, 20, 13, 17, 14, 18, 10, 19, 15, 11)
Solution :val z = x.intersection(y)intersection : Returns the elements in the two RDDs which are the same.
Share your comments for Cloudera CCA175 exam with other users:
could you post the link
hello send me dumps
it is very nice
i gave the amazon dva-c02 tests today and passed. very helpful.
there is an incorrect word in the problem statement. for example, in question 1, there is the word "speci c". this is "specific. in the other question, there is the word "noti cation". this is "notification. these mistakes make this site difficult for me to use.
passed my az-120 certification exam today with 90% marks. studied using the dumps highly recommended to all.
i need it, plz make it available
q47: intrusion prevention system is the correct answer, not patch management. by definition, there are no patches available for a zero-day vulnerability. the way to prevent an attacker from exploiting a zero-day vulnerability is to use an ips.
this is simple but tiugh as well
questão 4, segundo meu compilador local e o site https://www.jdoodle.com/online-java-compiler/, a resposta correta é "c" !
its very useful
i mastered my skills and aced the comptia 220-1102 exam with a score of 920/1000. i give the credit to for my success.
real questions
very helpful assessments
hi there, i would like to get dumps for this exam
i studied for the microsoft azure az-204 exam through it has 100% real questions available for practice along with various mock tests. i scored 900/1000.
please upload 1z0-1072-23 exam dups
i was hoping if you could please share the pdf as i’m currently preparing to give the exam.
i am looking for oracle 1z0-116 exam
where we can get the answer to the questions
nice questions
question 129 is completely wrong.
i need dump
love the site.
can you please upload it back?
could you please re-upload this exam? thanks a lot!
great about shared quiz
goood helping
pay attention to questions. they are very tricky. i waould say about 80 to 85% of the questions are in this exam dump.
wish you would allow more free questions
great simulation
very g inood
q35 should be a
sap c_ts450_2021