private void deleteIndexFiles(final StringBuilder sBuilder) {
            if (indexDir.exists()) {
                if (!indexDir.isDirectory()) {
                    throw new RuntimeException(sBuilder
                            .append("[Data Repair] Topic index path is not a directory, path is ")
                            .append(indexPath).toString());
                }
                try {
                    FileUtil.fullyDeleteContents(indexDir);
                } catch (Throwable er) {
                    logger.error(sBuilder
                            .append("[Data Repair] delete index files error, path is ")
                            .append(indexPath).toString(), er);
                }
            } else {
                if (!indexDir.mkdirs()) {
                    throw new RuntimeException(sBuilder
                            .append("[Data Repair] Could not make index directory ")
                            .append(indexPath).toString());
                }
                if (!indexDir.isDirectory() || !indexDir.canRead()) {
                    throw new RuntimeException(sBuilder.append("[Data Repair] Index path ")
                            .append(indexPath).append(" is not a readable directory").toString());
                }
            }
        }
Repair topic storage files, rebuild index files by existing data files
@param args   Startup parameter array, including the following parts:
              The 1st parameter is the path of topic storage files;
              The 2nd parameter is the topic name(s) that needs to be repaired,
                  if not specified, all topics in the storage path will be repaired.
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/StoreRepairAdmin.java