# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #
# # Shell script for starting the Spark Shell REPL
cygwin=false case "$(uname)" in CYGWIN*) cygwin=true;; esac
# Enter posix mode for bash set -o posix
if [ -z "${SPARK_HOME}" ]; then source "$(dirname "$0")"/find-spark-home fi
[hadoop@hadoop001 spark-3.2.0-bin-custom-spark]$ vi ~/.bash_profile [hadoop@hadoop001 spark-3.2.0-bin-custom-spark]$ source ~/.bash_profile [hadoop@hadoop001 spark-3.2.0-bin-custom-spark]$ echo $SPARK_HOME /home/hadoop/app/spark [hadoop@hadoop001 spark-3.2.0-bin-custom-spark]$ exit logout [root@hadoop001 ~]# su - hadoop [hadoop@hadoop001 ~]$ echo $SPARK_HOME [hadoop@hadoop001 ~]$ source/spark-3.2.0-bin-custom-spark/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). For SparkR, use setLogLevel(newLevel). 22/01/21 19:51:27 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Spark context Web UI available at http://hadoop001:4040 Spark context available as 'sc' (master = local[*], app id = local-1642794689485). Spark session available as 'spark'. Welcome to new Spark ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 3.2.0 /_/ Using Scala version 2.12.14 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45) Type in expressions to have them evaluated. Type :help for more information.