Skip to content

Commit d75ebc1

Browse files
feat: add support for new cloud client test framework in google-cloud-spanner-executor (#2217)
* Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Fix error code mapping. * Remove read_timestamp field in read result as it will never use it.(for optimistic only) * Mark all fields in spanner action outcome as optional. * Refactored existing protos according to api dev lint. Prepare new protos for existing executor features. * Added DML/batch DML/query features. Commented out Batch txns and change stream for future support. * Added support to Write. * Update batch txn related protos. * Add support for batch txn feature. * Add metadata for batch read. Prepare protos for change stream. * Implement the support for change stream. * Update change stream proto fields. * Fix create cloud backup bug. * Fix numeric related issue. Fix partition token. Fix request index for batch read. * Make all calls to streamObserver synchronized to prevent concurrency issue. This is achieved by wrapping streamObserver into executionFlowContext and make all the calls synchronized. * Rebase onto java-spanner changes. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Add Spanner executor proto and implementation for Read/Mutation and admin actions. * Fix error code mapping. * Remove read_timestamp field in read result as it will never use it.(for optimistic only) * Mark all fields in spanner action outcome as optional. * Refactored existing protos according to api dev lint. Prepare new protos for existing executor features. * Added DML/batch DML/query features. Commented out Batch txns and change stream for future support. * Added support to Write. * Update batch txn related protos. * Add support for batch txn feature. * Add metadata for batch read. Prepare protos for change stream. * Implement the support for change stream. * Update change stream proto fields. * Fix create cloud backup bug. * Fix numeric related issue. Fix partition token. Fix request index for batch read. * Make all calls to streamObserver synchronized to prevent concurrency issue. This is achieved by wrapping streamObserver into executionFlowContext and make all the calls synchronized. * Replaces protos with the final released version. * Apply maven-protobuf-plugin to generate grpc stubs, remove grpc folder for executor proto. Add key file option to client creation. * Remove partitionTestUtil since partitionToken can be fetched now. * Remove partitionTestUtil since partitionToken can be fetched now. * Cleanup. * Fix pageToken for all the list operations. Reformat code. * Rephrase some comments. Add createUserInstanceConfig and deleteUserInstanceConfig. Fix instanceConfig conversion issue. * Fix key flag issue. Fix replicas in createUserInstanceConfig. * Fix some admin actions regarding instanceId args. * Remove unused stuff in metadata. Fix numeric key issue. * Remove debug message. * Remove debug message. * Update build files to accommodate with proto dependency changes. * Update pom file. * Update pom file. * fix: update comments * fix: clean up dependencies. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: addressed comments. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent d5372e6 commit d75ebc1

File tree

12 files changed

+4527
-0
lines changed

12 files changed

+4527
-0
lines changed

google-cloud-spanner-bom/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
<artifactId>google-cloud-spanner</artifactId>
5656
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner:current} -->
5757
</dependency>
58+
<dependency>
59+
<groupId>com.google.cloud</groupId>
60+
<artifactId>google-cloud-spanner-executor</artifactId>
61+
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner-executor:current} -->
62+
</dependency>
5863
<dependency>
5964
<groupId>com.google.cloud</groupId>
6065
<artifactId>google-cloud-spanner</artifactId>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
4+
<id>jar-with-dependencies</id>
5+
<formats>
6+
<format>jar</format>
7+
</formats>
8+
<includeBaseDirectory>false</includeBaseDirectory>
9+
<dependencySets>
10+
<dependencySet>
11+
<outputDirectory>/</outputDirectory>
12+
<useProjectArtifact>false</useProjectArtifact>
13+
<unpack>true</unpack>
14+
<unpackOptions>
15+
<excludes>
16+
<exclude>io.grpc.LoadBalancerProvider</exclude>
17+
</excludes>
18+
</unpackOptions>
19+
</dependencySet>
20+
</dependencySets>
21+
<fileSets>
22+
<fileSet>
23+
<directory>${project.build.outputDirectory}</directory>
24+
<outputDirectory>.</outputDirectory>
25+
</fileSet>
26+
</fileSets>
27+
</assembly>

