hdfs.cp

Copies an HDFS file from one location to another.

Usage

hdfs.cp(
        dfs.src,
        dfs.dst,
        force)

Arguments

dfs.src

The name of the source file to be copied. The file name can include a path that is either absolute or relative to the current path.

dfs.dst

The name of the copied file. The file name can include a path that is either absolute or relative to the current path.

force

Set to TRUE to overwrite an existing file, or set to FALSE to display an error message (default).

Return Value

NULL for a successful copy, or FALSE for a failed attempt

Example

This example copies a file named weblog in the parent directory and overwrites the existing weblog file:

R> hdfs.cp("weblog", "..", force=T)