Now import only new inserted records and append to existring directory . which has been created in first step.

Now import only new inserted records and append to existring directory . which has been created in first step.View AnswerAnswer: Solution: Step 1: Clean already imported data. (In real exam, please make sure you dont delete data generated from previous exercise). hadoop fs -rm -R departments Step 2: Import data...

December 10, 2020 No Comments READ MORE +

Now import only new inserted records and append to existring directory . which has been created in first step.

Now import only new inserted records and append to existring directory . which has been created in first step.View AnswerAnswer: Solution: Step 1: Clean already imported data. (In real exam, please make sure you dont delete data generated from previous exercise). hadoop fs -rm -R departments Step 2: Import data...

December 10, 2020 No Comments READ MORE +

Now export this data from hdfs to mysql retail_db.departments table. During upload make sure existing department will just updated and no new departments needs to be inserted.

Now export this data from hdfs to mysql retail_db.departments table. During upload make sure existing department will just updated and no new departments needs to be inserted.View AnswerAnswer: Solution: Step 1: Create a csv tile named updateddepartments.csv with give content. Step 2: Now upload this tile to HDFS. Create a...

December 10, 2020 No Comments READ MORE +

Now import data from mysql table departments_hive01 to this hive table. Please make sure that data should be visible using below hive command. Also, while importing if null value found for department_name column replace it with "" (empty string) and for id column with -999 select * from departments_hive;

Now import data from mysql table departments_hive01 to this hive table. Please make sure that data should be visible using below hive command. Also, while importing if null value found for department_name column replace it with "" (empty string) and for id column with -999 select * from departments_hive;View AnswerAnswer:...

December 9, 2020 No Comments READ MORE +

Store all the Java files in a directory called java_output to evalute the further

Store all the Java files in a directory called java_output to evalute the furtherView AnswerAnswer: Solution: Step 1: Drop all the tables, which we have created in previous problems. Before implementing the solution. Login to hive and execute following command. show tables; drop table categories; drop table customers; drop table...

December 9, 2020 No Comments READ MORE +

Problem Scenario 23: You have been given log generating service as below.

Problem Scenario 23: You have been given log generating service as below. Start_logs (It will generate continuous logs) Tail_logs (You can check, what logs are being generated) Stop_logs (It will stop the log service) Path where logs are generated using above service: /opt/gen_logs/logs/access.log Now write a flume configuration file named...

December 9, 2020 No Comments READ MORE +

Data should be written as text to hdfs

Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/spooldir2 Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume8.conf. agent1 .sources = source1 agent1.sinks = sink1a sink1b agent1.channels = channel1a channel1b agent1.sources.source1.channels = channel1a...

December 9, 2020 No Comments READ MORE +

Data should be written as text to hdfs

Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/nrtcontent Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume6.conf. agent1 .sources = source1 agent1 .sinks = sink1 agent1.channels = channel1 agent1 .sources.source1.channels = channel1...

December 9, 2020 No Comments READ MORE +

Data should be written as text to hdfs

Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/nrtcontent Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume6.conf. agent1 .sources = source1 agent1 .sinks = sink1 agent1.channels = channel1 agent1 .sources.source1.channels = channel1...

December 9, 2020 No Comments READ MORE +

Problem Scenario 21: You have been given log generating service as below.

Problem Scenario 21: You have been given log generating service as below. startjogs (It will generate continuous logs) tailjogs (You can check, what logs are being generated) stopjogs (It will stop the log service) Path where logs are generated using above service: /opt/gen_logs/logs/access.log Now write a flume configuration file named...

December 8, 2020 No Comments READ MORE +