简体   繁体   English

如何找到从 docker 运行的 hadoop 集群?

[英]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:参考:

Publish or expose port (-p, --expose) 发布或公开端口(-p,--expose)

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.

相关问题 在docker容器上运行hadoop集群 - Run a hadoop cluster on docker containers 如何在 Docker 桌面 Kubernetes 集群上找到主 IP? - How do I find the master IP on Docker Desktop Kubernetes Cluster? 如何从运行在同一 Kube.netes 集群中的容器连接到 Docker,它在 Kube.netes 集群中的主机虚拟机上运行? - How do I connect to Docker, running on host VMs in a Kubernetes cluster from a container running in the same Kubernetes cluster? 如何在笔记本电脑上运行多个Docker节点以模拟集群? - How can I run multiple docker nodes on my laptop to simulate a cluster? 如何防止每次启动 Docker 容器时运行我的脚本? - How do I prevent my script from being run every time a Docker container is brought up? 构建映像后,如何从.gitlab-ci.yml 运行我的 docker 映像? - How do I run my docker image from .gitlab-ci.yml after building the image? 如何配置docker容器在浏览器中运行? - How do I configure my docker container to run in the browser? 如何在我的docker容器中运行pycharm? - How do I run pycharm within my docker container? 是否有Hadoop集群的docker业务流程 - Is there docker orchestration for Hadoop cluster 如何在我的 docker 容器中运行 Postgres 查询? - How do I run a Postgres query inside my docker container?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM