HADOOP Procedure
HDFS Statement
Submits Hadoop Distributed File System (HDFS) commands.
Syntax
HDFS Command Options
These options support
commands that interact with the HDFS. Include only one operation per
HDFS statement.
- COPYFROMLOCAL='local-file'
-
copies the specified
local file to an HDFS path output location. Specify the complete pathname
and filename.
Requirement:Use the OUT= option to specify the HDFS path output location.
- COPYTOLOCAL='HDFS-file'
-
copies the specified
HDFS file to a local file output location. Specify the complete HDFS
directory and filename.
Requirement:Use the OUT= option to specify the local file output
location.
- DELETE='HDFS-file'
-
deletes the specified
HDFS file. Specify the complete HDFS directory and filename.
- DELETESOURCE
-
deletes the input source
file after a copy command.
Restriction:Use DELETESOURCE with the COPYFROMLOCAL= or COPYTOLOCAL=
options.
- KEEPCRC
-
saves the Cyclic Redundancy
Check (CRC) file after a copy command to a local file output location.
The CRC file is saved to the same location that is specified in the
OUT= option. The CRC file is used to ensure the correctness of the
file being copied.
Default:The CRC file is deleted.
Restriction:Use KEEPCRC with the COPYTOLOCAL= option.
- MKDIR='HDFS-path'
-
creates the specified
HDFS path. Specify the complete HDFS directory.
- OUT='output-location'
-
specifies the output
location for an HDFS operation. When copying a local file to HDFS,
specify the HDFS path. When copying an HDFS file to a local file,
specify the external file for your machine. When renaming an HDFS
file, specify the new HDFS path and filename.
- OVERWRITE
-
overwrites the output
file after a copy command.
Restriction:Use OVERWRITE with the COPYFROMLOCAL= or COPYTOLOCAL=
options.
- RENAME='HDFS-file'
-
renames the specified
HDFS file. Specify the complete HDFS directory and filename.
Requirement:Use the OUT= option to specify the new HDFS path and
filename.
Copyright © SAS Institute Inc. All rights reserved.