Last active
May 31, 2022 21:38
-
-
Save djaquels/0667d5007e3ebf84561468c1c343a28f to your computer and use it in GitHub Desktop.
Bgitable Custom GRPC Channel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val settingsBuilder = BigtableDataSettings.newBuilder() | |
settingsBuilder.setProjectId("projectId") | |
settingsBuilder.setInstanceId("instanceId") | |
settingsBuilder.setAppProfileId("default") | |
val grpcSettings = EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder() | |
grpcSettings.setMaxInboundMessageSize(550000000) | |
println("Before Building Client Settings: ") | |
println(grpcSettings.getMaxInboundMessageSize().toString) | |
settingsBuilder.stubSettings().setTransportChannelProvider(grpcSettings.build()) | |
val settings = settingsBuilder.build() | |
println("Buffer Size After Building Settings: ") | |
val provider = settings.getStubSettings().getTransportChannelProvider().asInstanceOf[InstantiatingGrpcChannelProvider] | |
val bufferSize = provider.toBuilder().getMaxInboundMessageSize() | |
println(bufferSize) | |
val client = BigtableDataClient.create(settings) | |
println("Buffer Size After Creating Client: ") | |
val providerAfter = settings.getStubSettings().getTransportChannelProvider().asInstanceOf[InstantiatingGrpcChannelProvider] | |
val bufferSizeAfter = provider.toBuilder().getMaxInboundMessageSize() | |
println(bufferSizeAfter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Java Version