【发布时间】:2017-10-10 23:06:18
【问题描述】:
我的基础数据是使用 HIVE 输出格式 (org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat) 编写的
尝试使用本机 Java Map reduce 读取此数据
byte[] b = value.getBinary(value.getType().getFieldIndex(field), 0).getBytes();
HiveDecimal hd = HiveDecimal.create(b, true);
这里的值是org.apache.parquet.example.data.Group type hd 在这种情况下变成NULL。
但下面的字符串/int 类型工作得很好。
value.getValueToString(value.getType().getFieldIndex(field), 0);
【问题讨论】:
-
请编辑您的问题以更清楚地提出问题。
标签: java hadoop hive mapreduce parquet