L2 Accessing HDFS On Cloudera Distribution
L2 Accessing HDFS On Cloudera Distribution
Scenario 1 One of the important steps toward copying a file to HDFS is to get familiar to browse
through the directories within the cloudera's home
*you may see some files if exists, otherwise, just an empty hdfs directory
*to exit the cat command in terminal, press keys CTRL & D
Scenario 2 To copy a text file from local home directory into HDFS via terminal
transfer the file into Note: you will need to install winscp and setting up winscp
hdfs
(using WinSCP
winscp+ssh+comman 1) launch your winscp and login to the remote machine. You should see both sides
ds) such as:
2) click upload
4) you should see the uploaded file in the right panel
SSH
5) launch putty and access cluster via SSH using the given account
7) (optional) you can check the existing files and directories in HDFS
hdfs dfs –ls
transfer the file into 1) login to HUE using the given accounts - https://bigdatalab-rm-en1.uitm.edu.my:8889/
hdfs
(using HUE) 2) click on the file browser
3) click upload
4) browse and select the file
observe several Pre-requisite: In this example, you should have created the directory and stored the
parameters respective file
replication factors
locations
number of blocks
number of data-nodes
number of racks
remove directory in If you need to remove a directory in HDFS which is not empty, you can use this
HDFS command:
Move existing file into a directory, and followed by renaming the file to (id.txt)
Removing file