[ 
https://issues.apache.org/jira/browse/HDFS-17946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDFS-17946:
----------------------------------
    Labels: pull-request-available  (was: )

> Several HDFS client integer configs report raw NumberFormatException for 
> out-of-range values
> --------------------------------------------------------------------------------------------
>
>                 Key: HDFS-17946
>                 URL: https://issues.apache.org/jira/browse/HDFS-17946
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>            Reporter: jiang he
>            Priority: Trivial
>              Labels: pull-request-available
>
> Several HDFS client integer configuration keys fail with a raw
>   NumberFormatException when set to an out-of-range negative value.
>   Instead of exposing a raw NumberFormatException, HDFS should report a clear
>   configuration validation error that identifies the invalid key and expected
>   range.
>   Examples
>   Example 1
>   <property>
>     <name>dfs.client.block.write.retries</name>
>     <value>-4294967296</value>
>   </property>
>   Observed:
>   Failed to initialize filesystem hdfs://127.0.0.1:9000:
>   java.lang.NumberFormatException: For input string: "-4294967296"
>   Example 2
>   <property>
>     <name>dfs.client.pipeline.recovery.max-retries</name>
>     <value>-4294967296</value>
>   </property>
>   Observed:
>   Failed to initialize filesystem hdfs://127.0.0.1:9000:
>   java.lang.NumberFormatException: For input string: "-4294967296"
>   Example 3
>   <property>
>     <name>dfs.client.retry.max.attempts</name>
>     <value>-4294967296</value>
>   </property>
>   Observed:
>   Failed to initialize filesystem hdfs://127.0.0.1:9000:
>   java.lang.NumberFormatException: For input string: "-4294967296"
>   Example 4
>   <property>
>     <name>dfs.client.congestion.backoff.mean.time</name>
>     <value>-4294967296</value>
>   </property>
>   Observed:
>   java.lang.NumberFormatException: For input string: "-4294967296"
>   Expected
>   HDFS should report clear configuration validation errors, for example:
>     Invalid value for dfs.client.block.write.retries: -4294967296.
>     The value must be a valid integer within range ...
>   rather than a raw NumberFormatException.
>   Control test
>   The following normal values pass successfully:
>   <property>
>     <name>dfs.client.block.write.retries</name>
>     <value>3</value>
>   </property>
>   <property>
>     <name>dfs.client.pipeline.recovery.max-retries</name>
>     <value>5</value>
>   </property>
>   <property>
>     <name>dfs.client.retry.max.attempts</name>
>     <value>10</value>
>   </property>
>   <property>
>     <name>dfs.client.congestion.backoff.mean.time</name>
>     <value>5000</value>
>   </property>



--
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