【问题标题】:pyhive, Cannot initialize Cluster. Please check your configurationpyhive,无法初始化集群。请检查您的配置
【发布时间】:2022-01-07 18:50:29
【问题描述】:

我在我的程序中使用 pyhive 和 dolphinscheduler,它在开发环境中运行良好,但在生产环境中有时会失败,有时会成功。不知道为什么?

示例代码

from pyhive import hive
conn = hive.Connection(host="cdh1", port=10000, username="root")
cursor = conn.cursor()
cursor.execute("""
set hive.exec.dynamic.partition.mode=nonstrict
""")
cursor.execute("""
INSERT INTO TABLE table_name
SELECT ...
""")
cursor.close()
conn.close()    

软件版本

CDH6.3  
hive version 2.1.1  
hadoop version 3.0.0

/tmp/hive/XXX 日志

ERROR [main]  hadoop.ParquetRecordReader: Can not initialize counter due to context is not a instance of TaskInputOutputContext, but is org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl

【问题讨论】:

    标签: hive pyhive apache-dolphinscheduler


    【解决方案1】:

    也许,你必须确保你的 CDH 集群是健康的

    【讨论】:

      猜你喜欢
      • 2016-01-05
      • 2013-10-03
      • 2020-12-07
      • 2020-05-31
      • 1970-01-01
      • 1970-01-01
      • 2020-11-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多