[ 
https://issues.apache.org/jira/browse/HDFS-17796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18076522#comment-18076522
 ] 

Stefan Wang commented on HDFS-17796:
------------------------------------

  PR: https://github.com/apache/hadoop/pull/8460

  WebHDFS write failures caused by storage-capacity limits surface as
  generic 403 (or 500 on channel timeout) today, so clients can't tell
  "out of space" from "permission denied". Patch adds typed mappings for
  ClusterStorageCapacityExceededException (incl. DS/NSQuotaExceededException)
  and DiskChecker.DiskOutOfSpaceException to HTTP 507 (RFC 4918) on both
  NN-side and DN-side ExceptionHandlers, ahead of the generic IOException
  fallthrough. JAX-RS 2.1 lacks a 507 enum so the NN handler defines a
  StatusType constant; DN uses Netty's built-in INSUFFICIENT_STORAGE.

> File write via WebHDFS when required space not available doesn't give 
> appropriate error on failing
> --------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-17796
>                 URL: https://issues.apache.org/jira/browse/HDFS-17796
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>            Reporter: Atin Arora
>            Priority: Major
>              Labels: pull-request-available
>
> When initiating a write operation through WebHDFS to upload a large file (~10 
> GB), if the available HDFS storage is less than the size of the file, WebHDFS 
> responds with an HTTP 500 Internal Server Error. This error response is 
> generic and does not clearly indicate the actual cause — insufficient storage 
> space. Additionally, the partial or incomplete file that is created during 
> the upload process is not cleaned up from HDFS, which may lead to further 
> storage issues or confusion for users and automated processes.
> +*STEPS TO REPRODUCE:*+
>  # Almost fill the available storage in HDFS, leaving ~5gb of space
>  # Initiate a webHDFS call to upload a large file (~10gb) 
>  # Wait for the operation to timeout
> +*CURRENT BEHAVIOUR:*+
> Currently the webHDFS call times out with a 500 response code
> +*EXPECTED BEHAVIOUR:*+
>  * The server should return a meaningful error (e.g., *HTTP 507 Insufficient 
> Storage* or a descriptive 400-level error) indicating that there is not 
> enough space to complete the operation.
>  * There shouldn't be any incomplete files on the node.



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