Skip to content
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
29 changes: 0 additions & 29 deletions google-cloud-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
</parent>
<properties>
<site.installationModule>google-cloud-bigquery</site.installationModule>
<artifact.version>${project.version}</artifact.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -71,15 +70,6 @@
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>./..</directory>
<filtering>true</filtering>
<includes>
<include>project.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<!-- Allow script to run, so we can run benchmarks. -->
Expand All @@ -89,25 +79,6 @@
<cleanupDaemonThreads>false</cleanupDaemonThreads>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<copy file="${project.build.outputDirectory}/project.properties"
toFile="${project.build.outputDirectory}/com/google/cloud/bigquery/project.properties"
overwrite="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
28 changes: 0 additions & 28 deletions google-cloud-bigquerydatatransfer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,35 +102,7 @@
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>./..</directory>
<filtering>true</filtering>
<includes>
<include>project.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<copy file="${project.build.outputDirectory}/project.properties"
toFile="${project.build.outputDirectory}/com/google/cloud/bigquerydatatransfer/project.properties"
overwrite="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.core.PropertiesProvider;
import com.google.api.gax.grpc.GrpcExtraHeaderData;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
Expand Down Expand Up @@ -92,15 +92,6 @@ public class DataTransferServiceSettings extends ClientSettings<DataTransferServ
.add("https://www.googleapis.com/auth/cloud-platform.read-only")
.build();

private static final String DEFAULT_GAPIC_NAME = "gapic";
private static final String DEFAULT_GAPIC_VERSION = "";

private static final String PROPERTIES_FILE =
"/com/google/cloud/bigquery/datatransfer/project.properties";
private static final String META_VERSION_KEY = "artifact.version";

private static String gapicVersion;

private final UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings;
private final PagedCallSettings<
ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse>
Expand Down Expand Up @@ -249,19 +240,10 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratorHeader(DEFAULT_GAPIC_NAME, getGapicVersion())
.setApiClientHeaderLineKey("x-goog-api-client")
.addApiClientHeaderLineData(GrpcExtraHeaderData.getXGoogApiClientData());
}

private static String getGapicVersion() {
if (gapicVersion == null) {
gapicVersion =
PropertiesProvider.loadProperty(
DataTransferServiceSettings.class, PROPERTIES_FILE, META_VERSION_KEY);
gapicVersion = gapicVersion == null ? DEFAULT_GAPIC_VERSION : gapicVersion;
}
return gapicVersion;
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(DataTransferServiceSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}

/** Returns a new builder for this class. */
Expand Down
29 changes: 0 additions & 29 deletions google-cloud-bigtable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
</parent>
<properties>
<site.installationModule>google-cloud-bigtable</site.installationModule>
<artifact.version>${project.version}</artifact.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -107,35 +106,7 @@
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>./..</directory>
<filtering>true</filtering>
<includes>
<include>project.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<copy file="${project.build.outputDirectory}/project.properties"
toFile="${project.build.outputDirectory}/com/google/cloud/bigtable/project.properties"
overwrite="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.core.PropertiesProvider;
import com.google.api.gax.grpc.GrpcExtraHeaderData;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
Expand Down Expand Up @@ -105,15 +105,6 @@ public class BigtableInstanceAdminSettings extends ClientSettings<BigtableInstan
.add("https://www.googleapis.com/auth/cloud-platform.read-only")
.build();

private static final String DEFAULT_GAPIC_NAME = "gapic";
private static final String DEFAULT_GAPIC_VERSION = "";

private static final String PROPERTIES_FILE =
"/com/google/cloud/bigtable/admin/project.properties";
private static final String META_VERSION_KEY = "artifact.version";

private static String gapicVersion;

private final UnaryCallSettings<CreateInstanceRequest, Operation> createInstanceSettings;
private final OperationCallSettings<CreateInstanceRequest, Instance, CreateInstanceMetadata>
createInstanceOperationSettings;
Expand Down Expand Up @@ -244,19 +235,10 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratorHeader(DEFAULT_GAPIC_NAME, getGapicVersion())
.setApiClientHeaderLineKey("x-goog-api-client")
.addApiClientHeaderLineData(GrpcExtraHeaderData.getXGoogApiClientData());
}

