如何在Jar类中(在Scala中定义多个主要方法,并从Azure数据工厂调用它?

问题描述 投票:0回答:1

我正在寻找创建Jar文件类,该文件类包含多个主类方法(在Scala中),以便Azure数据工厂活动可以调用jar活动。 Azure数据工厂需要主类名称和参数。

关于拉贾尼什

scala azure jar azure-data-factory azure-data-factory-2
1个回答
0
投票

在Azure数据工厂中,Jar文件在清单中只能包含一个Main-Class属性,这意味着jar只能包含一个mainClassName。

enter image description here

这是Databricks Jar活动的示例JSON定义:

{
    "name": "ADB-Jar-Activity",
    "properties": {
        "activities": [
            {
                "name": "Jar1",
                "type": "DatabricksSparkJar",
                "dependsOn": [],
                "policy": {
                    "timeout": "7.00:00:00",
                    "retry": 0,
                    "retryIntervalInSeconds": 30,
                    "secureOutput": false,
                    "secureInput": false
                },
                "userProperties": [],
                "typeProperties": {
                    "mainClassName": "org.apache.spark.examples.SparkPi",
                    "parameters": [
                        "10",
                        "20"
                    ],
                    "libraries": [
                        {
                            "jar": "dbfs:/docs/sparkpi.jar"
                        }
                    ]
                },
                "linkedServiceName": {
                    "referenceName": "ADB",
                    "type": "LinkedServiceReference"
                }
            }
        ],
        "annotations": []
    }
}

参考: Transform data by running a Jar activity in Azure Databricks

© www.soinside.com 2019 - 2024. All rights reserved.