{"record":{"id":"0fe53041a2bc16f7","repo":"apache/hadoop","slug":"user-accesskey-and-secretaccesskey-should-not-be-n","errorCode":null,"errorMessage":"user accessKey and secretAccessKey should not be null","messagePattern":"user accessKey and secretAccessKey should not be null","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java","lineNumber":122,"sourceCode":"    this.conf = conf;\n    this.uri = uri;\n\n    BosClientConfiguration config =\n        new BosClientConfiguration();\n    updateUserForInit();\n    provider =\n        BceCredentialsProvider\n            .getBceCredentialsProviderImpl(conf);\n    if (provider instanceof HadoopCredentialsProvider) {\n      provider.setConf(this.conf);\n    }\n    DefaultBceSessionCredentials token =\n        provider.getCredentials(uri, user);\n\n    if (token == null\n        || StringUtils.isEmpty(token.getAccessKeyId())\n        || StringUtils.isEmpty(token.getSecretKey())) {\n      throw new IllegalArgumentException(\n          \"user accessKey and secretAccessKey\"\n              + \" should not be null\");\n    }\n    if (token.getSessionToken() == null\n        || token.getSessionToken().trim().isEmpty()) {\n      config.setCredentials(\n          new DefaultBceCredentials(\n              token.getAccessKeyId(),\n              token.getSecretKey()\n          ));\n    } else {\n      config.setCredentials(\n          new DefaultBceSessionCredentials(\n              token.getAccessKeyId(),\n              token.getSecretKey(),\n              token.getSessionToken()\n          ));\n    }","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-cloud-storage-project/hadoop-bos/src/main/java/org/apache/hadoop/fs/bos/BosClientProxyImpl.java#L104-L140","documentation":"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.","triggerScenarios":"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.","commonSituations":"Replaying damaged rumen traces (missing result fields); traces produced by modified Hadoop builds; simulation harnesses that fabricate LoggedTaskAttempt objects without setting result.","solutions":["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.","Skip or synthesize attempts with missing results in your JobStory wrapper instead of forwarding them to ZombieJob.","If fabricating attempts in code, always call attempt.setResult(...) with a valid Values constant."],"exampleFix":"// before\nLoggedTaskAttempt a = zombieJob.getLoggedTaskAttempt(TaskType.MAP, n, k);\nzombieJob.getMapTaskAttemptInfoAdjusted(n, k, locality); // IAE when result is null\n\n// after: pre-check in a wrapper JobStory\nValues r = (a == null) ? null : a.getResult();\nif (a == null || r == null\n    || !EnumSet.of(Values.SUCCESS, Values.FAILED, Values.KILLED).contains(r)) {\n  return makeUpAttemptInfo(taskType, taskInfo, k, n, locality); // synthesize\n}\nreturn zombieJob.getMapTaskAttemptInfoAdjusted(n, k, locality);","handlingStrategy":"validation","validationCode":"static boolean isSimulationResult(Values r) {\n  return r == Values.SUCCESS || r == Values.FAILED || r == Values.KILLED;\n}\n// guard before getMapTaskAttemptInfoAdjusted:\n// LoggedTaskAttempt a = job.getLoggedTaskAttempt(TaskType.MAP, n, k);\n// if (a != null && !isSimulationResult(a.getResult())) skip or synthesize;","typeGuard":"static boolean attemptResultIsSimulationReady(LoggedTaskAttempt a) {\n  Values r = (a == null) ? null : a.getResult();\n  return r == Values.SUCCESS || r == Values.FAILED || r == Values.KILLED;\n}","tryCatchPattern":null,"preventionTips":["Pre-validate attempt results in a trace-loading pass; drop or synthesize records with missing results.","Regenerate edited traces with rumen rather than replaying hand-modified JSON.","Treat null result fields as corrupt data and count them in replay reports."],"tags":["hadoop","rumen","enum-validation","task-attempt","job-trace"],"backgroundTag":"missing-required-field","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}