我在Hive中创建了一个外部分区表。日志中显示numinputrows,这意味着查询正在工作并发送数据。但是,当我使用Beeline连接到Hive并查询select *或count(*)
时,结果总是为空。
def hiveOrcSetWriter[T](event_stream: Dataset[T])( implicit spark: SparkSession): DataStreamWriter[T] = {
import spark.implicits._
val hiveOrcSetWriter: DataStreamWriter[T] = event_stream
.writeStream
.partitionBy("year","month","day")
.format("orc")
.outputMode("append")
.option("compression", "zlib")
.option("path", _table_loc)
.option("checkpointLocation", _table_checkpoint)
hiveOrcSetWriter
}
有什么问题吗?我无法理解。