google-cloud-spanner-executor/pom.xml

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.google.cloud</groupId>
7+
<artifactId>google-cloud-spanner-executor</artifactId>
8+
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner-executor:current} -->
9+
<packaging>jar</packaging>
10+
<name>Google Cloud Spanner Executor</name>
11+
12+
<parent>
13+
<groupId>com.google.cloud</groupId>
14+
<artifactId>google-cloud-spanner-parent</artifactId>
15+
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner:current} -->
16+
</parent>
17+
18+
<properties>
19+
<maven.compiler.target>1.8</maven.compiler.target>
20+
<maven.compiler.source>1.8</maven.compiler.source>
21+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22+
</properties>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>com.google.cloud</groupId>
27+
<artifactId>google-cloud-spanner</artifactId>
28+
</dependency>
29+
<dependency>
30+
<groupId>io.grpc</groupId>
31+
<artifactId>grpc-api</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>io.grpc</groupId>
35+
<artifactId>grpc-netty-shaded</artifactId>
36+
</dependency>
37+
<dependency>
38+
<groupId>io.grpc</groupId>
39+
<artifactId>grpc-stub</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>com.google.api</groupId>
43+
<artifactId>api-common</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>com.google.protobuf</groupId>
47+
<artifactId>protobuf-java</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>com.google.protobuf</groupId>
51+
<artifactId>protobuf-java-util</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>com.google.api.grpc</groupId>
55+
<artifactId>proto-google-common-protos</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.google.cloud</groupId>
59+
<artifactId>google-cloud-core</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.google.auth</groupId>
63+
<artifactId>google-auth-library-oauth2-http</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>com.google.http-client</groupId>
67+
<artifactId>google-http-client</artifactId>
68+
</dependency>
69+
<dependency>
70+
<groupId>com.google.api.grpc</groupId>
71+
<artifactId>proto-google-cloud-spanner-admin-instance-v1</artifactId>
72+
</dependency>
73+
<dependency>
74+
<groupId>com.google.api.grpc</groupId>
75+
<artifactId>proto-google-cloud-spanner-v1</artifactId>
76+
</dependency>
77+
<dependency>
78+
<groupId>com.google.api.grpc</groupId>
79+
<artifactId>proto-google-cloud-spanner-admin-database-v1</artifactId>
80+
</dependency>
81+
<dependency>
82+
<groupId>com.google.api.grpc</groupId>
83+
<artifactId>proto-google-cloud-spanner-executor-v1</artifactId>
84+
<version>1.0.0</version>
85+
</dependency>
86+
<dependency>
87+
<groupId>com.google.guava</groupId>
88+
<artifactId>guava</artifactId>
89+
</dependency>
90+
<dependency>
91+
<groupId>com.google.api</groupId>
92+
<artifactId>gax</artifactId>
93+
</dependency>
94+
<dependency>
95+
<groupId>com.google.api</groupId>
96+
<artifactId>gax-grpc</artifactId>
97+
</dependency>
98+
<dependency>
99+
<groupId>org.threeten</groupId>
100+
<artifactId>threetenbp</artifactId>
101+
</dependency>
102+
<dependency>
103+
<groupId>com.google.code.findbugs</groupId>
104+
<artifactId>jsr305</artifactId>
105+
</dependency>
106+
<dependency>
107+
<groupId>com.google.auth</groupId>
108+
<artifactId>google-auth-library-credentials</artifactId>
109+
</dependency>
110+
<dependency>
111+
<groupId>io.grpc</groupId>
112+
<artifactId>grpc-services</artifactId>
113+
</dependency>
114+
<dependency>
115+
<groupId>commons-cli</groupId>
116+
<artifactId>commons-cli</artifactId>
117+
<version>1.5.0</version>
118+
</dependency>
119+
<dependency>
120+
<groupId>commons-io</groupId>
121+
<artifactId>commons-io</artifactId>
122+
<version>2.11.0</version>
123+
</dependency>
124+
125+
<dependency>
126+
<groupId>org.jetbrains</groupId>
127+
<artifactId>annotations</artifactId>
128+
<version>RELEASE</version>
129+
<scope>compile</scope>
130+
</dependency>
131+
</dependencies>
132+
<build>
133+
<finalName>google-spanner-cloud-executor</finalName>
134+
<plugins>
135+
<plugin>
136+
<artifactId>maven-assembly-plugin</artifactId>
137+
<version>3.4.2</version>
138+
<configuration>
139+
<descriptors>
140+
<descriptor>assembly-descriptor.xml</descriptor>
141+
</descriptors>
142+
<archive>
143+
<manifest>
144+
<mainClass>com.google.cloud.executor.spanner.WorkerProxy</mainClass>
145+
</manifest>
146+
</archive>
147+
</configuration>
148+
<executions>
149+
<execution>
150+
<id>make-assembly</id>
151+
<phase>package</phase>
152+
<goals>
153+
<goal>single</goal>
154+
</goals>
155+
</execution>
156+
</executions>
157+
</plugin>
158+
<plugin>
159+
<groupId>org.apache.maven.plugins</groupId>
160+
<artifactId>maven-failsafe-plugin</artifactId>
161+
<version>3.0.0-M7</version>
162+
</plugin>
163+
</plugins>
164+
</build>
165+
</project>

0 commit comments

Comments
 (0)