@Override public void newEndOfFileRecord() { this.newMonitoringRecord(EOF); } }
@Override public void newEndOfFileRecord() { this.newMonitoringRecord(EOF); } }
@Override public void newEndOfFileRecord() { this.newMonitoringRecord(EOF); } }
/** * {@inheritDoc} */ @Override protected AbstractReaderPlugin createReader(final IAnalysisController analysisInstance) { final Configuration configuration = new Configuration(); configuration.setProperty(FSReader.CONFIG_PROPERTY_NAME_INPUTDIRS, Configuration.toProperty(this.inputDirs)); configuration.setProperty(FSReader.CONFIG_PROPERTY_NAME_IGNORE_UNKNOWN_RECORD_TYPES, Boolean.toString(true)); return new FSReader(configuration, analysisInstance); }
/** * {@inheritDoc} */ @Override public void terminate(final boolean error) { this.logger.info("Shutting down reader."); for (final AbstractLogReaderThread readerThread : this.readerThreads) { readerThread.terminate(); } }
/** * Creates a new instance of this class. * * @param inputDir * The File object for the input directory. * @param recordReceiver * The receiver handling the records. * @param ignoreUnknownRecordTypes * select only records of this type; null selects all */ public FSDirectoryReader(final File inputDir, final IMonitoringRecordReceiver recordReceiver, final boolean ignoreUnknownRecordTypes) { if ((inputDir == null) || !inputDir.isDirectory()) { throw new IllegalArgumentException("Invalid or empty inputDir"); } this.inputDir = inputDir; this.recordReceiver = recordReceiver; this.ignoreUnknownRecordTypes = ignoreUnknownRecordTypes; this.textFileStreamProcessor = new TextFileStreamProcessor(ignoreUnknownRecordTypes, this.stringRegistry, recordReceiver); this.binaryFileStreamProcessor = new BinaryFileStreamProcessor(this.stringRegistry, recordReceiver); }
public void terminate() { this.shouldTerminate = true; this.interrupt(); } }
/** * Reads the records contained in the given normal file and passes them to the registered {@link #recordReceiver}. * * @param inputFile * The input file which should be processed. */ private final void processNormalInputFile(final File inputFile) { try { this.textFileStreamProcessor.processInputChannel(new FileInputStream(inputFile)); this.terminated = true; } catch (final Exception ex) { // NOCS NOPMD (gonna catch them all) LOGGER.error("Error reading {}", inputFile, ex); } }
/** * {@inheritDoc} */ @Override protected AbstractReaderPlugin createReader(final IAnalysisController analysisInstance) { final Configuration configuration = new Configuration(); configuration.setProperty(FSReader.CONFIG_PROPERTY_NAME_INPUTDIRS, Configuration.toProperty(this.inputDirs)); configuration.setProperty(FSReader.CONFIG_PROPERTY_NAME_IGNORE_UNKNOWN_RECORD_TYPES, Boolean.toString(true)); return new FSReader(configuration, analysisInstance); }
/** * {@inheritDoc} */ @Override public void terminate(final boolean error) { this.logger.info("Shutting down reader."); for (final AbstractLogReaderThread readerThread : this.readerThreads) { readerThread.terminate(); } }
/** * Creates a new instance of this class. * * @param inputDir * The File object for the input directory. * @param recordReceiver * The receiver handling the records. * @param ignoreUnknownRecordTypes * select only records of this type; null selects all */ public FSDirectoryReader(final File inputDir, final IMonitoringRecordReceiver recordReceiver, final boolean ignoreUnknownRecordTypes) { if ((inputDir == null) || !inputDir.isDirectory()) { throw new IllegalArgumentException("Invalid or empty inputDir"); } this.inputDir = inputDir; this.recordReceiver = recordReceiver; this.ignoreUnknownRecordTypes = ignoreUnknownRecordTypes; this.textFileStreamProcessor = new TextFileStreamProcessor(ignoreUnknownRecordTypes, this.stringRegistry, recordReceiver); this.binaryFileStreamProcessor = new BinaryFileStreamProcessor(this.stringRegistry, recordReceiver); }
@Override public void newEndOfFileRecord() { this.newMonitoringRecord(EOF); } }
@Override public void newEndOfFileRecord() { this.newMonitoringRecord(EOF); } }
@Override public void newEndOfFileRecord() { this.newMonitoringRecord(EOF); } }
public void terminate() { this.shouldTerminate = true; this.interrupt(); } }
/** * Reads the records contained in the given normal file and passes them to the registered {@link #recordReceiver}. * * @param inputFile * The input file which should be processed. */ private final void processNormalInputFile(final File inputFile) { try { this.textFileStreamProcessor.processInputChannel(new FileInputStream(inputFile)); this.terminated = true; } catch (final Exception ex) { // NOCS NOPMD (gonna catch them all) LOGGER.error("Error reading {}", inputFile, ex); } }
/** * {@inheritDoc} */ @Override public void terminate(final boolean error) { this.log.info("Shutting down reader."); for (final AbstractLogReaderThread readerThread : this.readerThreads) { readerThread.terminate(); } }
/** * Creates a new instance of this class. * * @param zipFile * The File object for the zip file. * @param recordReceiver * The receiver handling the records. * @param ignoreUnknownRecordTypes * select only records of this type; null selects all */ public FSZipReader(final File zipFile, final IMonitoringRecordReceiver recordReceiver, final boolean ignoreUnknownRecordTypes) { if ((zipFile == null) || !zipFile.isFile() || !zipFile.getName().endsWith(FSUtil.ZIP_FILE_EXTENSION)) { throw new IllegalArgumentException("Invalid zip file"); } this.zipFile = zipFile; this.recordReceiver = recordReceiver; this.ignoreUnknownRecordTypes = ignoreUnknownRecordTypes; this.binaryFileStreamProcessor = new BinaryFileStreamProcessor(this.stringRegistry, recordReceiver); this.textFileStreamProcessor = new TextFileStreamProcessor(ignoreUnknownRecordTypes, this.stringRegistry, recordReceiver); }
/** * {@inheritDoc} */ @Override public void terminate(final boolean error) { this.log.info("Shutting down reader."); for (final AbstractLogReaderThread readerThread : this.readerThreads) { readerThread.terminate(); } }
/** * Creates a new instance of this class. * * @param zipFile * The File object for the zip file. * @param recordReceiver * The receiver handling the records. * @param ignoreUnknownRecordTypes * select only records of this type; null selects all */ public FSZipReader(final File zipFile, final IMonitoringRecordReceiver recordReceiver, final boolean ignoreUnknownRecordTypes) { if ((zipFile == null) || !zipFile.isFile() || !zipFile.getName().endsWith(FSUtil.ZIP_FILE_EXTENSION)) { throw new IllegalArgumentException("Invalid zip file"); } this.zipFile = zipFile; this.recordReceiver = recordReceiver; this.ignoreUnknownRecordTypes = ignoreUnknownRecordTypes; this.binaryFileStreamProcessor = new BinaryFileStreamProcessor(this.stringRegistry, recordReceiver); this.textFileStreamProcessor = new TextFileStreamProcessor(ignoreUnknownRecordTypes, this.stringRegistry, recordReceiver); }