@Internal
public class HBaseSinkFunction<T>
extends org.apache.flink.streaming.api.functions.sink.RichSinkFunction<T>
implements org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.hadoop.hbase.client.BufferedMutator.ExceptionListener
This class leverage BufferedMutator to buffer multiple
Mutations before sending the requests to cluster.
The buffering strategy can be configured by bufferFlushMaxSizeInBytes,
bufferFlushMaxMutations and bufferFlushIntervalMillis.
| 构造器和说明 |
|---|
HBaseSinkFunction(String hTableName,
org.apache.hadoop.conf.Configuration conf,
HBaseMutationConverter<T> mutationConverter,
long bufferFlushMaxSizeInBytes,
long bufferFlushMaxMutations,
long bufferFlushIntervalMillis) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) |
void |
invoke(T value,
org.apache.flink.streaming.api.functions.sink.SinkFunction.Context context) |
void |
onException(org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException exception,
org.apache.hadoop.hbase.client.BufferedMutator mutator) |
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) |
getIterationRuntimeContext, getRuntimeContext, setRuntimeContextpublic HBaseSinkFunction(String hTableName, org.apache.hadoop.conf.Configuration conf, HBaseMutationConverter<T> mutationConverter, long bufferFlushMaxSizeInBytes, long bufferFlushMaxMutations, long bufferFlushIntervalMillis)
public void open(org.apache.flink.configuration.Configuration parameters)
throws Exception
open 在接口中 org.apache.flink.api.common.functions.RichFunctionopen 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void invoke(T value, org.apache.flink.streaming.api.functions.sink.SinkFunction.Context context) throws Exception
public void close()
throws Exception
close 在接口中 org.apache.flink.api.common.functions.RichFunctionclose 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
throws Exception
snapshotState 在接口中 org.apache.flink.streaming.api.checkpoint.CheckpointedFunctionExceptionpublic void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context)
throws Exception
initializeState 在接口中 org.apache.flink.streaming.api.checkpoint.CheckpointedFunctionExceptionpublic void onException(org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException exception,
org.apache.hadoop.hbase.client.BufferedMutator mutator)
throws org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException
onException 在接口中 org.apache.hadoop.hbase.client.BufferedMutator.ExceptionListenerorg.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.