./spark-shell无法正确启动(spark1.6.1-bin.hadoop2.6版本)

2023-12-08

我安装了这个spark版本:spark-1.6.1-bin-hadoop2.6.tgz。

现在当我开始火花时./spark-shell命令我遇到了这个问题(它显示了很多错误行,所以我只放了一些看起来很重要的错误行)

     Cleanup action completed
        16/03/27 00:19:35 ERROR Schema: Failed initialising database.
        Failed to create database 'metastore_db', see the next exception for details.
        org.datanucleus.exceptions.NucleusDataStoreException: Failed to create database 'metastore_db', see the next exception for details.
            at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:516)

        Caused by: java.sql.SQLException: Directory /usr/local/spark-1.6.1-bin-hadoop2.6/bin/metastore_db cannot be created.
            org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
            ... 128 more
        Caused by: ERROR XBM0H: Directory /usr/local/spark-1.6.1-bin-hadoop2.6/bin/metastore_db cannot be created.


        Nested Throwables StackTrace:
        java.sql.SQLException: Failed to create database 'metastore_db', see the next exception for details.
  org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
            ... 128 more
        Caused by: ERROR XBM0H: Directory /usr/local/spark-1.6.1-bin-hadoop2.6/bin/metastore_db cannot be created.
            at org.apache.derby.iapi.error.StandardException.newException


        Caused by: java.sql.SQLException: Directory /usr/local/spark-1.6.1-bin-hadoop2.6/bin/metastore_db cannot be created.
            at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
            at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
            at 
            ... 128 more

        <console>:16: error: not found: value sqlContext
                 import sqlContext.implicits._
                        ^
        <console>:16: error: not found: value sqlContext
                 import sqlContext.sql
                        ^

        scala> 

我尝试了一些配置来解决这个问题,我在其他有关值 sqlContext 未找到问题的问题中搜索,例如:

/etc/hosts 文件:

127.0.0.1  hadoophost localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    10.2.0.15 hadoophost

echo $HOSTNAME返回:

hadoop主机

.bashrc 文件包含:

export SPARK_LOCAL_IP=127.0.0.1

但不起作用,你能提供一些帮助来尝试理解为什么 Spark 无法正确启动吗?

hive-default.xml.模板

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!--
   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.
--><configuration>
  <!-- WARNING!!! This file is auto generated for documentation purposes ONLY! -->
  <!-- WARNING!!! Any changes you make to this file will be ignored by Hive.   -->
  <!-- WARNING!!! You must make your changes in hive-site.xml instead.         -->

在主文件夹中我遇到了同样的问题:

[hadoopadmin@hadoop home]$ pwd
/home
[hadoopadmin@hadoop home]$ 

文件夹权限:

[hadoopdadmin@hadoop spark-1.6.1-bin-hadoop2.6]$ ls -la
total 1416
drwxr-xr-x. 12 hadoop hadoop    4096 .
drwxr-xr-x. 16 root   root      4096  ..
drwxr-xr-x.  2 hadoop hadoop    4096  bin
-rw-r--r--.  1 hadoop hadoop 1343562  CHANGES.txt
drwxr-xr-x.  2 hadoop hadoop    4096  conf
drwxr-xr-x.  3 hadoop hadoop    4096  data
drwxr-xr-x.  3 hadoop hadoop    4096  ec2
drwxr-xr-x.  3 hadoop hadoop    4096  examples
drwxr-xr-x.  2 hadoop hadoop    4096  lib
-rw-r--r--.  1 hadoop hadoop   17352  LICENSE
drwxr-xr-x.  2 hadoop hadoop    4096  licenses
-rw-r--r--.  1 hadoop hadoop   23529  NOTICE
drwxr-xr-x.  6 hadoop hadoop    4096  python
drwxr-xr-x.  3 hadoop hadoop    4096  R
-rw-r--r--.  1 hadoop hadoop    3359  README.md
-rw-r--r--.  1 hadoop hadoop     120  RELEASE
drwxr-xr-x.  2 hadoop hadoop    4096  sbin

显然您没有在该目录中写入的权限,我建议您运行./spark-shell在你的HOME(您可能想将该命令添加到您的PATH),或您的用户可访问和写入的任何其他目录中。

这可能也与您相关笔记本电脑与 Spark 一起使用

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

./spark-shell无法正确启动(spark1.6.1-bin.hadoop2.6版本) 的相关文章