private static String getGapicVersion() {
if (gapicVersion == null) {
gapicVersion =
PropertiesProvider.loadProperty(
BigtableInstanceAdminSettings.class, PROPERTIES_FILE, META_VERSION_KEY);
gapicVersion = gapicVersion == null ? DEFAULT_GAPIC_VERSION : gapicVersion;
}
return gapicVersion;
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(BigtableInstanceAdminSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}

/** Returns a new builder for this class. */
Expand Down Expand Up @@ -408,7 +390,7 @@ private static Builder createDefault() {
Builder builder = new Builder((ClientContext) null);
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
return initDefaults(builder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.core.PropertiesProvider;
import com.google.api.gax.grpc.GrpcExtraHeaderData;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
Expand Down Expand Up @@ -102,15 +102,6 @@ public class BigtableTableAdminSettings extends ClientSettings<BigtableTableAdmi
.add("https://www.googleapis.com/auth/cloud-platform.read-only")
.build();

private static final String DEFAULT_GAPIC_NAME = "gapic";
private static final String DEFAULT_GAPIC_VERSION = "";

private static final String PROPERTIES_FILE =
"/com/google/cloud/bigtable/admin/project.properties";
private static final String META_VERSION_KEY = "artifact.version";

private static String gapicVersion;

private final UnaryCallSettings<CreateTableRequest, Table> createTableSettings;
private final PagedCallSettings<ListTablesRequest, ListTablesResponse, ListTablesPagedResponse>
listTablesSettings;
Expand Down Expand Up @@ -194,19 +185,10 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratorHeader(DEFAULT_GAPIC_NAME, getGapicVersion())
.setApiClientHeaderLineKey("x-goog-api-client")
.addApiClientHeaderLineData(GrpcExtraHeaderData.getXGoogApiClientData());
}

private static String getGapicVersion() {
if (gapicVersion == null) {
gapicVersion =
PropertiesProvider.loadProperty(
BigtableTableAdminSettings.class, PROPERTIES_FILE, META_VERSION_KEY);
gapicVersion = gapicVersion == null ? DEFAULT_GAPIC_VERSION : gapicVersion;
}
return gapicVersion;
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(BigtableTableAdminSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}

/** Returns a new builder for this class. */
Expand Down Expand Up @@ -371,7 +353,7 @@ private static Builder createDefault() {
Builder builder = new Builder((ClientContext) null);
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
return initDefaults(builder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.core.PropertiesProvider;
import com.google.api.gax.grpc.GrpcExtraHeaderData;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
Expand Down Expand Up @@ -94,14 +94,6 @@ public class BigtableSettings extends ClientSettings<BigtableSettings> {
.add("https://www.googleapis.com/auth/cloud-platform.read-only")
.build();

private static final String DEFAULT_GAPIC_NAME = "gapic";
private static final String DEFAULT_GAPIC_VERSION = "";

private static final String PROPERTIES_FILE = "/com/google/cloud/bigtable/project.properties";
private static final String META_VERSION_KEY = "artifact.version";

private static String gapicVersion;

private final StreamingCallSettings<ReadRowsRequest, ReadRowsResponse> readRowsSettings;
private final StreamingCallSettings<SampleRowKeysRequest, SampleRowKeysResponse>
sampleRowKeysSettings;
Expand Down Expand Up @@ -189,19 +181,9 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratorHeader(DEFAULT_GAPIC_NAME, getGapicVersion())
.setApiClientHeaderLineKey("x-goog-api-client")
.addApiClientHeaderLineData(GrpcExtraHeaderData.getXGoogApiClientData());
}

private static String getGapicVersion() {
if (gapicVersion == null) {
gapicVersion =
PropertiesProvider.loadProperty(
BigtableSettings.class, PROPERTIES_FILE, META_VERSION_KEY);
gapicVersion = gapicVersion == null ? DEFAULT_GAPIC_VERSION : gapicVersion;
}
return gapicVersion;
.setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(BigtableSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}

/** Returns a new builder for this class. */
Expand Down Expand Up @@ -309,7 +291,7 @@ private static Builder createDefault() {
Builder builder = new Builder((ClientContext) null);
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
return initDefaults(builder);
}
Expand Down
Loading