Professional Documents
Culture Documents
Bda Practical
Bda Practical
TY-lT-2-A BDA
Practical-3
Aim: Installation of Hadoop on Ubuntu os and study of hdfs Hadoop
commands.
l)start-all.sh:
Description: This command starts namenode,datanodes,secondary namenodes and
resourcemanager.
Syntax:
sbin/start-atl.sh
WARNING: Attempting to start all Apache Hadoop daemons as hadoop in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
Starting datanodes
Starting secondary namenodes [vboxuser]
Starting resourcemanager Starting
nodemanagers
Execution:
Summary
Security is off
Safernode is off.
4 files and directories. 2 blocks (2 replicated blocks. O erasure coded block groups) 6 total hlesystem object(s).
Heap Memory used 54.42 MB of 84.59 MB Heap Mernory. Max Heap Memory is 997.63 MB.
Non Heap Memory used 51.13 MB of 54.63 MB Commited Non Heap Memory Max Non Heap Memory is eunbounded>.
Configured Capacity: 23.32 6B
Configured Remote Capacity:
OFS used: 28.03 KB (0%)
2) mkdir:
Description: make a directory on Hadoop localhost with name SVIT
Syntax:
1
200410116026
TY-lT-2-A BDA-3161607
WARNING: Use of this script to bin/hadoop /SVIT dfs is
deprecated.
execute "hdfs dfs" instead.
WARNING: Attempting to execute
replacement
dfs -mkdtr
Execution:
3)put:
Description: Put the file named 'FIRST.txt' to Hadoop storage from the local
storage
Syntax:
bin/hdfs dfs -put
/usr/share/hadoop /FIRST.txt /SVIT/
2023-02-15 INFO sast.Sas1DataTransferC1ient: SASL encryption trust check:
locatHostTrusted = false, remoteHostTrusted = false
Execution:
Last Block
Owner Group Size Modified Replication Size Name
11:12
4) copyFromLocaI:
Description: Copy a file named 'SECOND.txt' to Hadoop storage system at '/SVIT/'
folder.
SVIT
200410116026
TY-lT-2-A BDA-3161607
Syntax:
are/ bin/hdfs dfs -copyFromLocal /usr/sh
hadoop/SECOND.txt /SVIT/
sasl.SaslDataTransferClient: SASL encryption
2023-02-15 11:20:34, 151 INFO
check: tocaIHostTrusted = false, trust remoteHostTrusted = false
Execution:
5) moveFromLocaI:
Description: Move the file 'THIRD.txt' to Hadoop storage,means it will be deleted from
locat storage.
Before:
Syntax:
btn/hdfs dfs -moveFromLocal /usr/sh
are/hadoop/THIRD.txt /SVIT/
2023-02-15 INFO sas1.Sas1DataTransferC1ient: SASL encryption trust check:
localHostTrusted = false, remoteHostTrusted = false
Execution:
SVIT
200410116026
TY-lT-2-A BDA-3161607
Last DIOCK
6) get:
7) getmerge:
Description: Merge to files and save the content of them in third files.
Syntax:
bin/hdfs dfs -getmerge /SVIT/THIRD.
txt /SVIT/SECOND. txt /usr/share/hadoop/merged.txt
2023-02-15 11:43: 15,941 INFO sast.SaslDataTransferClient: SASL encryption trust check:
localHostTrusted = false, remoteHostTrusted = false
Execution:
SVIT
200410116026
TY-lT-2-A BDA-3161607
matrtx.Ja
r mergel.
txt
merged.
txt merge
txt
8) copyToLocaI:
Description: Simply copy the file from Hadoop storage to local storage
Syntax:
Execution:
9) rmdir:
Description: Remove whole directory from Hadoop storage.
Syntax:
hadoop@vboxuser:/usr/ coca L/hoöoop$ bin/hadoop dfs -rmdir /SVIT
WARNING: Use of this script to execute dfs is deprecated.
WARNING: Attempting to execute replacement "hdfs dfs" instead.
Before:
Go!
Show 25 v entries
O Permission Owner Group Size Last Modified Replication Block Size Name
O drwxr-xr-x hadppp sypergrpyp 0B Feb 20 23:47 0B SVIT
Showing I to I of I entries
Previous Next
Execution:
SVIT
200410116026
TY-lT-2-A BDA-3161607
Showing O to O of O entries Previous Next
10)rm:
Permission Owner Group Size Last Modified Replication 11 Block Size Name
Execution:
/SVIT G
o
!
Show 25 v entries
.1 1
Permission Owner Group Size Last Modified Replication Block Size Name
No data available in table
11) sbin/hadoop/stop-all.sh:
Description: Stop all the Hadoop components started by 'start-all.sh' command
Syntax:
sbin/stop-all.sh
WARNING: Stopping alt Apache Hadoop daemons as malavinay in 10
seconds.
WARNING : Use CTRL-C to abort.
Stopping namenodes on [0.0.0.0]
Stopping datanodes
Stopping secondary namenodes [bda-virtualbox]
Stopping nodemanagers
Stopping resourcemanager
Execution:
SVIT
200410116026
TY-lT-2-A BDA-3161607
C¯_) @ localhost:9870/explorer.html#/SVIT 0 01
Unable to connect
Firefox can't establish a connection to the server at
localhost:9870.