apache/hadoop · error · IllegalArgumentException

user accessKey and secretAccessKey should not be null

Error message

user accessKey and secretAccessKey should not be null

What it means

In ZombieJob.getMapTaskAttemptInfoAdjusted(), after handling results KILLED, FAILED, and SUCCESS, the final else-branch throws IllegalArgumentException for any other result value — most notably null. This is the map-attempt entry point used by simulators, so the error means the trace's attempt record has no recognizable outcome. Unlike convertState() (which reports 'unknown status'), this site names all three accepted values, making the accepted set explicit.

Source

Thrown at hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java:122

    this.conf = conf;
    this.uri = uri;

    BosClientConfiguration config =
        new BosClientConfiguration();
    updateUserForInit();
    provider =
        BceCredentialsProvider
            .getBceCredentialsProviderImpl(conf);
    if (provider instanceof HadoopCredentialsProvider) {
      provider.setConf(this.conf);
    }
    DefaultBceSessionCredentials token =
        provider.getCredentials(uri, user);

    if (token == null
        || StringUtils.isEmpty(token.getAccessKeyId())
        || StringUtils.isEmpty(token.getSecretKey())) {
      throw new IllegalArgumentException(
          "user accessKey and secretAccessKey"
              + " should not be null");
    }
    if (token.getSessionToken() == null
        || token.getSessionToken().trim().isEmpty()) {
      config.setCredentials(
          new DefaultBceCredentials(
              token.getAccessKeyId(),
              token.getSecretKey()
          ));
    } else {
      config.setCredentials(
          new DefaultBceSessionCredentials(
              token.getAccessKeyId(),
              token.getSecretKey(),
              token.getSessionToken()
          ));
    }

View on GitHub (pinned to 2add963021)

Solutions

  1. Sanitize the trace before simulation: verify each attempt has a result of SUCCESS/FAILED/KILLED; re-run rumen's trace generation (Rumenzifier) to rebuild well-formed traces.
  2. Skip or synthesize attempts with missing results in your JobStory wrapper instead of forwarding them to ZombieJob.
  3. If fabricating attempts in code, always call attempt.setResult(...) with a valid Values constant.

Example fix

// before
LoggedTaskAttempt a = zombieJob.getLoggedTaskAttempt(TaskType.MAP, n, k);
zombieJob.getMapTaskAttemptInfoAdjusted(n, k, locality); // IAE when result is null

// after: pre-check in a wrapper JobStory
Values r = (a == null) ? null : a.getResult();
if (a == null || r == null
    || !EnumSet.of(Values.SUCCESS, Values.FAILED, Values.KILLED).contains(r)) {
  return makeUpAttemptInfo(taskType, taskInfo, k, n, locality); // synthesize
}
return zombieJob.getMapTaskAttemptInfoAdjusted(n, k, locality);
Defensive patterns

Strategy: validation

Validate before calling

static boolean isSimulationResult(Values r) {
  return r == Values.SUCCESS || r == Values.FAILED || r == Values.KILLED;
}
// guard before getMapTaskAttemptInfoAdjusted:
// LoggedTaskAttempt a = job.getLoggedTaskAttempt(TaskType.MAP, n, k);
// if (a != null && !isSimulationResult(a.getResult())) skip or synthesize;

Type guard

static boolean attemptResultIsSimulationReady(LoggedTaskAttempt a) {
  Values r = (a == null) ? null : a.getResult();
  return r == Values.SUCCESS || r == Values.FAILED || r == Values.KILLED;
}

Prevention

When it happens

Trigger: Calling getMapTaskAttemptInfoAdjusted(taskNumber, attemptNumber, locality) when the corresponding LoggedTaskAttempt's getResult() is null or an unexpected Values constant — typically a trace JSON attempt object missing the 'result' field, or one whose result was serialized as an unmapped string.

Common situations: Replaying damaged rumen traces (missing result fields); traces produced by modified Hadoop builds; simulation harnesses that fabricate LoggedTaskAttempt objects without setting result.

Understand the failure class

Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.

Related errors


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