public abstract class NebulaBatchOutputFormat<T,OptionsT extends ExecutionOptions> extends org.apache.flink.api.common.io.RichOutputFormat<T> implements Flushable
| Modifier and Type | Field and Description |
|---|---|
protected OptionsT |
executionOptions |
protected NebulaGraphConnectionProvider |
graphProvider |
protected com.vesoft.nebula.client.meta.MetaClient |
metaClient |
protected NebulaMetaConnectionProvider |
metaProvider |
protected NebulaBatchExecutor<T> |
nebulaBatchExecutor |
| Constructor and Description |
|---|
NebulaBatchOutputFormat(NebulaGraphConnectionProvider graphProvider,
NebulaMetaConnectionProvider metaProvider,
OptionsT executionOptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
commit the batch write operator before release connection
|
void |
configure(org.apache.flink.configuration.Configuration configuration) |
protected abstract NebulaBatchExecutor<T> |
createNebulaBatchExecutor() |
void |
flush()
commit the batch write operator
|
void |
open(int i,
int i1)
prepare all resources
|
void |
writeRecord(T row)
write one record to buffer
|
protected com.vesoft.nebula.client.meta.MetaClient metaClient
protected final NebulaMetaConnectionProvider metaProvider
protected final NebulaGraphConnectionProvider graphProvider
protected final OptionsT extends ExecutionOptions executionOptions
protected NebulaBatchExecutor<T> nebulaBatchExecutor
public NebulaBatchOutputFormat(NebulaGraphConnectionProvider graphProvider, NebulaMetaConnectionProvider metaProvider, OptionsT executionOptions)
public void configure(org.apache.flink.configuration.Configuration configuration)
configure in interface org.apache.flink.api.common.io.OutputFormat<T>public void open(int i,
int i1)
throws IOException
open in interface org.apache.flink.api.common.io.OutputFormat<T>IOExceptionprotected abstract NebulaBatchExecutor<T> createNebulaBatchExecutor()
public final void writeRecord(T row) throws IOException
writeRecord in interface org.apache.flink.api.common.io.OutputFormat<T>IOExceptionpublic final void close()
throws IOException
close in interface org.apache.flink.api.common.io.OutputFormat<T>IOExceptionpublic void flush()
throws IOException
flush in interface FlushableIOExceptionCopyright © 2024. All rights reserved.