2016-11-18 27 views
3

我试图使用parquet-tools.jar(https://github.com/Parquet/parquet-mr/tree/master/parquet-tools)从实木复合地板文件打印一列。 我使用这个命令:运行拼花地板工具jar无效的参数

java -jar parquet-tools-1.6.1-SNAPSHOT.jar dump -c COLUMNNAME someParquet.parquet

,但我得到:

Invalid arguments: missing required arguments 

usage: parquet-dump [option...] <input> 
where option is one of: 
    -c,--column <arg> Dump only the given column, can be specified more than 
         once 
    -d,--disable-data Do not dump column data 
     --debug   Enable debug output 
    -h,--help   Show this help string 
    -m,--disable-meta Do not dump row group and page metadata 
     --no-color  Disable color output even if supported 
where <input> is the parquet file to print to stdout 

不知道在那里我得到的语法错误。

+0

也许你想使用这些脚本https://github.com/wesleypeck/parquet-tools/tree/master/src/main/scripts - 应该给你的帮助页面提出的语法 –

+1

我想你获得正确的语法。这似乎是Apache CLI库中的一个错误,或者是拼花板工具使用它的方式。 – Zoltan

+0

我同意,看起来像apache cli用法的问题。尝试使用' - 列NAME',' - 列= NAME'等 – borowis

回答

2

选项-c, - 列认为您已指定多个列作为“dump”commnad的参数,并最终以吃掉所有参数结束。因此你会看到缺少的需求参数例外。

一种解决方法,我可以建议你需要在-c选项后添加一个附加选项。这将使CLI解析器停止使用-c选项的意外参数。

下面的命令(加--debug选项),你应该能够执行程序:

java -jar parquet-tools-1.6.1-SNAPSHOT.jar dump -c COLUMNNAME --debug someParquet.parquet 

您可以尝试--no色,而不是--debug了。

希望这会有所帮助。