随机推荐

  • knit/rmarkdown/Latex:如何交叉引用图形和表格?

    我正在尝试交叉引用使用knitr rmarkdown 生成的PDF 中的图形和表格 关于 SO 和 tex stackexchange 有一些问题 here and here 例如 建议内联执行此操作的方法是添加 ref fig my fi
  • 将 _blank 添加到所有外部链接[重复]

    这个问题在这里已经有答案了 可能的重复 获取 A 元素的 href 属性 解析 href 标签中包含特定单词的所有链接 我使用以下函数将 blank 添加到我网站上的所有链接 function targetBlank text return
  • PHP 中的 curl_setopt() 中 RETURNTRANSFER 常量的用途

    我想了解 PHP 中curl 的工作细节 有什么用curl setopt ch curl returntransfer true 我搜索了很多网站但没有得到答案 那么请告诉我这个特殊的功能 为什么我们使用CURL RETURNTRANSFE
  • 重复的局部变量和变量无法解析

    我的 java 代码中出现了三个不同的错误 有什么帮助吗 错误一 重复的局部变量乘积 int product input nextInt 错误 2 productTotal 无法解析为变量 System out printf 10 2f n
  • setTimeout 存在字段更新的循环问题

    我正在尝试循环遍历计时器上的列表 当前为 1 秒 但我希望它更快 问题是当前值没有在视觉上更新 我不明白为什么 当我循环遍历时Firebug it works按预期但没有萤火虫它没有显示文本更改 它是否以某种方式跳过文本更新 我把定时器设置
  • 如何使用 xml starlet 插入实体

    我试图用包含 符号的文本替换属性值
  • iOS 中捆绑资源中的 Sqlite3

    您好 我计划从我的项目资源文件夹添加静态 SQLite3 但我不知道我是否正确执行 到目前为止 这是我的进展 创建 SQLite3 数据库SQLite 数据库浏览器 Copied Sqlite3 Database to my project
  • 经典 ASP、MySQL 或 ODBC UTF8 编码

    我有一个由 GoDaddy 托管的网站 包括后端的 MySQL 数据库 该网站是斯洛文尼亚网站 因此使用了特殊字符 该网站是用经典 ASP 构建的 我在 Notepad 中创建了所有页面 其中使用了 utf 8 编码 在每个页面的顶部 我还
  • 使用curl POST multipart/form-data 的正确方法是什么?

    我使用此语法来发布文件以及一些参数 curl v include form key1 value1 form upload localfilename URL 该文件大小约为 500K 首先 我看到发送端的内容长度为 254 之后服务器响应
  • 如何使用python下载谷歌云平台上文件夹内的文件?

    from google cloud import storage client storage Client bucket client get bucket bucket name blob bucket get blob path to
  • 可变递归预处理器宏 - 可能吗?

    我遇到了一些理论问题 在我维护的一段代码中有一组宏 例如 define MAX OF 2 a b a gt b a b define MAX OF 3 a b c MAX OF 2 MAX OF 2 a b c define MAX OF
  • 将 Yii2 应用程序部署到共享主机步骤

    我觉得奇怪的是 关于将 Yii2 应用程序部署到共享主机服务器的注意事项的详细信息如此之少 如果有的话 有人对此有一些步骤 技巧 注意事项吗 您是否遵循一个流程可以将问题 错误降至最低 数据库如何迁移 带有数据 我假设我可以导出 导入数据库
  • C# 比较两个泛型值[重复]

    这个问题在这里已经有答案了 可能的重复 运算符 不能应用于 C 中的泛型类型吗 我编写了这样的代码 public bool IsDataChanged T value1 GetValue2 T value2 GetValue1 return
  • 模块 appregistry 不是已注册的可调用模块(调用 runApplication)

    我根本找不到让反应导航工作的方法 我从互联网上复制了工作示例 但它们似乎也不起作用 有人可以告诉我我做错了什么吗 我在用着 节点 8 9 4 反应 16 3 0 alpha 1 反应本机 0 54 0 反应导航 1 4 0 index js
  • 谷歌地图折线的中间(质心?)

    我有一个折线列表 就像谷歌地图一样does当我单击折线时 我希望在我单击的位置显示一个信息窗口 并且它与此功能配合得很好 function mapsInfoWindow polyline content google maps event
  • 在最新的 Python 3 版本中实现“openssl_private_encrypt”

    我正在尝试用 Python 维护 FastSpring 电子商务平台 Secure Payload api 实现 他们的文档提供了使用 Java 和 PHP 中的私钥加密 或技术上签名 有效负载的示例 https developer fas
  • 如何在 Ruby 中将八进制数转换为十进制数?

    我试图找到一种使用八进制编号引用数组索引的干净方法 如果我正在寻找八进制 13 的数组索引 它应该返回以下值 a 11 这是我想出的方法来完成它 但它看起来不是很优雅或有效 a 50 51 52 53 54 55 56 57 58 59 6
  • 本地 WCF 服务的 ClientAccessPolicy.xml 放置在哪里?

    我正在尝试创建一个基本的 WCF 服务和 Silverlight 客户端 我已按照以下教程进行操作 http channel9 msdn com shows Endpoint Endpoint Screencasts Creating Yo
  • 如何将参数传递给 karate.call [重复]

    这个问题在这里已经有答案了 我正在将参数传递给karate call如下 getting object by name def id response content 0 id And eval if size response conte
  • ./spark-shell无法正确启动(spark1.6.1-bin.hadoop2.6版本)

    我安装了这个spark版本 spark 1 6 1 bin hadoop2 6 tgz 现在当我开始火花时 spark shell命令我遇到了这个问题 它显示了很多错误行 所以我只放了一些看起来很重要的错误行 Cleanup action