Java Interfaces
Java Interfaces
appendToFile chgrp
Usage: hadoop fs -appendToFile <localsrc> ... <dst> Usage: hadoop fs -chgrp [-R] GROUP URI [URI ...]
Append single src, or multiple srcs from local file system to the Change group association of files. The user must be
destination file system. Also reads input from stdin and appends to
the owner of files, or else a super-user.
destination file system.
Options
•hadoop fs -appendToFile localfile /user/hadoop/hadoopfile
•The -R option will make the change recursively
•hadoop fs -appendToFile localfile1 localfile2 /user/hadoop/hadoopfile
through the directory structure.
•hadoop fs -appendToFile localfile
hdfs://nn.example.com/hadoop/hadoopfile
•hadoop fs -appendToFile -
hdfs://nn.example.com/hadoop/hadoopfile Reads the input from stdin.
Exit Code: Pawan Kumar Singh, AP, Deptt of Cse 3
Returns 0 on success and 1 on error.
chmod copyFromLocal
Usage: hadoop fs -chmod [-R] <MODE[,MODE]... | Usage: hadoop fs -copyFromLocal
OCTALMODE> URI [URI ...] <localsrc> URI
Change the permissions of files. With -R, make the Similar to put command, except that
change recursively through the directory structure.
the source is restricted to a local file
The user must be the owner of the file, or else a
super-user.
reference.
Options Options:
•The -R option will make the change recursively •The -f option will overwrite the
through the directory structure. destination if it already exists.
chown copyToLocal
Usage: hadoop fs -chown [-R] [OWNER][:[GROUP]] URI Usage: hadoop fs -copyToLocal [-
[URI ] ignorecrc] [-crc] URI <localdst>
Change the owner of files. The user must be a super- Similar to get command, except that
user. the destination is restricted to a local
Options file reference.
•The -R option will make the change recursively
through the directory structure.