关注 spark技术分享,
撸spark源码 玩spark最佳实践

Spark Tips and Tricks

Spark Tips and Tricks

Print Launch Command of Spark Scripts

SPARK_PRINT_LAUNCH_COMMAND environment variable controls whether the Spark launch command is printed out to the standard error output, i.e. System.err, or not.

All the Spark shell scripts use org.apache.spark.launcher.Main class internally that checks SPARK_PRINT_LAUNCH_COMMAND and when set (to any value) will print out the entire command line to launch it.

Show Spark version in Spark shell

In spark-shell, use sc.version or org.apache.spark.SPARK_VERSION to know the Spark version:

Resolving local host name

When you face networking issues when Spark can’t resolve your local hostname or IP address, use the preferred SPARK_LOCAL_HOSTNAME environment variable as the custom host name or SPARK_LOCAL_IP as the custom IP that is going to be later resolved to a hostname.

You may see the following WARN messages in the logs when Spark finished the resolving process:

Starting standalone Master and workers on Windows 7

Windows 7 users can use spark-class to start Spark Standalone as there are no launch scripts for the Windows platform.

赞(0) 打赏
未经允许不得转载:spark技术分享 » Spark Tips and Tricks
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