【问题标题】:Number of partitions scanned(=32767) exceeds limit扫描的分区数 (=32767) 超出限制
【发布时间】:2018-04-16 11:59:01
【问题描述】:

我正在尝试使用 Eel-sdk 将数据流式传输到 Hive。

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 个项目时,为什么需要这么多分区?我只需要一个分区。

标签: hadoop hive partition


【解决方案1】:

Spark + Hive : Number of partitions scanned exceeds limit (=4000)

--conf "spark.sql.hive.convertMetastoreOrc=false"
--conf "spark.sql.hive.metastorePartitionPruning=false"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-09
    • 1970-01-01
    • 1970-01-01
    • 2018-09-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-19
    相关资源
    最近更新 更多