Hive的单个文件输出

时间:2017-04-26 18:29:20

标签: hive azure-storage-blobs

我有一个使用SerDe在Azure Blob上存储文件的配置单元表。

field 1 int,
field 2 string, 
field 3 struct
ROW FORMAT SERDE 
  'org.apache.hive.hcatalog.data.JsonSerDe' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.mapred.TextInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'

当我在表中插入5000条记录时,输出包含Azure存储上的5000个blob,有没有办法将输出存储为单个blob,甚至可以减少每个记录中包含更多记录的Blob数量?

1 个答案:

答案 0 :(得分:0)

它似乎是由HiveIgnoreKeyTextOutputFormat引起的,具有用于编写HDFS文件的ignore键功能。请尝试指定其他输出格式,例如HiveBinaryOutputFormat