{"record":{"id":"b471a557585d1c9f","repo":"apache/hadoop","slug":"replica-of-type-getstate-does-not-support-cre-b471a5","errorCode":null,"errorMessage":"Replica of type ${getState()} does not support createInfo","messagePattern":"Replica of type (.+?) does not support createInfo","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java","lineNumber":409,"sourceCode":"    throw new UnsupportedOperationException(\"Replica of type \" + getState() +\n        \" does not support getOriginalReplica\");\n  }\n\n  @Override\n  public long getRecoveryID() {\n    throw new UnsupportedOperationException(\"Replica of type \" + getState() +\n        \" does not support getRecoveryID\");\n  }\n\n  @Override\n  public void setRecoveryID(long recoveryId) {\n    throw new UnsupportedOperationException(\"Replica of type \" + getState() +\n        \" does not support setRecoveryID\");\n  }\n\n  @Override\n  public ReplicaRecoveryInfo createInfo(){\n    throw new UnsupportedOperationException(\"Replica of type \" + getState() +\n        \" does not support createInfo\");\n  }\n\n  public void moveReplicaFrom(ReplicaInfo oldReplicaInfo, File newBlkFile)\n      throws IOException {\n\n    if (!(oldReplicaInfo instanceof LocalReplica)) {\n      throw new IOException(\"The source replica with blk id \"\n          + oldReplicaInfo.getBlockId()\n          + \" should be derived from LocalReplica\");\n    }\n\n    final LocalReplica oldReplica = (LocalReplica) oldReplicaInfo;\n    final File oldBlockFile = oldReplica.getBlockFile();\n    final File oldmeta = oldReplica.getMetaFile();\n    final File newmeta = getMetaFile();\n    final FileIoProvider fileIoProvider = getFileIoProvider();\n","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplicaInPipeline.java#L391-L427","documentation":"Error \"Replica of type ${getState()} does not support createInfo\" thrown in apache/hadoop.","triggerScenarios":"createInfo is invoked on a replica whose state/type does not implement it.","commonSituations":"createInfo was called on a replica type that cannot produce block info. Internal misuse limited to specific replica states.","solutions":["Do not call createInfo on this replica type; it is only meaningful for specific replica implementations.","Check the replica state before invoking createInfo."],"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-22T20:17:22.307Z"}