Skip to content

Commit

Permalink
Merge pull request #88 from khorshuheng/update-bigtable-client
Browse files Browse the repository at this point in the history
Upgrade BigTable Client version
  • Loading branch information
khorshuheng authored Feb 21, 2023
2 parents a1c40a7 + 1f6b902 commit 1151d2f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/groovy/caraml.grpc-service.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'net.devh:grpc-spring-boot-starter:2.13.1.RELEASE'
implementation 'com.google.protobuf:protobuf-java-util:3.19.2'
implementation 'net.devh:grpc-spring-boot-starter:2.14.0.RELEASE'
implementation 'com.google.protobuf:protobuf-java-util:3.21.12'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus:1.9.2'
Expand Down
4 changes: 2 additions & 2 deletions caraml-store-protobuf/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
protobufVersion = '3.19.2'
grpcVersion = '1.42.2'
protobufVersion = '3.21.12'
grpcVersion = '1.52.1'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import io.grpc.BindableService;
import io.grpc.Status;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.binder.grpc.MetricCollectingServerInterceptor;
import java.time.Duration;
import java.util.Collection;
import java.util.List;
import java.util.function.UnaryOperator;
import lombok.Getter;
import lombok.Setter;
import net.devh.boot.grpc.server.metric.MetricCollectingServerInterceptor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
3 changes: 2 additions & 1 deletion caraml-store-serving/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ dependencies {
implementation 'com.google.guava:guava:26.0-jre'
implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'org.apache.avro:avro:1.10.2'
implementation 'com.google.cloud:google-cloud-bigtable:2.5.0'
implementation 'com.google.cloud:google-cloud-bigtable:2.19.1'
implementation 'com.google.cloud:google-cloud-bigtable-bom:2.19.1'
implementation 'io.lettuce:lettuce-core:6.2.0.RELEASE'
implementation 'io.netty:netty-transport-native-epoll:4.1.52.Final:linux-x86_64'
testImplementation project(':caraml-store-testutil')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ public class BigTableStoreConfig {
private String instanceId;
private String appProfileId;

private Boolean enableClientSideMetrics;

@Bean
public OnlineRetriever getRetriever() {
try {
BigtableDataClient client =
BigtableDataClient.create(
BigtableDataSettings.newBuilder()
.setProjectId(projectId)
.setInstanceId(instanceId)
.setAppProfileId(appProfileId)
.build());
BigtableDataSettings settings =
BigtableDataSettings.newBuilder()
.setProjectId(projectId)
.setInstanceId(instanceId)
.setAppProfileId(appProfileId)
.build();
if (enableClientSideMetrics) {
BigtableDataSettings.enableBuiltinMetrics();
}
BigtableDataClient client = BigtableDataClient.create(settings);
return new BigTableOnlineRetriever(client);
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down
1 change: 1 addition & 0 deletions caraml-store-serving/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ caraml:
projectId: gcp-project-name
instanceId: bigtable-instance
appProfileId: default
enableClientSideMetrics: false

grpc:
server:
Expand Down

0 comments on commit 1151d2f

Please sign in to comment.