Skip to content

Commit a381426

Browse files
authored
merge master into pubsub-hp (#1591)
* Update version to 0.8.1-SNAPSHOT (#1467) Also, update versions in README to 0.8.0 * Add link to Maven Central for maven-central badge. (#1468) Used to link to the image, which wasn't super useful. * fix more races in pubsub tests Previously BlockingProcessStreamReader has a terminate() method, used to tell the Reader to stop reading from the emulator process. This causes an inter-process race. If the Reader stops before reading emulator's output, the emulator process will hang as it tries to write to stdout/stderr as there's no one to read from the other side of the pipe. Since there is no way to safely stop the Reader, this commit deletes the method and its associated test. Additionally, the timeout for LocalSystemTest is increased to 3 minutes, since the emulator, somehow, consistently takes just longer than a minute to shut down. * Regenerating SPI layer (#1501) * Converting Error Reporting and Monitoring to use resource name types * Removing formatX/parseX methods from pubsub, converting usage of the same to resource name types * New methods in Logging and PubSub * Updating grpc dependency to 1.0.3 (#1504) * Release 0.8.1 (#1512) * Fix code snippet (wrong method name) in README.md Original code snippet in _"Querying data"_ section: `..while (!queryResponse.jobComplete()) {..` This results in a compile error: _"Cannot resolve method jobComplete()"_ The correct method is `jobCompleted()` * Updating version in README files. [ci skip] * Update version to 0.8.2-alpha-SNAPSHOT * Allow path in URIs passed to newFileSystem (#1470) * This makes it easier for users who start with a URI describing a full path to get a FileSystem that can work with that path, since they no longer have to needlessly remove the path from the URI. Note that Oracle's description of newFileSystem [1] puts no restriction on the passed URI. [1] https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystems.html#newFileSystem(java.net.URI,%20java.util.Map) * Preventing logging re-entrance at FINE level (#1523) * Preventing logging re-entrance at FINE level Also: * Reducing the scope of synchronized blocks * Removing logger exclusions except for Http2FrameLogger * Add a PathMatcher for CloudStorageFileSystem (#1469) Add a test, as well. We reuse the default PathMatcher since it does a fine job of globbing files. * Set timestamp from LogRecord (#1533) * Initialize the default MonitoredResource from a GAE environment (#1535) * BigQuery: Add support to FormatOptions for AVRO #1441 Added new constant in FormatOptions, and a corresponding factory method. Updated test cases. Confirmed that AVRO does not require special treatment (like CSV does), so no additional changes are required. * Reverting changed commited by mistake before review. * BigQuery: Add support to FormatOptions for AVRO #1441 Added new constant in FormatOptions and a corresponding factory method. Updated test cases. Confirmed that AVRO does not require special treatment (like CSV does), so no additional changes are required. * use RpcFuture and remove old BundlingSettings (#1572) * use RpcFuture and remove old BundlingSettings * Release 0.8.2 Note: This version was accidentally released to Sonatype because of experimenting with deployment commands, combined with the fact that autoReleaseAfterClose is set to true. Since releases can't be taken back, we might as well own up to the release and push the code forward. * Updating version in README files. [ci skip] * Fixing javadoc error in GaeFlexLoggingEnhancer (#1582) * get tests to compile and pass
1 parent 36e609e commit a381426

File tree

128 files changed

+17309
-860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+17309
-860
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ If you are using Maven, add this to your pom.xml file
4343
<dependency>
4444
<groupId>com.google.cloud</groupId>
4545
<artifactId>google-cloud</artifactId>
46-
<version>0.8.0</version>
46+
<version>0.8.2-alpha</version>
4747
</dependency>
4848
```
4949
If you are using Gradle, add this to your dependencies
5050
```Groovy
51-
compile 'com.google.cloud:google-cloud:0.8.0'
51+
compile 'com.google.cloud:google-cloud:0.8.2-alpha'
5252
```
5353
If you are using SBT, add this to your dependencies
5454
```Scala
55-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.8.0"
55+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.8.2-alpha"
5656
```
5757

5858
Example Applications

google-cloud-bigquery/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-bigquery</artifactId>
25-
<version>0.8.0-beta</version>
25+
<version>0.8.2-beta</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-bigquery:0.8.0-beta'
30+
compile 'com.google.cloud:google-cloud-bigquery:0.8.2-beta'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.8.0-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.8.2-beta"
3535
```
3636

3737
Example Application
@@ -189,7 +189,7 @@ QueryRequest queryRequest =
189189
.build();
190190
// Request query to be executed and wait for results
191191
QueryResponse queryResponse = bigquery.query(queryRequest);
192-
while (!queryResponse.jobComplete()) {
192+
while (!queryResponse.jobCompleted()) {
193193
Thread.sleep(1000L);
194194
queryResponse = bigquery.getQueryResults(queryResponse.getJobId());
195195
}

google-cloud-bigquery/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.8.1-SNAPSHOT</version>
15+
<version>0.8.2-alpha</version>
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/FormatOptions.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class FormatOptions implements Serializable {
3232
static final String CSV = "CSV";
3333
static final String JSON = "NEWLINE_DELIMITED_JSON";
3434
static final String DATASTORE_BACKUP = "DATASTORE_BACKUP";
35+
static final String AVRO = "AVRO";
3536
private static final long serialVersionUID = -443376052020423691L;
3637

3738
private final String type;
@@ -94,6 +95,13 @@ public static FormatOptions datastoreBackup() {
9495
return new FormatOptions(DATASTORE_BACKUP);
9596
}
9697

98+
/**
99+
* Default options for AVRO format.
100+
*/
101+
public static FormatOptions avro() {
102+
return new FormatOptions(AVRO);
103+
}
104+
97105
/**
98106
* Default options for the provided format.
99107
*/

google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/FormatOptionsTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,29 @@ public void testConstructor() {
3030
assertEquals(FormatOptions.JSON, options.getType());
3131
options = new FormatOptions(FormatOptions.DATASTORE_BACKUP);
3232
assertEquals(FormatOptions.DATASTORE_BACKUP, options.getType());
33+
options = new FormatOptions(FormatOptions.AVRO);
34+
assertEquals(FormatOptions.AVRO, options.getType());
3335
}
3436

3537
@Test
38+
@SuppressWarnings("deprecation")
3639
public void testConstructorDeprecated() {
3740
FormatOptions options = new FormatOptions(FormatOptions.CSV);
3841
assertEquals(FormatOptions.CSV, options.type());
3942
options = new FormatOptions(FormatOptions.JSON);
4043
assertEquals(FormatOptions.JSON, options.type());
4144
options = new FormatOptions(FormatOptions.DATASTORE_BACKUP);
4245
assertEquals(FormatOptions.DATASTORE_BACKUP, options.type());
46+
options = new FormatOptions(FormatOptions.AVRO);
47+
assertEquals(FormatOptions.AVRO, options.type());
4348
}
4449

4550
@Test
4651
public void testFactoryMethods() {
4752
assertEquals(FormatOptions.CSV, FormatOptions.csv().getType());
4853
assertEquals(FormatOptions.JSON, FormatOptions.json().getType());
4954
assertEquals(FormatOptions.DATASTORE_BACKUP, FormatOptions.datastoreBackup().getType());
55+
assertEquals(FormatOptions.AVRO, FormatOptions.avro().getType());
5056
}
5157

5258
@Test

google-cloud-compute/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-compute</artifactId>
25-
<version>0.8.0</version>
25+
<version>0.8.2-alpha</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-compute:0.8.0'
30+
compile 'com.google.cloud:google-cloud-compute:0.8.2-alpha'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.8.0"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.8.2-alpha"
3535
```
3636

3737
Example Application

google-cloud-compute/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.cloud</groupId>
1313
<artifactId>google-cloud-pom</artifactId>
14-
<version>0.8.1-SNAPSHOT</version>
14+
<version>0.8.2-alpha</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>google-cloud-compute</site.installationModule>

google-cloud-contrib/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ If you are using Maven, add this to your pom.xml file
2525
<dependency>
2626
<groupId>com.google.cloud</groupId>
2727
<artifactId>google-cloud-contrib</artifactId>
28-
<version>0.8.0</version>
28+
<version>0.8.2-alpha</version>
2929
</dependency>
3030
```
3131
If you are using Gradle, add this to your dependencies
3232
```Groovy
33-
compile 'com.google.cloud:google-cloud-contrib:0.8.0'
33+
compile 'com.google.cloud:google-cloud-contrib:0.8.2-alpha'
3434
```
3535
If you are using SBT, add this to your dependencies
3636
```Scala
37-
libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.8.0"
37+
libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.8.2-alpha"
3838
```
3939

4040
### google-cloud-nio-examples

google-cloud-contrib/google-cloud-nio-examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ To run this example:
2222
4. Run the sample with:
2323
2424
```
25-
java -cp google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.7.1-SNAPSHOT-shaded.jar:google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.7.1-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
25+
java -cp google-cloud-contrib/google-cloud-nio/target/google-cloud-nio-0.8.3-alpha-SNAPSHOT-shaded.jar:google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.8.3-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
2626
```
2727
2828
Notice that it lists Google Cloud Storage, which it wouldn't if you ran it without the NIO jar:
2929
```
30-
java -cp google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.7.1-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
30+
java -cp google-cloud-contrib/google-cloud-nio-examples/target/google-cloud-nio-examples-0.8.3-alpha-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
3131
```
3232
3333
The sample doesn't have anything about Google Cloud Storage in it. It gets that ability from the NIO

google-cloud-contrib/google-cloud-nio-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.cloud</groupId>
1313
<artifactId>google-cloud-contrib</artifactId>
14-
<version>0.8.1-SNAPSHOT</version>
14+
<version>0.8.2-alpha</version>
1515
</parent>
1616
<properties>
1717
<site.installationModule>google-cloud-nio-examples</site.installationModule>

0 commit comments

Comments
 (0)