apache/hadoop · error · ResourceEstimatorException

The log parser is not initialized, please try again after…

Error message

The log parser is not initialized, please try again after initializing.

What it means

Log parser lifecycle guard: parseLog was called before the underlying LogParser implementation was initialized, so no parser is bound to consume the log file; initialize the parser first.

Solutions

  1. Initialize the log parser (call init with the log directory) before requesting parsed data.
Defensive patterns

Strategy: validation

When it happens

Trigger: LogParserUtil is used to parse a log line before init() has been called with a log format, so the parser regex is not configured.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/547091458fe8ab59. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-tools/hadoop-resourceestimator/src/main/java/org/apache/hadoop/resourceestimator/translator/impl/LogParserUtil.java:91

   */
  public long stringToUnixTimestamp(final String date) throws ParseException {
    return format.parse(date).getTime();
  }

  /**
   * Parse the log file/directory.
   *
   * @param logFile the file/directory of the log.
   * @throws SkylineStoreException      if fails to addHistory to
   *                                    {@link SkylineStore}.
   * @throws IOException                if fails to parse the log.
   * @throws ResourceEstimatorException if the {@link LogParser}
   *     is not initialized.
   */
  public final void parseLog(final String logFile)
      throws SkylineStoreException, IOException, ResourceEstimatorException {
    if (logParser == null) {
      throw new ResourceEstimatorException("The log parser is not initialized,"
          + " please try again after initializing.");
    }
    InputStream inputStream = null;
    try {
      inputStream = new FileInputStream(logFile);
      logParser.parseStream(inputStream);
    } finally {
      if (inputStream != null) {
        inputStream.close();
      }
    }
  }
}

View on GitHub (pinned to 2add963021)