【问题标题】:Errors in hadoop fs -cat command while writing output of text delimited table into local unix将文本分隔表的输出写入本地 unix 时 hadoop fs -cat 命令出错
【发布时间】:2020-08-13 00:53:39
【问题描述】:

我有非常大量的数据存储在一个文本分隔表中,我通过Impala 创建了它的DDL,我已经用Hive 中的数据编写了它,我想把它送到@987654325 中的local file system @ 在一个文件中。 我在HDFS 表位置路径中有多个文件,这是我使用的命令:

hadoop fs -cat '<tablelocationinHDFS>/*' > /unixlocalpathandfilename.csv

我收到 2 个错误:

  1. cat: is a directory error
    因为里面有一个impala_insert_staging目录,如何避免这个错误?
  2. cat: Unable to write to output stream

或者我是否应该使用get 命令或getmerge 命令将数据放入本地?
如何避免上述错误并成功运行命令。

【问题讨论】:

    标签: hadoop hdfs


    【解决方案1】:

    我会做以下事情

    hdfs dfs -getmerge [-nl] <localdst> /unixlocalpath
    
    -nl  Add a newline character at the end of each file.
    

    【讨论】:

    • 感谢您点击我的解决方案作为已接受的解决方案。问候
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-23
    • 1970-01-01
    • 2021-04-29
    • 1970-01-01
    • 2021-12-23
    • 1970-01-01
    相关资源
    最近更新 更多