亚马逊emr-4上的tez上的running pig

db2dz4w8  于 2021-06-21  发布在  Pig
关注(0)|答案(1)|浏览(354)

我正在尝试在amazonemr4.5.0上运行pig-on-tez。配置在没有tez的情况下可以工作,我只是想让它在tez上工作。
为了创建集群(从命令行),我们使用(tez\u版本定义为0.5.2):

--bootstrap-actions Path=s3://support.elasticmapreduce/tez/bigtop/install-tez.rb,Args=[-v,$TEZ_VERSION,--tez-site,tez.lib.uris=s3://support.elasticmapreduce/tez/$TEZ_VERSION/tez-$TEZ_VERSION-minimal.tar.gz]

另外,我正在覆盖pig\u类路径:

--configurations file://pig_tez_classification.json

包含:

[
  {
    "Classification": "hadoop-env",
    "Properties": {

    },
    "Configurations": [
      {
        "Classification": "export",
        "Properties": {
          "PIG_CLASSPATH": "/etc/tez/conf"
        },
        "Configurations": [

        ]
      }
    ]
  }
]

需要pig\u类路径来防止此错误:

ERROR org.apache.pig.backend.hadoop.executionengine.tez.TezJob  - Cannot submit DAG
org.apache.tez.dag.api.TezUncheckedException: Invalid configuration of tez jars, tez.lib.uris is not defined in the configuration

需要使用tez.lib.uris覆盖来防止此错误:

ERROR org.apache.pig.backend.hadoop.executionengine.tez.TezJob (PigTezLauncher-0): Cannot submit DAG
java.io.FileNotFoundException: File does not exist: hdfs://ip-172-31-3-207.eu-west-1.compute.internal:8020/apps/tez/0.5.2/tez-0.5.2-minimal.tar.gz

安装脚本似乎将tar.gz文件写入hdfs中的正确位置,但当我随后通过ssh登录时,该文件不在那里。我认为在emr-4中,引导操作是在不同的时间运行的,所以在hdfs可用之前?
在这一切之后,我仍然得到这个错误:

WARN  org.apache.pig.backend.hadoop.executionengine.tez.TezJob  - Exception while gathering stats
java.lang.NullPointerException
    at org.apache.pig.tools.pigstats.tez.TezDAGStats.accumulateStats(TezDAGStats.java:191)
    at org.apache.pig.tools.pigstats.tez.TezPigScriptStats.accumulateStats(TezPigScriptStats.java:180)
    at org.apache.pig.backend.hadoop.executionengine.tez.TezJob.run(TezJob.java:194)
    at org.apache.pig.backend.hadoop.executionengine.tez.TezLauncher$1.run(TezLauncher.java:167)

尝试tez版本0.8.2会产生:

ERROR org.apache.pig.backend.hadoop.executionengine.tez.TezJob  - Cannot submit DAG
org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown

这似乎是由于使用过的tez版本的不同,因为它仍然打印出:

INFO  org.apache.pig.tools.pigstats.tez.TezPigScriptStats  - Script Statistics:

       HadoopVersion: 2.7.2-amzn-0                                                                                        
          PigVersion: 0.14.0-amzn-0                                                                                       
          TezVersion: 0.5.2                                                                                               
              UserId: hadoop

那么,有人知道如何在亚马逊emr(无论什么版本)上运行pig on tez吗?

ee7vknir

ee7vknir1#

我正在用emr-4.4.0成功运行它。但是,我无法让pig正确使用上传到hdfs的tar.gz。相反,我必须解压缩tarball并上传所有单独的文件,然后将tez.lib.uris设置为hdfs:///apps/tez-0.8.2,hdfs:///apps/tez-0.8.2/lib

相关问题