Package io.github.kaststream.api.v2
Interface FailureHandler
-
- All Superinterfaces:
Serializable
public interface FailureHandler extends Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Initialization method for the handler.voidonFailure(KastRow kRow, String errorMessage)Handle a failed jdbc request.default voidopen(Map<String,String> configuration, org.apache.avro.Schema schema, Map<String,Object> meta)Initialization method for the function.default voidopen(org.apache.avro.Schema schema)Initialization method for the handler.
-
-
-
Method Detail
-
onFailure
void onFailure(KastRow kRow, String errorMessage) throws Throwable
Handle a failed jdbc request.- Parameters:
kRow- The row that is on failureerrorMessage- the string describing the error- Throws:
Throwable- Throwable if the sink should fail on this failure, the implementation should rethrow the exception or a custom one
-
open
default void open(org.apache.avro.Schema schema) throws ExceptionInitialization method for the handler.- Parameters:
schema- the input row schema- Throws:
Exception- The function may throw exceptions which cause the streaming program to fail and go into recovery.
-
open
default void open(Map<String,String> configuration, org.apache.avro.Schema schema, Map<String,Object> meta) throws Exception
Initialization method for the function.- Parameters:
configuration- The configuration containing the parameters attached to the contractschema- the input row schemameta- the udf configuration parameters- Throws:
Exception- The function may throw exceptions which cause the streaming program to fail and go into recovery.
-
-