Closed judechen closed 9 years ago
from the command line:
hdfs dfs -cp hdfs:///path/to/file oss://bucket/path/
How to do it in java code?
Dragon is an implementation of the Hadoop Filesystem for OSS. You can copy to/from oss the same way you access hdfs in Java. Use the oss
scheme instead of the hdfs
scheme when specifying paths.
https://hadoop.apache.org/docs/current/api/org/apache/hadoop/fs/FileSystem.html
Could you please provide sample code to copy file from HDFS to OSS?