nifi puthive3streaming-写入分区表

czfnxgou  于 2021-06-27  发布在  Hive
关注(0)|答案(1)|浏览(403)

我正在使用nifi1.7.1来写入分区的配置单元表。虽然数据流传输成功,但我在配置单元元存储日志中看到了几条消息:

2018-10-29T17:09:40,682 ERROR [pool-10-thread-198]: metastore.RetryingHMSHandler (RetryingHMSHandler.java:invokeInternal(201)) - AlreadyExistsException(message:Partition already exists: Partition(values:[2018, 3, 28], dbName:default, tableName:myTable, createTime:0, lastAccessTime:0, sd:StorageDescriptor(cols:[FieldSchema(name:type, type:string, comment:null), FieldSchema(name:id, type:string, comment:null), FieldSchema(name:referenced_event_id, type:string, comment:null), FieldSchema(name:happened, type:string, comment:null), FieldSchema(name:processed, type:string, comment:null), FieldSchema(name:tracking_id, type:string, comment:null), FieldSchema(name:source_attributes, type:struct<id:string,origin:string,data:map<string,string>,external_data:map<string,string>>, comment:null), FieldSchema(name:event_data, type:struct<service:struct<name:string,version:string>,result:struct<mno:string,mvno:string,mcc:string,mnc:string,country:string>>, comment:null)], location:hdfs://node-master:8020/user/hive/warehouse/myTable/year=2018/month=3/day=28, inputFormat:org.apache.hadoop.hive.ql.io.orc.OrcInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat, compressed:false, numBuckets:6, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.ql.io.orc.OrcSerde, parameters:{serialization.format=1}), bucketCols:[tracking_id], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), parameters:null, catName:hive))

我试过:

"hive3-stream-part-vals": "${year},${month},${day}",
"hive3-stream-autocreate-partition": "false",

还有

"hive3-stream-autocreate-partition": "true",

有没有人清楚地知道为什么要记录这些错误?

6rqinv9w

6rqinv9w1#

我想你遇到了https://issues.apache.org/jira/browse/hive-18931. 处理器的最大并发任务属性的设置是什么?如果它大于1,你能试着把它设置为1,看看你是否仍然收到消息吗?如果为1,是否有多个客户机(nifi、beeline等)试图同时写入该表?

相关问题