本地啟動spark-shell

來源:互聯網
上載者:User

標籤:

由於spark-1.3作為一個裡程碑式的發布, 加入眾多的功能特性,所以,有必要好好的研究一把,spark-1.3需要scala-2.10.x的版本支援,而系統上預設的scala的版本為2.9,需要進行升級, 可以參考ubuntu 安裝 2.10.x版本的scala. 配置好scala的環境後,下載spark的cdh版本, 點我下載.

  下載好後,直接解壓,然後在bin目錄直接運行./spark-shell 即可:

 

日誌如下:

[email protected]:~/spark-evn/spark-1.3.0-bin-cdh4/bin$ ./spark-shell Spark assembly has been built with Hive, including Datanucleus jars on classpathlog4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.Using Spark‘s default log4j profile: org/apache/spark/log4j-defaults.properties15/04/14 00:03:30 INFO SecurityManager: Changing view acls to: zhangchao315/04/14 00:03:30 INFO SecurityManager: Changing modify acls to: zhangchao315/04/14 00:03:30 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(zhangchao3); users with modify permissions: Set(zhangchao3)15/04/14 00:03:30 INFO HttpServer: Starting HTTP Server15/04/14 00:03:30 INFO Server: jetty-8.y.z-SNAPSHOT15/04/14 00:03:30 INFO AbstractConnector: Started [email protected]0.0.0.0:4591815/04/14 00:03:30 INFO Utils: Successfully started service ‘HTTP class server‘ on port 45918.Welcome to      ____              __     / __/__  ___ _____/ /__    _\ \/ _ \/ _ `/ __/  ‘_/   /___/ .__/\_,_/_/ /_/\_\   version 1.3.0      /_/Using Scala version 2.10.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_75)Type in expressions to have them evaluated.Type :help for more information.15/04/14 00:03:33 WARN Utils: Your hostname, hadoop01 resolves to a loopback address: 127.0.1.1; using 172.18.147.71 instead (on interface em1)15/04/14 00:03:33 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address15/04/14 00:03:33 INFO SparkContext: Running Spark version 1.3.015/04/14 00:03:33 INFO SecurityManager: Changing view acls to: zhangchao315/04/14 00:03:33 INFO SecurityManager: Changing modify acls to: zhangchao315/04/14 00:03:33 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(zhangchao3); users with modify permissions: Set(zhangchao3)15/04/14 00:03:33 INFO Slf4jLogger: Slf4jLogger started15/04/14 00:03:33 INFO Remoting: Starting remoting15/04/14 00:03:33 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://[email protected]:51629]15/04/14 00:03:33 INFO Utils: Successfully started service ‘sparkDriver‘ on port 51629.15/04/14 00:03:33 INFO SparkEnv: Registering MapOutputTracker15/04/14 00:03:33 INFO SparkEnv: Registering BlockManagerMaster15/04/14 00:03:33 INFO DiskBlockManager: Created local directory at /tmp/spark-d398c8f3-6345-41f9-a712-36cad4a45e67/blockmgr-255070a6-19a9-49a5-a117-e4e8733c250a15/04/14 00:03:33 INFO MemoryStore: MemoryStore started with capacity 265.4 MB15/04/14 00:03:33 INFO HttpFileServer: HTTP File server directory is /tmp/spark-296eb142-92fc-46e9-bea8-f6065aa8f49d/httpd-4d6e4295-dd96-48bc-84b8-c26815a9364f15/04/14 00:03:33 INFO HttpServer: Starting HTTP Server15/04/14 00:03:33 INFO Server: jetty-8.y.z-SNAPSHOT15/04/14 00:03:33 INFO AbstractConnector: Started [email protected]0.0.0.0:5652915/04/14 00:03:33 INFO Utils: Successfully started service ‘HTTP file server‘ on port 56529.15/04/14 00:03:33 INFO SparkEnv: Registering OutputCommitCoordinator15/04/14 00:03:33 INFO Server: jetty-8.y.z-SNAPSHOT15/04/14 00:03:33 INFO AbstractConnector: Started [email protected]0.0.0.0:404015/04/14 00:03:33 INFO Utils: Successfully started service ‘SparkUI‘ on port 4040.15/04/14 00:03:33 INFO SparkUI: Started SparkUI at http://172.18.147.71:404015/04/14 00:03:33 INFO Executor: Starting executor ID <driver> on host localhost15/04/14 00:03:33 INFO Executor: Using REPL class URI: http://172.18.147.71:4591815/04/14 00:03:33 INFO AkkaUtils: Connecting to HeartbeatReceiver: akka.tcp://[email protected]:51629/user/HeartbeatReceiver15/04/14 00:03:33 INFO NettyBlockTransferService: Server created on 5542915/04/14 00:03:33 INFO BlockManagerMaster: Trying to register BlockManager15/04/14 00:03:33 INFO BlockManagerMasterActor: Registering block manager localhost:55429 with 265.4 MB RAM, BlockManagerId(<driver>, localhost, 55429)15/04/14 00:03:33 INFO BlockManagerMaster: Registered BlockManager15/04/14 00:03:34 INFO SparkILoop: Created spark context..Spark context available as sc.15/04/14 00:03:34 INFO SparkILoop: Created sql context (with Hive support)..SQL context available as sqlContext.scala>

http://172.18.147.71:4040/jobs/ ,可以看到spark運行情況:

本地啟動spark-shell

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.