private StreamingWriteTables( BigQueryServices bigQueryServices, InsertRetryPolicy retryPolicy, boolean extendedErrorInfo, boolean skipInvalidRows, boolean ignoreUnknownValues) { this.bigQueryServices = bigQueryServices; this.retryPolicy = retryPolicy; this.extendedErrorInfo = extendedErrorInfo; this.skipInvalidRows = skipInvalidRows; this.ignoreUnknownValues = ignoreUnknownValues; }
/** Constructor. */ public StreamingInserts( CreateDisposition createDisposition, DynamicDestinations<?, DestinationT> dynamicDestinations) { this( createDisposition, dynamicDestinations, new BigQueryServicesImpl(), InsertRetryPolicy.alwaysRetry(), false, false, false); }
public long insertAll(TableReference ref, List<TableRow> rowList) throws IOException, InterruptedException { List<ValueInSingleWindow<TableRow>> rows = rowList.stream() .map(r -> ValueInSingleWindow.of( r, BoundedWindow.TIMESTAMP_MIN_VALUE, GlobalWindow.INSTANCE, PaneInfo.NO_FIRING)) .collect(Collectors.toList()); return bqServices.getDatasetService(bqOptions) .insertAll(ref, rows, null, InsertRetryPolicy.alwaysRetry(), new ArrayList<>(), ErrorContainer.TABLE_ROW_ERROR_CONTAINER, false, false); }
public long insertAll( TableReference ref, List<TableRow> rowList, @Nullable List<String> insertIdList) throws IOException, InterruptedException { List<ValueInSingleWindow<TableRow>> windowedRows = Lists.newArrayList(); for (TableRow row : rowList) { windowedRows.add( ValueInSingleWindow.of( row, GlobalWindow.TIMESTAMP_MAX_VALUE, GlobalWindow.INSTANCE, PaneInfo.ON_TIME_AND_ONLY_FIRING)); } return insertAll( ref, windowedRows, insertIdList, InsertRetryPolicy.alwaysRetry(), null, null, false, false); }
totalBytes = datasetService.insertAll( ref, rows, ids, InsertRetryPolicy.alwaysRetry(), null, null, false, false); } finally { verifyInsertAll(5);
BackOffAdapter.toGcpBackOff(TEST_BACKOFF.backoff()), new MockSleeper(), InsertRetryPolicy.alwaysRetry(), null, null,
@Test public void testAlwaysRetry() { assertTrue( InsertRetryPolicy.alwaysRetry() .shouldRetry(new Context(new TableDataInsertAllResponse.InsertErrors()))); }
BackOffAdapter.toGcpBackOff(TEST_BACKOFF.backoff()), new MockSleeper(), InsertRetryPolicy.alwaysRetry(), null, null,
BackOffAdapter.toGcpBackOff(TEST_BACKOFF.backoff()), new MockSleeper(), InsertRetryPolicy.alwaysRetry(), null, null,
BackOffAdapter.toGcpBackOff(TEST_BACKOFF.backoff()), new MockSleeper(), InsertRetryPolicy.alwaysRetry(), null, null,
"WriteDisposition.WRITE_TRUNCATE is not supported for an unbounded" + " PCollection."); InsertRetryPolicy retryPolicy = MoreObjects.firstNonNull(getFailedInsertRetryPolicy(), InsertRetryPolicy.alwaysRetry());