macos - 在 mac os 中在 hive 中创建表时出现错误 localhost:9000 连接失败
问题描述
hive> 如果不存在则创建架构 inconv_seql; 失败:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。MetaException(message:Got exception: java.net.ConnectException Call From User-MacBook-Air.local/127.0.0.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection denied; 有关详细信息,请参阅: http: //wiki.apache.org/hadoop/ConnectionRefused )
解决方案
localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused;
上述错误是由于带有端口9000
的 hadoop 恶魔未在您的本地计算机上运行,
请按照以下步骤启动 hadoop,然后启动 hive。
1.检查hadoop是否运行,
hduser@ubuntu:~$ jps
如果您找不到在本地运行的任何 hadoop 守护进程,请按照以下命令启动 hadoop,
hduser@ubuntu:~$ $HADOOP_HOME/sbin/start-all.sh
2.检查hive-site.xml,core-site.xml hive-site.xml
<property>
<name>hive.metastore.db.type</name>
<value>DERBY</value>
<description> Expects one of [derby, oracle, mysql, mssql, postgres]. Type of database used by the metastore. Information schema & JDBCStorageHandler depend on it. </description>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>hdfs://localhost:8020/user/hive/warehouse</value>
<description>location of default database for the warehouse</description> </property>
核心站点.xml
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/usr/local/Cellar/hadoop/hdfs/tmp</value>
<description>A base for other temporary directories</description>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
</property>
</configuration>
并尝试启动 hive 终端并继续。
推荐阅读
- network-programming - 是什么使 udp socker 服务器或客户端
- php - 到达特定标签名称时如何在php中打破'foreach'?
- python - 在某个索引后用零填充火炬张量
- swiftui - SwiftUI 从核心数据中列出 Set
- c# - 在 .NET Core React 应用程序中格式化 DateTime
- python-3.x - 无法识别包管理器的填充选项
- database - 在线性 nvme RAID (RAID 0) 上优化只读工作负载 [for Clickhouse]
- powershell - 通过 Powershell 更改 IIS 的默认目录和默认 html 页面
- reactjs - AspNetBoilerplate REACT 模板 - npm 启动后出错
- amazon-workspaces - 更改计算机名称后工作区不正常