Class VolumePutResult


  • public class VolumePutResult
    extends Object
    Contains the result of a volume put operation.

    This class encapsulates the outcome of uploading files to Databricks volumes, including both successful and failed operations. The HTTP status codes follow standard conventions and indicate the specific type of success or failure.

    HTTP Status Codes Used

    • 2xx Success Codes:
    • 4xx Client Error Codes:
      • 400 Bad Request - Invalid request parameters (e.g., file not found locally, mismatched array sizes in batch operations)
      • 401 Unauthorized - Authentication failed
      • 403 Forbidden - Access denied to the volume or path
      • 404 Not Found - Volume or path does not exist
      • 429 Too Many Requests - Rate limit exceeded
    • 499 Client Closed Request:
      • 499 - Upload was cancelled by the client before completion
    • 5xx Server Error Codes:
      • 500 Internal Server Error - Generic server error, network exceptions, presigned URL generation failures, or upload setup errors
      • 502 Bad Gateway - Upstream server error (from storage provider)
      • 503 Service Unavailable - Service temporarily unavailable
      • 504 Gateway Timeout - Upload timeout

    Retry Behavior

    Server errors (500, 502, 503, 504) trigger automatic retries with exponential backoff. Client errors (4xx) and cancellations (499) do not trigger retries as they indicate permanent failures or user actions.

    • Constructor Detail

      • VolumePutResult

        public VolumePutResult​(int statusCode,
                               VolumeOperationStatus status,
                               String message)
        Constructs a new VolumePutResult.
        Parameters:
        statusCode - The HTTP status code
        status - The operation status
        message - Optional error message
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Get the HTTP status code.
        Returns:
        the status code
      • getStatus

        public VolumeOperationStatus getStatus()
        Get the operation status.
        Returns:
        the operation status
      • getMessage

        public String getMessage()
        Get the error message if any.
        Returns:
        the error message or null if successful
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object