public class BigQueryDirectDataWriterContext extends Object implements DataWriterContext<org.apache.spark.sql.catalyst.InternalRow>
| Constructor and Description |
|---|
BigQueryDirectDataWriterContext(int partitionId,
long taskId,
long epochId,
BigQueryClientFactory writeClientFactory,
String tablePath,
org.apache.spark.sql.types.StructType sparkSchema,
com.google.cloud.bigquery.storage.v1.ProtoSchema protoSchema,
com.google.api.gax.retrying.RetrySettings bigqueryDataWriterHelperRetrySettings,
com.google.common.base.Optional<String> traceId,
boolean writeAtLeastOnce) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
close() |
WriterCommitMessageContext |
commit() |
void |
write(org.apache.spark.sql.catalyst.InternalRow record) |
public BigQueryDirectDataWriterContext(int partitionId,
long taskId,
long epochId,
BigQueryClientFactory writeClientFactory,
String tablePath,
org.apache.spark.sql.types.StructType sparkSchema,
com.google.cloud.bigquery.storage.v1.ProtoSchema protoSchema,
com.google.api.gax.retrying.RetrySettings bigqueryDataWriterHelperRetrySettings,
com.google.common.base.Optional<String> traceId,
boolean writeAtLeastOnce)
public void write(org.apache.spark.sql.catalyst.InternalRow record)
throws IOException
write in interface DataWriterContext<org.apache.spark.sql.catalyst.InternalRow>IOExceptionpublic WriterCommitMessageContext commit() throws IOException
commit in interface DataWriterContext<org.apache.spark.sql.catalyst.InternalRow>IOExceptionpublic void abort()
throws IOException
abort in interface DataWriterContext<org.apache.spark.sql.catalyst.InternalRow>IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2024. All rights reserved.