0.2.3
Features
BigQuery
- Add support for the
BYTESdatatype. A field of typeBYTEScan be created by usingField.Value.bytes(). Thebyte[] bytesValue()method is added toFieldValueto return the value of a field as a byte array. - A
Job waitFor(WaitForOption... waitOptions)method is added toJobclass. This method waits for the job to complete and returns job's updated information:
Job completedJob = job.waitFor();
if (completedJob == null) {
// job no longer exists
} else if (completedJob.status().error() != null) {
// job failed, handle error
} else {
// job completed successfully
}By default, the job status is checked every 500 milliseconds, to configure this value WaitForOption.checkEvery(long, TimeUnit) can be used. WaitForOption.timeout(long, TimeUnit), instead, sets the maximum time to wait.
Core
AuthCredentials.createFor(String)andAuthCredentials.createFor(String, Date)methods have been added to createAuthCredentialsobjects given an OAuth2 access token (and possibly its expiration date).
Compute
- A
Operation waitFor(WaitForOption... waitOptions)method is added toOperationclass. This method waits for the operation to complete and returns operation's updated information:
Operation completedOperation = operation.waitFor();
if (completedOperation == null) {
// operation no longer exists
} else if (completedOperation.errors() != null) {
// operation failed, handle error
} else {
// operation completed successfully
}By default, the operation status is checked every 500 milliseconds, to configure this value WaitForOption.checkEvery(long, TimeUnit) can be used. WaitForOption.timeout(long, TimeUnit), instead, sets the maximum time to wait.
Datastore
Datastore.putandDatastoreBatchWriter.putnow support entities with incomplete keys. Bothputmethods return the just updated/created entities. AputWithDeferredIdAllocationmethod has been also added toDatastoreBatchWriter.