正在尝试将文件夹从本地移动到包含%20的hdfs无法复制目录

xnifntxz  于 2021-05-27  发布在  Hadoop
关注(0)|答案(1)|浏览(425)

我正在尝试将文件夹从本地系统移动到包含%20的hdfs。我无法更改文件夹名称,因为它是一列的值,而这些名称是由spark在写入文件时使用分区列创建的。我需要将它们按原样移动到hdfs,并在hive/impala表中查看它们。
前任:

HADOOP_USER_NAME=vishal hdfs dfs -copyFromLocal "/home/vishal/incoming/partition-edit/tableName/cp_sys_name=Change%20Request%20Satisfaction%20Survey/cp_evaluation_method=survey/" /data/files/vishal/managed/asmt_metric_type_orc_sep_29/cp_sys_name=Change%20Request%20Satisfaction%20Survey/cp_evaluation_method=survey

正在执行上述命令,但它在内部将%20视为空间并引发“找不到文件”异常。

Error while Inserting data into target: copyFromLocal: `/home/vishal/incoming/partition-edit/asmt_metric_type_orc_sep_29/cp_sys_name=Change Request Satisfaction Survey/cp_evaluation_method=survey/': No such file or directory

java.io.IOException: copyFromLocal: `/home/vishal/incoming/partition-edit/tableName/cp_sys_name=Change Request Satisfaction Survey/cp_evaluation_method=survey/': 
No such file or directory
lp0sw83n

lp0sw83n1#

你能试着用%2520替换%20吗?想法是用代码“%25”替换“%”,用“20”替换concat

相关问题