亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

導入錯誤 Python Hive UDF

導入錯誤 Python Hive UDF

江戶川亂折騰 2021-08-02 05:32:12
我想將一些常量放在一個 Python 文件中,然后將其導入到另一個文件中。我創建了兩個文件,一個帶有常量,一個導入它,一切都在本地運行良好:常量.py:CONST = "hi guy"test_constants.py:from constants import CONSTimport sysfor line in sys.stdin:    print(CONST)本地測試:$ echo "dummy" | python test_constants.pyhi guy使用 Hive (beeline) 進行測試:hive> add file hdfs://path/.../test_constants.py;No rows affected (0.191 seconds)hive> add file hdfs://path/.../constants.py;No rows affected (0.049 seconds)hive> list files;resource/tmp/bb09f878-7e36-4aa2-8566-a30950072bcb_resources/test_constants.py/tmp/bb09f878-7e36-4aa2-8566-a30950072bcb_resources/constants.py2 rows selected (0.179 seconds)hive> with t as (select 1 as dummy)   select transform (dummy)   using 'python test_constants.py'   as dummy_out   from t;Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_1535407036047_170618_1_00, diagnostics=[Task failed, taskId=task_1535407036047_170618_1_00_000000, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_1535407036047_170618_1_00_000000_0:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 297 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號