jiang he created HDFS-17947:
-------------------------------

             Summary:  dfs.block.access.token.lifetime=0 can cause DataStreamer 
createBlockOutputStream failure
                 Key: HDFS-17947
                 URL: https://issues.apache.org/jira/browse/HDFS-17947
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: hdfs-client
    Affects Versions: 3.4.3
            Reporter: jiang he


When block access tokens are enabled and dfs.block.access.token.lifetime is
  set to 0, HDFS write operations fail with a DataStreamer error.

  Reproduced with Hadoop 3.4.3.

  The same test passes when dfs.block.access.token.lifetime is set to a normal
  positive value.

  Reproduction config

  <configuration>
    <property>
      <name>dfs.replication</name>
      <value>1</value>
    </property>
    <property>
      <name>dfs.datanode.du.reserved.calculator</name>
      
<value>org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.ReservedSpaceCalculator$ReservedSpaceCalculatorAbsolu
  te</value>
    </property>
    <property>
      <name>dfs.block.access.token.lifetime</name>
      <value>0</value>
    </property>
    <property>
      <name>dfs.namenode.upgrade.domain.factor</name>
      <value>${dfs.replication}</value>
    </property>
    <property>
      <name>dfs.ha.zkfc.nn.http.timeout.ms</name>
      <value>20000</value>
    </property>
    <property>
      <name>dfs.namenode.reencrypt.throttle.limit.updater.ratio</name>
      <value>1.0</value>
    </property>
    <property>
      <name>dfs.namenode.redundancy.considerLoadByVolume</name>
      <value>false</value>
    </property>
    <property>
      <name>dfs.datanode.du.reserved</name>
      <value>0</value>
    </property>
    <property>
      <name>dfs.datanode.du.reserved.pct</name>
      <value>0</value>
    </property>
    <property>
      <name>dfs.block.access.token.enable</name>
      <value>True</value>
    </property>
    <property>
      <name>dfs.replication</name>
      <value>3</value>
    </property>
    <property>
      <name>dfs.namenode.reencrypt.throttle.limit.handler.ratio</name>
      <value>1.0</value>
    </property>
  </configuration>

  Observed

  WARN hdfs.DataStreamer:
  Exception in createBlockOutputStream blk_1073741825_1001

  The API test fails while writing to HDFS.

  Full observed wrapper output:

  API operation exception and shut done hdfs!
  Exception in thread "main" java.lang.RuntimeException:
  API request Exception: Operation exception[info_excetion]
  2026-06-26 15:59:40,444 WARN hdfs.DataStreamer:
  Exception in createBlockOutputStream blk_1073741825_1001

  Expected

  Either dfs.block.access.token.lifetime=0 should be rejected with a clear
  configuration validation error, or HDFS should handle this value without
  causing DataStreamer write failure.

  Control test

  dfs.block.access.token.enable=true
  dfs.block.access.token.lifetime=600

  passes successfully.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to