[英]How do I find my hadoop cluster run from docker?
I am trying to do an experiment to test different runtimes of algorithms using Hadoop with 3 nodes and pig installed.我正在尝试使用安装了 3 个节点和 pig 的 Hadoop 来测试算法的不同运行时。 I found a docker image (fluddeni/hadoop-pig) that meets these needs and seemingly is running when checked with docker ps
, but I can't find it on any of my ports.我找到了一个满足这些需求的 docker 映像(fluddeni/hadoop-pig),并且在使用docker ps
检查时似乎正在运行,但我在我的任何端口上都找不到它。 I am running my code on Windows and when I check where other docker images run (the docker-machine ip) on the port 9000, as indicated in my core-site.xml file I am getting no page found.我在 Windows 上运行我的代码,当我检查其他 docker 图像在端口 9000 上运行的位置(码头机器 ip)时,如我的核心站点所示。 Any ideas on where to find the master page for hadoop?关于在哪里可以找到 hadoop 的母版页的任何想法? Let me know if you need any more information!如果您需要更多信息,请告诉我!
Resources:资源:
/usr/local/hadoop/etc/hadoop/core-site.xml /usr/local/hadoop/etc/hadoop/core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://3b85d55c5080:9000</value>
</property>
</configuration>
command docker ps
命令docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3b85d55c5080 fluddeni/hadoop-pig "/etc/bootstrap.sh -…" 19 hours ago Up 2 seconds 2122/tcp, 8020/tcp, 8030-8033/tcp, 8040/tcp, 8042/tcp, 8088/tcp, 9000/tcp, 10020/tcp, 19888/tcp, 49707/tcp, 50010/tcp, 50020/tcp, 50070/tcp, 50075/tcp, 50090/tcp boring_ptolemy
did you expose the port as you expect?您是否按预期公开了端口?
docker run -p 9000:9000 <rest image details>
reference:参考:
While port forwarding is one problem, another is the fact that that container ID is not consistent.虽然端口转发是一个问题,但另一个问题是容器 ID 不一致。 You should use Docker service DNS names您应该使用 Docker 服务 DNS 名称
Ideally, using Compose network bridges.理想情况下,使用 Compose网桥。
Then you would always refer to hdfs://namenode:9000
, for example然后你总是会参考hdfs://namenode:9000
,例如
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.