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