You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Syntax<br />
MAPREDUCE Statement<br />
HDFS ;<br />
HDFS Command Options<br />
These options support commands that interact with the HDFS. Include only one<br />
operation per HDFS statement.<br />
COPYFROMLOCAL='local-file'<br />
copies the specified local file to an HDFS path output location. Specify the complete<br />
pathname and filename.<br />
Requirement: Use the OUT= option to specify the HDFS path output location.<br />
COPYTOLOCAL='HDFS-file'<br />
copies the specified HDFS file to a local file output location. Specify the complete<br />
HDFS directory and filename.<br />
Requirement: Use the OUT= option to specify the local file output location.<br />
DELETE='HDFS-file'<br />
deletes the specified HDFS file. Specify the complete HDFS directory and filename.<br />
DELETESOURCE<br />
deletes the input source file after a copy command.<br />
Restriction: Use DELETESOURCE with the COPYFROMLOCAL= or<br />
COPYTOLOCAL= options.<br />
MKDIR='HDFS-path'<br />
creates the specified HDFS path. Specify the complete HDFS directory.<br />
OUT='output-location'<br />
specifies the output location for an HDFS operation. When copying a local file to<br />
HDFS, specify the HDFS path. When copying an HDFS file to a local file, specify<br />
the external file for your machine. When renaming an HDFS file, specify the new<br />
HDFS path and filename.<br />
OVERWRITE<br />
overwrites the output file after a copy command.<br />
Restriction: Use OVERWRITE with the COPYFROMLOCAL= or<br />
COPYTOLOCAL= options.<br />
RENAME='HDFS-file'<br />
renames the specified HDFS file. Specify the complete HDFS directory and<br />
filename.<br />
Requirement: Use the OUT= option to specify the new HDFS path and filename.<br />
Submits MapReduce programs into a Hadoop cluster.<br />
Example: “Example 2: Submitting a MapReduce Program” on page 28<br />
Syntax<br />
MAPREDUCE ;<br />
MAPREDUCE Statement 25