Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache spark 无法启动。/spark shell_Apache Spark_Apache Spark Sql_Ubuntu 16.04 - Fatal编程技术网

Apache spark 无法启动。/spark shell

Apache spark 无法启动。/spark shell,apache-spark,apache-spark-sql,ubuntu-16.04,Apache Spark,Apache Spark Sql,Ubuntu 16.04,我是spark的新手,正在尝试在我的ubuntu机器上安装spark,并且 当我试图启动spark-shell时,我面临以下错误 请帮忙 Caused by: org.apache.derby.iapi.error.StandardException: Directory /home/amar/spark-2.2.0-bin-hadoop2.7/bin/metastore_db cannot be created. at org.apache.derby.iapi.error.Standa

我是spark的新手,正在尝试在我的ubuntu机器上安装spark,并且 当我试图启动spark-shell时,我面临以下错误
请帮忙

Caused by: org.apache.derby.iapi.error.StandardException: Directory    /home/amar/spark-2.2.0-bin-hadoop2.7/bin/metastore_db cannot be created.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at    org.apache.derby.impl.services.monitor.StorageFactoryService$10.run(Unknown  Source)
at java.security.AccessController.doPrivileged(Native Method)
at  org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(Unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection$5.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.jdbc.EmbedConnection.createPersistentService(Unknown Source)
... 149 more
<console>:14: error: not found: value spark
   import spark.implicits._
          ^
<console>:14: error: not found: value spark
   import spark.sql
          ^
Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  '_/
   /___/ .__/\_,_/_/ /_/\_\   version 2.2.0
    /_/

Using Scala version 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_131)
Type in expressions to have them evaluated.
Type :help for more information.
原因:org.apache.derby.iapi.error.StandardException:无法创建目录/home/amar/spark-2.2.0-bin-hadoop2.7/bin/metastore_db。
位于org.apache.derby.iapi.error.StandardException.newException(未知源)
位于org.apache.derby.iapi.error.StandardException.newException(未知源)
位于org.apache.derby.impl.services.monitor.StorageFactoryService$10.run(未知来源)
位于java.security.AccessController.doPrivileged(本机方法)
位于org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot(未知源)
位于org.apache.derby.impl.services.monitor.BaseMonitor.bootService(未知源)
位于org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(未知源)
位于org.apache.derby.impl.services.monitor.FileMonitor.createPersistentService(未知源)
位于org.apache.derby.iapi.services.monitor.monitor.createPersistentService(未知源)
位于org.apache.derby.impl.jdbc.EmbedConnection$5.run(未知源代码)
位于java.security.AccessController.doPrivileged(本机方法)
位于org.apache.derby.impl.jdbc.EmbedConnection.createPersistentService(未知源)
... 149多
:14:错误:未找到:值火花
导入spark.implicits_
^
:14:错误:未找到:值火花
导入spark.sql
^
欢迎来到
____              __
/ __/__  ___ _____/ /__
_\ \/ _ \/ _ `/ __/  '_/
/___/.版本2.2.0
/_/
使用Scala版本2.11.8(OpenJDK 64位服务器虚拟机,Java 1.8.0131)
键入要计算的表达式。
键入:有关详细信息的帮助。

在我的案例中,问题在于权限。我试图以非管理员用户的身份启动spark。
一旦我开始成为root,一切都很顺利。然而,我不推荐这样的行为。只需指向检查权限并相应地设置它。以root用户身份运行是一种糟糕的做法

您的蜂巢元存储存在问题如何使用./sparkshell启动
sparkshell