public abstract class PipesReporter extends Object implements Closeable
report(FetchEmitTuple, PipesResult, long) in a thread safe
way.
Note, however, that this is not called in the forked processes.
Implementers do not have to worry about synchronizing across processes;
for example, one could use an in-memory h2 database as a target.| Modifier and Type | Field and Description |
|---|---|
static PipesReporter |
NO_OP_REPORTER |
| Constructor and Description |
|---|
PipesReporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
No-op implementation.
|
abstract void |
error(String msg)
This is called if the process has crashed.
|
abstract void |
error(Throwable t)
This is called if the process has crashed.
|
abstract void |
report(FetchEmitTuple t,
PipesResult result,
long elapsed) |
void |
report(TotalCountResult totalCountResult)
No-op implementation.
|
boolean |
supportsTotalCount()
Override this if your reporter supports total count.
|
public static final PipesReporter NO_OP_REPORTER
public abstract void report(FetchEmitTuple t, PipesResult result, long elapsed)
public void report(TotalCountResult totalCountResult)
supportsTotalCount()
to return truetotalCountResult - public boolean supportsTotalCount()
false as the baseline implementationpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic abstract void error(Throwable t)
t - public abstract void error(String msg)
msg - Copyright © 2007–2023 The Apache Software Foundation. All rights reserved.