hadoop - 试图将文件夹从本地移动到包含 %20 的 hdfs。无法复制目录
问题描述
我正在尝试将文件夹从我的本地系统移动到其中包含 %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 视为空格并抛出 File not found 异常。
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
解决方案
您可以尝试用 %2520 替换 %20 吗?想法是用代码“%25”替换“%”并用“20”替换
推荐阅读
- mysql - 命令执行期间mysql sql文件遇到错误
- java - 窗口打开但不响应 OpenGL 3.2
- c# - Metro Tiles 单独调整大小
- c++ - 范围修剪视图实现不适用于反向视图
- docker - 是否可以在不构建映像的情况下运行 Dockerfile(或立即/透明地丢弃映像)?
- powerbi - Power BI 仪表板未自动更新
- c# - c#.net如何通过windows server 2016上托管的网页访问用户的数字证书
- r - 在神经网络和插入符号 (R) 中设置隐藏层和神经元
- javascript - 提交表单而不重新加载
- python - 有没有办法告诉用户输入错误?