Pig`无法在Docker ENV中为Hadoop集群创建DataStorage`

时间:2015-12-28 17:46:31

标签: hadoop docker apache-pig

我试图在本地计算机(OSX)中运行Pig和Hadoop来测试脚本,但我似乎无法在Docker中连接Hadoop。

我在本地设置Pig。我从https://hub.docker.com/r/sequenceiq/hadoop-docker/安装了Hadoop,并使用此命令运行计算机

docker run -it sequenceiq/hadoop-docker:2.7.0 -p 50010:50010 -p 19888:19888 /etc/bootstrap.sh -bash

我可以启动Hadoop docker。

我查看Dockerfile以查看哪些端口已曝光。 https://github.com/sequenceiq/hadoop-docker/blob/master/Dockerfile#L103

这是我的hadoop-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
  <name>hadoop.tmp.dir</name>
  <value>/tmp/hadoop-${user.name}</value>
</property>
<property>
  <name>fs.default.name</name>
  <value>hdfs://192.168.99.100:50010</value>
</property>
<property>
  <name>mapred.job.tracker</name>
  <value>hdfs://192.168.99.100:19888</value>
</property>
<property> 
  <name>dfs.replication</name>
  <value>8</value>
</property>
<property>
  <name>mapred.child.java.opts</name>
  <value>-Xmx512m</value>
</property>
</configuration>

当我运行Pig时,我收到此错误。

e.xml to override properties of core-default.xml, mapred-default.xml and hdfs-default.xml respectively
15/12/28 12:29:04 INFO pig.ExecTypeProvider: Trying ExecType : LOCAL
15/12/28 12:29:04 INFO pig.ExecTypeProvider: Trying ExecType : MAPREDUCE
15/12/28 12:29:04 INFO pig.ExecTypeProvider: Picked MAPREDUCE as the ExecType
2015-12-28 12:29:04,982 [main] INFO  org.apache.pig.Main - Apache Pig version 0.15.0 (r1682971) compiled Jun 01 2015, 11:43:55
2015-12-28 12:29:04,982 [main] INFO  org.apache.pig.Main - Logging error messages to: /Users/ncharass/opensource/pig-0.15.0/conf/pig_1451323744980.log
2015-12-28 12:29:04,995 [main] INFO  org.apache.pig.impl.util.Utils - Default bootup file /Users/ncharass/.pigbootup not found
2015-12-28 12:29:05,141 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://192.168.99.100:50010
2015-12-28 12:29:05,371 [main] ERROR org.apache.pig.Main - ERROR 2999: Unexpected internal error. Failed to create DataStorage
Details at logfile: /Users/ncharass/opensource/pig-0.15.0/conf/pig_1451323744980.log
2015-12-28 12:29:05,383 [main] INFO  org.apache.pig.Main - Pig script completed in 468 milliseconds (468 ms)

我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

Docker在OSX(和Windows)上的虚拟机中运行。

公开docker端口与VirtualBox中的转发端口不同。

您是否已在设置&gt;下的VirtualBox中转发相应的端口?网络&gt;高级&gt;转发端口?