Problem Scenario 2:
Problem Scenario 2:
There is a parent organization called "ABC Group Inc", which has two child companies named Tech Inc and MPTech.
Both companies employee information is given in two separate text file as below. Please do the following activity for employee details.
Tech Inc.txt
Answer: Solution:
Step 1: Check All Available command hdfs dfs
Step 2: Get help on Individual command hdfs dfs -help get
Step 3: Create a directory in HDFS using named Employee and create a Dummy file in it called e.g. Techinc.txt hdfs dfs -mkdir Employee
Now create an emplty file in Employee directory using Hue.
Step 4: Create a directory on Local file System and then Create two files, with the given data in problems.
Step 5: Now we have an existing directory with content in it, now using HDFS command line, overrid this existing Employee directory. While copying these files from local file System to HDFS. cd /home/cloudera/Desktop/ hdfs dfs -put -f Employee
Step 6: Check All files in directory copied successfully hdfs dfs -Is Employee
Step 7: Now merge all the files in Employee directory, hdfs dfs -getmerge -nl Employee MergedEmployee.txt
Step 8: Check the content of the file. cat MergedEmployee.txt
Step 9: Copy merged file in Employeed directory from local file ssytem to HDFS. hdfs dfs -put MergedEmployee.txt Employee/
Step 10: Check file copied or not. hdfs dfs -Is Employee
Step 11: Change the permission of the merged file on HDFS hdfs dfs -chmpd 664 Employee/MergedEmployee.txt
Step 12: Get the file from HDFS to local file system, hdfs dfs -get Employee Employee_hdfs
Latest CCA175 Dumps Valid Version with 96 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund