【发布时间】:2016-03-17 12:06:31
【问题描述】:
我正在使用 Datastax Enterprise 4.8.3。 我正在尝试实现一个基于 Quartz 的应用程序来远程提交 Spark 作业。 在我的研究过程中,我偶然发现了以下链接:
- Apache Spark Hidden REST API
- Spark feature - Provide a stable application submission gateway in standalone cluster mode
为了测试理论,我尝试在我的 2 节点集群的主节点(IP:“spark-master-ip”;直接在 shell 上)上执行以下代码 sn-p(如上面的链接 #1 中提供的) ):
curl -X POST http://spark-master-ip:6066/v1/submissions/create --header "Content-Type:application/json;charset=UTF-8" --data '{
"action" : "CreateSubmissionRequest",
"appArgs" : [ "myAppArgument1" ],
"appResource" : "file:/home/local/sparkjob.jar",
"clientSparkVersion" : "1.4.2",
"environmentVariables" : {
"SPARK_ENV_LOADED" : "1"
},
"mainClass" : "com.spark.job.Launcher",
"sparkProperties" : {
"spark.jars" : "file:/home/local/sparkjob.jar",
"spark.driver.supervise" : "false",
"spark.app.name" : "MyJob",
"spark.eventLog.enabled": "true",
"spark.submit.deployMode" : "cluster",
"spark.master" : "spark://spark-master-ip:6066"
}
}'
但是执行代码我得到一个带有以下文本的 html 响应:
This Page Cannot Be Displayed
The system cannot communicate with the external server (spark-master-ip).
The Internet server may be busy, may be permanently down, or may be unreachable because of network problems.
Please check the spelling of the Internet address entered.
If it is correct, try this request later.
If you have questions, please contact your organization's network administrator and provide the codes shown below.
Date: Fri, 11 Dec 2015 13:19:15 GMT
Username:
Source IP: spark-master-ip
URL: POST http://spark-master-ip/v1/submissions/create
Category: Uncategorized URLs
Reason: UNKNOWN
Notification: GATEWAY_TIMEOUT
【问题讨论】:
标签: rest apache-spark datastax-enterprise