Mv
Move <source>
... to <dest>, where both might be one of:
<local_path> hdfs://<path> gs://<bucket>/<path> s3://<bucket>/<path> sftp://<path>
So then local files it calls standard ‘mv’ command to copy files.
But when <source>
and/or <dest>
contain URI like ‘hdfs://’, ‘s3://’,
‘gs://’ or ‘sftp://’ (i.e. Hadoop FS, Amazon S3, Google Storage and SFTP), then it calls
appropriate commands to move (or copy and delete) from/to such source/destination.
When more than one <source>
is specified, then URI prefix must be the same for all of them.
Note: All above URIs are supported only in EVL Enterprise Edition.
- Cp
-
is to be used in EVS job structure definition file or in EWS workflow structure definition.
- evl cp
-
is intended for standalone usage, i.e. to be invoked from command line.
Using this command might keep your code clean, but for more complex copying better use appropriate commands directly, as it gives you all the available options for particular storage or protocol type.
Synopsis
Mv [-f|--force] <source>... <dest> evl mv [-f|--force] <source>... <dest> [--verbose] evl mv ( --help | --usage | --version )
Options
- -f, --force
-
destination will be overwritten if exists
Standard options:
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- -v, --verbose
-
print to stderr info/debug messages of the component
- --version
-
print version and exit
Examples
- This line in EVL job (an ‘evs’ file):
Mv hdfs:///some/path/to/file /some/local/path/
will call:
$HADOOP_FS_GET hdfs:///some/path/file /some/local/path/ $HADOOP_FS_RM hdfs:///some/path/file
- This line in EVL job (an ‘evs’ file):
Mv /some/local/path/file hdfs:///some/path/
will call:
$HADOOP_FS_PUT /some/local/path/file hdfs:///some/path/ rm /some/local/path/file
- This line in EVL job (an ‘evs’ file):
Mv hdfs:///some/path/file hdfs:///other/path/
will call:
$HADOOP_FS_CP hdfs:///some/path/file hdfs:///other/path/ $HADOOP_FS_RM hdfs:///some/path/file
- This line in EVL job (an ‘evs’ file):
Mv /some/local/path/file /other/local/path/
will call:
mv /some/local/path/file /other/local/path/
Where defauls for ‘HADOOP_FS_*’ variables are:
export HADOOP_FS_CP=${HADOOP_FS_CP:-"hadoop fs -cp"} export HADOOP_FS_GET=${HADOOP_FS_GET:-"hadoop fs -get"} export HADOOP_FS_PUT=${HADOOP_FS_PUT:-"hadoop fs -put"} export HADOOP_FS_RM=${HADOOP_FS_RM:-"hadoop fs -rm"}