apache/druid · error · IllegalArgumentException

Not a directory [ ]

Error message

Not a directory [%s]

What it means

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.

Solutions

  1. Pass the path to a directory, not a file, as the directories argument.
  2. Verify the path spelling and that the target is a directory on the local filesystem.
Defensive patterns

Strategy: validation

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/9c2c655d0104a2ed. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/ParquetToJson.java:73

  public List<String> directories;


  public static void main(String[] args) throws Exception
  {
    CliBuilder<Callable> builder = Cli.builder("ParquetToJson");
    builder.withDefaultCommand(ParquetToJson.class);
    builder.build().parse(args).call();
  }

  private File[] getInputFiles()
  {
    if (directories == null || directories.size() != 1) {
      throw new IAE("Only one directory argument is supported!");
    }

    File dir = new File(directories.get(0));
    if (!dir.isDirectory()) {
      throw new IAE("Not a directory [%s]", dir);
    }
    File[] inputFiles = dir.listFiles(
        pathname -> pathname.getName().endsWith(".parquet"));
    if (inputFiles == null || inputFiles.length == 0) {
      throw new IAE("No parquet files in directory [%s]", dir);
    }
    return inputFiles;
  }

  @Override
  public Void call() throws Exception
  {
    ObjectMapper mapper = new DefaultObjectMapper();

    File[] inputFiles = getInputFiles();

    for (File inputFile : inputFiles) {
      File outputFile = new File(inputFile.getAbsolutePath() + ".json");

View on GitHub (pinned to 9b90983fd2)