public final class Report extends Object
error(String)
is invoked.
Clients should put @Sticky
annotation for operator methods using this API, otherwise the Asakusa
DSL compiler optimization may remove the target operator.
@Sticky
@Update
public void updateWithReport(Hoge hoge) {
if (hoge.getValue() < 0) {
Report.error("invalid value");
} else {
hoge.setValue(0);
}
}
Modifier and Type | Class and Description |
---|---|
static class |
Report.Default
A basic implementation of
Report.Delegate . |
static class |
Report.Delegate
An abstract super class of delegation objects for
Report . |
static class |
Report.FailedException
Report.FailedException is thrown when an exception was occurred while processing messages in Report . |
static class |
Report.Level
Represents levels of reporting.
|
Modifier and Type | Field and Description |
---|---|
static String |
K_DELEGATE_CLASS
The Hadoop property name of the custom implementation class name of
Report.Delegate . |
Modifier and Type | Method and Description |
---|---|
static void |
error(String message)
Reports an error message.
|
static void |
error(String message,
Throwable throwable)
Reports an error message.
|
static ApiStub<ReportApi> |
getStub()
Returns the API stub.
|
static void |
info(String message)
Reports an informative message.
|
static void |
info(String message,
Throwable throwable)
Reports an informative message.
|
static void |
warn(String message)
Reports a warning message.
|
static void |
warn(String message,
Throwable throwable)
Reports a warning message.
|
public static final String K_DELEGATE_CLASS
Report.Delegate
.
To use a default implementation, clients should set com.asakusafw.runtime.core.Report$Default
to it.public static void info(String message)
@Sticky
annotation to the operator method that using this.message
- the messageReport.FailedException
- if error was occurred while reporting tReportessageReport
public static void info(String message, Throwable throwable)
@Sticky
annotation to the operator method that using this.message
- the messagethrowable
- the optional exception object (nullable)Report.FailedException
- if error was occurred while reporting the messageReport
public static void warn(String message)
@Sticky
annotation to the operator method that using this.message
- the messageReport.FailedException
- if error was occurred while reporting the messageReport
public static void warn(String message, Throwable throwable)
@Sticky
annotation to the operator method that using this.message
- the messagethrowable
- the optional exception object (nullable)Report.FailedException
- if error was occurred while reporting the messageReport
public static void error(String message)
@Sticky
annotation to the operator method that using this.
Please be careful that this method will NOT shutdown the running batch.
To shutdown the batch, throw an exception (RuntimeException
) in operator methods.message
- the messageReport.FailedException
- if error was occurred while reporting the messageReport
public static void error(String message, Throwable throwable)
@Sticky
annotation to the operator method that using this.
Please be careful that this method will NOT shutdown the running batch.
To shutdown the batch, throw an exception (RuntimeException
) in operator methods.message
- the messagethrowable
- the optional exception object (nullable)Report.FailedException
- if error was occurred while reporting the messageReport
Copyright © 2011–2018 Asakusa Framework Team. All rights reserved.