apache/hadoop · error · IllegalArgumentException

Required param for op: is null or empty

Error message

Required param {} for op: {} is null or empty

What it means

WebHDFS parameter guard in validateOpParams: every HTTP operation declares mandatory query parameters (op, destination, owner and so on); this fires when one of them is absent or blank in the request URL, before the operation is dispatched to the namenode.

Solutions

  1. Supply the missing required parameter in the WebHDFS request URL (e.g. &owner=..., &permission=...) for the given op.
  2. Verify the op name is correct; some parameters are only required for specific operations.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown when a mandatory WebHDFS query parameter (path, op, offset, etc.) is absent or empty in the request URI.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/318d75056b491e8e. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java:598

      @DefaultValue(StorageTypeParam.DEFAULT)
      final StorageTypeParam storageType
  ) throws IOException, InterruptedException {
    return put(ugi, uriInfo, delegation, username, doAsUser, op, destination,
        owner, group, permission, unmaskedPermission, overwrite, bufferSize,
        replication, blockSize, modificationTime, accessTime, renameOptions,
        createParent, delegationTokenArgument, aclPermission, xattrName,
        xattrValue, xattrSetFlag, snapshotName, oldSnapshotName,
        excludeDatanodes, createFlagParam, noredirect, policyName, ecpolicy,
        namespaceQuota, storagespaceQuota, storageType);
  }

  /** Validate all required params. */
  @SuppressWarnings("rawtypes")
  protected void validateOpParams(HttpOpParam<?> op, Param... params) {
    for (Param param : params) {
      if (param.getValue() == null || param.getValueString() == null || param
          .getValueString().isEmpty()) {
        throw new IllegalArgumentException("Required param " + param.getName()
            + " for op: " + op.getValueString() + " is null or empty");
      }
    }
  }

  /**
   * Handle HTTP PUT request.
   *
   * @param ugi User and group information for Hadoop.
   * @param uriInfo An injectable interface that provides access.
   * @param delegation Represents delegation token used for authentication.
   * @param username User parameter.
   * @param doAsUser DoAs parameter for proxy user.
   * @param op Http POST operation parameter.
   * @param destination Destination path parameter.
   * @param owner Owner parameter.
   * @param group Group parameter.
   * @param permission Permission parameter,

View on GitHub (pinned to 2add963021)