public class LogManager extends Object implements AutoCloseable
| Constructor and Description |
|---|
LogManager(CqlSession session,
Path operationDirectory,
ErrorThreshold errorThreshold,
ErrorThreshold queryWarningsThreshold,
boolean trackPositions,
StatementFormatter statementFormatter,
StatementFormatVerbosity statementFormatVerbosity,
RowFormatter rowFormatter) |
public LogManager(CqlSession session, Path operationDirectory, ErrorThreshold errorThreshold, ErrorThreshold queryWarningsThreshold, boolean trackPositions, StatementFormatter statementFormatter, StatementFormatVerbosity statementFormatVerbosity, RowFormatter rowFormatter)
public void init()
public Path getOperationDirectory()
public int getTotalErrors()
public void close()
throws IOException
close in interface AutoCloseableIOExceptionpublic void reportLastLocations()
@NonNull public Function<Flux<Void>,Flux<Void>> newTerminationHandler()
It detects when the main workflow emits a terminal signal and reacts by triggering the completion of all processors managed by this component.
@NonNull public Function<Flux<BatchableStatement<?>>,Flux<BatchableStatement<?>>> newUnmappableStatementsHandler()
Used only in load workflows.
Increments the number of errors and forwards unmappable statements to the unmappable statement processor for further processing.
@NonNull public Function<Flux<Record>,Flux<Record>> newFailedRecordsHandler()
Used by both load and unload workflows.
Increments the number of errors and forwards failed records to the failed record processor for further processing.
@NonNull public Function<Flux<Record>,Flux<Record>> newUnmappableRecordsHandler()
Used only in unload workflows.
Increments the number of errors and forwards unmappable records to the unmappable record processor for further processing.
@NonNull public Function<Flux<WriteResult>,Flux<WriteResult>> newFailedWritesHandler()
WriteResults.
Used only by the load workflow.
Increments the number of errors and forwards unsuccessful write results to the write result processor for further processing.
@NonNull public Function<Flux<ReadResult>,Flux<ReadResult>> newFailedReadsHandler()
ReadResults.
Used only by the unload workflow.
Increments the number of errors and forwards unsuccessful read results to the read result processor for further processing.
public <T extends Result> Function<Flux<T>,Flux<T>> newQueryWarningsHandler()
Used by all workflows.
Increments the number of query warnings; if the threshold is exceeded, logs one last warning than mutes subsequent query warnings.
public Function<Flux<WriteResult>,Flux<Void>> newResultPositionsHandler()
Used only by the load workflow.
Extracts the result's Record and updates the positions.
Copyright © 2017–2021 DataStax. All rights reserved.