当前位置: 首页 > 知识库问答 >
问题:

对HDFS的色调访问:绕过默认色调。伊尼?

梁丘高朗
2023-03-14

我正试图用bde2020提供的图像构建一个轻量级的最小hadoop堆栈(学习目的)。现在,堆栈包括(除其他外)

  • 名称节点

基本上,我从大数据欧洲官方docker撰写开始,并根据他们的留档添加了色调图像

色调的文件浏览器无法访问HDFS:

Cannot access: /user/dav. The HDFS REST service is not available. Note: you are a Hue admin but not a HDFS superuser, "hdfs" or part of HDFS supergroup, "supergroup".

HTTPConnectionPool(host='namenode', port=50070): Max retries exceeded with url: /webhdfs/v1/user/dav?op=GETFILESTATUS&user.name=hue&doas=dav (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f8119a3cf10>: Failed to establish a new connection: [Errno 111] Connection refused',))
  • 将所有服务显式放到同一网络上

当我登录到hue的容器时,我可以看到namenode的端口9870是打开的(nmap-p9870 namenode)。50070不是。我认为我的问题与网络无关。尽管编辑了色调。ini,色调仍然适用于端口50070。那么,如何在当前设置中强制色调转到端口9870?(如果这是原因)

version: '3.7'

services:
  namenode:
    image: bde2020/hadoop-namenode:2.0.0-hadoop3.1.1-java8
    container_name: namenode
    hostname: namenode
    domainname: hadoop
    ports:
      - 9870:9870
    volumes:
      - hadoop_namenode:/hadoop/dfs/name
      - ./entrypoints/namenode/entrypoint.sh:/entrypoint.sh
    env_file:
      - ./hadoop.env
      - .env
    networks:
      - hadoop_net
    # TODO adduser --ingroup hadoop dav

  datanode1:
    image: bde2020/hadoop-datanode:2.0.0-hadoop3.1.1-java8
    container_name: datanode
    hostname: datanode1
    domainname: hadoop
    volumes:
      - hadoop_datanode:/hadoop/dfs/data
    environment:
      SERVICE_PRECONDITION: "namenode:9870"
    env_file:
      - ./hadoop.env
    networks:
      - hadoop_net

  resourcemanager:
    image: bde2020/hadoop-resourcemanager:2.0.0-hadoop3.1.1-java8
    container_name: resourcemanager
    environment:
      SERVICE_PRECONDITION: "namenode:9870 datanode:9864"
    env_file:
      - ./hadoop.env
    networks:
      - hadoop_net

  nodemanager1:
    image: bde2020/hadoop-nodemanager:2.0.0-hadoop3.1.1-java8
    container_name: nodemanager
    environment:
      SERVICE_PRECONDITION: "namenode:9870 datanode:9864 resourcemanager:8088"
    env_file:
      - ./hadoop.env
    networks:
      - hadoop_net    

  historyserver:
    image: bde2020/hadoop-historyserver:2.0.0-hadoop3.1.1-java8
    container_name: historyserver
    environment:
      SERVICE_PRECONDITION: "namenode:9870 datanode:9864 resourcemanager:8088"
    volumes:
      - hadoop_historyserver:/hadoop/yarn/timeline
    env_file:
      - ./hadoop.env
    networks:
      - hadoop_net

  filebrowser: 
    container_name: hue
    image: bde2020/hdfs-filebrowser:3.11
    ports:
      - "8088:8088"
    env_file:
      - ./hadoop.env
    volumes: # BYPASS DEFAULT webhdfs url
      - ./overrides/hue/hue.ini:/opt/hue/desktop/conf.dist/hue.ini
    environment:
      - NAMENODE_HOST=namenode
    networks:
      - hadoop_net

networks:
  hadoop_net: 

volumes:
  hadoop_namenode:
  hadoop_datanode:
  hadoop_historyserver:

共有2个答案

王飞虎
2023-03-14

是的,找到了。几个关键要素:

  • 在hadoop 3.*中,webhdfs不再侦听50070,但9870是标准端口
version: '3.7'

services:
  namenode:
    image: bde2020/hadoop-namenode:2.0.0-hadoop3.1.1-java8
    container_name: namenode
    ports:
      - 9870:9870
      - 8020:8020
    volumes:
      - hadoop_namenode:/hadoop/dfs/name
      - ./overrides/namenode/entrypoint.sh:/entrypoint.sh
    env_file:
      - ./hadoop.env
      - .env
    networks:
      - hadoop

  filebrowser: 
    container_name: hue
    image: gethue/hue:4.4.0
    ports:
      - "8000:8888"
    env_file:
      - ./hadoop.env
    volumes: # HERE
      - ./overrides/hue/hue-overrides.ini:/usr/share/hue/desktop/conf/hue-overrides.ini
    depends_on:
      - namenode
    networks:
      - hadoop
      - frontend

  datanode1:
    image: bde2020/hadoop-datanode:2.0.0-hadoop3.1.1-java8
    container_name: datanode1
    volumes:
      - hadoop_datanode:/hadoop/dfs/data
    environment:
      SERVICE_PRECONDITION: "namenode:9870"
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

  resourcemanager:
    image: bde2020/hadoop-resourcemanager:2.0.0-hadoop3.1.1-java8
    container_name: resourcemanager
    environment:
      SERVICE_PRECONDITION: "namenode:9870 datanode1:9864"
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

  nodemanager1:
    image: bde2020/hadoop-nodemanager:2.0.0-hadoop3.1.1-java8
    container_name: nodemanager
    environment:
      SERVICE_PRECONDITION: "namenode:9870 datanode1:9864 resourcemanager:8088"
    env_file:
      - ./hadoop.env
    networks:
      - hadoop    

  historyserver:
    image: bde2020/hadoop-historyserver:2.0.0-hadoop3.1.1-java8
    container_name: historyserver
    environment:
      SERVICE_PRECONDITION: "namenode:9870 datanode1:9864 resourcemanager:8088"
    volumes:
      - hadoop_historyserver:/hadoop/yarn/timeline
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

networks:
  hadoop: 
  frontend:

volumes:
  hadoop_namenode:
  hadoop_datanode:
  hadoop_historyserver:
CORE_CONF_fs_defaultFS=hdfs://namenode:8020
CORE_CONF_hadoop_http_staticuser_user=root
CORE_CONF_hadoop_proxyuser_hue_hosts=*
CORE_CONF_hadoop_proxyuser_hue_groups=*
CORE_CONF_io_compression_codecs=org.apache.hadoop.io.compress.SnappyCodec

HDFS_CONF_dfs_replication=1
HDFS_CONF_dfs_webhdfs_enabled=true
HDFS_CONF_dfs_permissions_enabled=false
HDFS_CONF_dfs_namenode_datanode_registration_ip___hostname___check=false
[desktop]
  http_host=0.0.0.0
  http_port=8888
  time_zone=France
  dev=true
  app_blacklist=impala,zookeeper,oozie,hbase,security,search
[hadoop]
  [[hdfs_clusters]]
    [[[default]]]
      fs_defaultfs=hdfs://namenode:8020
      webhdfs_url=http://namenode:9870/webhdfs/v1
      security_enabled=false

谢谢@cricket_007

夹谷信鸿
2023-03-14

我能够让文件浏览器使用这个INI

[desktop]
  http_host=0.0.0.0
  http_port=8888
  time_zone=America/Chicago
  dev=true
  app_blacklist=impala,zookeeper,oozie,hbase,security,search
[hadoop]
  [[hdfs_clusters]]
    [[[default]]]
      fs_defaultfs=hdfs://namenode:8020
      webhdfs_url=http://namenode:50070/webhdfs/v1
      security_enabled=false

这首曲子

version: "2"

services:
  namenode:
    image: bde2020/hadoop-namenode:1.1.0-hadoop2.7.1-java8
    container_name: namenode
    ports:
      - 8020:8020
      - 50070:50070
      # - 59050:59050
    volumes:
      - hadoop_namenode:/hadoop/dfs/name
    environment:
      - CLUSTER_NAME=test
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

  datanode1:
    image: bde2020/hadoop-datanode:1.1.0-hadoop2.7.1-java8
    container_name: datanode1
    ports:
      - 50075:50075
      # - 50010:50010
      # - 50020:50020
    depends_on:
      - namenode
    volumes:
      - hadoop_datanode1:/hadoop/dfs/data
    env_file:
      - ./hadoop.env
    networks:
      - hadoop

  hue:
    image: gethue/hue
    container_name: hue
    ports:
      - 8000:8888
    depends_on:
      - namenode
    volumes:
      - ./conf/hue.ini:/hue/desktop/conf/pseudo-distributed.ini
    networks:
      - hadoop
      - frontend

    volumes:
      hadoop_namenode:
      hadoop_datanode1:

    networks:
      hadoop:
      frontend:

hadoop。env也必须作为代理用户添加色调

CORE_CONF_fs_defaultFS=hdfs://namenode:8020
CORE_CONF_hadoop_http_staticuser_user=root

CORE_CONF_hadoop_proxyuser_hue_hosts=*
CORE_CONF_hadoop_proxyuser_hue_groups=*

HDFS_CONF_dfs_replication=1
HDFS_CONF_dfs_webhdfs_enabled=true
HDFS_CONF_dfs_permissions_enabled=false
 类似资料:
  • 问题内容: 使用POI时,excel文档中的单元格和字体包含颜色信息,这些信息并不总是返回rgb值,并且通常仅提供索引值。必须对索引值进行对照以获取颜色。在HSSFWorkbook(xls)中,有一种方法可以用来获取调色板: 当访问XSSFWorkbook(xlsx)时,没有这种方法,实际上我在相关类的任何地方都找不到调色板信息。我能够从XSSFont和Cell中获得索引值,但是获取尽可能多的颜色

  • 使用POI时,excel文档中的单元格和字体包含颜色信息,这些信息并不总是返回rgb值,而且通常只提供索引值。索引值必须对照某物进行查找才能得到颜色。在HSSFWorkbook(xls)中,有一种方法可用于获取调色板: 我通过CellStyle获得XSSFColor,如下所示: 通过indexedcolors获取颜色名称: 类似的问题:如何获得给定单元格的(Java Apache POI HSSF

  • 调色板 返回上级 1、什么是调色板? 2、调色板的种类 3、对非主页面设置调色板 4、共享调色板 5、调色板动画 什么是调色板? 返回目录 基于调色板的页面需要调色板才能真正有意义的显示出来。一个基于调色板的页面,通常也被称作一个“色彩索引”页面,仅仅是一些数字的集合,其中的每一个数字代表一个像素。每一个数字的值都对应于一个色彩表中的项,这个表告诉DirectDraw对这个像素使用什么样的颜色。D

  • 调色板 可对模型的颜色进行设置,设有简单、高级和原始三种调节方式。一般情况下,原始材质的颜色不能更改。 注意事项 设置的颜色将在原模型贴图的基础上进行叠加,即调节后的颜色会受原模型贴图颜色的影响。

  • 使用吸管工具设置黑白场 请记住,使用吸管工具可以还原您之前在色阶或曲线中所做的任何调整。如果打算使用吸管工具,则最好先使用它们,然后再用“色阶”滑块或“曲线”点进行微调。 应用曲线或色阶调整。 在“属性”面板中,请执行下列任一操作: 双击“设置黑场”吸管工具来设置黑场。 双击“设置白场”吸管工具来设置白场。 在 Adobe 拾色器中,确定图像中最深和最浅色调的值: 要将黑场值设置为纯黑,请为 R

  • 我很困惑,无法改变我的android studio IDE的颜色,我如何面对非常困难的代码在这种类型的设置。