APISonar


com.streamsets.pipeline.lib.parser.DataParserFormat.LOG

> com > streamsets > pipeline > lib > parser > DataParserFormat > LOG
com APIs streamsets APIs pipeline APIs lib APIs parser APIs DataParserFormat APIs LOG APIs

Example 1
private DataParser getDataParser(String logLine, int maxObjectLength, int readerOffset) throws DataParserException {
    InputStream is = new ByteArrayInputStream(logLine.getBytes());
    DataParserFactoryBuilder dataParserFactoryBuilder = new DataParserFactoryBuilder(getContext(), DataParserFormat.LOG);
    DataParserFactory factory = dataParserFactoryBuilder
      .setMaxDataLen(maxObjectLength)
      .setMode(LogMode.COMBINED_LOG_FORMAT)
      .setConfig(LogDataParserFactory.RETAIN_ORIGINAL_TEXT_KEY, true)
      .setOverRunLimit(1000)
      .build();
    return factory.getParser("id", is, String.valueOf(readerOffset));
  }