{"record":{"id":"9c2c655d0104a2ed","repo":"apache/druid","slug":"not-a-directory-s","errorCode":null,"errorMessage":"Not a directory [%s]","messagePattern":"Not a directory \\[(.+?)\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/ParquetToJson.java","lineNumber":73,"sourceCode":"  public List<String> directories;\n\n\n  public static void main(String[] args) throws Exception\n  {\n    CliBuilder<Callable> builder = Cli.builder(\"ParquetToJson\");\n    builder.withDefaultCommand(ParquetToJson.class);\n    builder.build().parse(args).call();\n  }\n\n  private File[] getInputFiles()\n  {\n    if (directories == null || directories.size() != 1) {\n      throw new IAE(\"Only one directory argument is supported!\");\n    }\n\n    File dir = new File(directories.get(0));\n    if (!dir.isDirectory()) {\n      throw new IAE(\"Not a directory [%s]\", dir);\n    }\n    File[] inputFiles = dir.listFiles(\n        pathname -> pathname.getName().endsWith(\".parquet\"));\n    if (inputFiles == null || inputFiles.length == 0) {\n      throw new IAE(\"No parquet files in directory [%s]\", dir);\n    }\n    return inputFiles;\n  }\n\n  @Override\n  public Void call() throws Exception\n  {\n    ObjectMapper mapper = new DefaultObjectMapper();\n\n    File[] inputFiles = getInputFiles();\n\n    for (File inputFile : inputFiles) {\n      File outputFile = new File(inputFile.getAbsolutePath() + \".json\");","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/ParquetToJson.java#L55-L91","documentation":"CLI argument validation in the ParquetToJson dev utility's getInputFiles: the single directory argument supplied on the command line exists but is not actually a directory, so no parquet input files can be listed from it.","triggerScenarios":"Thrown at extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/ParquetToJson.java:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the path to a directory, not a file, as the directories argument.","Verify the path spelling and that the target is a directory on the local filesystem."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}