{"record":{"id":"db57c9c980e89830","repo":"apache/hadoop","slug":"another-diskbalancer-files-already-exist-at-the-ta","errorCode":null,"errorMessage":"Another DiskBalancer files already exist at the target location. {path}","messagePattern":"Another DiskBalancer files already exist at the target location\\. (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java","lineNumber":199,"sourceCode":"    Date now = new Date();\n\n    fs = FileSystem.get(getClusterURI(), getConf());\n    if (path == null || path.isEmpty()) {\n      if (getClusterURI().getScheme().startsWith(\"file\")) {\n        diskBalancerLogs = new Path(\n            System.getProperty(\"user.dir\") + DEFAULT_LOG_DIR.toString() +\n                Path.SEPARATOR + format.format(now));\n      } else {\n        diskBalancerLogs = new Path(DEFAULT_LOG_DIR.toString() +\n            Path.SEPARATOR + format.format(now));\n      }\n    } else {\n      diskBalancerLogs = new Path(path);\n    }\n    if (fs.exists(diskBalancerLogs)) {\n      LOG.debug(\"Another Diskbalancer instance is running ? - Target \" +\n          \"Directory already exists. {}\", diskBalancerLogs);\n      throw new IOException(\"Another DiskBalancer files already exist at the \" +\n          \"target location. \" + diskBalancerLogs.toString());\n    }\n    fs.mkdirs(diskBalancerLogs);\n  }\n\n  /**\n   * Sets the nodes to process.\n   *\n   * @param node - Node\n   */\n  protected void setNodesToProcess(DiskBalancerDataNode node) {\n    List<DiskBalancerDataNode> nodelist = new LinkedList<>();\n    nodelist.add(node);\n    setNodesToProcess(nodelist);\n  }\n\n  /**\n   * Sets the list of Nodes to process.","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java#L181-L217","documentation":"Error \"Another DiskBalancer files already exist at the target location. {path}\" thrown in apache/hadoop.","triggerScenarios":"DiskBalancer plan submission when a plan file already exists at the target before/after location, indicating an unexecuted prior plan.","commonSituations":"See trigger scenarios.","solutions":["Remove or move the existing DiskBalancer plan file at the target location before writing a new one.","Choose a different output path for the new plan file."],"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"}