command-runner.jar和script-runner.jar在AWS EMR中的作用是什么?

huangapple go评论47阅读模式
英文:

Role of command-runner.jar and script-runner.jar in aws emr

问题

在执行 EMR 集群中的 Spark 作业时,我们将步骤添加为

'HadoopJarStep': {
    'Args': [
        'spark-submit',
        's3://spark-test-bucket-pr/spark_job/spark_job_3.py'
    ],
    'Jar': 'command-runner.jar'
}

想要了解 'command-runner.jar' 文件在这里的作用。因为在本地 Hadoop 集群中运行 Spark 作业时,我们不使用这样的 JAR 文件。此外,在 EMR 中执行 shell 脚本时,我们使用 'script-runner.jar' 文件。所以,有人可以让我理解这两个 JAR 文件的作用,以及为什么我们需要它们来执行 EMR 集群中的 Spark 作业吗?

英文:

When we execute a spark job in emr cluster,we add step as

'HadoopJarStep': {
                'Args': [
                    'spark-submit',
                    's3://spark-test-bucket-pr/spark_job/spark_job_3.py'
                ],
                'Jar': 'command-runner.jar'
            }

Want to understand what is the role of 'command-runner.jar' file here. Because when we run spark job in on-premise hadoop cluster we dont use any such jar.
Also to execute shell script in emr we use script-runner.jar file.
So anyone can make me understand the role of these two jars and why we need them to execuute spark jobs in EMR cluster?

答案1

得分: 1

以下是AWS提供的辅助jar文件。当你在本地运行时,你直接与Hadoop集群通信。但是在AWS EMR中,你会有一个额外的AWS特定接口层。

你可以使用script-runnercommand-runner运行相同的EMR作业。据我所知,使用command-runner,你也可以指定一个包含你的业务逻辑的自定义jar文件。

更多详细信息和示例请参考这里:https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-commandrunner.html#emr-commandrunner-examples

英文:

These are helper jar files provided by AWS. When you run on-premise, you are directly talking to the hadoop cluster. But with AWS EMR, you have an extra layer of AWS specific interfaces.

You can run the same EMR job with either of the script-runner or command-runner. AFAIK, with command-runner you could also specify a custom jar file that has your business logic.

More details with examples here: https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-commandrunner.html#emr-commandrunner-examples

huangapple
  • 本文由 发表于 2023年5月17日 21:27:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76272643.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定