- Apache Spark 2.x for Java Developers
- Sourav Gulati Sumit Kumar
- 264字
- 2021-07-02 19:02:00
Spark REPL also known as CLI
In Chapter 1, Introduction to Spark, we learnt that one of the advantages of Apache Spark over the MapReduce framework is interactive processing. Apache Spark achieves the same using Spark REPL.
Spark REPL or Spark shell, also known as Spark CLI, is a very useful tool for exploring the Spark programming. REPL is an acronym for Read-Evaluate-Print Loop. It is an interactive shell used by programmers to interact with a framework. Apache Spark also comes with REPL that beginners can use to understand the Spark programming model.
To launch the Spark REPL, we will execute the command that we executed in the previous section:
$SPARK_HOME/bin/spark-shell
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel).
16/11/01 16:38:43 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/11/01 16:38:43 WARN Utils: Your hostname, dlla1424 resolves to a loopback address: 127.0.0.1; using 192.168.0.15 instead (on interface wlp1s0)
16/11/01 16:38:43 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
16/11/01 16:38:45 WARN SparkContext: Use an existing SparkContext, some configuration may not take effect.
Spark context Web UI available at http://192.168.0.15:4040
Spark context available as 'sc' (master = local[*], app id = local-1477998525363).
Spark session available as 'spark'.
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 2.1.1.
/_/
Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_101)
Type in expressions to have them evaluated.
Type :help for more information.
scala>
推薦閱讀
- Flutter開發(fā)實(shí)戰(zhàn)詳解
- Rust編程:入門、實(shí)戰(zhàn)與進(jìn)階
- Learning Informatica PowerCenter 10.x(Second Edition)
- 鋒利的SQL(第2版)
- 編程數(shù)學(xué)
- 從Excel到Python:用Python輕松處理Excel數(shù)據(jù)(第2版)
- 快人一步:系統(tǒng)性能提高之道
- Raspberry Pi Home Automation with Arduino(Second Edition)
- Visual C++開發(fā)入行真功夫
- 51單片機(jī)C語言開發(fā)教程
- Java面向?qū)ο蟪绦蛟O(shè)計(jì)
- 輕松上手2D游戲開發(fā):Unity入門
- PHP編程基礎(chǔ)與實(shí)踐教程
- 算法圖解
- Java Web開發(fā)教程:基于Struts2+Hibernate+Spring