hdfs.mv

Moves an HDFS file from one location to another.

Usage

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

Arguments

dfs.src

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

dfs.dst

The name of the moved 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 destination file, or FALSE to cancel the operation and display an error message (default).

Return Value

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

Example

This example moves a file named weblog to the demo subdirectory and overwrites the existing weblog file:

R> hdfs.mv("weblog", "./demo", force=T)