Unable to Submit MapReduce Job from Java Client to Hadoop Cluster Running in Pseudo-Distributed Mode

I’m working on a project where I need to perform aggregations on the result of an HBase table scan using MapReduce and store the result in another HBase table. To achieve this, I’ve set up a Hadoop cluster running HBase, HDFS, and YARN in pseudo-distributed mode.

My approach involves using a Java client to submit the MapReduce job whenever I receive a request from a different service via GRPC. However, I’m encountering an issue when submitting the job. The error message I’m receiving is as follows:

org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /tmp/hadoop-yarn/staging/root/.staging/job_1714655341519_0001/libjars/hbase-client.jar could only be written to 0 of the 1 minReplication nodes. There are 1 datanode(s) running and 1 node(s) are excluded in this operation.

Upon examining the Namenode logs, I noticed the following sequence of events:

2024-05-02 13:10:29,045 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* allocate blk_1073741858_1040, replicas=127.0.0.1:9866 for /hbase/data/default/tmp_984a107027fd49e590ae77dda740be82/.tabledesc/.tableinfo.0000000001.386
2024-05-02 13:10:29,077 INFO BlockStateChange: BLOCK* addStoredBlock: 127.0.0.1:9866 is added to blk_1073741858_1040 (size=386)
2024-05-02 13:10:29,078 INFO org.apache.hadoop.hdfs.StateChange: DIR* completeFile: /hbase/data/default/tmp_984a107027fd49e590ae77dda740be82/.tabledesc/.tableinfo.0000000001.386 is closed by DFSClient_NONMAPREDUCE_27241901_1
2024-05-02 13:10:29,097 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* allocate blk_1073741859_1041, replicas=127.0.0.1:9866 for /hbase/data/default/tmp_984a107027fd49e590ae77dda740be82/b57fd033d101d53c7d5afd77a72f78de/.regioninfo
2024-05-02 13:10:29,114 INFO BlockStateChange: BLOCK* addStoredBlock: 127.0.0.1:9866 is added to blk_1073741859_1041 (size=71)
2024-05-02 13:10:29,119 INFO org.apache.hadoop.hdfs.StateChange: DIR* completeFile: /hbase/data/default/tmp_984a107027fd49e590ae77dda740be82/b57fd033d101d53c7d5afd77a72f78de/.regioninfo is closed by DFSClient_NONMAPREDUCE_27241901_1
2024-05-02 13:10:29,921 INFO org.apache.hadoop.hdfs.StateChange: DIR* completeFile: /hbase/data/default/tmp_984a107027fd49e590ae77dda740be82/b57fd033d101d53c7d5afd77a72f78de/recovered.edits/1.seqid is closed by DFSClient_NONMAPREDUCE_1365210381_1
2024-05-02 13:10:33,334 INFO org.apache.hadoop.hdfs.StateChange: BLOCK* allocate blk_1073741860_1042, replicas=127.0.0.1:9866 for /tmp/hadoop-yarn/staging/root/.staging/job_1714655341519_0001/libjars/hbase-client.jar
2024-05-02 13:10:33,448 WARN org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy: Failed to place enough replicas, still in need of 1 to reach 1 (unavailableStorages=[], storagePolicy=BlockStoragePolicy{HOT:7, storageTypes=[DISK], creationFallbacks=[], replicationFallbacks=[ARCHIVE]}, newBlock=true) For more information, please enable DEBUG log level on org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy and org.apache.hadoop.net.NetworkTopology
2024-05-02 13:10:33,451 WARN org.apache.hadoop.hdfs.protocol.BlockStoragePolicy: Failed to place enough replicas: expected size is 1 but only 0 storage types can be selected (replication=1, selected=[], unavailable=[DISK], removed=[DISK], policy=BlockStoragePolicy{HOT:7, storageTypes=[DISK], creationFallbacks=[], replicationFallbacks=[ARCHIVE]})
2024-05-02 13:10:33,451 WARN org.apache.hadoop.hdfs.server.blockmanagement.BlockPlacementPolicy: Failed to place enough replicas, still in need of 1 to reach 1 (unavailableStorages=[DISK], storagePolicy=BlockStoragePolicy{HOT:7, storageTypes=[DISK], creationFallbacks=[], replicationFallbacks=[ARCHIVE]}, newBlock=true) All required storage types are unavailable:  unavailableStorages=[DISK], storagePolicy=BlockStoragePolicy{HOT:7, storageTypes=[DISK], creationFallbacks=[], replicationFallbacks=[ARCHIVE]}
2024-05-02 13:10:33,455 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on default port 9000, call Call#12 Retry#0 org.apache.hadoop.hdfs.protocol.ClientProtocol.addBlock from stockbroker-bdnr-hbase-client-1.stockbroker-bdnr_default:38876 / 172.20.0.2:38876
java.io.IOException: File /tmp/hadoop-yarn/staging/root/.staging/job_1714655341519_0001/libjars/hbase-client.jar could only be written to 0 of the 1 minReplication nodes. There are 1 datanode(s) running and 1 node(s) are excluded in this operation.

However, when I checked the Datanode logs, nothing relevant seemed to be happening.

Here’s my current HDFS configuration:

<configuration>
  <property>
      <name>dfs.replication</name>
      <value>1</value>
  </property>
  <property>
    <name>dfs.namenode.name.dir</name>
    <value>/hdfs/namenode</value>
  </property>
  <property>
    <name>dfs.datanode.data.dir</name>
    <value>/hdfs/datanode</value>
  </property>
  <property>
      <name>dfs.namenode.rpc-bind-host</name>
      <value>0.0.0.0</value>
  </property>
  <property>
      <name>dfs.namenode.servicerpc-bind-host</name>
      <value>0.0.0.0</value>
  </property>
  <property>
      <name>dfs.client.block.write.replace-datanode-on-failure.enable</name>
      <value>false</value>
  </property>
  <property>
      <name>dfs.storage.policy.enabled</name>
      <value>false</value>
  </property>
  <property>
      <name>dfs.use.dfs.network.topology</name>
      <value>false</value>
  </property>
  <property>
      <name>dfs.namenode.replication.considerLoad</name>
      <value>false</value>
  </property>
  <property>
      <name>dfs.namenode.replication.considerLoad.factor</name>
      <value>3</value>
  </property>
  <property>
      <name>dfs.permissions.superusergroup</name>
      <value>hadoop</value>
  </property>
  <property>
      <name>dfs.cluster.administrators</name>
      <value>hadoop</value>
  </property>
  <property>
      <name>dfs.permissions.enabled</name>
      <value>false</value>
  </property>
</configuration>


Some aspects of the configuration might seem redundant because I’ve been debugging this for a while. Please note that this setup is for a school project and won’t be put into production. I’m only running in pseudo-distributed mode to observe the distribution of data in HBase and MapReduce jobs.

Can someone help me understand what might be causing this issue and suggest potential solutions? Any insights or suggestions would be greatly appreciated.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật