1.安装
- 下载cdh5(http://archive.cloudera.com/cdh5/cdh/5/) 中下载bin.tar到software,然后解压到应用文件夹(建议名称为app)
- 配置环境变量
2.启动与退出
1.spark 启动——进入${sparkhome} 执行 spark --master local[4]
2.spark 退出——:quit
3.错误排查
java.net.BindException: Cannot assign requested address: Service ‘sparkDriver‘ failed after 16 retries (on a random free port)! Consider explicitly setting the appropriate binding address for the service ‘sparkDriver‘ (for example spark.driver.bindAddress for SparkDriver) to the correct binding address.
1.错误原因——虚拟机复制后/etc/hosts 文件的ip未修改
2.解决方法——修改etc/hosts