Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
yirutang committed Apr 3, 2023
1 parent 3fea877 commit 63cb115
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ public void initialize(TableName parentTable)
// For more information about JsonStreamWriter, see:
// https://googleapis.dev/java/google-cloud-bigquerystorage/latest/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.html
streamWriter =
JsonStreamWriter.newBuilder(parentTable.toString(), BigQueryWriteClient.create()).build();
JsonStreamWriter.newBuilder(streamWriter.getStreamName(),
BigQueryWriteClient.create()).build();
}

public void append(AppendContext appendContext)
Expand All @@ -163,7 +164,7 @@ public void append(AppendContext appendContext)
// If stream writer is premenantly failed, try recreate a stream writer.
if (streamWriter.isClosed() && recreateCount.getAndIncrement() < MAX_RECREATE_COUNT) {
streamWriter =
JsonStreamWriter.newBuilder(parentTable.toString(),
JsonStreamWriter.newBuilder(streamWriter.get,
BigQueryWriteClient.create()).build();
this.error = null;
}
Expand Down

0 comments on commit 63cb115

Please sign in to comment.