【发布时间】:2018-10-06 19:45:02
【问题描述】:
尝试在 Ubuntu 16.04 中创建从 sql server 2017 到 Hadoop 的外部表时,会引发以下错误
消息 105019,第 16 级,状态 1,第 1 行 由于内部错误,EXTERNAL TABLE 访问失败:“调用 HdfsBridge_IsDirExist 时引发 Java 异常。 Java 异常消息: 从 DESKTOP-VE8KNAG/xxx.xxx.x.xxx 调用到 xxx.xxx.x.x:54310 连接异常失败:java.net.ConnectException:连接被拒绝:没有更多信息;有关详细信息,请参阅:http://wiki.apache.org/hadoop/ConnectionRefused:错误 [从 DESKTOP-VE8KNAG/1xxx.xxx.x.xxx 调用到 xxx.xxx.x.x:54310 连接异常失败:java.net.ConnectException:连接被拒绝:没有更多信息;有关详细信息,请参阅:http://wiki.apache.org/hadoop/ConnectionRefused] 访问外部文件时发生。'
- 从 core-site.xml 获取外部源位置
- tmp文件夹被创建并添加权限给用户并添加到core-site.xml中
- 所有节点都在 Hadoop 中运行 10625 数据节点 10869 次要名称节点 17113 资源管理器 17434 节点管理器 10490 名称节点 21566 日/秒
sql查询
create EXTERNAL DATA SOURCE [HDP2]
WITH (TYPE = HADOOP,
LOCATION = N'hdfs://xxx.xxx.x.x:54310',
CREDENTIAL = [HDPUser])
GO
create EXTERNAL TABLE [dbo].CLASS_DIM_EXP (
[CLASS_ID] [varchar](8) NOT NULL,
[CLASS_DESC] [varchar](100) NULL,
[INSERT_DATE] [datetime2](7) NOT NULL,
[LAST_UPDATE_DATETIME] [datetime2](7) NOT NULL)
WITH (LOCATION='/user/pdw_user',
DATA_SOURCE = HDP2,
FILE_FORMAT = TSV,
REJECT_TYPE = VALUE,
REJECT_VALUE = 0);
核心站点.xml
<property>
<name>hadoop.tmp.dir</name>
<value>/app/hadoop/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
<description>The name of the default file system. A URI whose
scheme and authority determine the FileSystem implementation. The
uri's scheme determines the config property (fs.SCHEME.impl) naming
the FileSystem implementation class. The uri's authority is used to
determine the host, port, etc. for a filesystem.</description>
</property>
有什么需要改变的吗?
【问题讨论】:
标签: sql sql-server tsql hadoop polybase