spark安装出现的问题

安装scala, spark bin with hadoop, hadoop
安装spark一直出现错误,可能是spark配置文件的问题。

PS C:\BigData\spark-2.4.3-bin-hadoop2.7\bin> pyspark
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation

Type “help”, “copyright”, “credits” or “license” for more information.
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).
19/08/01 16:14:48 ERROR SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Invalid Spark URL: spark://[email protected]:51129
at org.apache.spark.rpc.RpcEndpointAddress . a p p l y ( R p c E n d p o i n t A d d r e s s . s c a l a : 66 ) a t o r g . a p a c h e . s p a r k . r p c . n e t t y . N e t t y R p c E n v . a s y n c S e t u p E n d p o i n t R e f B y U R I ( N e t t y R p c E n v . s c a l a : 134 ) a t o r g . a p a c h e . s p a r k . r p c . R p c E n v . s e t u p E n d p o i n t R e f B y U R I ( R p c E n v . s c a l a : 101 ) a t o r g . a p a c h e . s p a r k . r p c . R p c E n v . s e t u p E n d p o i n t R e f ( R p c E n v . s c a l a : 109 ) a t o r g . a p a c h e . s p a r k . u t i l . R p c U t i l s .apply(RpcEndpointAddress.scala:66) at org.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:134) at org.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:101) at org.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:109) at org.apache.spark.util.RpcUtils .apply(RpcEndpointAddress.scala:66)atorg.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:134)atorg.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:101)atorg.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:109)atorg.apache.spark.util.RpcUtils.makeDriverRef(RpcUtils.scala:32)
at org.apache.spark.executor.Executor.(Executor.scala:184)
at org.apache.spark.scheduler.local.LocalEndpoint.(LocalSchedulerBackend.scala:59)
at org.apache.spark.scheduler.local.LocalSchedulerBackend.start(LocalSchedulerBackend.scala:127)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:183)
at org.apache.spark.SparkContext.(SparkContext.scala:501)
at org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)
19/08/01 16:14:48 ERROR Utils: Uncaught exception in thread Thread-3
java.lang.NullPointerException
at org.apache.spark.scheduler.local.LocalSchedulerBackend.org a p a c h e apache apachespark s c h e d u l e r scheduler schedulerlocal L o c a l S c h e d u l e r B a c k e n d LocalSchedulerBackend LocalSchedulerBackend s t o p ( L o c a l S c h e d u l e r B a c k e n d . s c a l a : 162 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . l o c a l . L o c a l S c h e d u l e r B a c k e n d . s t o p ( L o c a l S c h e d u l e r B a c k e n d . s c a l a : 138 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . T a s k S c h e d u l e r I m p l . s t o p ( T a s k S c h e d u l e r I m p l . s c a l a : 653 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . D A G S c h e d u l e r . s t o p ( D A G S c h e d u l e r . s c a l a : 2042 ) a t o r g . a p a c h e . s p a r k . S p a r k C o n t e x t stop(LocalSchedulerBackend.scala:162) at org.apache.spark.scheduler.local.LocalSchedulerBackend.stop(LocalSchedulerBackend.scala:138) at org.apache.spark.scheduler.TaskSchedulerImpl.stop(TaskSchedulerImpl.scala:653) at org.apache.spark.scheduler.DAGScheduler.stop(DAGScheduler.scala:2042) at org.apache.spark.SparkContext stop(LocalSchedulerBackend.scala:162)atorg.apache.spark.scheduler.local.LocalSchedulerBackend.stop(LocalSchedulerBackend.scala:138)atorg.apache.spark.scheduler.TaskSchedulerImpl.stop(TaskSchedulerImpl.scala:653)atorg.apache.spark.scheduler.DAGScheduler.stop(DAGScheduler.scala:2042)atorg.apache.spark.SparkContext a n o n f u n anonfun anonfunstop 6. a p p l y 6.apply 6.applymcV s p ( S p a r k C o n t e x t . s c a l a : 1949 ) a t o r g . a p a c h e . s p a r k . u t i l . U t i l s sp(SparkContext.scala:1949) at org.apache.spark.util.Utils sp(SparkContext.scala:1949)atorg.apache.spark.util.Utils.tryLogNonFatalError(Utils.scala:1340)
at org.apache.spark.SparkContext.stop(SparkContext.scala:1948)
at org.apache.spark.SparkContext.(SparkContext.scala:585)
at org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)
19/08/01 16:14:48 WARN MetricsSystem: Stopping a MetricsSystem that is not running
19/08/01 16:14:48 WARN SparkContext: Another SparkContext is being constructed (or threw an exception in its constructor). This may indicate an error, since only one SparkContext may be running in this JVM (see SPARK-2243). The other SparkContext was created at:
org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:58)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
py4j.Gateway.invoke(Gateway.java:238)
py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
py4j.GatewayConnection.run(GatewayConnection.java:238)
java.lang.Thread.run(Thread.java:748)
19/08/01 16:14:48 ERROR SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Invalid Spark URL: spark://[email protected]:51150
at org.apache.spark.rpc.RpcEndpointAddress . a p p l y ( R p c E n d p o i n t A d d r e s s . s c a l a : 66 ) a t o r g . a p a c h e . s p a r k . r p c . n e t t y . N e t t y R p c E n v . a s y n c S e t u p E n d p o i n t R e f B y U R I ( N e t t y R p c E n v . s c a l a : 134 ) a t o r g . a p a c h e . s p a r k . r p c . R p c E n v . s e t u p E n d p o i n t R e f B y U R I ( R p c E n v . s c a l a : 101 ) a t o r g . a p a c h e . s p a r k . r p c . R p c E n v . s e t u p E n d p o i n t R e f ( R p c E n v . s c a l a : 109 ) a t o r g . a p a c h e . s p a r k . u t i l . R p c U t i l s .apply(RpcEndpointAddress.scala:66) at org.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:134) at org.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:101) at org.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:109) at org.apache.spark.util.RpcUtils .apply(RpcEndpointAddress.scala:66)atorg.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:134)atorg.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:101)atorg.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:109)atorg.apache.spark.util.RpcUtils.makeDriverRef(RpcUtils.scala:32)
at org.apache.spark.executor.Executor.(Executor.scala:184)
at org.apache.spark.scheduler.local.LocalEndpoint.(LocalSchedulerBackend.scala:59)
at org.apache.spark.scheduler.local.LocalSchedulerBackend.start(LocalSchedulerBackend.scala:127)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:183)
at org.apache.spark.SparkContext.(SparkContext.scala:501)
at org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)
19/08/01 16:14:48 ERROR Utils: Uncaught exception in thread Thread-3
java.lang.NullPointerException
at org.apache.spark.scheduler.local.LocalSchedulerBackend.org a p a c h e apache apachespark s c h e d u l e r scheduler schedulerlocal L o c a l S c h e d u l e r B a c k e n d LocalSchedulerBackend LocalSchedulerBackend s t o p ( L o c a l S c h e d u l e r B a c k e n d . s c a l a : 162 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . l o c a l . L o c a l S c h e d u l e r B a c k e n d . s t o p ( L o c a l S c h e d u l e r B a c k e n d . s c a l a : 138 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . T a s k S c h e d u l e r I m p l . s t o p ( T a s k S c h e d u l e r I m p l . s c a l a : 653 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . D A G S c h e d u l e r . s t o p ( D A G S c h e d u l e r . s c a l a : 2042 ) a t o r g . a p a c h e . s p a r k . S p a r k C o n t e x t stop(LocalSchedulerBackend.scala:162) at org.apache.spark.scheduler.local.LocalSchedulerBackend.stop(LocalSchedulerBackend.scala:138) at org.apache.spark.scheduler.TaskSchedulerImpl.stop(TaskSchedulerImpl.scala:653) at org.apache.spark.scheduler.DAGScheduler.stop(DAGScheduler.scala:2042) at org.apache.spark.SparkContext stop(LocalSchedulerBackend.scala:162)atorg.apache.spark.scheduler.local.LocalSchedulerBackend.stop(LocalSchedulerBackend.scala:138)atorg.apache.spark.scheduler.TaskSchedulerImpl.stop(TaskSchedulerImpl.scala:653)atorg.apache.spark.scheduler.DAGScheduler.stop(DAGScheduler.scala:2042)atorg.apache.spark.SparkContext a n o n f u n anonfun anonfunstop 6. a p p l y 6.apply 6.applymcV s p ( S p a r k C o n t e x t . s c a l a : 1949 ) a t o r g . a p a c h e . s p a r k . u t i l . U t i l s sp(SparkContext.scala:1949) at org.apache.spark.util.Utils sp(SparkContext.scala:1949)atorg.apache.spark.util.Utils.tryLogNonFatalError(Utils.scala:1340)
at org.apache.spark.SparkContext.stop(SparkContext.scala:1948)
at org.apache.spark.SparkContext.(SparkContext.scala:585)
at org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)
19/08/01 16:14:48 WARN MetricsSystem: Stopping a MetricsSystem that is not running
C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\shell.py:45: UserWarning: Failed to initialize Spark session.
warnings.warn(“Failed to initialize Spark session.”)
Traceback (most recent call last):
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\shell.py”, line 41, in
spark = SparkSession._create_shell_session()
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\sql\session.py”, line 583, in _create_shell_session
return SparkSession.builder.getOrCreate()
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\sql\session.py”, line 173, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\context.py”, line 367, in getOrCreate
SparkContext(conf=conf or SparkConf())
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\context.py”, line 136, in init
conf, jsc, profiler_cls)
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\context.py”, line 198, in _do_init
self._jsc = jsc or self._initialize_context(self._conf._jconf)
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\pyspark\context.py”, line 306, in _initialize_context
return self._jvm.JavaSparkContext(jconf)
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\lib\py4j-0.10.7-src.zip\py4j\java_gateway.py”, line 1525, in call
answer, self._gateway_client, None, self._fqn)
File “C:\BigData\spark-2.4.3-bin-hadoop2.7\python\lib\py4j-0.10.7-src.zip\py4j\protocol.py”, line 328, in get_return_value
format(target_id, “.”, name), value)
py4j.protocol.Py4JJavaError: An error occurred while calling None.org.apache.spark.api.java.JavaSparkContext.
: org.apache.spark.SparkException: Invalid Spark URL: spark://[email protected]:51150
at org.apache.spark.rpc.RpcEndpointAddress . a p p l y ( R p c E n d p o i n t A d d r e s s . s c a l a : 66 ) a t o r g . a p a c h e . s p a r k . r p c . n e t t y . N e t t y R p c E n v . a s y n c S e t u p E n d p o i n t R e f B y U R I ( N e t t y R p c E n v . s c a l a : 134 ) a t o r g . a p a c h e . s p a r k . r p c . R p c E n v . s e t u p E n d p o i n t R e f B y U R I ( R p c E n v . s c a l a : 101 ) a t o r g . a p a c h e . s p a r k . r p c . R p c E n v . s e t u p E n d p o i n t R e f ( R p c E n v . s c a l a : 109 ) a t o r g . a p a c h e . s p a r k . u t i l . R p c U t i l s .apply(RpcEndpointAddress.scala:66) at org.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:134) at org.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:101) at org.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:109) at org.apache.spark.util.RpcUtils .apply(RpcEndpointAddress.scala:66)atorg.apache.spark.rpc.netty.NettyRpcEnv.asyncSetupEndpointRefByURI(NettyRpcEnv.scala:134)atorg.apache.spark.rpc.RpcEnv.setupEndpointRefByURI(RpcEnv.scala:101)atorg.apache.spark.rpc.RpcEnv.setupEndpointRef(RpcEnv.scala:109)atorg.apache.spark.util.RpcUtils.makeDriverRef(RpcUtils.scala:32)
at org.apache.spark.executor.Executor.(Executor.scala:184)
at org.apache.spark.scheduler.local.LocalEndpoint.(LocalSchedulerBackend.scala:59)
at org.apache.spark.scheduler.local.LocalSchedulerBackend.start(LocalSchedulerBackend.scala:127)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:183)
at org.apache.spark.SparkContext.(SparkContext.scala:501)
at org.apache.spark.api.java.JavaSparkContext.(JavaSparkContext.scala:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:238)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:748)

PS C:\BigData\spark-2.4.3-bin-hadoop2.7\bin> SUCCESS: The process with PID 4320 (child process of PID 29792) has been terminated.
SUCCESS: The process with PID 29792 (child process of PID 19164) has been terminated.
SUCCESS: The process with PID 19164 (child process of PID 408) has been terminated.

你可能感兴趣的:(spark安装出现的问题)