{"record":{"id":"edad266d5bcf37d8","repo":"apache/hadoop","slug":"unsupported-namenodecommand-cmd-getaction","errorCode":null,"errorMessage":"Unsupported NamenodeCommand: cmd.getAction()","messagePattern":"Unsupported NamenodeCommand: cmd\\.getAction\\(\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java","lineNumber":205,"sourceCode":"    BackupImage bnImage = getFSImage();\n    NNStorage bnStorage = bnImage.getStorage();\n\n    long startTime = monotonicNow();\n    bnImage.freezeNamespaceAtNextRoll();\n    \n    NamenodeCommand cmd = \n      getRemoteNamenodeProxy().startCheckpoint(backupNode.getRegistration());\n    CheckpointCommand cpCmd = null;\n    switch(cmd.getAction()) {\n      case NamenodeProtocol.ACT_SHUTDOWN:\n        shutdown();\n        throw new IOException(\"Name-node \" + backupNode.nnRpcAddress\n                                           + \" requested shutdown.\");\n      case NamenodeProtocol.ACT_CHECKPOINT:\n        cpCmd = (CheckpointCommand)cmd;\n        break;\n      default:\n        throw new IOException(\"Unsupported NamenodeCommand: \"+cmd.getAction());\n    }\n\n    bnImage.waitUntilNamespaceFrozen();\n    \n    CheckpointSignature sig = cpCmd.getSignature();\n\n    // Make sure we're talking to the same NN!\n    sig.validateStorageInfo(bnImage);\n\n    long lastApplied = bnImage.getLastAppliedTxId();\n    LOG.debug(\"Doing checkpoint. Last applied: \" + lastApplied);\n    RemoteEditLogManifest manifest =\n      getRemoteNamenodeProxy().getEditLogManifest(bnImage.getLastAppliedTxId() + 1);\n\n    boolean needReloadImage = false;\n    if (!manifest.getLogs().isEmpty()) {\n      RemoteEditLog firstRemoteLog = manifest.getLogs().get(0);\n      // we don't have enough logs to roll forward using only logs. Need","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java#L187-L223","documentation":"Error \"Unsupported NamenodeCommand: cmd.getAction()\" thrown in apache/hadoop.","triggerScenarios":"Checkpointer receives a NameNodeCommand action it does not recognize.","commonSituations":"See trigger scenarios.","solutions":["Check the NameNode and Checkpointer versions for compatibility; an unknown command usually indicates a version mismatch or corruption.","Restart the checkpointing daemon against the correct active NameNode."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}