Hadoop 扫描的分区数(=32767)超过限制

Hadoop 扫描的分区数(=32767)超过限制,hadoop,hive,partition,Hadoop,Hive,Partition,我正在尝试使用Eel sdk将数据流传输到配置单元中 val sink = HiveSink(testDBName, testTableName) .withPartitionStrategy(new DynamicPartitionStrategy) val hiveOps:HiveOps = ... val schema = new StructType(Vector(Field("name", StringType),Field("pk", StringType),Field("pk1"

我正在尝试使用Eel sdk将数据流传输到配置单元中

val sink = HiveSink(testDBName, testTableName)
.withPartitionStrategy(new DynamicPartitionStrategy)

val hiveOps:HiveOps = ...
val schema = new StructType(Vector(Field("name", StringType),Field("pk", StringType),Field("pk1",a StringType)))

hiveOps.createTable( 
  testDBName,
  testTableName,
  schema,
  partitionKeys = Seq("pk", "pk1"),
  dialect = ParquetHiveDialect(),
  tableType = TableType.EXTERNAL_TABLE,
  overwrite = true
)
val items = Seq.tabulate(100)(i => TestData(i.toString, "42", "apple"))
val ds = DataStream(items)
ds.to(sink)
获取错误:扫描的分区数(=32767)超过限制(=10000)。 32767是2的幂……但仍然无法找出它到底出了什么问题。有什么想法吗?


您为
hive.limit.query.max.table.partition
设置了什么?问题是……当我用相同的分区键编写100个项目时,为什么需要这么多分区?我只需要一个分区。
--conf "spark.sql.hive.convertMetastoreOrc=false"
--conf "spark.sql.hive.metastorePartitionPruning=false"