public class RemoteBigQueryHelper extends Object
getOptions()
method. Returned options have custom ServiceOptions.getRetrySettings()
: RetrySettings.getMaxAttempts()
is 10
, RetrySettings.getMaxRetryDelay()
is 30000
, RetrySettings.getTotalTimeout()
is
120000
and RetrySettings.getInitialRetryDelay()
is 250
. HttpTransportOptions.getConnectTimeout()
and HttpTransportOptions.getReadTimeout()
are
both set to 60000
.Modifier and Type | Class and Description |
---|---|
static class |
RemoteBigQueryHelper.BigQueryHelperException |
Modifier and Type | Method and Description |
---|---|
static RemoteBigQueryHelper |
create()
Creates a
RemoteBigQueryHelper object using default project id and authentication
credentials. |
static RemoteBigQueryHelper |
create(String projectId,
InputStream keyStream)
Creates a
RemoteBigQueryHelper object for the given project id and JSON key input
stream. |
static boolean |
forceDelete(BigQuery bigquery,
String dataset)
Deletes a dataset, even if non-empty.
|
static String |
generateDatasetName()
Returns a dataset name generated using a random UUID.
|
BigQueryOptions |
getOptions()
Returns a
BigQueryOptions object to be used for testing. |
public BigQueryOptions getOptions()
BigQueryOptions
object to be used for testing.public static boolean forceDelete(BigQuery bigquery, String dataset)
bigquery
- the BigQuery service to be used to issue the delete requestdataset
- the dataset to be deletedtrue
if deletion succeeded, false
if the dataset was not foundBigQueryException
- upon failurepublic static String generateDatasetName()
public static RemoteBigQueryHelper create(String projectId, InputStream keyStream) throws RemoteBigQueryHelper.BigQueryHelperException
RemoteBigQueryHelper
object for the given project id and JSON key input
stream.projectId
- id of the project to be used for running the testskeyStream
- input stream for a JSON keyRemoteBigQueryHelper
object for the provided optionsRemoteBigQueryHelper.BigQueryHelperException
- if keyStream
is not a valid JSON key streampublic static RemoteBigQueryHelper create()
RemoteBigQueryHelper
object using default project id and authentication
credentials.Copyright © 2019 Google LLC. All rights reserved.