Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make pubsub high perf compile #1474

Merged
merged 8 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Java idiomatic client for [Google Cloud Platform][cloud-platform] services.

[![Build Status](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java)
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/google-cloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/google-cloud-java?branch=master)
[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud.svg)]( https://img.shields.io/maven-central/v/com.google.cloud/google-cloud.svg)
[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.google.cloud%22%20a%3A%22google-cloud%22)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java)
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)

Expand Down Expand Up @@ -43,16 +43,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud:0.7.0'
compile 'com.google.cloud:google-cloud:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.8.0"
```

Example Applications
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-bigquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>0.7.0</version>
<version>0.8.0-beta</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-bigquery:0.7.0'
compile 'com.google.cloud:google-cloud-bigquery:0.8.0-beta'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.8.0-beta"
```

Example Application
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-bigquery</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-compute</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-compute:0.7.0'
compile 'com.google.cloud:google-cloud-compute:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "0.8.0"
```

Example Application
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-compute/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-compute</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-contrib</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-contrib:0.7.0'
compile 'com.google.cloud:google-cloud-contrib:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-contrib" % "0.8.0"
```

### google-cloud-nio-examples
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-contrib/google-cloud-nio-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-contrib</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-nio-examples</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-contrib/google-cloud-nio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-nio</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-nio:0.7.0'
compile 'com.google.cloud:google-cloud-nio:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-nio" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-nio" % "0.8.0"
```

Example Applications
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-contrib/google-cloud-nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-contrib</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-nio</site.installationModule>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-contrib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-contrib</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-core:0.7.0'
compile 'com.google.cloud:google-cloud-core:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-core" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-core" % "0.8.0"
```

Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-core</site.installationModule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ protected final void startProcess(String blockUntilOutput)
* and stop any possible thread listening for its output.
*/
protected final int waitForProcess(Duration timeout) throws IOException, InterruptedException, TimeoutException {
if (blockingProcessReader != null) {
blockingProcessReader.terminate();
blockingProcessReader = null;
}
if (activeRunner != null) {
int exitCode = activeRunner.waitFor(timeout);
activeRunner = null;
return exitCode;
}
if (blockingProcessReader != null) {
blockingProcessReader.join();
blockingProcessReader = null;
}
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ private BlockingProcessStreamReader(String emulator, InputStream stream, String
}
}

void terminate() throws IOException {
interrupt();
}

@Override
public void run() {
String previousLine = "";
Expand All @@ -79,9 +75,7 @@ public void run() {
processLogLine(previousLine, nextLine);
}
} catch (IOException e) {
if (!isInterrupted()) {
e.printStackTrace(System.err);
}
e.printStackTrace(System.err);
}
processLogLine(previousLine, firstNonNull(nextLine, ""));
writeLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,6 @@ Multimap<Level, String> getLogs() {
}
}

@Test
public void testBlockUntil() throws IOException {
InputStream stream = new ByteArrayInputStream(OUTPUT.getBytes(Charsets.UTF_8));
BlockingProcessStreamReader thread =
BlockingProcessStreamReader.start("emulator", stream, BLOCK_UNTIL, null);
thread.terminate();
stream.close();
}

@Test
public void testForwardLogEntry() throws IOException, InterruptedException {
TestLogger logger = new TestLogger();
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-datastore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
<version>0.7.0</version>
<version>0.8.0-beta</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-datastore:0.7.0'
compile 'com.google.cloud:google-cloud-datastore:0.8.0-beta'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "0.8.0-beta"
```

Example Application
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-datastore</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-dns</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-dns:0.7.0'
compile 'com.google.cloud:google-cloud-dns:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-dns" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-dns" % "0.8.0"
```

Example Application
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-dns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-dns</site.installationModule>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-errorreporting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-errorreporting</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-examples</artifactId>
<version>0.7.0</version>
<version>0.8.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-examples:0.7.0'
compile 'com.google.cloud:google-cloud-examples:0.8.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-examples" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-examples" % "0.8.0"
```

To run examples from your command line:
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-examples</site.installationModule>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-language/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-language</site.installationModule>
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ Add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-logging</artifactId>
<version>0.7.0</version>
<version>0.8.0-beta</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.cloud:google-cloud-logging:0.7.0'
compile 'com.google.cloud:google-cloud-logging:0.8.0-beta'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "0.7.0"
libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "0.8.0-beta"
```

Example Application
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-logging</site.installationModule>
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-monitoring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pom</artifactId>
<version>0.8.0</version>
<version>0.8.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>google-cloud-monitoring</site.installationModule>
Expand Down
Loading