An Error Is Reported When DistCP Is Used to Copy an Empty Folder
Symptom
When a user runs the following distcp commands on the MRS client, empty folders cannot be copied from HDFS to OBS:
hadoop distcp -Dfs.obs.endpoint=xxx
-Dfs.obs.access.key=xxx -Dfs.obs.secret.key=xxx -update hdfs://hacluster/blee obs://xxx/aaa
Cause Analysis
If the source directory (for example, blee) is empty and the destination directory (for example, aaa) does not exist, the system automatically creates the aaa directory but does not create the blee directory under aaa.
If the blee directory at the source is not empty and the aaa directory at the destination does not exist, the system automatically creates the aaa directory and creates the blee directory under aaa to move files.
Procedure
- It is recommended that the source directory (for example, blee) is not empty.
- If the source directory is empty, manually create a destination directory (aaa for example) before moving files.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.