Copies a file from the local file system into HDFS.
Name of a file in the local file system.
Name of the new directory in HDFS.
Controls whether dfs.name
can overwrite a directory with the same name. Set to TRUE
to overwrite the directory, or FALSE
to signal an error (default).
Maximum number of bytes in each part of the Hadoop file (optional).
Indicates whether the first line of the local file is a header containing column names. Set to TRUE
if it has a header, or FALSE
if it does not (default).
A header enables you to exact the column names and reference the data fields by name instead of by index in your MapReduce R scripts.
This function provides the fastest and easiest way to copy a file into HDFS. If the file is larger than split.size
, then Hadoop splits it into two or more parts. The new Hadoop file gets a unique object ID, and each part is named part-0000
x
. Hadoop automatically creates metadata for the file.