From 313d926f89406700aea63acfe4b9e11c3e0aebfb Mon Sep 17 00:00:00 2001 From: Anthony Yeh Date: Fri, 23 Sep 2016 11:41:17 -0700 Subject: [PATCH] Update to gRPC 1.0.0 and protobuf 3.0.0. (#2012) --- bootstrap.sh | 2 +- composer.json | 12 +- composer.lock | 183 +- docker/bootstrap/Dockerfile.common | 2 +- go/vt/proto/query/query.pb.go | 2 +- .../vitess/hadoop/VitessInputFormat.java | 2 +- java/jdbc/pom.xml | 2 +- java/pom.xml | 4 +- php/README.md | 2 +- php/tests/VTGateConnTest.php | 17 +- py/vtctl/grpc_vtctl_client.py | 10 +- py/vtdb/grpc_vtgate_client.py | 89 +- py/vtdb/prefer_vtroot_imports.py | 39 + py/vtproto/automation_pb2.py | 3 +- py/vtproto/automationservice_pb2.py | 115 +- py/vtproto/binlogdata_pb2.py | 3 +- py/vtproto/binlogservice_pb2.py | 126 +- py/vtproto/logutil_pb2.py | 3 +- py/vtproto/mysqlctl_pb2.py | 174 +- py/vtproto/query_pb2.py | 7 +- py/vtproto/queryservice_pb2.py | 492 +++-- py/vtproto/replicationdata_pb2.py | 3 +- py/vtproto/tableacl_pb2.py | 3 +- py/vtproto/tabletmanagerdata_pb2.py | 3 +- py/vtproto/tabletmanagerservice_pb2.py | 1725 ++++++++++++----- py/vtproto/throttlerdata_pb2.py | 9 +- py/vtproto/throttlerservice_pb2.py | 261 ++- py/vtproto/topodata_pb2.py | 3 +- py/vtproto/vschema_pb2.py | 3 +- py/vtproto/vtctldata_pb2.py | 3 +- py/vtproto/vtctlservice_pb2.py | 75 +- py/vtproto/vtgate_pb2.py | 3 +- py/vtproto/vtgateservice_pb2.py | 802 ++++++-- py/vtproto/vtrpc_pb2.py | 3 +- py/vtproto/vttest_pb2.py | 3 +- py/vtproto/vtworkerdata_pb2.py | 3 +- py/vtproto/vtworkerservice_pb2.py | 84 +- py/vtproto/workflow_pb2.py | 3 +- py/vttest/run_local_database.py | 2 + test/utils.py | 10 +- test/vtgatev2_test.py | 8 +- travis/install_grpc.sh | 33 +- vendor/vendor.json | 124 +- 43 files changed, 3138 insertions(+), 1317 deletions(-) create mode 100644 py/vtdb/prefer_vtroot_imports.py diff --git a/bootstrap.sh b/bootstrap.sh index 9aa82db03d..1f9ddebf48 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -57,7 +57,7 @@ fi # install gRPC C++ base, so we can install the python adapters. # this also installs protobufs grpc_dist=$VTROOT/dist/grpc -grpc_ver=release-0_13_0 +grpc_ver=v1.0.0 if [ $SKIP_ROOT_INSTALLS == "True" ]; then echo "skipping grpc build, as root version was already installed." elif [[ -f $grpc_dist/.build_finished && "$(cat $grpc_dist/.build_finished)" == "$grpc_ver" ]]; then diff --git a/composer.json b/composer.json index 256f4d5603..54337b8b34 100644 --- a/composer.json +++ b/composer.json @@ -5,17 +5,11 @@ "config": { "vendor-dir": "php/vendor" }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/pixelfederation/datto-Protobuf-PHP-fake" - } - ], "require": { "php": ">=5.5.0", - "stanley-cheung/protobuf-php": "1.0.x-dev", - "google/auth": "v0.7", - "grpc/grpc": "dev-release-0_13" + "stanley-cheung/protobuf-php": "v0.6", + "google/auth": "v0.10", + "grpc/grpc": "v1.0.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 4b2ddedd67..4ef7ef1e91 100644 --- a/composer.lock +++ b/composer.lock @@ -4,34 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ee30f9a7bdb87d0117d08f7f81a74451", - "content-hash": "ac27aa6775524f2c7df3c5eab6058f13", + "hash": "b37bde69302058ef01f45bfe5858e396", + "content-hash": "64f1877959de9ad06d22633049abb636", "packages": [ - { - "name": "datto/protobuf-php", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/pixelfederation/datto-Protobuf-PHP-fake.git", - "reference": "e85085f54abad7e30f72c8086adae47c21372e7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pixelfederation/datto-Protobuf-PHP-fake/zipball/e85085f54abad7e30f72c8086adae47c21372e7f", - "reference": "e85085f54abad7e30f72c8086adae47c21372e7f", - "shasum": "" - }, - "type": "library", - "license": [ - "MIT" - ], - "description": "Fake datto/protobuf-php repository for overriding in youtube/vitess", - "support": { - "source": "https://github.com/pixelfederation/datto-Protobuf-PHP-fake/tree/master", - "issues": "https://github.com/pixelfederation/datto-Protobuf-PHP-fake/issues" - }, - "time": "2016-07-19 22:01:45" - }, { "name": "firebase/php-jwt", "version": "v3.0.0", @@ -77,27 +52,28 @@ }, { "name": "google/auth", - "version": "v0.7", + "version": "v0.10", "source": { "type": "git", "url": "https://github.com/google/google-auth-library-php.git", - "reference": "f3288860ce7b3076a6768e4ff7b85e0f6100e221" + "reference": "760e3fbe4064c0525c22e27e5374eada3c103da8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/f3288860ce7b3076a6768e4ff7b85e0f6100e221", - "reference": "f3288860ce7b3076a6768e4ff7b85e0f6100e221", + "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/760e3fbe4064c0525c22e27e5374eada3c103da8", + "reference": "760e3fbe4064c0525c22e27e5374eada3c103da8", "shasum": "" }, "require": { "firebase/php-jwt": "~2.0|~3.0", - "guzzlehttp/guzzle": "~5.2|~6.0", - "guzzlehttp/psr7": "1.2.*", + "guzzlehttp/guzzle": "~5.3|~6.0", + "guzzlehttp/psr7": "~1.2", "php": ">=5.4", - "psr/http-message": "1.0.*" + "psr/cache": "^1.0", + "psr/http-message": "^1.0" }, "require-dev": { - "phplint/phplint": "0.0.1", + "friendsofphp/php-cs-fixer": "^1.11", "phpunit/phpunit": "3.7.*" }, "type": "library", @@ -120,26 +96,28 @@ "google", "oauth2" ], - "time": "2016-03-03 02:03:58" + "time": "2016-08-02 22:00:48" }, { "name": "grpc/grpc", - "version": "dev-release-0_13", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/grpc/grpc.git", - "reference": "768c769acef173ef6ba4fc076e782607816c5ab9" + "reference": "2a69139aa7f609e439c24a46754252a5f9d37500" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/grpc/grpc/zipball/768c769acef173ef6ba4fc076e782607816c5ab9", - "reference": "768c769acef173ef6ba4fc076e782607816c5ab9", + "url": "https://api.github.com/repos/grpc/grpc/zipball/2a69139aa7f609e439c24a46754252a5f9d37500", + "reference": "2a69139aa7f609e439c24a46754252a5f9d37500", "shasum": "" }, "require": { - "datto/protobuf-php": "dev-master", - "google/auth": "v0.7", - "php": ">=5.5.0" + "php": ">=5.5.0", + "stanley-cheung/protobuf-php": "v0.6" + }, + "require-dev": { + "google/auth": "v0.9" }, "type": "library", "autoload": { @@ -156,31 +134,31 @@ "keywords": [ "rpc" ], - "time": "2016-04-29 18:06:37" + "time": "2016-08-19 00:55:10" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.0", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d094e337976dff9d8e2424e8485872194e768662" + "reference": "3b45e7675e8997ac96142b0265d158343958f708" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", - "reference": "d094e337976dff9d8e2424e8485872194e768662", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3b45e7675e8997ac96142b0265d158343958f708", + "reference": "3b45e7675e8997ac96142b0265d158343958f708", "shasum": "" }, "require": { - "guzzlehttp/promises": "~1.0", - "guzzlehttp/psr7": "~1.1", - "php": ">=5.5.0" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.3.1", + "php": ">=5.5" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" }, "type": "library", "extra": { @@ -218,7 +196,7 @@ "rest", "web service" ], - "time": "2016-03-21 20:02:09" + "time": "2016-08-04 00:05:49" }, { "name": "guzzlehttp/promises", @@ -273,16 +251,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.2.3", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b" + "reference": "64862e854f876bc5aee2996cab2f552db8586065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/2e89629ff057ebb49492ba08e6995d3a6a80021b", - "reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/64862e854f876bc5aee2996cab2f552db8586065", + "reference": "64862e854f876bc5aee2996cab2f552db8586065", "shasum": "" }, "require": { @@ -298,7 +276,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -318,16 +296,69 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2016-02-18 21:54:00" + "time": "2016-08-03 09:33:34" + }, + { + "name": "psr/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06 20:24:11" }, { "name": "psr/http-message", @@ -335,12 +366,12 @@ "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -368,6 +399,7 @@ } ], "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", @@ -376,20 +408,20 @@ "request", "response" ], - "time": "2015-05-04 20:22:00" + "time": "2016-08-06 14:39:51" }, { "name": "stanley-cheung/protobuf-php", - "version": "dev-master", + "version": "v0.6", "source": { "type": "git", "url": "https://github.com/stanley-cheung/Protobuf-PHP.git", - "reference": "02e2c2ac00f42bc788cedbd10306d3565fec8090" + "reference": "e5d3b55b1898233e36abb552281d2dd0ce86c5e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stanley-cheung/Protobuf-PHP/zipball/02e2c2ac00f42bc788cedbd10306d3565fec8090", - "reference": "02e2c2ac00f42bc788cedbd10306d3565fec8090", + "url": "https://api.github.com/repos/stanley-cheung/Protobuf-PHP/zipball/e5d3b55b1898233e36abb552281d2dd0ce86c5e7", + "reference": "e5d3b55b1898233e36abb552281d2dd0ce86c5e7", "shasum": "" }, "require": { @@ -410,6 +442,7 @@ "DrSlump": "library/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -427,19 +460,13 @@ "protocol buffer", "serializing" ], - "support": { - "source": "https://github.com/stanley-cheung/Protobuf-PHP/tree/v0.5" - }, - "time": "2016-07-13 23:17:34" + "time": "2016-07-22 02:12:15" } ], "packages-dev": [], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "stanley-cheung/protobuf-php": 20, - "grpc/grpc": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/docker/bootstrap/Dockerfile.common b/docker/bootstrap/Dockerfile.common index 9203cc7509..87da38c1dc 100644 --- a/docker/bootstrap/Dockerfile.common +++ b/docker/bootstrap/Dockerfile.common @@ -42,7 +42,7 @@ RUN export MAKEFLAGS="-j$(nproc)" && \ curl -sL --connect-timeout 10 --retry 3 \ https://phar.phpunit.de/phpunit-4.8.9.phar > /vt/bin/phpunit && \ chmod +x /vt/bin/phpunit && \ - curl -sS --connect-timeout 10 --retry 3 \ + curl -sL --connect-timeout 10 --retry 3 \ https://getcomposer.org/installer | php -- --install-dir=/vt/bin --filename=composer && \ pecl install xdebug && \ echo "zend_extension=$(pecl config-get ext_dir default)/xdebug.so" > /etc/php5/cli/conf.d/20-xdebug.ini diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 1805e3eed2..f1b1ec647c 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -461,7 +461,7 @@ type Row struct { // A length of -1 means that the field is NULL. While // reading values, you have to accummulate the length // to know the offset where the next value begins in values. - Lengths []int64 `protobuf:"zigzag64,1,rep,name=lengths" json:"lengths,omitempty"` + Lengths []int64 `protobuf:"zigzag64,1,rep,packed,name=lengths" json:"lengths,omitempty"` // values contains a concatenation of all values in the row. Values []byte `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` } diff --git a/java/hadoop/src/main/java/com/youtube/vitess/hadoop/VitessInputFormat.java b/java/hadoop/src/main/java/com/youtube/vitess/hadoop/VitessInputFormat.java index 847f6b77cd..4740d4f094 100644 --- a/java/hadoop/src/main/java/com/youtube/vitess/hadoop/VitessInputFormat.java +++ b/java/hadoop/src/main/java/com/youtube/vitess/hadoop/VitessInputFormat.java @@ -2,7 +2,7 @@ package com.youtube.vitess.hadoop; import static com.google.common.base.Preconditions.checkNotNull; -import com.google.api.client.util.Lists; +import com.google.common.collect.Lists; import com.google.common.net.HostAndPort; import com.youtube.vitess.client.Context; diff --git a/java/jdbc/pom.xml b/java/jdbc/pom.xml index e55cc30666..60ea63e3dd 100644 --- a/java/jdbc/pom.xml +++ b/java/jdbc/pom.xml @@ -42,7 +42,7 @@ io.grpc grpc-all - 0.13.1 + ${grpc.version} commons-lang diff --git a/java/pom.xml b/java/pom.xml index 31046ad102..27789f9513 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -63,11 +63,11 @@ UTF-8 - 0.13.1 + 1.0.0 19.0 4.12 1.2.17 - 3.0.0-beta-2 + 3.0.0 diff --git a/php/README.md b/php/README.md index 3584fe07ed..76afdd5858 100644 --- a/php/README.md +++ b/php/README.md @@ -22,7 +22,7 @@ For example, on Debian/Ubuntu: ``` sh $ sudo apt-get install php5-dev php5-cli php-pear -$ sudo pecl install grpc-beta +$ sudo pecl install grpc ``` ### gRPC Dependencies diff --git a/php/tests/VTGateConnTest.php b/php/tests/VTGateConnTest.php index 4b5c90dcdc..81444f1bc5 100644 --- a/php/tests/VTGateConnTest.php +++ b/php/tests/VTGateConnTest.php @@ -89,17 +89,24 @@ class VTGateConnTest extends \PHPUnit_Framework_TestCase } self::$proc = $proc; - // Wait for connection to be accepted. + // Wait for the server to be ready. + $client = new Grpc\Client("$addr:$port", [ + 'credentials' => \Grpc\ChannelCredentials::createInsecure() + ]); $ctx = Context::getDefault()->withDeadlineAfter(5.0); $level = error_reporting(error_reporting() & ~ E_WARNING); + // The client creation doesn't necessarily mean the server is up. + // Send a test RPC to make sure the connection is good. + $conn = new VTGateConn($client); while (! $ctx->isCancelled()) { try { - $client = new Grpc\Client("$addr:$port", [ - 'credentials' => \Grpc\ChannelCredentials::createInsecure() - ]); - } catch (Exception $e) { + $conn->execute($ctx, '', array(), 0); + } catch (Error\Transient $e) { + // The connection isn't ready yet. Wait and try again. usleep(100000); continue; + } catch (\Vitess\Exception $e) { + // Non-transient error means the connection is at least up. } break; } diff --git a/py/vtctl/grpc_vtctl_client.py b/py/vtctl/grpc_vtctl_client.py index 324eb6dc77..1089f6d528 100644 --- a/py/vtctl/grpc_vtctl_client.py +++ b/py/vtctl/grpc_vtctl_client.py @@ -7,11 +7,9 @@ import datetime from urlparse import urlparse -# Import main protobuf library first -# to work around import order issues. -import google.protobuf # pylint: disable=unused-import +from vtdb import prefer_vtroot_imports # pylint: disable=unused-import -from grpc.beta import implementations +import grpc import vtctl_client @@ -38,8 +36,8 @@ class GRPCVtctlClient(vtctl_client.VtctlClient): self.stub.close() p = urlparse('http://' + self.addr) - channel = implementations.insecure_channel(p.hostname, p.port) - self.stub = vtctlservice_pb2.beta_create_Vtctl_stub(channel) + channel = grpc.insecure_channel('%s:%s' % (p.hostname, p.port)) + self.stub = vtctlservice_pb2.VtctlStub(channel) def close(self): self.stub = None diff --git a/py/vtdb/grpc_vtgate_client.py b/py/vtdb/grpc_vtgate_client.py index e289e91934..d1aed6e616 100644 --- a/py/vtdb/grpc_vtgate_client.py +++ b/py/vtdb/grpc_vtgate_client.py @@ -9,13 +9,9 @@ import logging import re from urlparse import urlparse -# Import main protobuf library first -# to work around import order issues. -import google.protobuf # pylint: disable=unused-import +from vtdb import prefer_vtroot_imports # pylint: disable=unused-import -from grpc.beta import implementations -from grpc.beta import interfaces -from grpc.framework.interfaces.face import face +import grpc from vtproto import vtgate_pb2 from vtproto import vtgateservice_pb2 @@ -63,14 +59,15 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, self.stub.close() p = urlparse('http://' + self.addr) + target = '%s:%s' % (p.hostname, p.port) if self.root_certificates or self.private_key or self.certificate_chain: - creds = implementations.ssl_channel_credentials( + creds = grpc.ssl_channel_credentials( self.root_certificates, self.private_key, self.certificate_chain) - channel = implementations.secure_channel(p.hostname, p.port, creds) + channel = grpc.secure_channel(target, creds) else: - channel = implementations.insecure_channel(p.hostname, p.port) - self.stub = vtgateservice_pb2.beta_create_Vitess_stub(channel) + channel = grpc.insecure_channel(target) + self.stub = vtgateservice_pb2.VitessStub(channel) def close(self): """close closes the server connection and frees up associated resources. @@ -84,7 +81,7 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, # Let's swallow that exception. try: self.rollback() - except dbexceptions.TimeoutError: + except dbexceptions.DatabaseError: pass self.stub = None @@ -100,14 +97,14 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, request = self.begin_request(effective_caller_id) response = self.stub.Begin(request, self.timeout) self.update_session(response) - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: raise _convert_exception(e, 'Begin') def commit(self): try: request = self.commit_request() self.stub.Commit(request, self.timeout) - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: raise _convert_exception(e, 'Commit') finally: self.session = None @@ -116,7 +113,7 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, try: request = self.rollback_request() self.stub.Rollback(request, self.timeout) - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: raise _convert_exception(e, 'Rollback') finally: self.session = None @@ -143,7 +140,7 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, response = method(request, self.timeout) return self.process_execute_response(method_name, response) - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: self.logger_object.log_private_data(bind_variables) raise _convert_exception( e, method_name, @@ -166,7 +163,7 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, response = method(request, self.timeout) return self.process_execute_batch_response(method_name, response) - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: self.logger_object.log_private_data(bind_variables_list) raise _convert_exception( e, method_name, @@ -181,17 +178,18 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, **kwargs): try: - request, routing_kwargs, method_name = self.stream_execute_request_and_name( - sql, bind_variables, tablet_type, - keyspace_name, - shards, - keyspace_ids, - keyranges, - effective_caller_id) + request, routing_kwargs, method_name = ( + self.stream_execute_request_and_name( + sql, bind_variables, tablet_type, + keyspace_name, + shards, + keyspace_ids, + keyranges, + effective_caller_id)) method = getattr(self.stub, method_name) it = method(request, self.timeout) first_response = it.next() - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: self.logger_object.log_private_data(bind_variables) raise _convert_exception( e, method_name, @@ -219,7 +217,7 @@ class GRPCVTGateConnection(vtgate_client.VTGateClient, response = self.stub.GetSrvKeyspace(request, self.timeout) return self.keyspace_from_response(name, response) - except (face.AbortionError, vtgate_utils.VitessError) as e: + except (grpc.RpcError, vtgate_utils.VitessError) as e: raise _convert_exception(e, keyspace=name) @vtgate_utils.exponential_backoff_retry((dbexceptions.TransientError)) @@ -272,27 +270,30 @@ def _convert_exception(exc, *args, **kwargs): new_args = (type(exc).__name__,) + exc.args if isinstance(exc, vtgate_utils.VitessError): new_exc = exc.convert_to_dbexception(new_args) - elif isinstance(exc, face.ExpirationError): - # face.ExpirationError is returned by the gRPC library when - # a request times out. Note it is a subclass of face.AbortionError - # so we have to test for it before. - new_exc = dbexceptions.TimeoutError(new_args) - elif isinstance(exc, face.AbortionError): - # face.AbortionError is the toplevel error returned by gRPC for any - # RPC that finishes earlier than expected. - msg = exc.details - if exc.code == interfaces.StatusCode.UNAVAILABLE: - if _throttler_err_pattern.search(msg): - return dbexceptions.ThrottledError(new_args) + elif isinstance(exc, grpc.RpcError): + # Most RpcErrors should also implement Call so we can get details. + if isinstance(exc, grpc.Call): + code = exc.code() + details = exc.details() + + if code == grpc.StatusCode.DEADLINE_EXCEEDED: + new_exc = dbexceptions.TimeoutError(new_args) + elif code == grpc.StatusCode.UNAVAILABLE: + if _throttler_err_pattern.search(details): + return dbexceptions.ThrottledError(new_args) + else: + return dbexceptions.TransientError(new_args) + elif code == grpc.StatusCode.ALREADY_EXISTS: + new_exc = _prune_integrity_error(details, new_args) + elif code == grpc.StatusCode.FAILED_PRECONDITION: + return dbexceptions.QueryNotServed(details, new_args) else: - return dbexceptions.TransientError(new_args) - elif exc.code == interfaces.StatusCode.ALREADY_EXISTS: - new_exc = _prune_integrity_error(msg, new_args) - elif exc.code == interfaces.StatusCode.FAILED_PRECONDITION: - return dbexceptions.QueryNotServed(msg, new_args) + # Other RPC error that we don't specifically handle. + new_exc = dbexceptions.DatabaseError(new_args + (code, details)) else: - # Unhandled RPC application error - new_exc = dbexceptions.DatabaseError(new_args + (msg,)) + # RPC error that doesn't provide code and details. + # Don't let gRPC-specific errors leak beyond this package. + new_exc = dbexceptions.DatabaseError(new_args + (exc,)) else: new_exc = exc vtgate_utils.log_exception( diff --git a/py/vtdb/prefer_vtroot_imports.py b/py/vtdb/prefer_vtroot_imports.py new file mode 100644 index 0000000000..31410ee872 --- /dev/null +++ b/py/vtdb/prefer_vtroot_imports.py @@ -0,0 +1,39 @@ +"""Reorder sys.path to put $VTROOT/dist/* paths before others. + +This ensures libraries installed there will be preferred over other versions +that may be present at the system level. We do this at runtime because +regardless of what we set in the PYTHONPATH environment variable, the system +dist-packages folder gets prepended sometimes. + +To use this, just import it before importing packages that you want to make +sure are overridden from $VTROOT/dist. + +from vtdb import prefer_vtroot_imports # pylint: disable=unused-import +""" + +import os +import sys + + +def _prefer_vtroot_imports(): + """Reorder sys.path to put $VTROOT/dist before others.""" + + vtroot = os.environ.get('VTROOT') + if not vtroot: + # VTROOT is not set. Don't try anything. + return + dist = os.path.join(vtroot, 'dist') + + dist_paths = [] + other_paths = [] + + for path in sys.path: + if path: + if path.startswith(dist): + dist_paths.append(path) + else: + other_paths.append(path) + + sys.path = [''] + dist_paths + other_paths + +_prefer_vtroot_imports() diff --git a/py/vtproto/automation_pb2.py b/py/vtproto/automation_pb2.py index 605bf90f46..7a6ac1e8c8 100644 --- a/py/vtproto/automation_pb2.py +++ b/py/vtproto/automation_pb2.py @@ -625,8 +625,9 @@ _TASK_PARAMETERSENTRY.has_options = True _TASK_PARAMETERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY.has_options = True _ENQUEUECLUSTEROPERATIONREQUEST_PARAMETERSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/automationservice_pb2.py b/py/vtproto/automationservice_pb2.py index 00a72f6661..0e0468eafe 100644 --- a/py/vtproto/automationservice_pb2.py +++ b/py/vtproto/automationservice_pb2.py @@ -29,45 +29,103 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaAutomationServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class AutomationStub(object): + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.EnqueueClusterOperation = channel.unary_unary( + '/automationservice.Automation/EnqueueClusterOperation', + request_serializer=automation__pb2.EnqueueClusterOperationRequest.SerializeToString, + response_deserializer=automation__pb2.EnqueueClusterOperationResponse.FromString, + ) + self.GetClusterOperationDetails = channel.unary_unary( + '/automationservice.Automation/GetClusterOperationDetails', + request_serializer=automation__pb2.GetClusterOperationDetailsRequest.SerializeToString, + response_deserializer=automation__pb2.GetClusterOperationDetailsResponse.FromString, + ) + + +class AutomationServicer(object): + def EnqueueClusterOperation(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Start a cluster operation. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetClusterOperationDetails(self, request, context): - raise NotImplementedError() + """TODO(mberlin): Polling this is bad. Implement a subscribe mechanism to wait for changes? + Get all details of an active cluster operation. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AutomationServicer_to_server(servicer, server): + rpc_method_handlers = { + 'EnqueueClusterOperation': grpc.unary_unary_rpc_method_handler( + servicer.EnqueueClusterOperation, + request_deserializer=automation__pb2.EnqueueClusterOperationRequest.FromString, + response_serializer=automation__pb2.EnqueueClusterOperationResponse.SerializeToString, + ), + 'GetClusterOperationDetails': grpc.unary_unary_rpc_method_handler( + servicer.GetClusterOperationDetails, + request_deserializer=automation__pb2.GetClusterOperationDetailsRequest.FromString, + response_serializer=automation__pb2.GetClusterOperationDetailsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'automationservice.Automation', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaAutomationServicer(object): + def EnqueueClusterOperation(self, request, context): + """Start a cluster operation. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def GetClusterOperationDetails(self, request, context): + """TODO(mberlin): Polling this is bad. Implement a subscribe mechanism to wait for changes? + Get all details of an active cluster operation. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaAutomationStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def EnqueueClusterOperation(self, request, timeout): + def EnqueueClusterOperation(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Start a cluster operation. + """ raise NotImplementedError() EnqueueClusterOperation.future = None - @abc.abstractmethod - def GetClusterOperationDetails(self, request, timeout): + def GetClusterOperationDetails(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """TODO(mberlin): Polling this is bad. Implement a subscribe mechanism to wait for changes? + Get all details of an active cluster operation. + """ raise NotImplementedError() GetClusterOperationDetails.future = None + def beta_create_Automation_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import automation_pb2 - import automation_pb2 - import automation_pb2 - import automation_pb2 request_deserializers = { - ('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationRequest.FromString, - ('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsRequest.FromString, + ('automationservice.Automation', 'EnqueueClusterOperation'): automation__pb2.EnqueueClusterOperationRequest.FromString, + ('automationservice.Automation', 'GetClusterOperationDetails'): automation__pb2.GetClusterOperationDetailsRequest.FromString, } response_serializers = { - ('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationResponse.SerializeToString, - ('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsResponse.SerializeToString, + ('automationservice.Automation', 'EnqueueClusterOperation'): automation__pb2.EnqueueClusterOperationResponse.SerializeToString, + ('automationservice.Automation', 'GetClusterOperationDetails'): automation__pb2.GetClusterOperationDetailsResponse.SerializeToString, } method_implementations = { ('automationservice.Automation', 'EnqueueClusterOperation'): face_utilities.unary_unary_inline(servicer.EnqueueClusterOperation), @@ -76,18 +134,15 @@ def beta_create_Automation_server(servicer, pool=None, pool_size=None, default_t server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_Automation_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import automation_pb2 - import automation_pb2 - import automation_pb2 - import automation_pb2 request_serializers = { - ('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationRequest.SerializeToString, - ('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsRequest.SerializeToString, + ('automationservice.Automation', 'EnqueueClusterOperation'): automation__pb2.EnqueueClusterOperationRequest.SerializeToString, + ('automationservice.Automation', 'GetClusterOperationDetails'): automation__pb2.GetClusterOperationDetailsRequest.SerializeToString, } response_deserializers = { - ('automationservice.Automation', 'EnqueueClusterOperation'): automation_pb2.EnqueueClusterOperationResponse.FromString, - ('automationservice.Automation', 'GetClusterOperationDetails'): automation_pb2.GetClusterOperationDetailsResponse.FromString, + ('automationservice.Automation', 'EnqueueClusterOperation'): automation__pb2.EnqueueClusterOperationResponse.FromString, + ('automationservice.Automation', 'GetClusterOperationDetails'): automation__pb2.GetClusterOperationDetailsResponse.FromString, } cardinalities = { 'EnqueueClusterOperation': cardinality.Cardinality.UNARY_UNARY, diff --git a/py/vtproto/binlogdata_pb2.py b/py/vtproto/binlogdata_pb2.py index 3539072e07..ae0ba3133f 100644 --- a/py/vtproto/binlogdata_pb2.py +++ b/py/vtproto/binlogdata_pb2.py @@ -419,8 +419,9 @@ StreamTablesResponse = _reflection.GeneratedProtocolMessageType('StreamTablesRes _sym_db.RegisterMessage(StreamTablesResponse) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/binlogservice_pb2.py b/py/vtproto/binlogservice_pb2.py index 06a4a53604..d921aab560 100644 --- a/py/vtproto/binlogservice_pb2.py +++ b/py/vtproto/binlogservice_pb2.py @@ -29,43 +29,112 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaUpdateStreamServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class UpdateStreamStub(object): + """UpdateStream is the RPC version of binlog.UpdateStream. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StreamKeyRange = channel.unary_stream( + '/binlogservice.UpdateStream/StreamKeyRange', + request_serializer=binlogdata__pb2.StreamKeyRangeRequest.SerializeToString, + response_deserializer=binlogdata__pb2.StreamKeyRangeResponse.FromString, + ) + self.StreamTables = channel.unary_stream( + '/binlogservice.UpdateStream/StreamTables', + request_serializer=binlogdata__pb2.StreamTablesRequest.SerializeToString, + response_deserializer=binlogdata__pb2.StreamTablesResponse.FromString, + ) + + +class UpdateStreamServicer(object): + """UpdateStream is the RPC version of binlog.UpdateStream. + """ + def StreamKeyRange(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamKeyRange returns the binlog transactions related to + the specified Keyrange. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamTables(self, request, context): - raise NotImplementedError() + """StreamTables returns the binlog transactions related to + the specified Tables. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_UpdateStreamServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StreamKeyRange': grpc.unary_stream_rpc_method_handler( + servicer.StreamKeyRange, + request_deserializer=binlogdata__pb2.StreamKeyRangeRequest.FromString, + response_serializer=binlogdata__pb2.StreamKeyRangeResponse.SerializeToString, + ), + 'StreamTables': grpc.unary_stream_rpc_method_handler( + servicer.StreamTables, + request_deserializer=binlogdata__pb2.StreamTablesRequest.FromString, + response_serializer=binlogdata__pb2.StreamTablesResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'binlogservice.UpdateStream', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaUpdateStreamServicer(object): + """UpdateStream is the RPC version of binlog.UpdateStream. + """ + def StreamKeyRange(self, request, context): + """StreamKeyRange returns the binlog transactions related to + the specified Keyrange. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamTables(self, request, context): + """StreamTables returns the binlog transactions related to + the specified Tables. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaUpdateStreamStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def StreamKeyRange(self, request, timeout): + """UpdateStream is the RPC version of binlog.UpdateStream. + """ + def StreamKeyRange(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamKeyRange returns the binlog transactions related to + the specified Keyrange. + """ raise NotImplementedError() - @abc.abstractmethod - def StreamTables(self, request, timeout): + def StreamTables(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamTables returns the binlog transactions related to + the specified Tables. + """ raise NotImplementedError() + def beta_create_UpdateStream_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import binlogdata_pb2 - import binlogdata_pb2 - import binlogdata_pb2 - import binlogdata_pb2 request_deserializers = { - ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata_pb2.StreamKeyRangeRequest.FromString, - ('binlogservice.UpdateStream', 'StreamTables'): binlogdata_pb2.StreamTablesRequest.FromString, + ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata__pb2.StreamKeyRangeRequest.FromString, + ('binlogservice.UpdateStream', 'StreamTables'): binlogdata__pb2.StreamTablesRequest.FromString, } response_serializers = { - ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata_pb2.StreamKeyRangeResponse.SerializeToString, - ('binlogservice.UpdateStream', 'StreamTables'): binlogdata_pb2.StreamTablesResponse.SerializeToString, + ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata__pb2.StreamKeyRangeResponse.SerializeToString, + ('binlogservice.UpdateStream', 'StreamTables'): binlogdata__pb2.StreamTablesResponse.SerializeToString, } method_implementations = { ('binlogservice.UpdateStream', 'StreamKeyRange'): face_utilities.unary_stream_inline(servicer.StreamKeyRange), @@ -74,18 +143,15 @@ def beta_create_UpdateStream_server(servicer, pool=None, pool_size=None, default server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_UpdateStream_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import binlogdata_pb2 - import binlogdata_pb2 - import binlogdata_pb2 - import binlogdata_pb2 request_serializers = { - ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata_pb2.StreamKeyRangeRequest.SerializeToString, - ('binlogservice.UpdateStream', 'StreamTables'): binlogdata_pb2.StreamTablesRequest.SerializeToString, + ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata__pb2.StreamKeyRangeRequest.SerializeToString, + ('binlogservice.UpdateStream', 'StreamTables'): binlogdata__pb2.StreamTablesRequest.SerializeToString, } response_deserializers = { - ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata_pb2.StreamKeyRangeResponse.FromString, - ('binlogservice.UpdateStream', 'StreamTables'): binlogdata_pb2.StreamTablesResponse.FromString, + ('binlogservice.UpdateStream', 'StreamKeyRange'): binlogdata__pb2.StreamKeyRangeResponse.FromString, + ('binlogservice.UpdateStream', 'StreamTables'): binlogdata__pb2.StreamTablesResponse.FromString, } cardinalities = { 'StreamKeyRange': cardinality.Cardinality.UNARY_STREAM, diff --git a/py/vtproto/logutil_pb2.py b/py/vtproto/logutil_pb2.py index 91995bc48f..030a2fdd1c 100644 --- a/py/vtproto/logutil_pb2.py +++ b/py/vtproto/logutil_pb2.py @@ -179,8 +179,9 @@ Event = _reflection.GeneratedProtocolMessageType('Event', (_message.Message,), d _sym_db.RegisterMessage(Event) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/mysqlctl_pb2.py b/py/vtproto/mysqlctl_pb2.py index 012fb184b8..5eed287bc5 100644 --- a/py/vtproto/mysqlctl_pb2.py +++ b/py/vtproto/mysqlctl_pb2.py @@ -297,67 +297,140 @@ ReinitConfigResponse = _reflection.GeneratedProtocolMessageType('ReinitConfigRes _sym_db.RegisterMessage(ReinitConfigResponse) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaMysqlCtlServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class MysqlCtlStub(object): + """MysqlCtl is the service definition + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Start = channel.unary_unary( + '/mysqlctl.MysqlCtl/Start', + request_serializer=StartRequest.SerializeToString, + response_deserializer=StartResponse.FromString, + ) + self.Shutdown = channel.unary_unary( + '/mysqlctl.MysqlCtl/Shutdown', + request_serializer=ShutdownRequest.SerializeToString, + response_deserializer=ShutdownResponse.FromString, + ) + self.RunMysqlUpgrade = channel.unary_unary( + '/mysqlctl.MysqlCtl/RunMysqlUpgrade', + request_serializer=RunMysqlUpgradeRequest.SerializeToString, + response_deserializer=RunMysqlUpgradeResponse.FromString, + ) + self.ReinitConfig = channel.unary_unary( + '/mysqlctl.MysqlCtl/ReinitConfig', + request_serializer=ReinitConfigRequest.SerializeToString, + response_deserializer=ReinitConfigResponse.FromString, + ) + + +class MysqlCtlServicer(object): + """MysqlCtl is the service definition + """ + def Start(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Shutdown(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def RunMysqlUpgrade(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ReinitConfig(self, request, context): - raise NotImplementedError() + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MysqlCtlServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Start': grpc.unary_unary_rpc_method_handler( + servicer.Start, + request_deserializer=StartRequest.FromString, + response_serializer=StartResponse.SerializeToString, + ), + 'Shutdown': grpc.unary_unary_rpc_method_handler( + servicer.Shutdown, + request_deserializer=ShutdownRequest.FromString, + response_serializer=ShutdownResponse.SerializeToString, + ), + 'RunMysqlUpgrade': grpc.unary_unary_rpc_method_handler( + servicer.RunMysqlUpgrade, + request_deserializer=RunMysqlUpgradeRequest.FromString, + response_serializer=RunMysqlUpgradeResponse.SerializeToString, + ), + 'ReinitConfig': grpc.unary_unary_rpc_method_handler( + servicer.ReinitConfig, + request_deserializer=ReinitConfigRequest.FromString, + response_serializer=ReinitConfigResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'mysqlctl.MysqlCtl', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaMysqlCtlServicer(object): + """MysqlCtl is the service definition + """ + def Start(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Shutdown(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def RunMysqlUpgrade(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ReinitConfig(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaMysqlCtlStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def Start(self, request, timeout): + """MysqlCtl is the service definition + """ + def Start(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() Start.future = None - @abc.abstractmethod - def Shutdown(self, request, timeout): + def Shutdown(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() Shutdown.future = None - @abc.abstractmethod - def RunMysqlUpgrade(self, request, timeout): + def RunMysqlUpgrade(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() RunMysqlUpgrade.future = None - @abc.abstractmethod - def ReinitConfig(self, request, timeout): + def ReinitConfig(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() ReinitConfig.future = None + def beta_create_MysqlCtl_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 request_deserializers = { - ('mysqlctl.MysqlCtl', 'ReinitConfig'): mysqlctl_pb2.ReinitConfigRequest.FromString, - ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): mysqlctl_pb2.RunMysqlUpgradeRequest.FromString, - ('mysqlctl.MysqlCtl', 'Shutdown'): mysqlctl_pb2.ShutdownRequest.FromString, - ('mysqlctl.MysqlCtl', 'Start'): mysqlctl_pb2.StartRequest.FromString, + ('mysqlctl.MysqlCtl', 'ReinitConfig'): ReinitConfigRequest.FromString, + ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): RunMysqlUpgradeRequest.FromString, + ('mysqlctl.MysqlCtl', 'Shutdown'): ShutdownRequest.FromString, + ('mysqlctl.MysqlCtl', 'Start'): StartRequest.FromString, } response_serializers = { - ('mysqlctl.MysqlCtl', 'ReinitConfig'): mysqlctl_pb2.ReinitConfigResponse.SerializeToString, - ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): mysqlctl_pb2.RunMysqlUpgradeResponse.SerializeToString, - ('mysqlctl.MysqlCtl', 'Shutdown'): mysqlctl_pb2.ShutdownResponse.SerializeToString, - ('mysqlctl.MysqlCtl', 'Start'): mysqlctl_pb2.StartResponse.SerializeToString, + ('mysqlctl.MysqlCtl', 'ReinitConfig'): ReinitConfigResponse.SerializeToString, + ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): RunMysqlUpgradeResponse.SerializeToString, + ('mysqlctl.MysqlCtl', 'Shutdown'): ShutdownResponse.SerializeToString, + ('mysqlctl.MysqlCtl', 'Start'): StartResponse.SerializeToString, } method_implementations = { ('mysqlctl.MysqlCtl', 'ReinitConfig'): face_utilities.unary_unary_inline(servicer.ReinitConfig), @@ -368,26 +441,19 @@ def beta_create_MysqlCtl_server(servicer, pool=None, pool_size=None, default_tim server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_MysqlCtl_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 - import mysqlctl_pb2 request_serializers = { - ('mysqlctl.MysqlCtl', 'ReinitConfig'): mysqlctl_pb2.ReinitConfigRequest.SerializeToString, - ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): mysqlctl_pb2.RunMysqlUpgradeRequest.SerializeToString, - ('mysqlctl.MysqlCtl', 'Shutdown'): mysqlctl_pb2.ShutdownRequest.SerializeToString, - ('mysqlctl.MysqlCtl', 'Start'): mysqlctl_pb2.StartRequest.SerializeToString, + ('mysqlctl.MysqlCtl', 'ReinitConfig'): ReinitConfigRequest.SerializeToString, + ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): RunMysqlUpgradeRequest.SerializeToString, + ('mysqlctl.MysqlCtl', 'Shutdown'): ShutdownRequest.SerializeToString, + ('mysqlctl.MysqlCtl', 'Start'): StartRequest.SerializeToString, } response_deserializers = { - ('mysqlctl.MysqlCtl', 'ReinitConfig'): mysqlctl_pb2.ReinitConfigResponse.FromString, - ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): mysqlctl_pb2.RunMysqlUpgradeResponse.FromString, - ('mysqlctl.MysqlCtl', 'Shutdown'): mysqlctl_pb2.ShutdownResponse.FromString, - ('mysqlctl.MysqlCtl', 'Start'): mysqlctl_pb2.StartResponse.FromString, + ('mysqlctl.MysqlCtl', 'ReinitConfig'): ReinitConfigResponse.FromString, + ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): RunMysqlUpgradeResponse.FromString, + ('mysqlctl.MysqlCtl', 'Shutdown'): ShutdownResponse.FromString, + ('mysqlctl.MysqlCtl', 'Start'): StartResponse.FromString, } cardinalities = { 'ReinitConfig': cardinality.Cardinality.UNARY_UNARY, diff --git a/py/vtproto/query_pb2.py b/py/vtproto/query_pb2.py index f30050ad87..ec69d38f21 100644 --- a/py/vtproto/query_pb2.py +++ b/py/vtproto/query_pb2.py @@ -1835,14 +1835,14 @@ _REALTIMESTATS = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='cpu_usage', full_name='query.RealtimeStats.cpu_usage', index=4, number=5, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='qps', full_name='query.RealtimeStats.qps', index=5, number=6, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -2391,8 +2391,9 @@ DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\030com.youtube.vitess.proto')) _BOUNDQUERY_BINDVARIABLESENTRY.has_options = True _BOUNDQUERY_BINDVARIABLESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/queryservice_pb2.py b/py/vtproto/queryservice_pb2.py index cf0dbde42e..ef9b581f36 100644 --- a/py/vtproto/queryservice_pb2.py +++ b/py/vtproto/queryservice_pb2.py @@ -29,141 +29,378 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaQueryServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class QueryStub(object): + """Query defines the tablet query service, implemented by vttablet. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Execute = channel.unary_unary( + '/queryservice.Query/Execute', + request_serializer=query__pb2.ExecuteRequest.SerializeToString, + response_deserializer=query__pb2.ExecuteResponse.FromString, + ) + self.ExecuteBatch = channel.unary_unary( + '/queryservice.Query/ExecuteBatch', + request_serializer=query__pb2.ExecuteBatchRequest.SerializeToString, + response_deserializer=query__pb2.ExecuteBatchResponse.FromString, + ) + self.StreamExecute = channel.unary_stream( + '/queryservice.Query/StreamExecute', + request_serializer=query__pb2.StreamExecuteRequest.SerializeToString, + response_deserializer=query__pb2.StreamExecuteResponse.FromString, + ) + self.Begin = channel.unary_unary( + '/queryservice.Query/Begin', + request_serializer=query__pb2.BeginRequest.SerializeToString, + response_deserializer=query__pb2.BeginResponse.FromString, + ) + self.Commit = channel.unary_unary( + '/queryservice.Query/Commit', + request_serializer=query__pb2.CommitRequest.SerializeToString, + response_deserializer=query__pb2.CommitResponse.FromString, + ) + self.Rollback = channel.unary_unary( + '/queryservice.Query/Rollback', + request_serializer=query__pb2.RollbackRequest.SerializeToString, + response_deserializer=query__pb2.RollbackResponse.FromString, + ) + self.BeginExecute = channel.unary_unary( + '/queryservice.Query/BeginExecute', + request_serializer=query__pb2.BeginExecuteRequest.SerializeToString, + response_deserializer=query__pb2.BeginExecuteResponse.FromString, + ) + self.BeginExecuteBatch = channel.unary_unary( + '/queryservice.Query/BeginExecuteBatch', + request_serializer=query__pb2.BeginExecuteBatchRequest.SerializeToString, + response_deserializer=query__pb2.BeginExecuteBatchResponse.FromString, + ) + self.SplitQuery = channel.unary_unary( + '/queryservice.Query/SplitQuery', + request_serializer=query__pb2.SplitQueryRequest.SerializeToString, + response_deserializer=query__pb2.SplitQueryResponse.FromString, + ) + self.StreamHealth = channel.unary_stream( + '/queryservice.Query/StreamHealth', + request_serializer=query__pb2.StreamHealthRequest.SerializeToString, + response_deserializer=query__pb2.StreamHealthResponse.FromString, + ) + self.UpdateStream = channel.unary_stream( + '/queryservice.Query/UpdateStream', + request_serializer=query__pb2.UpdateStreamRequest.SerializeToString, + response_deserializer=query__pb2.UpdateStreamResponse.FromString, + ) + + +class QueryServicer(object): + """Query defines the tablet query service, implemented by vttablet. + """ + def Execute(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Execute executes the specified SQL query (might be in a + transaction context, if Query.transaction_id is set). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteBatch(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteBatch executes a list of queries, and returns the result + for each query. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamExecute(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamExecute executes a streaming query. Use this method if the + query returns a large number of rows. The first QueryResult will + contain the Fields, subsequent QueryResult messages will contain + the rows. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Begin(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Begin a transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Commit(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Commit a transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Rollback(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Rollback a transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def BeginExecute(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """BeginExecute executes a begin and the specified SQL query. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def BeginExecuteBatch(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """BeginExecuteBatch executes a begin and a list of queries. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SplitQuery(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """SplitQuery is the API to facilitate MapReduce-type iterations + over large data sets (like full table dumps). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamHealth(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamHealth runs a streaming RPC to the tablet, that returns the + current health of the tablet on a regular basis. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def UpdateStream(self, request, context): - raise NotImplementedError() + """UpdateStream asks the server to return a stream of the updates that have been applied to its database. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_QueryServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Execute': grpc.unary_unary_rpc_method_handler( + servicer.Execute, + request_deserializer=query__pb2.ExecuteRequest.FromString, + response_serializer=query__pb2.ExecuteResponse.SerializeToString, + ), + 'ExecuteBatch': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteBatch, + request_deserializer=query__pb2.ExecuteBatchRequest.FromString, + response_serializer=query__pb2.ExecuteBatchResponse.SerializeToString, + ), + 'StreamExecute': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecute, + request_deserializer=query__pb2.StreamExecuteRequest.FromString, + response_serializer=query__pb2.StreamExecuteResponse.SerializeToString, + ), + 'Begin': grpc.unary_unary_rpc_method_handler( + servicer.Begin, + request_deserializer=query__pb2.BeginRequest.FromString, + response_serializer=query__pb2.BeginResponse.SerializeToString, + ), + 'Commit': grpc.unary_unary_rpc_method_handler( + servicer.Commit, + request_deserializer=query__pb2.CommitRequest.FromString, + response_serializer=query__pb2.CommitResponse.SerializeToString, + ), + 'Rollback': grpc.unary_unary_rpc_method_handler( + servicer.Rollback, + request_deserializer=query__pb2.RollbackRequest.FromString, + response_serializer=query__pb2.RollbackResponse.SerializeToString, + ), + 'BeginExecute': grpc.unary_unary_rpc_method_handler( + servicer.BeginExecute, + request_deserializer=query__pb2.BeginExecuteRequest.FromString, + response_serializer=query__pb2.BeginExecuteResponse.SerializeToString, + ), + 'BeginExecuteBatch': grpc.unary_unary_rpc_method_handler( + servicer.BeginExecuteBatch, + request_deserializer=query__pb2.BeginExecuteBatchRequest.FromString, + response_serializer=query__pb2.BeginExecuteBatchResponse.SerializeToString, + ), + 'SplitQuery': grpc.unary_unary_rpc_method_handler( + servicer.SplitQuery, + request_deserializer=query__pb2.SplitQueryRequest.FromString, + response_serializer=query__pb2.SplitQueryResponse.SerializeToString, + ), + 'StreamHealth': grpc.unary_stream_rpc_method_handler( + servicer.StreamHealth, + request_deserializer=query__pb2.StreamHealthRequest.FromString, + response_serializer=query__pb2.StreamHealthResponse.SerializeToString, + ), + 'UpdateStream': grpc.unary_stream_rpc_method_handler( + servicer.UpdateStream, + request_deserializer=query__pb2.UpdateStreamRequest.FromString, + response_serializer=query__pb2.UpdateStreamResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'queryservice.Query', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaQueryServicer(object): + """Query defines the tablet query service, implemented by vttablet. + """ + def Execute(self, request, context): + """Execute executes the specified SQL query (might be in a + transaction context, if Query.transaction_id is set). + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteBatch(self, request, context): + """ExecuteBatch executes a list of queries, and returns the result + for each query. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamExecute(self, request, context): + """StreamExecute executes a streaming query. Use this method if the + query returns a large number of rows. The first QueryResult will + contain the Fields, subsequent QueryResult messages will contain + the rows. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Begin(self, request, context): + """Begin a transaction. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Commit(self, request, context): + """Commit a transaction. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Rollback(self, request, context): + """Rollback a transaction. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def BeginExecute(self, request, context): + """BeginExecute executes a begin and the specified SQL query. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def BeginExecuteBatch(self, request, context): + """BeginExecuteBatch executes a begin and a list of queries. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SplitQuery(self, request, context): + """SplitQuery is the API to facilitate MapReduce-type iterations + over large data sets (like full table dumps). + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamHealth(self, request, context): + """StreamHealth runs a streaming RPC to the tablet, that returns the + current health of the tablet on a regular basis. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def UpdateStream(self, request, context): + """UpdateStream asks the server to return a stream of the updates that have been applied to its database. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaQueryStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def Execute(self, request, timeout): + """Query defines the tablet query service, implemented by vttablet. + """ + def Execute(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Execute executes the specified SQL query (might be in a + transaction context, if Query.transaction_id is set). + """ raise NotImplementedError() Execute.future = None - @abc.abstractmethod - def ExecuteBatch(self, request, timeout): + def ExecuteBatch(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteBatch executes a list of queries, and returns the result + for each query. + """ raise NotImplementedError() ExecuteBatch.future = None - @abc.abstractmethod - def StreamExecute(self, request, timeout): + def StreamExecute(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamExecute executes a streaming query. Use this method if the + query returns a large number of rows. The first QueryResult will + contain the Fields, subsequent QueryResult messages will contain + the rows. + """ raise NotImplementedError() - @abc.abstractmethod - def Begin(self, request, timeout): + def Begin(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Begin a transaction. + """ raise NotImplementedError() Begin.future = None - @abc.abstractmethod - def Commit(self, request, timeout): + def Commit(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Commit a transaction. + """ raise NotImplementedError() Commit.future = None - @abc.abstractmethod - def Rollback(self, request, timeout): + def Rollback(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Rollback a transaction. + """ raise NotImplementedError() Rollback.future = None - @abc.abstractmethod - def BeginExecute(self, request, timeout): + def BeginExecute(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """BeginExecute executes a begin and the specified SQL query. + """ raise NotImplementedError() BeginExecute.future = None - @abc.abstractmethod - def BeginExecuteBatch(self, request, timeout): + def BeginExecuteBatch(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """BeginExecuteBatch executes a begin and a list of queries. + """ raise NotImplementedError() BeginExecuteBatch.future = None - @abc.abstractmethod - def SplitQuery(self, request, timeout): + def SplitQuery(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """SplitQuery is the API to facilitate MapReduce-type iterations + over large data sets (like full table dumps). + """ raise NotImplementedError() SplitQuery.future = None - @abc.abstractmethod - def StreamHealth(self, request, timeout): + def StreamHealth(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamHealth runs a streaming RPC to the tablet, that returns the + current health of the tablet on a regular basis. + """ raise NotImplementedError() - @abc.abstractmethod - def UpdateStream(self, request, timeout): + def UpdateStream(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """UpdateStream asks the server to return a stream of the updates that have been applied to its database. + """ raise NotImplementedError() + def beta_create_Query_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 request_deserializers = { - ('queryservice.Query', 'Begin'): query_pb2.BeginRequest.FromString, - ('queryservice.Query', 'BeginExecute'): query_pb2.BeginExecuteRequest.FromString, - ('queryservice.Query', 'BeginExecuteBatch'): query_pb2.BeginExecuteBatchRequest.FromString, - ('queryservice.Query', 'Commit'): query_pb2.CommitRequest.FromString, - ('queryservice.Query', 'Execute'): query_pb2.ExecuteRequest.FromString, - ('queryservice.Query', 'ExecuteBatch'): query_pb2.ExecuteBatchRequest.FromString, - ('queryservice.Query', 'Rollback'): query_pb2.RollbackRequest.FromString, - ('queryservice.Query', 'SplitQuery'): query_pb2.SplitQueryRequest.FromString, - ('queryservice.Query', 'StreamExecute'): query_pb2.StreamExecuteRequest.FromString, - ('queryservice.Query', 'StreamHealth'): query_pb2.StreamHealthRequest.FromString, - ('queryservice.Query', 'UpdateStream'): query_pb2.UpdateStreamRequest.FromString, + ('queryservice.Query', 'Begin'): query__pb2.BeginRequest.FromString, + ('queryservice.Query', 'BeginExecute'): query__pb2.BeginExecuteRequest.FromString, + ('queryservice.Query', 'BeginExecuteBatch'): query__pb2.BeginExecuteBatchRequest.FromString, + ('queryservice.Query', 'Commit'): query__pb2.CommitRequest.FromString, + ('queryservice.Query', 'Execute'): query__pb2.ExecuteRequest.FromString, + ('queryservice.Query', 'ExecuteBatch'): query__pb2.ExecuteBatchRequest.FromString, + ('queryservice.Query', 'Rollback'): query__pb2.RollbackRequest.FromString, + ('queryservice.Query', 'SplitQuery'): query__pb2.SplitQueryRequest.FromString, + ('queryservice.Query', 'StreamExecute'): query__pb2.StreamExecuteRequest.FromString, + ('queryservice.Query', 'StreamHealth'): query__pb2.StreamHealthRequest.FromString, + ('queryservice.Query', 'UpdateStream'): query__pb2.UpdateStreamRequest.FromString, } response_serializers = { - ('queryservice.Query', 'Begin'): query_pb2.BeginResponse.SerializeToString, - ('queryservice.Query', 'BeginExecute'): query_pb2.BeginExecuteResponse.SerializeToString, - ('queryservice.Query', 'BeginExecuteBatch'): query_pb2.BeginExecuteBatchResponse.SerializeToString, - ('queryservice.Query', 'Commit'): query_pb2.CommitResponse.SerializeToString, - ('queryservice.Query', 'Execute'): query_pb2.ExecuteResponse.SerializeToString, - ('queryservice.Query', 'ExecuteBatch'): query_pb2.ExecuteBatchResponse.SerializeToString, - ('queryservice.Query', 'Rollback'): query_pb2.RollbackResponse.SerializeToString, - ('queryservice.Query', 'SplitQuery'): query_pb2.SplitQueryResponse.SerializeToString, - ('queryservice.Query', 'StreamExecute'): query_pb2.StreamExecuteResponse.SerializeToString, - ('queryservice.Query', 'StreamHealth'): query_pb2.StreamHealthResponse.SerializeToString, - ('queryservice.Query', 'UpdateStream'): query_pb2.UpdateStreamResponse.SerializeToString, + ('queryservice.Query', 'Begin'): query__pb2.BeginResponse.SerializeToString, + ('queryservice.Query', 'BeginExecute'): query__pb2.BeginExecuteResponse.SerializeToString, + ('queryservice.Query', 'BeginExecuteBatch'): query__pb2.BeginExecuteBatchResponse.SerializeToString, + ('queryservice.Query', 'Commit'): query__pb2.CommitResponse.SerializeToString, + ('queryservice.Query', 'Execute'): query__pb2.ExecuteResponse.SerializeToString, + ('queryservice.Query', 'ExecuteBatch'): query__pb2.ExecuteBatchResponse.SerializeToString, + ('queryservice.Query', 'Rollback'): query__pb2.RollbackResponse.SerializeToString, + ('queryservice.Query', 'SplitQuery'): query__pb2.SplitQueryResponse.SerializeToString, + ('queryservice.Query', 'StreamExecute'): query__pb2.StreamExecuteResponse.SerializeToString, + ('queryservice.Query', 'StreamHealth'): query__pb2.StreamHealthResponse.SerializeToString, + ('queryservice.Query', 'UpdateStream'): query__pb2.UpdateStreamResponse.SerializeToString, } method_implementations = { ('queryservice.Query', 'Begin'): face_utilities.unary_unary_inline(servicer.Begin), @@ -181,54 +418,33 @@ def beta_create_Query_server(servicer, pool=None, pool_size=None, default_timeou server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_Query_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 - import query_pb2 request_serializers = { - ('queryservice.Query', 'Begin'): query_pb2.BeginRequest.SerializeToString, - ('queryservice.Query', 'BeginExecute'): query_pb2.BeginExecuteRequest.SerializeToString, - ('queryservice.Query', 'BeginExecuteBatch'): query_pb2.BeginExecuteBatchRequest.SerializeToString, - ('queryservice.Query', 'Commit'): query_pb2.CommitRequest.SerializeToString, - ('queryservice.Query', 'Execute'): query_pb2.ExecuteRequest.SerializeToString, - ('queryservice.Query', 'ExecuteBatch'): query_pb2.ExecuteBatchRequest.SerializeToString, - ('queryservice.Query', 'Rollback'): query_pb2.RollbackRequest.SerializeToString, - ('queryservice.Query', 'SplitQuery'): query_pb2.SplitQueryRequest.SerializeToString, - ('queryservice.Query', 'StreamExecute'): query_pb2.StreamExecuteRequest.SerializeToString, - ('queryservice.Query', 'StreamHealth'): query_pb2.StreamHealthRequest.SerializeToString, - ('queryservice.Query', 'UpdateStream'): query_pb2.UpdateStreamRequest.SerializeToString, + ('queryservice.Query', 'Begin'): query__pb2.BeginRequest.SerializeToString, + ('queryservice.Query', 'BeginExecute'): query__pb2.BeginExecuteRequest.SerializeToString, + ('queryservice.Query', 'BeginExecuteBatch'): query__pb2.BeginExecuteBatchRequest.SerializeToString, + ('queryservice.Query', 'Commit'): query__pb2.CommitRequest.SerializeToString, + ('queryservice.Query', 'Execute'): query__pb2.ExecuteRequest.SerializeToString, + ('queryservice.Query', 'ExecuteBatch'): query__pb2.ExecuteBatchRequest.SerializeToString, + ('queryservice.Query', 'Rollback'): query__pb2.RollbackRequest.SerializeToString, + ('queryservice.Query', 'SplitQuery'): query__pb2.SplitQueryRequest.SerializeToString, + ('queryservice.Query', 'StreamExecute'): query__pb2.StreamExecuteRequest.SerializeToString, + ('queryservice.Query', 'StreamHealth'): query__pb2.StreamHealthRequest.SerializeToString, + ('queryservice.Query', 'UpdateStream'): query__pb2.UpdateStreamRequest.SerializeToString, } response_deserializers = { - ('queryservice.Query', 'Begin'): query_pb2.BeginResponse.FromString, - ('queryservice.Query', 'BeginExecute'): query_pb2.BeginExecuteResponse.FromString, - ('queryservice.Query', 'BeginExecuteBatch'): query_pb2.BeginExecuteBatchResponse.FromString, - ('queryservice.Query', 'Commit'): query_pb2.CommitResponse.FromString, - ('queryservice.Query', 'Execute'): query_pb2.ExecuteResponse.FromString, - ('queryservice.Query', 'ExecuteBatch'): query_pb2.ExecuteBatchResponse.FromString, - ('queryservice.Query', 'Rollback'): query_pb2.RollbackResponse.FromString, - ('queryservice.Query', 'SplitQuery'): query_pb2.SplitQueryResponse.FromString, - ('queryservice.Query', 'StreamExecute'): query_pb2.StreamExecuteResponse.FromString, - ('queryservice.Query', 'StreamHealth'): query_pb2.StreamHealthResponse.FromString, - ('queryservice.Query', 'UpdateStream'): query_pb2.UpdateStreamResponse.FromString, + ('queryservice.Query', 'Begin'): query__pb2.BeginResponse.FromString, + ('queryservice.Query', 'BeginExecute'): query__pb2.BeginExecuteResponse.FromString, + ('queryservice.Query', 'BeginExecuteBatch'): query__pb2.BeginExecuteBatchResponse.FromString, + ('queryservice.Query', 'Commit'): query__pb2.CommitResponse.FromString, + ('queryservice.Query', 'Execute'): query__pb2.ExecuteResponse.FromString, + ('queryservice.Query', 'ExecuteBatch'): query__pb2.ExecuteBatchResponse.FromString, + ('queryservice.Query', 'Rollback'): query__pb2.RollbackResponse.FromString, + ('queryservice.Query', 'SplitQuery'): query__pb2.SplitQueryResponse.FromString, + ('queryservice.Query', 'StreamExecute'): query__pb2.StreamExecuteResponse.FromString, + ('queryservice.Query', 'StreamHealth'): query__pb2.StreamHealthResponse.FromString, + ('queryservice.Query', 'UpdateStream'): query__pb2.UpdateStreamResponse.FromString, } cardinalities = { 'Begin': cardinality.Cardinality.UNARY_UNARY, diff --git a/py/vtproto/replicationdata_pb2.py b/py/vtproto/replicationdata_pb2.py index 34ef103830..0ec3046982 100644 --- a/py/vtproto/replicationdata_pb2.py +++ b/py/vtproto/replicationdata_pb2.py @@ -108,8 +108,9 @@ Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), _sym_db.RegisterMessage(Status) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/tableacl_pb2.py b/py/vtproto/tableacl_pb2.py index 15f1b06e59..04b4249ca0 100644 --- a/py/vtproto/tableacl_pb2.py +++ b/py/vtproto/tableacl_pb2.py @@ -134,8 +134,9 @@ Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), _sym_db.RegisterMessage(Config) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/tabletmanagerdata_pb2.py b/py/vtproto/tabletmanagerdata_pb2.py index ddbc84426c..cd8875073f 100644 --- a/py/vtproto/tabletmanagerdata_pb2.py +++ b/py/vtproto/tabletmanagerdata_pb2.py @@ -3697,8 +3697,9 @@ _DBPERMISSION_PRIVILEGESENTRY.has_options = True _DBPERMISSION_PRIVILEGESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _EXECUTEHOOKREQUEST_EXTRAENVENTRY.has_options = True _EXECUTEHOOKREQUEST_EXTRAENVENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/tabletmanagerservice_pb2.py b/py/vtproto/tabletmanagerservice_pb2.py index 7a905b7b4b..b61461d375 100644 --- a/py/vtproto/tabletmanagerservice_pb2.py +++ b/py/vtproto/tabletmanagerservice_pb2.py @@ -29,472 +29,1282 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaTabletManagerServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class TabletManagerStub(object): + """TabletManager is a service definition for tabletmanagerdata.TabletManager. + + Various read-only methods + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Ping = channel.unary_unary( + '/tabletmanagerservice.TabletManager/Ping', + request_serializer=tabletmanagerdata__pb2.PingRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.PingResponse.FromString, + ) + self.Sleep = channel.unary_unary( + '/tabletmanagerservice.TabletManager/Sleep', + request_serializer=tabletmanagerdata__pb2.SleepRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SleepResponse.FromString, + ) + self.ExecuteHook = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ExecuteHook', + request_serializer=tabletmanagerdata__pb2.ExecuteHookRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ExecuteHookResponse.FromString, + ) + self.GetSchema = channel.unary_unary( + '/tabletmanagerservice.TabletManager/GetSchema', + request_serializer=tabletmanagerdata__pb2.GetSchemaRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.GetSchemaResponse.FromString, + ) + self.GetPermissions = channel.unary_unary( + '/tabletmanagerservice.TabletManager/GetPermissions', + request_serializer=tabletmanagerdata__pb2.GetPermissionsRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.GetPermissionsResponse.FromString, + ) + self.SetReadOnly = channel.unary_unary( + '/tabletmanagerservice.TabletManager/SetReadOnly', + request_serializer=tabletmanagerdata__pb2.SetReadOnlyRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SetReadOnlyResponse.FromString, + ) + self.SetReadWrite = channel.unary_unary( + '/tabletmanagerservice.TabletManager/SetReadWrite', + request_serializer=tabletmanagerdata__pb2.SetReadWriteRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SetReadWriteResponse.FromString, + ) + self.ChangeType = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ChangeType', + request_serializer=tabletmanagerdata__pb2.ChangeTypeRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ChangeTypeResponse.FromString, + ) + self.RefreshState = channel.unary_unary( + '/tabletmanagerservice.TabletManager/RefreshState', + request_serializer=tabletmanagerdata__pb2.RefreshStateRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.RefreshStateResponse.FromString, + ) + self.RunHealthCheck = channel.unary_unary( + '/tabletmanagerservice.TabletManager/RunHealthCheck', + request_serializer=tabletmanagerdata__pb2.RunHealthCheckRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.RunHealthCheckResponse.FromString, + ) + self.IgnoreHealthError = channel.unary_unary( + '/tabletmanagerservice.TabletManager/IgnoreHealthError', + request_serializer=tabletmanagerdata__pb2.IgnoreHealthErrorRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.IgnoreHealthErrorResponse.FromString, + ) + self.ReloadSchema = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ReloadSchema', + request_serializer=tabletmanagerdata__pb2.ReloadSchemaRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ReloadSchemaResponse.FromString, + ) + self.PreflightSchema = channel.unary_unary( + '/tabletmanagerservice.TabletManager/PreflightSchema', + request_serializer=tabletmanagerdata__pb2.PreflightSchemaRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.PreflightSchemaResponse.FromString, + ) + self.ApplySchema = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ApplySchema', + request_serializer=tabletmanagerdata__pb2.ApplySchemaRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ApplySchemaResponse.FromString, + ) + self.ExecuteFetchAsDba = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ExecuteFetchAsDba', + request_serializer=tabletmanagerdata__pb2.ExecuteFetchAsDbaRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ExecuteFetchAsDbaResponse.FromString, + ) + self.ExecuteFetchAsApp = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ExecuteFetchAsApp', + request_serializer=tabletmanagerdata__pb2.ExecuteFetchAsAppRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ExecuteFetchAsAppResponse.FromString, + ) + self.SlaveStatus = channel.unary_unary( + '/tabletmanagerservice.TabletManager/SlaveStatus', + request_serializer=tabletmanagerdata__pb2.SlaveStatusRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SlaveStatusResponse.FromString, + ) + self.MasterPosition = channel.unary_unary( + '/tabletmanagerservice.TabletManager/MasterPosition', + request_serializer=tabletmanagerdata__pb2.MasterPositionRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.MasterPositionResponse.FromString, + ) + self.StopSlave = channel.unary_unary( + '/tabletmanagerservice.TabletManager/StopSlave', + request_serializer=tabletmanagerdata__pb2.StopSlaveRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.StopSlaveResponse.FromString, + ) + self.StopSlaveMinimum = channel.unary_unary( + '/tabletmanagerservice.TabletManager/StopSlaveMinimum', + request_serializer=tabletmanagerdata__pb2.StopSlaveMinimumRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.StopSlaveMinimumResponse.FromString, + ) + self.StartSlave = channel.unary_unary( + '/tabletmanagerservice.TabletManager/StartSlave', + request_serializer=tabletmanagerdata__pb2.StartSlaveRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.StartSlaveResponse.FromString, + ) + self.TabletExternallyReparented = channel.unary_unary( + '/tabletmanagerservice.TabletManager/TabletExternallyReparented', + request_serializer=tabletmanagerdata__pb2.TabletExternallyReparentedRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.TabletExternallyReparentedResponse.FromString, + ) + self.TabletExternallyElected = channel.unary_unary( + '/tabletmanagerservice.TabletManager/TabletExternallyElected', + request_serializer=tabletmanagerdata__pb2.TabletExternallyElectedRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.TabletExternallyElectedResponse.FromString, + ) + self.GetSlaves = channel.unary_unary( + '/tabletmanagerservice.TabletManager/GetSlaves', + request_serializer=tabletmanagerdata__pb2.GetSlavesRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.GetSlavesResponse.FromString, + ) + self.WaitBlpPosition = channel.unary_unary( + '/tabletmanagerservice.TabletManager/WaitBlpPosition', + request_serializer=tabletmanagerdata__pb2.WaitBlpPositionRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.WaitBlpPositionResponse.FromString, + ) + self.StopBlp = channel.unary_unary( + '/tabletmanagerservice.TabletManager/StopBlp', + request_serializer=tabletmanagerdata__pb2.StopBlpRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.StopBlpResponse.FromString, + ) + self.StartBlp = channel.unary_unary( + '/tabletmanagerservice.TabletManager/StartBlp', + request_serializer=tabletmanagerdata__pb2.StartBlpRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.StartBlpResponse.FromString, + ) + self.RunBlpUntil = channel.unary_unary( + '/tabletmanagerservice.TabletManager/RunBlpUntil', + request_serializer=tabletmanagerdata__pb2.RunBlpUntilRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.RunBlpUntilResponse.FromString, + ) + self.ResetReplication = channel.unary_unary( + '/tabletmanagerservice.TabletManager/ResetReplication', + request_serializer=tabletmanagerdata__pb2.ResetReplicationRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.ResetReplicationResponse.FromString, + ) + self.InitMaster = channel.unary_unary( + '/tabletmanagerservice.TabletManager/InitMaster', + request_serializer=tabletmanagerdata__pb2.InitMasterRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.InitMasterResponse.FromString, + ) + self.PopulateReparentJournal = channel.unary_unary( + '/tabletmanagerservice.TabletManager/PopulateReparentJournal', + request_serializer=tabletmanagerdata__pb2.PopulateReparentJournalRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.PopulateReparentJournalResponse.FromString, + ) + self.InitSlave = channel.unary_unary( + '/tabletmanagerservice.TabletManager/InitSlave', + request_serializer=tabletmanagerdata__pb2.InitSlaveRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.InitSlaveResponse.FromString, + ) + self.DemoteMaster = channel.unary_unary( + '/tabletmanagerservice.TabletManager/DemoteMaster', + request_serializer=tabletmanagerdata__pb2.DemoteMasterRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.DemoteMasterResponse.FromString, + ) + self.PromoteSlaveWhenCaughtUp = channel.unary_unary( + '/tabletmanagerservice.TabletManager/PromoteSlaveWhenCaughtUp', + request_serializer=tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpResponse.FromString, + ) + self.SlaveWasPromoted = channel.unary_unary( + '/tabletmanagerservice.TabletManager/SlaveWasPromoted', + request_serializer=tabletmanagerdata__pb2.SlaveWasPromotedRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SlaveWasPromotedResponse.FromString, + ) + self.SetMaster = channel.unary_unary( + '/tabletmanagerservice.TabletManager/SetMaster', + request_serializer=tabletmanagerdata__pb2.SetMasterRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SetMasterResponse.FromString, + ) + self.SlaveWasRestarted = channel.unary_unary( + '/tabletmanagerservice.TabletManager/SlaveWasRestarted', + request_serializer=tabletmanagerdata__pb2.SlaveWasRestartedRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.SlaveWasRestartedResponse.FromString, + ) + self.StopReplicationAndGetStatus = channel.unary_unary( + '/tabletmanagerservice.TabletManager/StopReplicationAndGetStatus', + request_serializer=tabletmanagerdata__pb2.StopReplicationAndGetStatusRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.StopReplicationAndGetStatusResponse.FromString, + ) + self.PromoteSlave = channel.unary_unary( + '/tabletmanagerservice.TabletManager/PromoteSlave', + request_serializer=tabletmanagerdata__pb2.PromoteSlaveRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.PromoteSlaveResponse.FromString, + ) + self.Backup = channel.unary_stream( + '/tabletmanagerservice.TabletManager/Backup', + request_serializer=tabletmanagerdata__pb2.BackupRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.BackupResponse.FromString, + ) + self.RestoreFromBackup = channel.unary_stream( + '/tabletmanagerservice.TabletManager/RestoreFromBackup', + request_serializer=tabletmanagerdata__pb2.RestoreFromBackupRequest.SerializeToString, + response_deserializer=tabletmanagerdata__pb2.RestoreFromBackupResponse.FromString, + ) + + +class TabletManagerServicer(object): + """TabletManager is a service definition for tabletmanagerdata.TabletManager. + + Various read-only methods + + """ + def Ping(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Ping returns the input payload + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Sleep(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Sleep sleeps for the provided duration + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteHook(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteHook executes the hook remotely + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetSchema(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """GetSchema asks the tablet for its schema + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetPermissions(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """GetPermissions asks the tablet for its permissions + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetReadOnly(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ + Various read-write methods + + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetReadWrite(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ChangeType(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ChangeType asks the remote tablet to change its type + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def RefreshState(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def RunHealthCheck(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def IgnoreHealthError(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ReloadSchema(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def PreflightSchema(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ApplySchema(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteFetchAsDba(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteFetchAsApp(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SlaveStatus(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ + Replication related methods + + + SlaveStatus returns the current slave status. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def MasterPosition(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """MasterPosition returns the current master position + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StopSlave(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StopSlave makes mysql stop its replication + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StopSlaveMinimum(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StopSlaveMinimum stops the mysql replication after it reaches + the provided minimum point + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StartSlave(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StartSlave starts the mysql replication + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def TabletExternallyReparented(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """TabletExternallyReparented tells a tablet that its underlying MySQL is + currently the master. It is only used in environments (tabletmanagerdata.such as Vitess+MoB) + in which MySQL is reparented by some agent external to Vitess, and then + that agent simply notifies Vitess. + + This call is idempotent with respect to a single target tablet. + However, the tablet assumes there is a cooling-off period following the + initial external reparent from A to B, before this call is repeated on any + tablet other than B. This assumption is configurable with the vttablet flag + "finalize_external_reparent_timeout". + + For more information, see the design doc at go/vt-fast-failover. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def TabletExternallyElected(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """TabletExternallyElected is an notification that may be sent in + anticipation of potentially later sending TabletExternallyReparented. + The tablet can use this extra lead time to prepare to react quickly if + TabletExternallyReparented does follow. + + This call is effectively a no-op if it is not followed by a call to + TabletExternallyReparented, so the external agent doing the reparent can + still change its mind. + + The agent does not need to wait for this call or cancel it before calling + TabletExternallyReparented if the external reparent operation finishes + before TabletExternallyElected returns. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetSlaves(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """GetSlaves asks for the list of mysql slaves + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def WaitBlpPosition(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """WaitBlpPosition tells the remote tablet to wait until it reaches + the specified binolg player position + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StopBlp(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StopBlp asks the tablet to stop all its binlog players, + and returns the current position for all of them + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StartBlp(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StartBlp asks the tablet to restart its binlog players + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def RunBlpUntil(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """RunBlpUntil asks the tablet to restart its binlog players + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ResetReplication(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ + Reparenting related functions + + + ResetReplication makes the target not replicating + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def InitMaster(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """InitMaster initializes the tablet as a master + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def PopulateReparentJournal(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """PopulateReparentJournal tells the tablet to add an entry to its + reparent journal + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def InitSlave(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """InitSlave tells the tablet to reparent to the master unconditionnally + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def DemoteMaster(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """DemoteMaster tells the soon-to-be-former master it's gonna change + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def PromoteSlaveWhenCaughtUp(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """PromoteSlaveWhenCaughtUp tells the remote tablet to catch up, + and then be the master + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SlaveWasPromoted(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """SlaveWasPromoted tells the remote tablet it is now the master + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetMaster(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """SetMaster tells the slave to reparent + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SlaveWasRestarted(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """SlaveWasRestarted tells the remote tablet its master has changed + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StopReplicationAndGetStatus(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StopReplicationAndGetStatus stops MySQL replication, and returns the + replication status + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def PromoteSlave(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """PromoteSlave makes the slave the new master + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Backup(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ + Backup related methods + + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def RestoreFromBackup(self, request, context): - raise NotImplementedError() + """RestoreFromBackup deletes all local data and restores it from the latest backup. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TabletManagerServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=tabletmanagerdata__pb2.PingRequest.FromString, + response_serializer=tabletmanagerdata__pb2.PingResponse.SerializeToString, + ), + 'Sleep': grpc.unary_unary_rpc_method_handler( + servicer.Sleep, + request_deserializer=tabletmanagerdata__pb2.SleepRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SleepResponse.SerializeToString, + ), + 'ExecuteHook': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteHook, + request_deserializer=tabletmanagerdata__pb2.ExecuteHookRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ExecuteHookResponse.SerializeToString, + ), + 'GetSchema': grpc.unary_unary_rpc_method_handler( + servicer.GetSchema, + request_deserializer=tabletmanagerdata__pb2.GetSchemaRequest.FromString, + response_serializer=tabletmanagerdata__pb2.GetSchemaResponse.SerializeToString, + ), + 'GetPermissions': grpc.unary_unary_rpc_method_handler( + servicer.GetPermissions, + request_deserializer=tabletmanagerdata__pb2.GetPermissionsRequest.FromString, + response_serializer=tabletmanagerdata__pb2.GetPermissionsResponse.SerializeToString, + ), + 'SetReadOnly': grpc.unary_unary_rpc_method_handler( + servicer.SetReadOnly, + request_deserializer=tabletmanagerdata__pb2.SetReadOnlyRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SetReadOnlyResponse.SerializeToString, + ), + 'SetReadWrite': grpc.unary_unary_rpc_method_handler( + servicer.SetReadWrite, + request_deserializer=tabletmanagerdata__pb2.SetReadWriteRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SetReadWriteResponse.SerializeToString, + ), + 'ChangeType': grpc.unary_unary_rpc_method_handler( + servicer.ChangeType, + request_deserializer=tabletmanagerdata__pb2.ChangeTypeRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ChangeTypeResponse.SerializeToString, + ), + 'RefreshState': grpc.unary_unary_rpc_method_handler( + servicer.RefreshState, + request_deserializer=tabletmanagerdata__pb2.RefreshStateRequest.FromString, + response_serializer=tabletmanagerdata__pb2.RefreshStateResponse.SerializeToString, + ), + 'RunHealthCheck': grpc.unary_unary_rpc_method_handler( + servicer.RunHealthCheck, + request_deserializer=tabletmanagerdata__pb2.RunHealthCheckRequest.FromString, + response_serializer=tabletmanagerdata__pb2.RunHealthCheckResponse.SerializeToString, + ), + 'IgnoreHealthError': grpc.unary_unary_rpc_method_handler( + servicer.IgnoreHealthError, + request_deserializer=tabletmanagerdata__pb2.IgnoreHealthErrorRequest.FromString, + response_serializer=tabletmanagerdata__pb2.IgnoreHealthErrorResponse.SerializeToString, + ), + 'ReloadSchema': grpc.unary_unary_rpc_method_handler( + servicer.ReloadSchema, + request_deserializer=tabletmanagerdata__pb2.ReloadSchemaRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ReloadSchemaResponse.SerializeToString, + ), + 'PreflightSchema': grpc.unary_unary_rpc_method_handler( + servicer.PreflightSchema, + request_deserializer=tabletmanagerdata__pb2.PreflightSchemaRequest.FromString, + response_serializer=tabletmanagerdata__pb2.PreflightSchemaResponse.SerializeToString, + ), + 'ApplySchema': grpc.unary_unary_rpc_method_handler( + servicer.ApplySchema, + request_deserializer=tabletmanagerdata__pb2.ApplySchemaRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ApplySchemaResponse.SerializeToString, + ), + 'ExecuteFetchAsDba': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteFetchAsDba, + request_deserializer=tabletmanagerdata__pb2.ExecuteFetchAsDbaRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ExecuteFetchAsDbaResponse.SerializeToString, + ), + 'ExecuteFetchAsApp': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteFetchAsApp, + request_deserializer=tabletmanagerdata__pb2.ExecuteFetchAsAppRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ExecuteFetchAsAppResponse.SerializeToString, + ), + 'SlaveStatus': grpc.unary_unary_rpc_method_handler( + servicer.SlaveStatus, + request_deserializer=tabletmanagerdata__pb2.SlaveStatusRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SlaveStatusResponse.SerializeToString, + ), + 'MasterPosition': grpc.unary_unary_rpc_method_handler( + servicer.MasterPosition, + request_deserializer=tabletmanagerdata__pb2.MasterPositionRequest.FromString, + response_serializer=tabletmanagerdata__pb2.MasterPositionResponse.SerializeToString, + ), + 'StopSlave': grpc.unary_unary_rpc_method_handler( + servicer.StopSlave, + request_deserializer=tabletmanagerdata__pb2.StopSlaveRequest.FromString, + response_serializer=tabletmanagerdata__pb2.StopSlaveResponse.SerializeToString, + ), + 'StopSlaveMinimum': grpc.unary_unary_rpc_method_handler( + servicer.StopSlaveMinimum, + request_deserializer=tabletmanagerdata__pb2.StopSlaveMinimumRequest.FromString, + response_serializer=tabletmanagerdata__pb2.StopSlaveMinimumResponse.SerializeToString, + ), + 'StartSlave': grpc.unary_unary_rpc_method_handler( + servicer.StartSlave, + request_deserializer=tabletmanagerdata__pb2.StartSlaveRequest.FromString, + response_serializer=tabletmanagerdata__pb2.StartSlaveResponse.SerializeToString, + ), + 'TabletExternallyReparented': grpc.unary_unary_rpc_method_handler( + servicer.TabletExternallyReparented, + request_deserializer=tabletmanagerdata__pb2.TabletExternallyReparentedRequest.FromString, + response_serializer=tabletmanagerdata__pb2.TabletExternallyReparentedResponse.SerializeToString, + ), + 'TabletExternallyElected': grpc.unary_unary_rpc_method_handler( + servicer.TabletExternallyElected, + request_deserializer=tabletmanagerdata__pb2.TabletExternallyElectedRequest.FromString, + response_serializer=tabletmanagerdata__pb2.TabletExternallyElectedResponse.SerializeToString, + ), + 'GetSlaves': grpc.unary_unary_rpc_method_handler( + servicer.GetSlaves, + request_deserializer=tabletmanagerdata__pb2.GetSlavesRequest.FromString, + response_serializer=tabletmanagerdata__pb2.GetSlavesResponse.SerializeToString, + ), + 'WaitBlpPosition': grpc.unary_unary_rpc_method_handler( + servicer.WaitBlpPosition, + request_deserializer=tabletmanagerdata__pb2.WaitBlpPositionRequest.FromString, + response_serializer=tabletmanagerdata__pb2.WaitBlpPositionResponse.SerializeToString, + ), + 'StopBlp': grpc.unary_unary_rpc_method_handler( + servicer.StopBlp, + request_deserializer=tabletmanagerdata__pb2.StopBlpRequest.FromString, + response_serializer=tabletmanagerdata__pb2.StopBlpResponse.SerializeToString, + ), + 'StartBlp': grpc.unary_unary_rpc_method_handler( + servicer.StartBlp, + request_deserializer=tabletmanagerdata__pb2.StartBlpRequest.FromString, + response_serializer=tabletmanagerdata__pb2.StartBlpResponse.SerializeToString, + ), + 'RunBlpUntil': grpc.unary_unary_rpc_method_handler( + servicer.RunBlpUntil, + request_deserializer=tabletmanagerdata__pb2.RunBlpUntilRequest.FromString, + response_serializer=tabletmanagerdata__pb2.RunBlpUntilResponse.SerializeToString, + ), + 'ResetReplication': grpc.unary_unary_rpc_method_handler( + servicer.ResetReplication, + request_deserializer=tabletmanagerdata__pb2.ResetReplicationRequest.FromString, + response_serializer=tabletmanagerdata__pb2.ResetReplicationResponse.SerializeToString, + ), + 'InitMaster': grpc.unary_unary_rpc_method_handler( + servicer.InitMaster, + request_deserializer=tabletmanagerdata__pb2.InitMasterRequest.FromString, + response_serializer=tabletmanagerdata__pb2.InitMasterResponse.SerializeToString, + ), + 'PopulateReparentJournal': grpc.unary_unary_rpc_method_handler( + servicer.PopulateReparentJournal, + request_deserializer=tabletmanagerdata__pb2.PopulateReparentJournalRequest.FromString, + response_serializer=tabletmanagerdata__pb2.PopulateReparentJournalResponse.SerializeToString, + ), + 'InitSlave': grpc.unary_unary_rpc_method_handler( + servicer.InitSlave, + request_deserializer=tabletmanagerdata__pb2.InitSlaveRequest.FromString, + response_serializer=tabletmanagerdata__pb2.InitSlaveResponse.SerializeToString, + ), + 'DemoteMaster': grpc.unary_unary_rpc_method_handler( + servicer.DemoteMaster, + request_deserializer=tabletmanagerdata__pb2.DemoteMasterRequest.FromString, + response_serializer=tabletmanagerdata__pb2.DemoteMasterResponse.SerializeToString, + ), + 'PromoteSlaveWhenCaughtUp': grpc.unary_unary_rpc_method_handler( + servicer.PromoteSlaveWhenCaughtUp, + request_deserializer=tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpRequest.FromString, + response_serializer=tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpResponse.SerializeToString, + ), + 'SlaveWasPromoted': grpc.unary_unary_rpc_method_handler( + servicer.SlaveWasPromoted, + request_deserializer=tabletmanagerdata__pb2.SlaveWasPromotedRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SlaveWasPromotedResponse.SerializeToString, + ), + 'SetMaster': grpc.unary_unary_rpc_method_handler( + servicer.SetMaster, + request_deserializer=tabletmanagerdata__pb2.SetMasterRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SetMasterResponse.SerializeToString, + ), + 'SlaveWasRestarted': grpc.unary_unary_rpc_method_handler( + servicer.SlaveWasRestarted, + request_deserializer=tabletmanagerdata__pb2.SlaveWasRestartedRequest.FromString, + response_serializer=tabletmanagerdata__pb2.SlaveWasRestartedResponse.SerializeToString, + ), + 'StopReplicationAndGetStatus': grpc.unary_unary_rpc_method_handler( + servicer.StopReplicationAndGetStatus, + request_deserializer=tabletmanagerdata__pb2.StopReplicationAndGetStatusRequest.FromString, + response_serializer=tabletmanagerdata__pb2.StopReplicationAndGetStatusResponse.SerializeToString, + ), + 'PromoteSlave': grpc.unary_unary_rpc_method_handler( + servicer.PromoteSlave, + request_deserializer=tabletmanagerdata__pb2.PromoteSlaveRequest.FromString, + response_serializer=tabletmanagerdata__pb2.PromoteSlaveResponse.SerializeToString, + ), + 'Backup': grpc.unary_stream_rpc_method_handler( + servicer.Backup, + request_deserializer=tabletmanagerdata__pb2.BackupRequest.FromString, + response_serializer=tabletmanagerdata__pb2.BackupResponse.SerializeToString, + ), + 'RestoreFromBackup': grpc.unary_stream_rpc_method_handler( + servicer.RestoreFromBackup, + request_deserializer=tabletmanagerdata__pb2.RestoreFromBackupRequest.FromString, + response_serializer=tabletmanagerdata__pb2.RestoreFromBackupResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'tabletmanagerservice.TabletManager', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaTabletManagerServicer(object): + """TabletManager is a service definition for tabletmanagerdata.TabletManager. + + Various read-only methods + + """ + def Ping(self, request, context): + """Ping returns the input payload + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Sleep(self, request, context): + """Sleep sleeps for the provided duration + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteHook(self, request, context): + """ExecuteHook executes the hook remotely + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def GetSchema(self, request, context): + """GetSchema asks the tablet for its schema + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def GetPermissions(self, request, context): + """GetPermissions asks the tablet for its permissions + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SetReadOnly(self, request, context): + """ + Various read-write methods + + + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SetReadWrite(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ChangeType(self, request, context): + """ChangeType asks the remote tablet to change its type + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def RefreshState(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def RunHealthCheck(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def IgnoreHealthError(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ReloadSchema(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def PreflightSchema(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ApplySchema(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteFetchAsDba(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteFetchAsApp(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SlaveStatus(self, request, context): + """ + Replication related methods + + + SlaveStatus returns the current slave status. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def MasterPosition(self, request, context): + """MasterPosition returns the current master position + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StopSlave(self, request, context): + """StopSlave makes mysql stop its replication + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StopSlaveMinimum(self, request, context): + """StopSlaveMinimum stops the mysql replication after it reaches + the provided minimum point + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StartSlave(self, request, context): + """StartSlave starts the mysql replication + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def TabletExternallyReparented(self, request, context): + """TabletExternallyReparented tells a tablet that its underlying MySQL is + currently the master. It is only used in environments (tabletmanagerdata.such as Vitess+MoB) + in which MySQL is reparented by some agent external to Vitess, and then + that agent simply notifies Vitess. + + This call is idempotent with respect to a single target tablet. + However, the tablet assumes there is a cooling-off period following the + initial external reparent from A to B, before this call is repeated on any + tablet other than B. This assumption is configurable with the vttablet flag + "finalize_external_reparent_timeout". + + For more information, see the design doc at go/vt-fast-failover. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def TabletExternallyElected(self, request, context): + """TabletExternallyElected is an notification that may be sent in + anticipation of potentially later sending TabletExternallyReparented. + The tablet can use this extra lead time to prepare to react quickly if + TabletExternallyReparented does follow. + + This call is effectively a no-op if it is not followed by a call to + TabletExternallyReparented, so the external agent doing the reparent can + still change its mind. + + The agent does not need to wait for this call or cancel it before calling + TabletExternallyReparented if the external reparent operation finishes + before TabletExternallyElected returns. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def GetSlaves(self, request, context): + """GetSlaves asks for the list of mysql slaves + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def WaitBlpPosition(self, request, context): + """WaitBlpPosition tells the remote tablet to wait until it reaches + the specified binolg player position + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StopBlp(self, request, context): + """StopBlp asks the tablet to stop all its binlog players, + and returns the current position for all of them + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StartBlp(self, request, context): + """StartBlp asks the tablet to restart its binlog players + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def RunBlpUntil(self, request, context): + """RunBlpUntil asks the tablet to restart its binlog players + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ResetReplication(self, request, context): + """ + Reparenting related functions + + + ResetReplication makes the target not replicating + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def InitMaster(self, request, context): + """InitMaster initializes the tablet as a master + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def PopulateReparentJournal(self, request, context): + """PopulateReparentJournal tells the tablet to add an entry to its + reparent journal + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def InitSlave(self, request, context): + """InitSlave tells the tablet to reparent to the master unconditionnally + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def DemoteMaster(self, request, context): + """DemoteMaster tells the soon-to-be-former master it's gonna change + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def PromoteSlaveWhenCaughtUp(self, request, context): + """PromoteSlaveWhenCaughtUp tells the remote tablet to catch up, + and then be the master + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SlaveWasPromoted(self, request, context): + """SlaveWasPromoted tells the remote tablet it is now the master + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SetMaster(self, request, context): + """SetMaster tells the slave to reparent + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SlaveWasRestarted(self, request, context): + """SlaveWasRestarted tells the remote tablet its master has changed + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StopReplicationAndGetStatus(self, request, context): + """StopReplicationAndGetStatus stops MySQL replication, and returns the + replication status + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def PromoteSlave(self, request, context): + """PromoteSlave makes the slave the new master + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Backup(self, request, context): + """ + Backup related methods + + + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def RestoreFromBackup(self, request, context): + """RestoreFromBackup deletes all local data and restores it from the latest backup. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaTabletManagerStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def Ping(self, request, timeout): + """TabletManager is a service definition for tabletmanagerdata.TabletManager. + + Various read-only methods + + """ + def Ping(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Ping returns the input payload + """ raise NotImplementedError() Ping.future = None - @abc.abstractmethod - def Sleep(self, request, timeout): + def Sleep(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Sleep sleeps for the provided duration + """ raise NotImplementedError() Sleep.future = None - @abc.abstractmethod - def ExecuteHook(self, request, timeout): + def ExecuteHook(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteHook executes the hook remotely + """ raise NotImplementedError() ExecuteHook.future = None - @abc.abstractmethod - def GetSchema(self, request, timeout): + def GetSchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """GetSchema asks the tablet for its schema + """ raise NotImplementedError() GetSchema.future = None - @abc.abstractmethod - def GetPermissions(self, request, timeout): + def GetPermissions(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """GetPermissions asks the tablet for its permissions + """ raise NotImplementedError() GetPermissions.future = None - @abc.abstractmethod - def SetReadOnly(self, request, timeout): + def SetReadOnly(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ + Various read-write methods + + + """ raise NotImplementedError() SetReadOnly.future = None - @abc.abstractmethod - def SetReadWrite(self, request, timeout): + def SetReadWrite(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() SetReadWrite.future = None - @abc.abstractmethod - def ChangeType(self, request, timeout): + def ChangeType(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ChangeType asks the remote tablet to change its type + """ raise NotImplementedError() ChangeType.future = None - @abc.abstractmethod - def RefreshState(self, request, timeout): + def RefreshState(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() RefreshState.future = None - @abc.abstractmethod - def RunHealthCheck(self, request, timeout): + def RunHealthCheck(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() RunHealthCheck.future = None - @abc.abstractmethod - def IgnoreHealthError(self, request, timeout): + def IgnoreHealthError(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() IgnoreHealthError.future = None - @abc.abstractmethod - def ReloadSchema(self, request, timeout): + def ReloadSchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() ReloadSchema.future = None - @abc.abstractmethod - def PreflightSchema(self, request, timeout): + def PreflightSchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() PreflightSchema.future = None - @abc.abstractmethod - def ApplySchema(self, request, timeout): + def ApplySchema(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() ApplySchema.future = None - @abc.abstractmethod - def ExecuteFetchAsDba(self, request, timeout): + def ExecuteFetchAsDba(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() ExecuteFetchAsDba.future = None - @abc.abstractmethod - def ExecuteFetchAsApp(self, request, timeout): + def ExecuteFetchAsApp(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() ExecuteFetchAsApp.future = None - @abc.abstractmethod - def SlaveStatus(self, request, timeout): + def SlaveStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ + Replication related methods + + + SlaveStatus returns the current slave status. + """ raise NotImplementedError() SlaveStatus.future = None - @abc.abstractmethod - def MasterPosition(self, request, timeout): + def MasterPosition(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """MasterPosition returns the current master position + """ raise NotImplementedError() MasterPosition.future = None - @abc.abstractmethod - def StopSlave(self, request, timeout): + def StopSlave(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StopSlave makes mysql stop its replication + """ raise NotImplementedError() StopSlave.future = None - @abc.abstractmethod - def StopSlaveMinimum(self, request, timeout): + def StopSlaveMinimum(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StopSlaveMinimum stops the mysql replication after it reaches + the provided minimum point + """ raise NotImplementedError() StopSlaveMinimum.future = None - @abc.abstractmethod - def StartSlave(self, request, timeout): + def StartSlave(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StartSlave starts the mysql replication + """ raise NotImplementedError() StartSlave.future = None - @abc.abstractmethod - def TabletExternallyReparented(self, request, timeout): + def TabletExternallyReparented(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """TabletExternallyReparented tells a tablet that its underlying MySQL is + currently the master. It is only used in environments (tabletmanagerdata.such as Vitess+MoB) + in which MySQL is reparented by some agent external to Vitess, and then + that agent simply notifies Vitess. + + This call is idempotent with respect to a single target tablet. + However, the tablet assumes there is a cooling-off period following the + initial external reparent from A to B, before this call is repeated on any + tablet other than B. This assumption is configurable with the vttablet flag + "finalize_external_reparent_timeout". + + For more information, see the design doc at go/vt-fast-failover. + """ raise NotImplementedError() TabletExternallyReparented.future = None - @abc.abstractmethod - def TabletExternallyElected(self, request, timeout): + def TabletExternallyElected(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """TabletExternallyElected is an notification that may be sent in + anticipation of potentially later sending TabletExternallyReparented. + The tablet can use this extra lead time to prepare to react quickly if + TabletExternallyReparented does follow. + + This call is effectively a no-op if it is not followed by a call to + TabletExternallyReparented, so the external agent doing the reparent can + still change its mind. + + The agent does not need to wait for this call or cancel it before calling + TabletExternallyReparented if the external reparent operation finishes + before TabletExternallyElected returns. + """ raise NotImplementedError() TabletExternallyElected.future = None - @abc.abstractmethod - def GetSlaves(self, request, timeout): + def GetSlaves(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """GetSlaves asks for the list of mysql slaves + """ raise NotImplementedError() GetSlaves.future = None - @abc.abstractmethod - def WaitBlpPosition(self, request, timeout): + def WaitBlpPosition(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """WaitBlpPosition tells the remote tablet to wait until it reaches + the specified binolg player position + """ raise NotImplementedError() WaitBlpPosition.future = None - @abc.abstractmethod - def StopBlp(self, request, timeout): + def StopBlp(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StopBlp asks the tablet to stop all its binlog players, + and returns the current position for all of them + """ raise NotImplementedError() StopBlp.future = None - @abc.abstractmethod - def StartBlp(self, request, timeout): + def StartBlp(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StartBlp asks the tablet to restart its binlog players + """ raise NotImplementedError() StartBlp.future = None - @abc.abstractmethod - def RunBlpUntil(self, request, timeout): + def RunBlpUntil(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """RunBlpUntil asks the tablet to restart its binlog players + """ raise NotImplementedError() RunBlpUntil.future = None - @abc.abstractmethod - def ResetReplication(self, request, timeout): + def ResetReplication(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ + Reparenting related functions + + + ResetReplication makes the target not replicating + """ raise NotImplementedError() ResetReplication.future = None - @abc.abstractmethod - def InitMaster(self, request, timeout): + def InitMaster(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """InitMaster initializes the tablet as a master + """ raise NotImplementedError() InitMaster.future = None - @abc.abstractmethod - def PopulateReparentJournal(self, request, timeout): + def PopulateReparentJournal(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """PopulateReparentJournal tells the tablet to add an entry to its + reparent journal + """ raise NotImplementedError() PopulateReparentJournal.future = None - @abc.abstractmethod - def InitSlave(self, request, timeout): + def InitSlave(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """InitSlave tells the tablet to reparent to the master unconditionnally + """ raise NotImplementedError() InitSlave.future = None - @abc.abstractmethod - def DemoteMaster(self, request, timeout): + def DemoteMaster(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """DemoteMaster tells the soon-to-be-former master it's gonna change + """ raise NotImplementedError() DemoteMaster.future = None - @abc.abstractmethod - def PromoteSlaveWhenCaughtUp(self, request, timeout): + def PromoteSlaveWhenCaughtUp(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """PromoteSlaveWhenCaughtUp tells the remote tablet to catch up, + and then be the master + """ raise NotImplementedError() PromoteSlaveWhenCaughtUp.future = None - @abc.abstractmethod - def SlaveWasPromoted(self, request, timeout): + def SlaveWasPromoted(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """SlaveWasPromoted tells the remote tablet it is now the master + """ raise NotImplementedError() SlaveWasPromoted.future = None - @abc.abstractmethod - def SetMaster(self, request, timeout): + def SetMaster(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """SetMaster tells the slave to reparent + """ raise NotImplementedError() SetMaster.future = None - @abc.abstractmethod - def SlaveWasRestarted(self, request, timeout): + def SlaveWasRestarted(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """SlaveWasRestarted tells the remote tablet its master has changed + """ raise NotImplementedError() SlaveWasRestarted.future = None - @abc.abstractmethod - def StopReplicationAndGetStatus(self, request, timeout): + def StopReplicationAndGetStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StopReplicationAndGetStatus stops MySQL replication, and returns the + replication status + """ raise NotImplementedError() StopReplicationAndGetStatus.future = None - @abc.abstractmethod - def PromoteSlave(self, request, timeout): + def PromoteSlave(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """PromoteSlave makes the slave the new master + """ raise NotImplementedError() PromoteSlave.future = None - @abc.abstractmethod - def Backup(self, request, timeout): + def Backup(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ + Backup related methods + + + """ raise NotImplementedError() - @abc.abstractmethod - def RestoreFromBackup(self, request, timeout): + def RestoreFromBackup(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """RestoreFromBackup deletes all local data and restores it from the latest backup. + """ raise NotImplementedError() + def beta_create_TabletManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 request_deserializers = { - ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata_pb2.ApplySchemaRequest.FromString, - ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata_pb2.BackupRequest.FromString, - ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata_pb2.ChangeTypeRequest.FromString, - ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata_pb2.DemoteMasterRequest.FromString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.FromString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.FromString, - ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata_pb2.ExecuteHookRequest.FromString, - ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata_pb2.GetPermissionsRequest.FromString, - ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata_pb2.GetSchemaRequest.FromString, - ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata_pb2.GetSlavesRequest.FromString, - ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata_pb2.IgnoreHealthErrorRequest.FromString, - ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata_pb2.InitMasterRequest.FromString, - ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata_pb2.InitSlaveRequest.FromString, - ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata_pb2.MasterPositionRequest.FromString, - ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata_pb2.PingRequest.FromString, - ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata_pb2.PopulateReparentJournalRequest.FromString, - ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata_pb2.PreflightSchemaRequest.FromString, - ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata_pb2.PromoteSlaveRequest.FromString, - ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.FromString, - ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata_pb2.RefreshStateRequest.FromString, - ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata_pb2.ReloadSchemaRequest.FromString, - ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata_pb2.ResetReplicationRequest.FromString, - ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata_pb2.RestoreFromBackupRequest.FromString, - ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata_pb2.RunBlpUntilRequest.FromString, - ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata_pb2.RunHealthCheckRequest.FromString, - ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata_pb2.SetMasterRequest.FromString, - ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata_pb2.SetReadOnlyRequest.FromString, - ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata_pb2.SetReadWriteRequest.FromString, - ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata_pb2.SlaveStatusRequest.FromString, - ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata_pb2.SlaveWasPromotedRequest.FromString, - ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata_pb2.SlaveWasRestartedRequest.FromString, - ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata_pb2.SleepRequest.FromString, - ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata_pb2.StartBlpRequest.FromString, - ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata_pb2.StartSlaveRequest.FromString, - ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata_pb2.StopBlpRequest.FromString, - ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.FromString, - ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata_pb2.StopSlaveRequest.FromString, - ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata_pb2.StopSlaveMinimumRequest.FromString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata_pb2.TabletExternallyElectedRequest.FromString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata_pb2.TabletExternallyReparentedRequest.FromString, - ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata_pb2.WaitBlpPositionRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata__pb2.ApplySchemaRequest.FromString, + ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata__pb2.BackupRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata__pb2.ChangeTypeRequest.FromString, + ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata__pb2.DemoteMasterRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata__pb2.ExecuteFetchAsAppRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata__pb2.ExecuteFetchAsDbaRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata__pb2.ExecuteHookRequest.FromString, + ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata__pb2.GetPermissionsRequest.FromString, + ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata__pb2.GetSchemaRequest.FromString, + ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata__pb2.GetSlavesRequest.FromString, + ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata__pb2.IgnoreHealthErrorRequest.FromString, + ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata__pb2.InitMasterRequest.FromString, + ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata__pb2.InitSlaveRequest.FromString, + ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata__pb2.MasterPositionRequest.FromString, + ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata__pb2.PingRequest.FromString, + ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata__pb2.PopulateReparentJournalRequest.FromString, + ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata__pb2.PreflightSchemaRequest.FromString, + ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata__pb2.PromoteSlaveRequest.FromString, + ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpRequest.FromString, + ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata__pb2.RefreshStateRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata__pb2.ReloadSchemaRequest.FromString, + ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata__pb2.ResetReplicationRequest.FromString, + ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata__pb2.RestoreFromBackupRequest.FromString, + ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata__pb2.RunBlpUntilRequest.FromString, + ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata__pb2.RunHealthCheckRequest.FromString, + ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata__pb2.SetMasterRequest.FromString, + ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata__pb2.SetReadOnlyRequest.FromString, + ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata__pb2.SetReadWriteRequest.FromString, + ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata__pb2.SlaveStatusRequest.FromString, + ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata__pb2.SlaveWasPromotedRequest.FromString, + ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata__pb2.SlaveWasRestartedRequest.FromString, + ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata__pb2.SleepRequest.FromString, + ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata__pb2.StartBlpRequest.FromString, + ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata__pb2.StartSlaveRequest.FromString, + ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata__pb2.StopBlpRequest.FromString, + ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata__pb2.StopReplicationAndGetStatusRequest.FromString, + ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata__pb2.StopSlaveRequest.FromString, + ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata__pb2.StopSlaveMinimumRequest.FromString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata__pb2.TabletExternallyElectedRequest.FromString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata__pb2.TabletExternallyReparentedRequest.FromString, + ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata__pb2.WaitBlpPositionRequest.FromString, } response_serializers = { - ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata_pb2.ApplySchemaResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata_pb2.BackupResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata_pb2.ChangeTypeResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata_pb2.DemoteMasterResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata_pb2.ExecuteHookResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata_pb2.GetPermissionsResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata_pb2.GetSchemaResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata_pb2.GetSlavesResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata_pb2.IgnoreHealthErrorResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata_pb2.InitMasterResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata_pb2.InitSlaveResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata_pb2.MasterPositionResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata_pb2.PingResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata_pb2.PopulateReparentJournalResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata_pb2.PreflightSchemaResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata_pb2.PromoteSlaveResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata_pb2.RefreshStateResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata_pb2.ReloadSchemaResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata_pb2.ResetReplicationResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata_pb2.RestoreFromBackupResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata_pb2.RunBlpUntilResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata_pb2.RunHealthCheckResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata_pb2.SetMasterResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata_pb2.SetReadOnlyResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata_pb2.SetReadWriteResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata_pb2.SlaveStatusResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata_pb2.SlaveWasPromotedResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata_pb2.SlaveWasRestartedResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata_pb2.SleepResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata_pb2.StartBlpResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata_pb2.StartSlaveResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata_pb2.StopBlpResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata_pb2.StopSlaveResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata_pb2.StopSlaveMinimumResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata_pb2.TabletExternallyElectedResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata_pb2.TabletExternallyReparentedResponse.SerializeToString, - ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata_pb2.WaitBlpPositionResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata__pb2.ApplySchemaResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata__pb2.BackupResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata__pb2.ChangeTypeResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata__pb2.DemoteMasterResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata__pb2.ExecuteFetchAsAppResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata__pb2.ExecuteFetchAsDbaResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata__pb2.ExecuteHookResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata__pb2.GetPermissionsResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata__pb2.GetSchemaResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata__pb2.GetSlavesResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata__pb2.IgnoreHealthErrorResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata__pb2.InitMasterResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata__pb2.InitSlaveResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata__pb2.MasterPositionResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata__pb2.PingResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata__pb2.PopulateReparentJournalResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata__pb2.PreflightSchemaResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata__pb2.PromoteSlaveResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata__pb2.RefreshStateResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata__pb2.ReloadSchemaResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata__pb2.ResetReplicationResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata__pb2.RestoreFromBackupResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata__pb2.RunBlpUntilResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata__pb2.RunHealthCheckResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata__pb2.SetMasterResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata__pb2.SetReadOnlyResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata__pb2.SetReadWriteResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata__pb2.SlaveStatusResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata__pb2.SlaveWasPromotedResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata__pb2.SlaveWasRestartedResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata__pb2.SleepResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata__pb2.StartBlpResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata__pb2.StartSlaveResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata__pb2.StopBlpResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata__pb2.StopReplicationAndGetStatusResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata__pb2.StopSlaveResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata__pb2.StopSlaveMinimumResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata__pb2.TabletExternallyElectedResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata__pb2.TabletExternallyReparentedResponse.SerializeToString, + ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata__pb2.WaitBlpPositionResponse.SerializeToString, } method_implementations = { ('tabletmanagerservice.TabletManager', 'ApplySchema'): face_utilities.unary_unary_inline(servicer.ApplySchema), @@ -542,174 +1352,93 @@ def beta_create_TabletManager_server(servicer, pool=None, pool_size=None, defaul server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_TabletManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 - import tabletmanagerdata_pb2 request_serializers = { - ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata_pb2.ApplySchemaRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata_pb2.BackupRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata_pb2.ChangeTypeRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata_pb2.DemoteMasterRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata_pb2.ExecuteFetchAsAppRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata_pb2.ExecuteFetchAsDbaRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata_pb2.ExecuteHookRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata_pb2.GetPermissionsRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata_pb2.GetSchemaRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata_pb2.GetSlavesRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata_pb2.IgnoreHealthErrorRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata_pb2.InitMasterRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata_pb2.InitSlaveRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata_pb2.MasterPositionRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata_pb2.PingRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata_pb2.PopulateReparentJournalRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata_pb2.PreflightSchemaRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata_pb2.PromoteSlaveRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata_pb2.RefreshStateRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata_pb2.ReloadSchemaRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata_pb2.ResetReplicationRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata_pb2.RestoreFromBackupRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata_pb2.RunBlpUntilRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata_pb2.RunHealthCheckRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata_pb2.SetMasterRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata_pb2.SetReadOnlyRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata_pb2.SetReadWriteRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata_pb2.SlaveStatusRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata_pb2.SlaveWasPromotedRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata_pb2.SlaveWasRestartedRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata_pb2.SleepRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata_pb2.StartBlpRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata_pb2.StartSlaveRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata_pb2.StopBlpRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata_pb2.StopReplicationAndGetStatusRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata_pb2.StopSlaveRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata_pb2.StopSlaveMinimumRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata_pb2.TabletExternallyElectedRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata_pb2.TabletExternallyReparentedRequest.SerializeToString, - ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata_pb2.WaitBlpPositionRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata__pb2.ApplySchemaRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata__pb2.BackupRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata__pb2.ChangeTypeRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata__pb2.DemoteMasterRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata__pb2.ExecuteFetchAsAppRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata__pb2.ExecuteFetchAsDbaRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata__pb2.ExecuteHookRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata__pb2.GetPermissionsRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata__pb2.GetSchemaRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata__pb2.GetSlavesRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata__pb2.IgnoreHealthErrorRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata__pb2.InitMasterRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata__pb2.InitSlaveRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata__pb2.MasterPositionRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata__pb2.PingRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata__pb2.PopulateReparentJournalRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata__pb2.PreflightSchemaRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata__pb2.PromoteSlaveRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata__pb2.RefreshStateRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata__pb2.ReloadSchemaRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata__pb2.ResetReplicationRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata__pb2.RestoreFromBackupRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata__pb2.RunBlpUntilRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata__pb2.RunHealthCheckRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata__pb2.SetMasterRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata__pb2.SetReadOnlyRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata__pb2.SetReadWriteRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata__pb2.SlaveStatusRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata__pb2.SlaveWasPromotedRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata__pb2.SlaveWasRestartedRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata__pb2.SleepRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata__pb2.StartBlpRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata__pb2.StartSlaveRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata__pb2.StopBlpRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata__pb2.StopReplicationAndGetStatusRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata__pb2.StopSlaveRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata__pb2.StopSlaveMinimumRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata__pb2.TabletExternallyElectedRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata__pb2.TabletExternallyReparentedRequest.SerializeToString, + ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata__pb2.WaitBlpPositionRequest.SerializeToString, } response_deserializers = { - ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata_pb2.ApplySchemaResponse.FromString, - ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata_pb2.BackupResponse.FromString, - ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata_pb2.ChangeTypeResponse.FromString, - ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata_pb2.DemoteMasterResponse.FromString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata_pb2.ExecuteFetchAsAppResponse.FromString, - ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata_pb2.ExecuteFetchAsDbaResponse.FromString, - ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata_pb2.ExecuteHookResponse.FromString, - ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata_pb2.GetPermissionsResponse.FromString, - ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata_pb2.GetSchemaResponse.FromString, - ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata_pb2.GetSlavesResponse.FromString, - ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata_pb2.IgnoreHealthErrorResponse.FromString, - ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata_pb2.InitMasterResponse.FromString, - ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata_pb2.InitSlaveResponse.FromString, - ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata_pb2.MasterPositionResponse.FromString, - ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata_pb2.PingResponse.FromString, - ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata_pb2.PopulateReparentJournalResponse.FromString, - ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata_pb2.PreflightSchemaResponse.FromString, - ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata_pb2.PromoteSlaveResponse.FromString, - ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata_pb2.PromoteSlaveWhenCaughtUpResponse.FromString, - ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata_pb2.RefreshStateResponse.FromString, - ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata_pb2.ReloadSchemaResponse.FromString, - ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata_pb2.ResetReplicationResponse.FromString, - ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata_pb2.RestoreFromBackupResponse.FromString, - ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata_pb2.RunBlpUntilResponse.FromString, - ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata_pb2.RunHealthCheckResponse.FromString, - ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata_pb2.SetMasterResponse.FromString, - ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata_pb2.SetReadOnlyResponse.FromString, - ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata_pb2.SetReadWriteResponse.FromString, - ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata_pb2.SlaveStatusResponse.FromString, - ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata_pb2.SlaveWasPromotedResponse.FromString, - ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata_pb2.SlaveWasRestartedResponse.FromString, - ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata_pb2.SleepResponse.FromString, - ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata_pb2.StartBlpResponse.FromString, - ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata_pb2.StartSlaveResponse.FromString, - ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata_pb2.StopBlpResponse.FromString, - ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata_pb2.StopReplicationAndGetStatusResponse.FromString, - ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata_pb2.StopSlaveResponse.FromString, - ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata_pb2.StopSlaveMinimumResponse.FromString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata_pb2.TabletExternallyElectedResponse.FromString, - ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata_pb2.TabletExternallyReparentedResponse.FromString, - ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata_pb2.WaitBlpPositionResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ApplySchema'): tabletmanagerdata__pb2.ApplySchemaResponse.FromString, + ('tabletmanagerservice.TabletManager', 'Backup'): tabletmanagerdata__pb2.BackupResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ChangeType'): tabletmanagerdata__pb2.ChangeTypeResponse.FromString, + ('tabletmanagerservice.TabletManager', 'DemoteMaster'): tabletmanagerdata__pb2.DemoteMasterResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsApp'): tabletmanagerdata__pb2.ExecuteFetchAsAppResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ExecuteFetchAsDba'): tabletmanagerdata__pb2.ExecuteFetchAsDbaResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ExecuteHook'): tabletmanagerdata__pb2.ExecuteHookResponse.FromString, + ('tabletmanagerservice.TabletManager', 'GetPermissions'): tabletmanagerdata__pb2.GetPermissionsResponse.FromString, + ('tabletmanagerservice.TabletManager', 'GetSchema'): tabletmanagerdata__pb2.GetSchemaResponse.FromString, + ('tabletmanagerservice.TabletManager', 'GetSlaves'): tabletmanagerdata__pb2.GetSlavesResponse.FromString, + ('tabletmanagerservice.TabletManager', 'IgnoreHealthError'): tabletmanagerdata__pb2.IgnoreHealthErrorResponse.FromString, + ('tabletmanagerservice.TabletManager', 'InitMaster'): tabletmanagerdata__pb2.InitMasterResponse.FromString, + ('tabletmanagerservice.TabletManager', 'InitSlave'): tabletmanagerdata__pb2.InitSlaveResponse.FromString, + ('tabletmanagerservice.TabletManager', 'MasterPosition'): tabletmanagerdata__pb2.MasterPositionResponse.FromString, + ('tabletmanagerservice.TabletManager', 'Ping'): tabletmanagerdata__pb2.PingResponse.FromString, + ('tabletmanagerservice.TabletManager', 'PopulateReparentJournal'): tabletmanagerdata__pb2.PopulateReparentJournalResponse.FromString, + ('tabletmanagerservice.TabletManager', 'PreflightSchema'): tabletmanagerdata__pb2.PreflightSchemaResponse.FromString, + ('tabletmanagerservice.TabletManager', 'PromoteSlave'): tabletmanagerdata__pb2.PromoteSlaveResponse.FromString, + ('tabletmanagerservice.TabletManager', 'PromoteSlaveWhenCaughtUp'): tabletmanagerdata__pb2.PromoteSlaveWhenCaughtUpResponse.FromString, + ('tabletmanagerservice.TabletManager', 'RefreshState'): tabletmanagerdata__pb2.RefreshStateResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ReloadSchema'): tabletmanagerdata__pb2.ReloadSchemaResponse.FromString, + ('tabletmanagerservice.TabletManager', 'ResetReplication'): tabletmanagerdata__pb2.ResetReplicationResponse.FromString, + ('tabletmanagerservice.TabletManager', 'RestoreFromBackup'): tabletmanagerdata__pb2.RestoreFromBackupResponse.FromString, + ('tabletmanagerservice.TabletManager', 'RunBlpUntil'): tabletmanagerdata__pb2.RunBlpUntilResponse.FromString, + ('tabletmanagerservice.TabletManager', 'RunHealthCheck'): tabletmanagerdata__pb2.RunHealthCheckResponse.FromString, + ('tabletmanagerservice.TabletManager', 'SetMaster'): tabletmanagerdata__pb2.SetMasterResponse.FromString, + ('tabletmanagerservice.TabletManager', 'SetReadOnly'): tabletmanagerdata__pb2.SetReadOnlyResponse.FromString, + ('tabletmanagerservice.TabletManager', 'SetReadWrite'): tabletmanagerdata__pb2.SetReadWriteResponse.FromString, + ('tabletmanagerservice.TabletManager', 'SlaveStatus'): tabletmanagerdata__pb2.SlaveStatusResponse.FromString, + ('tabletmanagerservice.TabletManager', 'SlaveWasPromoted'): tabletmanagerdata__pb2.SlaveWasPromotedResponse.FromString, + ('tabletmanagerservice.TabletManager', 'SlaveWasRestarted'): tabletmanagerdata__pb2.SlaveWasRestartedResponse.FromString, + ('tabletmanagerservice.TabletManager', 'Sleep'): tabletmanagerdata__pb2.SleepResponse.FromString, + ('tabletmanagerservice.TabletManager', 'StartBlp'): tabletmanagerdata__pb2.StartBlpResponse.FromString, + ('tabletmanagerservice.TabletManager', 'StartSlave'): tabletmanagerdata__pb2.StartSlaveResponse.FromString, + ('tabletmanagerservice.TabletManager', 'StopBlp'): tabletmanagerdata__pb2.StopBlpResponse.FromString, + ('tabletmanagerservice.TabletManager', 'StopReplicationAndGetStatus'): tabletmanagerdata__pb2.StopReplicationAndGetStatusResponse.FromString, + ('tabletmanagerservice.TabletManager', 'StopSlave'): tabletmanagerdata__pb2.StopSlaveResponse.FromString, + ('tabletmanagerservice.TabletManager', 'StopSlaveMinimum'): tabletmanagerdata__pb2.StopSlaveMinimumResponse.FromString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyElected'): tabletmanagerdata__pb2.TabletExternallyElectedResponse.FromString, + ('tabletmanagerservice.TabletManager', 'TabletExternallyReparented'): tabletmanagerdata__pb2.TabletExternallyReparentedResponse.FromString, + ('tabletmanagerservice.TabletManager', 'WaitBlpPosition'): tabletmanagerdata__pb2.WaitBlpPositionResponse.FromString, } cardinalities = { 'ApplySchema': cardinality.Cardinality.UNARY_UNARY, diff --git a/py/vtproto/throttlerdata_pb2.py b/py/vtproto/throttlerdata_pb2.py index 866c004c72..6e28f71bc4 100644 --- a/py/vtproto/throttlerdata_pb2.py +++ b/py/vtproto/throttlerdata_pb2.py @@ -211,14 +211,14 @@ _CONFIGURATION = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='max_increase', full_name='throttlerdata.Configuration.max_increase', index=3, number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='emergency_decrease', full_name='throttlerdata.Configuration.emergency_decrease', index=4, number=5, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -274,7 +274,7 @@ _CONFIGURATION = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='bad_rate_increase', full_name='throttlerdata.Configuration.bad_rate_increase', index=12, number=13, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=0, + has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -647,8 +647,9 @@ _MAXRATESRESPONSE_RATESENTRY.has_options = True _MAXRATESRESPONSE_RATESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _GETCONFIGURATIONRESPONSE_CONFIGURATIONSENTRY.has_options = True _GETCONFIGURATIONRESPONSE_CONFIGURATIONSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/throttlerservice_pb2.py b/py/vtproto/throttlerservice_pb2.py index 78b00f07bc..e33fc7563f 100644 --- a/py/vtproto/throttlerservice_pb2.py +++ b/py/vtproto/throttlerservice_pb2.py @@ -29,78 +29,216 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaThrottlerServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class ThrottlerStub(object): + """Throttler defines the throttler RPC calls. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.MaxRates = channel.unary_unary( + '/throttlerservice.Throttler/MaxRates', + request_serializer=throttlerdata__pb2.MaxRatesRequest.SerializeToString, + response_deserializer=throttlerdata__pb2.MaxRatesResponse.FromString, + ) + self.SetMaxRate = channel.unary_unary( + '/throttlerservice.Throttler/SetMaxRate', + request_serializer=throttlerdata__pb2.SetMaxRateRequest.SerializeToString, + response_deserializer=throttlerdata__pb2.SetMaxRateResponse.FromString, + ) + self.GetConfiguration = channel.unary_unary( + '/throttlerservice.Throttler/GetConfiguration', + request_serializer=throttlerdata__pb2.GetConfigurationRequest.SerializeToString, + response_deserializer=throttlerdata__pb2.GetConfigurationResponse.FromString, + ) + self.UpdateConfiguration = channel.unary_unary( + '/throttlerservice.Throttler/UpdateConfiguration', + request_serializer=throttlerdata__pb2.UpdateConfigurationRequest.SerializeToString, + response_deserializer=throttlerdata__pb2.UpdateConfigurationResponse.FromString, + ) + self.ResetConfiguration = channel.unary_unary( + '/throttlerservice.Throttler/ResetConfiguration', + request_serializer=throttlerdata__pb2.ResetConfigurationRequest.SerializeToString, + response_deserializer=throttlerdata__pb2.ResetConfigurationResponse.FromString, + ) + + +class ThrottlerServicer(object): + """Throttler defines the throttler RPC calls. + """ + def MaxRates(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """MaxRates returns the current max rate for each throttler of the process. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetMaxRate(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """SetMaxRate allows to change the current max rate for all throttlers + of the process. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetConfiguration(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """GetConfiguration returns the configuration of the MaxReplicationlag module + for the given throttler or all throttlers if "throttler_name" is empty. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def UpdateConfiguration(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """UpdateConfiguration (partially) updates the configuration of the + MaxReplicationlag module for the given throttler or all throttlers if + "throttler_name" is empty. + If "copy_zero_values" is true, fields with zero values will be copied + as well. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ResetConfiguration(self, request, context): - raise NotImplementedError() + """ResetConfiguration resets the configuration of the MaxReplicationlag module + to the initial configuration for the given throttler or all throttlers if + "throttler_name" is empty. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ThrottlerServicer_to_server(servicer, server): + rpc_method_handlers = { + 'MaxRates': grpc.unary_unary_rpc_method_handler( + servicer.MaxRates, + request_deserializer=throttlerdata__pb2.MaxRatesRequest.FromString, + response_serializer=throttlerdata__pb2.MaxRatesResponse.SerializeToString, + ), + 'SetMaxRate': grpc.unary_unary_rpc_method_handler( + servicer.SetMaxRate, + request_deserializer=throttlerdata__pb2.SetMaxRateRequest.FromString, + response_serializer=throttlerdata__pb2.SetMaxRateResponse.SerializeToString, + ), + 'GetConfiguration': grpc.unary_unary_rpc_method_handler( + servicer.GetConfiguration, + request_deserializer=throttlerdata__pb2.GetConfigurationRequest.FromString, + response_serializer=throttlerdata__pb2.GetConfigurationResponse.SerializeToString, + ), + 'UpdateConfiguration': grpc.unary_unary_rpc_method_handler( + servicer.UpdateConfiguration, + request_deserializer=throttlerdata__pb2.UpdateConfigurationRequest.FromString, + response_serializer=throttlerdata__pb2.UpdateConfigurationResponse.SerializeToString, + ), + 'ResetConfiguration': grpc.unary_unary_rpc_method_handler( + servicer.ResetConfiguration, + request_deserializer=throttlerdata__pb2.ResetConfigurationRequest.FromString, + response_serializer=throttlerdata__pb2.ResetConfigurationResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'throttlerservice.Throttler', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaThrottlerServicer(object): + """Throttler defines the throttler RPC calls. + """ + def MaxRates(self, request, context): + """MaxRates returns the current max rate for each throttler of the process. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SetMaxRate(self, request, context): + """SetMaxRate allows to change the current max rate for all throttlers + of the process. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def GetConfiguration(self, request, context): + """GetConfiguration returns the configuration of the MaxReplicationlag module + for the given throttler or all throttlers if "throttler_name" is empty. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def UpdateConfiguration(self, request, context): + """UpdateConfiguration (partially) updates the configuration of the + MaxReplicationlag module for the given throttler or all throttlers if + "throttler_name" is empty. + If "copy_zero_values" is true, fields with zero values will be copied + as well. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ResetConfiguration(self, request, context): + """ResetConfiguration resets the configuration of the MaxReplicationlag module + to the initial configuration for the given throttler or all throttlers if + "throttler_name" is empty. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaThrottlerStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def MaxRates(self, request, timeout): + """Throttler defines the throttler RPC calls. + """ + def MaxRates(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """MaxRates returns the current max rate for each throttler of the process. + """ raise NotImplementedError() MaxRates.future = None - @abc.abstractmethod - def SetMaxRate(self, request, timeout): + def SetMaxRate(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """SetMaxRate allows to change the current max rate for all throttlers + of the process. + """ raise NotImplementedError() SetMaxRate.future = None - @abc.abstractmethod - def GetConfiguration(self, request, timeout): + def GetConfiguration(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """GetConfiguration returns the configuration of the MaxReplicationlag module + for the given throttler or all throttlers if "throttler_name" is empty. + """ raise NotImplementedError() GetConfiguration.future = None - @abc.abstractmethod - def UpdateConfiguration(self, request, timeout): + def UpdateConfiguration(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """UpdateConfiguration (partially) updates the configuration of the + MaxReplicationlag module for the given throttler or all throttlers if + "throttler_name" is empty. + If "copy_zero_values" is true, fields with zero values will be copied + as well. + """ raise NotImplementedError() UpdateConfiguration.future = None - @abc.abstractmethod - def ResetConfiguration(self, request, timeout): + def ResetConfiguration(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ResetConfiguration resets the configuration of the MaxReplicationlag module + to the initial configuration for the given throttler or all throttlers if + "throttler_name" is empty. + """ raise NotImplementedError() ResetConfiguration.future = None + def beta_create_Throttler_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 request_deserializers = { - ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata_pb2.GetConfigurationRequest.FromString, - ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesRequest.FromString, - ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata_pb2.ResetConfigurationRequest.FromString, - ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateRequest.FromString, - ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata_pb2.UpdateConfigurationRequest.FromString, + ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata__pb2.GetConfigurationRequest.FromString, + ('throttlerservice.Throttler', 'MaxRates'): throttlerdata__pb2.MaxRatesRequest.FromString, + ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata__pb2.ResetConfigurationRequest.FromString, + ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata__pb2.SetMaxRateRequest.FromString, + ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata__pb2.UpdateConfigurationRequest.FromString, } response_serializers = { - ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata_pb2.GetConfigurationResponse.SerializeToString, - ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesResponse.SerializeToString, - ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata_pb2.ResetConfigurationResponse.SerializeToString, - ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateResponse.SerializeToString, - ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata_pb2.UpdateConfigurationResponse.SerializeToString, + ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata__pb2.GetConfigurationResponse.SerializeToString, + ('throttlerservice.Throttler', 'MaxRates'): throttlerdata__pb2.MaxRatesResponse.SerializeToString, + ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata__pb2.ResetConfigurationResponse.SerializeToString, + ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata__pb2.SetMaxRateResponse.SerializeToString, + ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata__pb2.UpdateConfigurationResponse.SerializeToString, } method_implementations = { ('throttlerservice.Throttler', 'GetConfiguration'): face_utilities.unary_unary_inline(servicer.GetConfiguration), @@ -112,30 +250,21 @@ def beta_create_Throttler_server(servicer, pool=None, pool_size=None, default_ti server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_Throttler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 - import throttlerdata_pb2 request_serializers = { - ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata_pb2.GetConfigurationRequest.SerializeToString, - ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesRequest.SerializeToString, - ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata_pb2.ResetConfigurationRequest.SerializeToString, - ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateRequest.SerializeToString, - ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata_pb2.UpdateConfigurationRequest.SerializeToString, + ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata__pb2.GetConfigurationRequest.SerializeToString, + ('throttlerservice.Throttler', 'MaxRates'): throttlerdata__pb2.MaxRatesRequest.SerializeToString, + ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata__pb2.ResetConfigurationRequest.SerializeToString, + ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata__pb2.SetMaxRateRequest.SerializeToString, + ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata__pb2.UpdateConfigurationRequest.SerializeToString, } response_deserializers = { - ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata_pb2.GetConfigurationResponse.FromString, - ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesResponse.FromString, - ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata_pb2.ResetConfigurationResponse.FromString, - ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateResponse.FromString, - ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata_pb2.UpdateConfigurationResponse.FromString, + ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata__pb2.GetConfigurationResponse.FromString, + ('throttlerservice.Throttler', 'MaxRates'): throttlerdata__pb2.MaxRatesResponse.FromString, + ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata__pb2.ResetConfigurationResponse.FromString, + ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata__pb2.SetMaxRateResponse.FromString, + ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata__pb2.UpdateConfigurationResponse.FromString, } cardinalities = { 'GetConfiguration': cardinality.Cardinality.UNARY_UNARY, diff --git a/py/vtproto/topodata_pb2.py b/py/vtproto/topodata_pb2.py index 4bc211a2de..05571707ab 100644 --- a/py/vtproto/topodata_pb2.py +++ b/py/vtproto/topodata_pb2.py @@ -1073,8 +1073,9 @@ _TABLET_PORTMAPENTRY.has_options = True _TABLET_PORTMAPENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _TABLET_TAGSENTRY.has_options = True _TABLET_TAGSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vschema_pb2.py b/py/vtproto/vschema_pb2.py index 96d116e2bb..054ce69412 100644 --- a/py/vtproto/vschema_pb2.py +++ b/py/vtproto/vschema_pb2.py @@ -518,8 +518,9 @@ _VINDEX_PARAMSENTRY.has_options = True _VINDEX_PARAMSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _SRVVSCHEMA_KEYSPACESENTRY.has_options = True _SRVVSCHEMA_KEYSPACESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vtctldata_pb2.py b/py/vtproto/vtctldata_pb2.py index cad2dfdcf5..647a946ea7 100644 --- a/py/vtproto/vtctldata_pb2.py +++ b/py/vtproto/vtctldata_pb2.py @@ -115,8 +115,9 @@ ExecuteVtctlCommandResponse = _reflection.GeneratedProtocolMessageType('ExecuteV _sym_db.RegisterMessage(ExecuteVtctlCommandResponse) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vtctlservice_pb2.py b/py/vtproto/vtctlservice_pb2.py index 972a53c0b6..acad14b16f 100644 --- a/py/vtproto/vtctlservice_pb2.py +++ b/py/vtproto/vtctlservice_pb2.py @@ -29,33 +29,73 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaVtctlServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class VtctlStub(object): + """Service Vtctl allows you to call vt commands through gRPC. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ExecuteVtctlCommand = channel.unary_stream( + '/vtctlservice.Vtctl/ExecuteVtctlCommand', + request_serializer=vtctldata__pb2.ExecuteVtctlCommandRequest.SerializeToString, + response_deserializer=vtctldata__pb2.ExecuteVtctlCommandResponse.FromString, + ) + + +class VtctlServicer(object): + """Service Vtctl allows you to call vt commands through gRPC. + """ + def ExecuteVtctlCommand(self, request, context): - raise NotImplementedError() + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_VtctlServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ExecuteVtctlCommand': grpc.unary_stream_rpc_method_handler( + servicer.ExecuteVtctlCommand, + request_deserializer=vtctldata__pb2.ExecuteVtctlCommandRequest.FromString, + response_serializer=vtctldata__pb2.ExecuteVtctlCommandResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'vtctlservice.Vtctl', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaVtctlServicer(object): + """Service Vtctl allows you to call vt commands through gRPC. + """ + def ExecuteVtctlCommand(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaVtctlStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def ExecuteVtctlCommand(self, request, timeout): + """Service Vtctl allows you to call vt commands through gRPC. + """ + def ExecuteVtctlCommand(self, request, timeout, metadata=None, with_call=False, protocol_options=None): raise NotImplementedError() + def beta_create_Vtctl_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import vtctldata_pb2 - import vtctldata_pb2 request_deserializers = { - ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata_pb2.ExecuteVtctlCommandRequest.FromString, + ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata__pb2.ExecuteVtctlCommandRequest.FromString, } response_serializers = { - ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata_pb2.ExecuteVtctlCommandResponse.SerializeToString, + ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata__pb2.ExecuteVtctlCommandResponse.SerializeToString, } method_implementations = { ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): face_utilities.unary_stream_inline(servicer.ExecuteVtctlCommand), @@ -63,14 +103,13 @@ def beta_create_Vtctl_server(servicer, pool=None, pool_size=None, default_timeou server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_Vtctl_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import vtctldata_pb2 - import vtctldata_pb2 request_serializers = { - ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata_pb2.ExecuteVtctlCommandRequest.SerializeToString, + ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata__pb2.ExecuteVtctlCommandRequest.SerializeToString, } response_deserializers = { - ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata_pb2.ExecuteVtctlCommandResponse.FromString, + ('vtctlservice.Vtctl', 'ExecuteVtctlCommand'): vtctldata__pb2.ExecuteVtctlCommandResponse.FromString, } cardinalities = { 'ExecuteVtctlCommand': cardinality.Cardinality.UNARY_STREAM, diff --git a/py/vtproto/vtgate_pb2.py b/py/vtproto/vtgate_pb2.py index a493557f79..08037aeff5 100644 --- a/py/vtproto/vtgate_pb2.py +++ b/py/vtproto/vtgate_pb2.py @@ -2510,8 +2510,9 @@ _sym_db.RegisterMessage(UpdateStreamResponse) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\030com.youtube.vitess.proto')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vtgateservice_pb2.py b/py/vtproto/vtgateservice_pb2.py index 7c67af2758..0404bbe2e6 100644 --- a/py/vtproto/vtgateservice_pb2.py +++ b/py/vtproto/vtgateservice_pb2.py @@ -31,205 +31,620 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\035com.youtube.vitess.proto.grpc')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaVitessServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class VitessStub(object): + """Vitess is the main service to access a Vitess cluster. It is the API that vtgate + exposes to serve all queries. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Execute = channel.unary_unary( + '/vtgateservice.Vitess/Execute', + request_serializer=vtgate__pb2.ExecuteRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteResponse.FromString, + ) + self.ExecuteShards = channel.unary_unary( + '/vtgateservice.Vitess/ExecuteShards', + request_serializer=vtgate__pb2.ExecuteShardsRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteShardsResponse.FromString, + ) + self.ExecuteKeyspaceIds = channel.unary_unary( + '/vtgateservice.Vitess/ExecuteKeyspaceIds', + request_serializer=vtgate__pb2.ExecuteKeyspaceIdsRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteKeyspaceIdsResponse.FromString, + ) + self.ExecuteKeyRanges = channel.unary_unary( + '/vtgateservice.Vitess/ExecuteKeyRanges', + request_serializer=vtgate__pb2.ExecuteKeyRangesRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteKeyRangesResponse.FromString, + ) + self.ExecuteEntityIds = channel.unary_unary( + '/vtgateservice.Vitess/ExecuteEntityIds', + request_serializer=vtgate__pb2.ExecuteEntityIdsRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteEntityIdsResponse.FromString, + ) + self.ExecuteBatchShards = channel.unary_unary( + '/vtgateservice.Vitess/ExecuteBatchShards', + request_serializer=vtgate__pb2.ExecuteBatchShardsRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteBatchShardsResponse.FromString, + ) + self.ExecuteBatchKeyspaceIds = channel.unary_unary( + '/vtgateservice.Vitess/ExecuteBatchKeyspaceIds', + request_serializer=vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString, + response_deserializer=vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.FromString, + ) + self.StreamExecute = channel.unary_stream( + '/vtgateservice.Vitess/StreamExecute', + request_serializer=vtgate__pb2.StreamExecuteRequest.SerializeToString, + response_deserializer=vtgate__pb2.StreamExecuteResponse.FromString, + ) + self.StreamExecuteShards = channel.unary_stream( + '/vtgateservice.Vitess/StreamExecuteShards', + request_serializer=vtgate__pb2.StreamExecuteShardsRequest.SerializeToString, + response_deserializer=vtgate__pb2.StreamExecuteShardsResponse.FromString, + ) + self.StreamExecuteKeyspaceIds = channel.unary_stream( + '/vtgateservice.Vitess/StreamExecuteKeyspaceIds', + request_serializer=vtgate__pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString, + response_deserializer=vtgate__pb2.StreamExecuteKeyspaceIdsResponse.FromString, + ) + self.StreamExecuteKeyRanges = channel.unary_stream( + '/vtgateservice.Vitess/StreamExecuteKeyRanges', + request_serializer=vtgate__pb2.StreamExecuteKeyRangesRequest.SerializeToString, + response_deserializer=vtgate__pb2.StreamExecuteKeyRangesResponse.FromString, + ) + self.Begin = channel.unary_unary( + '/vtgateservice.Vitess/Begin', + request_serializer=vtgate__pb2.BeginRequest.SerializeToString, + response_deserializer=vtgate__pb2.BeginResponse.FromString, + ) + self.Commit = channel.unary_unary( + '/vtgateservice.Vitess/Commit', + request_serializer=vtgate__pb2.CommitRequest.SerializeToString, + response_deserializer=vtgate__pb2.CommitResponse.FromString, + ) + self.Rollback = channel.unary_unary( + '/vtgateservice.Vitess/Rollback', + request_serializer=vtgate__pb2.RollbackRequest.SerializeToString, + response_deserializer=vtgate__pb2.RollbackResponse.FromString, + ) + self.SplitQuery = channel.unary_unary( + '/vtgateservice.Vitess/SplitQuery', + request_serializer=vtgate__pb2.SplitQueryRequest.SerializeToString, + response_deserializer=vtgate__pb2.SplitQueryResponse.FromString, + ) + self.GetSrvKeyspace = channel.unary_unary( + '/vtgateservice.Vitess/GetSrvKeyspace', + request_serializer=vtgate__pb2.GetSrvKeyspaceRequest.SerializeToString, + response_deserializer=vtgate__pb2.GetSrvKeyspaceResponse.FromString, + ) + self.UpdateStream = channel.unary_stream( + '/vtgateservice.Vitess/UpdateStream', + request_serializer=vtgate__pb2.UpdateStreamRequest.SerializeToString, + response_deserializer=vtgate__pb2.UpdateStreamResponse.FromString, + ) + + +class VitessServicer(object): + """Vitess is the main service to access a Vitess cluster. It is the API that vtgate + exposes to serve all queries. + """ + def Execute(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Execute tries to route the query to the right shard. + It depends on the query and bind variables to provide enough + information in conjonction with the vindexes to route the query. + API group: v3 API (alpha) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteShards(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteShards executes the query on the specified shards. + API group: Custom Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteKeyspaceIds(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteKeyspaceIds executes the query based on the specified keyspace ids. + API group: Range-based Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteKeyRanges(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteKeyRanges executes the query based on the specified key ranges. + API group: Range-based Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteEntityIds(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteEntityIds executes the query based on the specified external id to keyspace id map. + API group: Range-based Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteBatchShards(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteBatchShards executes the list of queries on the specified shards. + API group: Custom Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExecuteBatchKeyspaceIds(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids. + API group: Range-based Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamExecute(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamExecute executes a streaming query based on shards. + It depends on the query and bind variables to provide enough + information in conjonction with the vindexes to route the query. + Use this method if the query returns a large number of rows. + API group: v3 API (alpha) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamExecuteShards(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamExecuteShards executes a streaming query based on shards. + Use this method if the query returns a large number of rows. + API group: Custom Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamExecuteKeyspaceIds(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids. + Use this method if the query returns a large number of rows. + API group: Range-based Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def StreamExecuteKeyRanges(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """StreamExecuteKeyRanges executes a streaming query based on key ranges. + Use this method if the query returns a large number of rows. + API group: Range-based Sharding + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Begin(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Begin a transaction. + API group: Transactions + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Commit(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Commit a transaction. + API group: Transactions + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Rollback(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Rollback a transaction. + API group: Transactions + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SplitQuery(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """Split a query into non-overlapping sub queries + API group: Map Reduce + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetSrvKeyspace(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate). + This method is provided as a convenient way for clients to take a + look at the sharding configuration for a Keyspace. Looking at the + sharding information should not be used for routing queries (as the + information may change, use the Execute calls for that). + It is convenient for monitoring applications for instance, or if + using custom sharding. + API group: Topology + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def UpdateStream(self, request, context): - raise NotImplementedError() + """UpdateStream asks the server for a stream of StreamEvent objects. + API group: Update Stream + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_VitessServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Execute': grpc.unary_unary_rpc_method_handler( + servicer.Execute, + request_deserializer=vtgate__pb2.ExecuteRequest.FromString, + response_serializer=vtgate__pb2.ExecuteResponse.SerializeToString, + ), + 'ExecuteShards': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteShards, + request_deserializer=vtgate__pb2.ExecuteShardsRequest.FromString, + response_serializer=vtgate__pb2.ExecuteShardsResponse.SerializeToString, + ), + 'ExecuteKeyspaceIds': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteKeyspaceIds, + request_deserializer=vtgate__pb2.ExecuteKeyspaceIdsRequest.FromString, + response_serializer=vtgate__pb2.ExecuteKeyspaceIdsResponse.SerializeToString, + ), + 'ExecuteKeyRanges': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteKeyRanges, + request_deserializer=vtgate__pb2.ExecuteKeyRangesRequest.FromString, + response_serializer=vtgate__pb2.ExecuteKeyRangesResponse.SerializeToString, + ), + 'ExecuteEntityIds': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteEntityIds, + request_deserializer=vtgate__pb2.ExecuteEntityIdsRequest.FromString, + response_serializer=vtgate__pb2.ExecuteEntityIdsResponse.SerializeToString, + ), + 'ExecuteBatchShards': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteBatchShards, + request_deserializer=vtgate__pb2.ExecuteBatchShardsRequest.FromString, + response_serializer=vtgate__pb2.ExecuteBatchShardsResponse.SerializeToString, + ), + 'ExecuteBatchKeyspaceIds': grpc.unary_unary_rpc_method_handler( + servicer.ExecuteBatchKeyspaceIds, + request_deserializer=vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.FromString, + response_serializer=vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString, + ), + 'StreamExecute': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecute, + request_deserializer=vtgate__pb2.StreamExecuteRequest.FromString, + response_serializer=vtgate__pb2.StreamExecuteResponse.SerializeToString, + ), + 'StreamExecuteShards': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecuteShards, + request_deserializer=vtgate__pb2.StreamExecuteShardsRequest.FromString, + response_serializer=vtgate__pb2.StreamExecuteShardsResponse.SerializeToString, + ), + 'StreamExecuteKeyspaceIds': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecuteKeyspaceIds, + request_deserializer=vtgate__pb2.StreamExecuteKeyspaceIdsRequest.FromString, + response_serializer=vtgate__pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString, + ), + 'StreamExecuteKeyRanges': grpc.unary_stream_rpc_method_handler( + servicer.StreamExecuteKeyRanges, + request_deserializer=vtgate__pb2.StreamExecuteKeyRangesRequest.FromString, + response_serializer=vtgate__pb2.StreamExecuteKeyRangesResponse.SerializeToString, + ), + 'Begin': grpc.unary_unary_rpc_method_handler( + servicer.Begin, + request_deserializer=vtgate__pb2.BeginRequest.FromString, + response_serializer=vtgate__pb2.BeginResponse.SerializeToString, + ), + 'Commit': grpc.unary_unary_rpc_method_handler( + servicer.Commit, + request_deserializer=vtgate__pb2.CommitRequest.FromString, + response_serializer=vtgate__pb2.CommitResponse.SerializeToString, + ), + 'Rollback': grpc.unary_unary_rpc_method_handler( + servicer.Rollback, + request_deserializer=vtgate__pb2.RollbackRequest.FromString, + response_serializer=vtgate__pb2.RollbackResponse.SerializeToString, + ), + 'SplitQuery': grpc.unary_unary_rpc_method_handler( + servicer.SplitQuery, + request_deserializer=vtgate__pb2.SplitQueryRequest.FromString, + response_serializer=vtgate__pb2.SplitQueryResponse.SerializeToString, + ), + 'GetSrvKeyspace': grpc.unary_unary_rpc_method_handler( + servicer.GetSrvKeyspace, + request_deserializer=vtgate__pb2.GetSrvKeyspaceRequest.FromString, + response_serializer=vtgate__pb2.GetSrvKeyspaceResponse.SerializeToString, + ), + 'UpdateStream': grpc.unary_stream_rpc_method_handler( + servicer.UpdateStream, + request_deserializer=vtgate__pb2.UpdateStreamRequest.FromString, + response_serializer=vtgate__pb2.UpdateStreamResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'vtgateservice.Vitess', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaVitessServicer(object): + """Vitess is the main service to access a Vitess cluster. It is the API that vtgate + exposes to serve all queries. + """ + def Execute(self, request, context): + """Execute tries to route the query to the right shard. + It depends on the query and bind variables to provide enough + information in conjonction with the vindexes to route the query. + API group: v3 API (alpha) + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteShards(self, request, context): + """ExecuteShards executes the query on the specified shards. + API group: Custom Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteKeyspaceIds(self, request, context): + """ExecuteKeyspaceIds executes the query based on the specified keyspace ids. + API group: Range-based Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteKeyRanges(self, request, context): + """ExecuteKeyRanges executes the query based on the specified key ranges. + API group: Range-based Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteEntityIds(self, request, context): + """ExecuteEntityIds executes the query based on the specified external id to keyspace id map. + API group: Range-based Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteBatchShards(self, request, context): + """ExecuteBatchShards executes the list of queries on the specified shards. + API group: Custom Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def ExecuteBatchKeyspaceIds(self, request, context): + """ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids. + API group: Range-based Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamExecute(self, request, context): + """StreamExecute executes a streaming query based on shards. + It depends on the query and bind variables to provide enough + information in conjonction with the vindexes to route the query. + Use this method if the query returns a large number of rows. + API group: v3 API (alpha) + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamExecuteShards(self, request, context): + """StreamExecuteShards executes a streaming query based on shards. + Use this method if the query returns a large number of rows. + API group: Custom Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamExecuteKeyspaceIds(self, request, context): + """StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids. + Use this method if the query returns a large number of rows. + API group: Range-based Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def StreamExecuteKeyRanges(self, request, context): + """StreamExecuteKeyRanges executes a streaming query based on key ranges. + Use this method if the query returns a large number of rows. + API group: Range-based Sharding + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Begin(self, request, context): + """Begin a transaction. + API group: Transactions + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Commit(self, request, context): + """Commit a transaction. + API group: Transactions + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Rollback(self, request, context): + """Rollback a transaction. + API group: Transactions + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def SplitQuery(self, request, context): + """Split a query into non-overlapping sub queries + API group: Map Reduce + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def GetSrvKeyspace(self, request, context): + """GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate). + This method is provided as a convenient way for clients to take a + look at the sharding configuration for a Keyspace. Looking at the + sharding information should not be used for routing queries (as the + information may change, use the Execute calls for that). + It is convenient for monitoring applications for instance, or if + using custom sharding. + API group: Topology + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def UpdateStream(self, request, context): + """UpdateStream asks the server for a stream of StreamEvent objects. + API group: Update Stream + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaVitessStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def Execute(self, request, timeout): + """Vitess is the main service to access a Vitess cluster. It is the API that vtgate + exposes to serve all queries. + """ + def Execute(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Execute tries to route the query to the right shard. + It depends on the query and bind variables to provide enough + information in conjonction with the vindexes to route the query. + API group: v3 API (alpha) + """ raise NotImplementedError() Execute.future = None - @abc.abstractmethod - def ExecuteShards(self, request, timeout): + def ExecuteShards(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteShards executes the query on the specified shards. + API group: Custom Sharding + """ raise NotImplementedError() ExecuteShards.future = None - @abc.abstractmethod - def ExecuteKeyspaceIds(self, request, timeout): + def ExecuteKeyspaceIds(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteKeyspaceIds executes the query based on the specified keyspace ids. + API group: Range-based Sharding + """ raise NotImplementedError() ExecuteKeyspaceIds.future = None - @abc.abstractmethod - def ExecuteKeyRanges(self, request, timeout): + def ExecuteKeyRanges(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteKeyRanges executes the query based on the specified key ranges. + API group: Range-based Sharding + """ raise NotImplementedError() ExecuteKeyRanges.future = None - @abc.abstractmethod - def ExecuteEntityIds(self, request, timeout): + def ExecuteEntityIds(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteEntityIds executes the query based on the specified external id to keyspace id map. + API group: Range-based Sharding + """ raise NotImplementedError() ExecuteEntityIds.future = None - @abc.abstractmethod - def ExecuteBatchShards(self, request, timeout): + def ExecuteBatchShards(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteBatchShards executes the list of queries on the specified shards. + API group: Custom Sharding + """ raise NotImplementedError() ExecuteBatchShards.future = None - @abc.abstractmethod - def ExecuteBatchKeyspaceIds(self, request, timeout): + def ExecuteBatchKeyspaceIds(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteBatchKeyspaceIds executes the list of queries based on the specified keyspace ids. + API group: Range-based Sharding + """ raise NotImplementedError() ExecuteBatchKeyspaceIds.future = None - @abc.abstractmethod - def StreamExecute(self, request, timeout): + def StreamExecute(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamExecute executes a streaming query based on shards. + It depends on the query and bind variables to provide enough + information in conjonction with the vindexes to route the query. + Use this method if the query returns a large number of rows. + API group: v3 API (alpha) + """ raise NotImplementedError() - @abc.abstractmethod - def StreamExecuteShards(self, request, timeout): + def StreamExecuteShards(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamExecuteShards executes a streaming query based on shards. + Use this method if the query returns a large number of rows. + API group: Custom Sharding + """ raise NotImplementedError() - @abc.abstractmethod - def StreamExecuteKeyspaceIds(self, request, timeout): + def StreamExecuteKeyspaceIds(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamExecuteKeyspaceIds executes a streaming query based on keyspace ids. + Use this method if the query returns a large number of rows. + API group: Range-based Sharding + """ raise NotImplementedError() - @abc.abstractmethod - def StreamExecuteKeyRanges(self, request, timeout): + def StreamExecuteKeyRanges(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """StreamExecuteKeyRanges executes a streaming query based on key ranges. + Use this method if the query returns a large number of rows. + API group: Range-based Sharding + """ raise NotImplementedError() - @abc.abstractmethod - def Begin(self, request, timeout): + def Begin(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Begin a transaction. + API group: Transactions + """ raise NotImplementedError() Begin.future = None - @abc.abstractmethod - def Commit(self, request, timeout): + def Commit(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Commit a transaction. + API group: Transactions + """ raise NotImplementedError() Commit.future = None - @abc.abstractmethod - def Rollback(self, request, timeout): + def Rollback(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Rollback a transaction. + API group: Transactions + """ raise NotImplementedError() Rollback.future = None - @abc.abstractmethod - def SplitQuery(self, request, timeout): + def SplitQuery(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Split a query into non-overlapping sub queries + API group: Map Reduce + """ raise NotImplementedError() SplitQuery.future = None - @abc.abstractmethod - def GetSrvKeyspace(self, request, timeout): + def GetSrvKeyspace(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """GetSrvKeyspace returns a SrvKeyspace object (as seen by this vtgate). + This method is provided as a convenient way for clients to take a + look at the sharding configuration for a Keyspace. Looking at the + sharding information should not be used for routing queries (as the + information may change, use the Execute calls for that). + It is convenient for monitoring applications for instance, or if + using custom sharding. + API group: Topology + """ raise NotImplementedError() GetSrvKeyspace.future = None - @abc.abstractmethod - def UpdateStream(self, request, timeout): + def UpdateStream(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """UpdateStream asks the server for a stream of StreamEvent objects. + API group: Update Stream + """ raise NotImplementedError() + def beta_create_Vitess_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 request_deserializers = { - ('vtgateservice.Vitess', 'Begin'): vtgate_pb2.BeginRequest.FromString, - ('vtgateservice.Vitess', 'Commit'): vtgate_pb2.CommitRequest.FromString, - ('vtgateservice.Vitess', 'Execute'): vtgate_pb2.ExecuteRequest.FromString, - ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.FromString, - ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate_pb2.ExecuteBatchShardsRequest.FromString, - ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate_pb2.ExecuteEntityIdsRequest.FromString, - ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate_pb2.ExecuteKeyRangesRequest.FromString, - ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate_pb2.ExecuteKeyspaceIdsRequest.FromString, - ('vtgateservice.Vitess', 'ExecuteShards'): vtgate_pb2.ExecuteShardsRequest.FromString, - ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate_pb2.GetSrvKeyspaceRequest.FromString, - ('vtgateservice.Vitess', 'Rollback'): vtgate_pb2.RollbackRequest.FromString, - ('vtgateservice.Vitess', 'SplitQuery'): vtgate_pb2.SplitQueryRequest.FromString, - ('vtgateservice.Vitess', 'StreamExecute'): vtgate_pb2.StreamExecuteRequest.FromString, - ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate_pb2.StreamExecuteKeyRangesRequest.FromString, - ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate_pb2.StreamExecuteKeyspaceIdsRequest.FromString, - ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate_pb2.StreamExecuteShardsRequest.FromString, - ('vtgateservice.Vitess', 'UpdateStream'): vtgate_pb2.UpdateStreamRequest.FromString, + ('vtgateservice.Vitess', 'Begin'): vtgate__pb2.BeginRequest.FromString, + ('vtgateservice.Vitess', 'Commit'): vtgate__pb2.CommitRequest.FromString, + ('vtgateservice.Vitess', 'Execute'): vtgate__pb2.ExecuteRequest.FromString, + ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.FromString, + ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate__pb2.ExecuteBatchShardsRequest.FromString, + ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate__pb2.ExecuteEntityIdsRequest.FromString, + ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate__pb2.ExecuteKeyRangesRequest.FromString, + ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate__pb2.ExecuteKeyspaceIdsRequest.FromString, + ('vtgateservice.Vitess', 'ExecuteShards'): vtgate__pb2.ExecuteShardsRequest.FromString, + ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate__pb2.GetSrvKeyspaceRequest.FromString, + ('vtgateservice.Vitess', 'Rollback'): vtgate__pb2.RollbackRequest.FromString, + ('vtgateservice.Vitess', 'SplitQuery'): vtgate__pb2.SplitQueryRequest.FromString, + ('vtgateservice.Vitess', 'StreamExecute'): vtgate__pb2.StreamExecuteRequest.FromString, + ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate__pb2.StreamExecuteKeyRangesRequest.FromString, + ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate__pb2.StreamExecuteKeyspaceIdsRequest.FromString, + ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate__pb2.StreamExecuteShardsRequest.FromString, + ('vtgateservice.Vitess', 'UpdateStream'): vtgate__pb2.UpdateStreamRequest.FromString, } response_serializers = { - ('vtgateservice.Vitess', 'Begin'): vtgate_pb2.BeginResponse.SerializeToString, - ('vtgateservice.Vitess', 'Commit'): vtgate_pb2.CommitResponse.SerializeToString, - ('vtgateservice.Vitess', 'Execute'): vtgate_pb2.ExecuteResponse.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate_pb2.ExecuteBatchShardsResponse.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate_pb2.ExecuteEntityIdsResponse.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate_pb2.ExecuteKeyRangesResponse.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate_pb2.ExecuteKeyspaceIdsResponse.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteShards'): vtgate_pb2.ExecuteShardsResponse.SerializeToString, - ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate_pb2.GetSrvKeyspaceResponse.SerializeToString, - ('vtgateservice.Vitess', 'Rollback'): vtgate_pb2.RollbackResponse.SerializeToString, - ('vtgateservice.Vitess', 'SplitQuery'): vtgate_pb2.SplitQueryResponse.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecute'): vtgate_pb2.StreamExecuteResponse.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate_pb2.StreamExecuteKeyRangesResponse.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate_pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate_pb2.StreamExecuteShardsResponse.SerializeToString, - ('vtgateservice.Vitess', 'UpdateStream'): vtgate_pb2.UpdateStreamResponse.SerializeToString, + ('vtgateservice.Vitess', 'Begin'): vtgate__pb2.BeginResponse.SerializeToString, + ('vtgateservice.Vitess', 'Commit'): vtgate__pb2.CommitResponse.SerializeToString, + ('vtgateservice.Vitess', 'Execute'): vtgate__pb2.ExecuteResponse.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate__pb2.ExecuteBatchShardsResponse.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate__pb2.ExecuteEntityIdsResponse.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate__pb2.ExecuteKeyRangesResponse.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate__pb2.ExecuteKeyspaceIdsResponse.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteShards'): vtgate__pb2.ExecuteShardsResponse.SerializeToString, + ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate__pb2.GetSrvKeyspaceResponse.SerializeToString, + ('vtgateservice.Vitess', 'Rollback'): vtgate__pb2.RollbackResponse.SerializeToString, + ('vtgateservice.Vitess', 'SplitQuery'): vtgate__pb2.SplitQueryResponse.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecute'): vtgate__pb2.StreamExecuteResponse.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate__pb2.StreamExecuteKeyRangesResponse.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate__pb2.StreamExecuteKeyspaceIdsResponse.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate__pb2.StreamExecuteShardsResponse.SerializeToString, + ('vtgateservice.Vitess', 'UpdateStream'): vtgate__pb2.UpdateStreamResponse.SerializeToString, } method_implementations = { ('vtgateservice.Vitess', 'Begin'): face_utilities.unary_unary_inline(servicer.Begin), @@ -253,78 +668,45 @@ def beta_create_Vitess_server(servicer, pool=None, pool_size=None, default_timeo server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_Vitess_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 - import vtgate_pb2 request_serializers = { - ('vtgateservice.Vitess', 'Begin'): vtgate_pb2.BeginRequest.SerializeToString, - ('vtgateservice.Vitess', 'Commit'): vtgate_pb2.CommitRequest.SerializeToString, - ('vtgateservice.Vitess', 'Execute'): vtgate_pb2.ExecuteRequest.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate_pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate_pb2.ExecuteBatchShardsRequest.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate_pb2.ExecuteEntityIdsRequest.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate_pb2.ExecuteKeyRangesRequest.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate_pb2.ExecuteKeyspaceIdsRequest.SerializeToString, - ('vtgateservice.Vitess', 'ExecuteShards'): vtgate_pb2.ExecuteShardsRequest.SerializeToString, - ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate_pb2.GetSrvKeyspaceRequest.SerializeToString, - ('vtgateservice.Vitess', 'Rollback'): vtgate_pb2.RollbackRequest.SerializeToString, - ('vtgateservice.Vitess', 'SplitQuery'): vtgate_pb2.SplitQueryRequest.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecute'): vtgate_pb2.StreamExecuteRequest.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate_pb2.StreamExecuteKeyRangesRequest.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate_pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString, - ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate_pb2.StreamExecuteShardsRequest.SerializeToString, - ('vtgateservice.Vitess', 'UpdateStream'): vtgate_pb2.UpdateStreamRequest.SerializeToString, + ('vtgateservice.Vitess', 'Begin'): vtgate__pb2.BeginRequest.SerializeToString, + ('vtgateservice.Vitess', 'Commit'): vtgate__pb2.CommitRequest.SerializeToString, + ('vtgateservice.Vitess', 'Execute'): vtgate__pb2.ExecuteRequest.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate__pb2.ExecuteBatchShardsRequest.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate__pb2.ExecuteEntityIdsRequest.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate__pb2.ExecuteKeyRangesRequest.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate__pb2.ExecuteKeyspaceIdsRequest.SerializeToString, + ('vtgateservice.Vitess', 'ExecuteShards'): vtgate__pb2.ExecuteShardsRequest.SerializeToString, + ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate__pb2.GetSrvKeyspaceRequest.SerializeToString, + ('vtgateservice.Vitess', 'Rollback'): vtgate__pb2.RollbackRequest.SerializeToString, + ('vtgateservice.Vitess', 'SplitQuery'): vtgate__pb2.SplitQueryRequest.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecute'): vtgate__pb2.StreamExecuteRequest.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate__pb2.StreamExecuteKeyRangesRequest.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate__pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString, + ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate__pb2.StreamExecuteShardsRequest.SerializeToString, + ('vtgateservice.Vitess', 'UpdateStream'): vtgate__pb2.UpdateStreamRequest.SerializeToString, } response_deserializers = { - ('vtgateservice.Vitess', 'Begin'): vtgate_pb2.BeginResponse.FromString, - ('vtgateservice.Vitess', 'Commit'): vtgate_pb2.CommitResponse.FromString, - ('vtgateservice.Vitess', 'Execute'): vtgate_pb2.ExecuteResponse.FromString, - ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate_pb2.ExecuteBatchKeyspaceIdsResponse.FromString, - ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate_pb2.ExecuteBatchShardsResponse.FromString, - ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate_pb2.ExecuteEntityIdsResponse.FromString, - ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate_pb2.ExecuteKeyRangesResponse.FromString, - ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate_pb2.ExecuteKeyspaceIdsResponse.FromString, - ('vtgateservice.Vitess', 'ExecuteShards'): vtgate_pb2.ExecuteShardsResponse.FromString, - ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate_pb2.GetSrvKeyspaceResponse.FromString, - ('vtgateservice.Vitess', 'Rollback'): vtgate_pb2.RollbackResponse.FromString, - ('vtgateservice.Vitess', 'SplitQuery'): vtgate_pb2.SplitQueryResponse.FromString, - ('vtgateservice.Vitess', 'StreamExecute'): vtgate_pb2.StreamExecuteResponse.FromString, - ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate_pb2.StreamExecuteKeyRangesResponse.FromString, - ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate_pb2.StreamExecuteKeyspaceIdsResponse.FromString, - ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate_pb2.StreamExecuteShardsResponse.FromString, - ('vtgateservice.Vitess', 'UpdateStream'): vtgate_pb2.UpdateStreamResponse.FromString, + ('vtgateservice.Vitess', 'Begin'): vtgate__pb2.BeginResponse.FromString, + ('vtgateservice.Vitess', 'Commit'): vtgate__pb2.CommitResponse.FromString, + ('vtgateservice.Vitess', 'Execute'): vtgate__pb2.ExecuteResponse.FromString, + ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.FromString, + ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate__pb2.ExecuteBatchShardsResponse.FromString, + ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate__pb2.ExecuteEntityIdsResponse.FromString, + ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate__pb2.ExecuteKeyRangesResponse.FromString, + ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate__pb2.ExecuteKeyspaceIdsResponse.FromString, + ('vtgateservice.Vitess', 'ExecuteShards'): vtgate__pb2.ExecuteShardsResponse.FromString, + ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate__pb2.GetSrvKeyspaceResponse.FromString, + ('vtgateservice.Vitess', 'Rollback'): vtgate__pb2.RollbackResponse.FromString, + ('vtgateservice.Vitess', 'SplitQuery'): vtgate__pb2.SplitQueryResponse.FromString, + ('vtgateservice.Vitess', 'StreamExecute'): vtgate__pb2.StreamExecuteResponse.FromString, + ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate__pb2.StreamExecuteKeyRangesResponse.FromString, + ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate__pb2.StreamExecuteKeyspaceIdsResponse.FromString, + ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate__pb2.StreamExecuteShardsResponse.FromString, + ('vtgateservice.Vitess', 'UpdateStream'): vtgate__pb2.UpdateStreamResponse.FromString, } cardinalities = { 'Begin': cardinality.Cardinality.UNARY_UNARY, diff --git a/py/vtproto/vtrpc_pb2.py b/py/vtproto/vtrpc_pb2.py index af249d8364..764ca0007a 100644 --- a/py/vtproto/vtrpc_pb2.py +++ b/py/vtproto/vtrpc_pb2.py @@ -211,8 +211,9 @@ _sym_db.RegisterMessage(RPCError) DESCRIPTOR.has_options = True DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\030com.youtube.vitess.proto')) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vttest_pb2.py b/py/vtproto/vttest_pb2.py index 8dde274308..03445e6a27 100644 --- a/py/vtproto/vttest_pb2.py +++ b/py/vtproto/vttest_pb2.py @@ -202,8 +202,9 @@ VTTestTopology = _reflection.GeneratedProtocolMessageType('VTTestTopology', (_me _sym_db.RegisterMessage(VTTestTopology) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vtworkerdata_pb2.py b/py/vtproto/vtworkerdata_pb2.py index 46d9e6d385..a15908086a 100644 --- a/py/vtproto/vtworkerdata_pb2.py +++ b/py/vtproto/vtworkerdata_pb2.py @@ -108,8 +108,9 @@ ExecuteVtworkerCommandResponse = _reflection.GeneratedProtocolMessageType('Execu _sym_db.RegisterMessage(ExecuteVtworkerCommandResponse) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vtproto/vtworkerservice_pb2.py b/py/vtproto/vtworkerservice_pb2.py index 1cd14f93a9..2778f0fda7 100644 --- a/py/vtproto/vtworkerservice_pb2.py +++ b/py/vtproto/vtworkerservice_pb2.py @@ -29,33 +29,82 @@ _sym_db.RegisterFileDescriptor(DESCRIPTOR) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class BetaVtworkerServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + +class VtworkerStub(object): + """Vtworker contains the vtworker RPC calls. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ExecuteVtworkerCommand = channel.unary_stream( + '/vtworkerservice.Vtworker/ExecuteVtworkerCommand', + request_serializer=vtworkerdata__pb2.ExecuteVtworkerCommandRequest.SerializeToString, + response_deserializer=vtworkerdata__pb2.ExecuteVtworkerCommandResponse.FromString, + ) + + +class VtworkerServicer(object): + """Vtworker contains the vtworker RPC calls. + """ + def ExecuteVtworkerCommand(self, request, context): - raise NotImplementedError() + """ExecuteVtworkerCommand allows to run a vtworker command by specifying the + same arguments as on the command line. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_VtworkerServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ExecuteVtworkerCommand': grpc.unary_stream_rpc_method_handler( + servicer.ExecuteVtworkerCommand, + request_deserializer=vtworkerdata__pb2.ExecuteVtworkerCommandRequest.FromString, + response_serializer=vtworkerdata__pb2.ExecuteVtworkerCommandResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'vtworkerservice.Vtworker', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetaVtworkerServicer(object): + """Vtworker contains the vtworker RPC calls. + """ + def ExecuteVtworkerCommand(self, request, context): + """ExecuteVtworkerCommand allows to run a vtworker command by specifying the + same arguments as on the command line. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + class BetaVtworkerStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def ExecuteVtworkerCommand(self, request, timeout): + """Vtworker contains the vtworker RPC calls. + """ + def ExecuteVtworkerCommand(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """ExecuteVtworkerCommand allows to run a vtworker command by specifying the + same arguments as on the command line. + """ raise NotImplementedError() + def beta_create_Vtworker_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): - import vtworkerdata_pb2 - import vtworkerdata_pb2 request_deserializers = { - ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata_pb2.ExecuteVtworkerCommandRequest.FromString, + ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata__pb2.ExecuteVtworkerCommandRequest.FromString, } response_serializers = { - ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata_pb2.ExecuteVtworkerCommandResponse.SerializeToString, + ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata__pb2.ExecuteVtworkerCommandResponse.SerializeToString, } method_implementations = { ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): face_utilities.unary_stream_inline(servicer.ExecuteVtworkerCommand), @@ -63,14 +112,13 @@ def beta_create_Vtworker_server(servicer, pool=None, pool_size=None, default_tim server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) return beta_implementations.server(method_implementations, options=server_options) + def beta_create_Vtworker_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): - import vtworkerdata_pb2 - import vtworkerdata_pb2 request_serializers = { - ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata_pb2.ExecuteVtworkerCommandRequest.SerializeToString, + ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata__pb2.ExecuteVtworkerCommandRequest.SerializeToString, } response_deserializers = { - ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata_pb2.ExecuteVtworkerCommandResponse.FromString, + ('vtworkerservice.Vtworker', 'ExecuteVtworkerCommand'): vtworkerdata__pb2.ExecuteVtworkerCommandResponse.FromString, } cardinalities = { 'ExecuteVtworkerCommand': cardinality.Cardinality.UNARY_STREAM, diff --git a/py/vtproto/workflow_pb2.py b/py/vtproto/workflow_pb2.py index 3a3a3b16fc..50855a8eba 100644 --- a/py/vtproto/workflow_pb2.py +++ b/py/vtproto/workflow_pb2.py @@ -148,8 +148,9 @@ Workflow = _reflection.GeneratedProtocolMessageType('Workflow', (_message.Messag _sym_db.RegisterMessage(Workflow) -import abc +import grpc from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities # @@protoc_insertion_point(module_scope) diff --git a/py/vttest/run_local_database.py b/py/vttest/run_local_database.py index 3ea19728a1..95a5e0fe2e 100755 --- a/py/vttest/run_local_database.py +++ b/py/vttest/run_local_database.py @@ -34,6 +34,8 @@ import optparse import os import sys +from vtdb import prefer_vtroot_imports # pylint: disable=unused-import + from google.protobuf import text_format from vttest import environment diff --git a/test/utils.py b/test/utils.py index dfbd09ec87..f2ab1360e0 100644 --- a/test/utils.py +++ b/test/utils.py @@ -17,6 +17,8 @@ import time import unittest import urllib2 +from vtdb import prefer_vtroot_imports # pylint: disable=unused-import + import environment from mysql_flavor import mysql_flavor from mysql_flavor import set_mysql_flavor @@ -808,12 +810,14 @@ class L2VtGate(object): Args: name: name of the endpoint, in the form: 'keyspace.shard.type'. """ + def condition(v): + return (v.get(vtgate_gateway_flavor().connection_count_vars()) + .get(name, None)) is None + poll_for_vars('l2vtgate', self.port, 'no endpoint named ' + name, timeout=5.0, - condition_fn=lambda v: v.get(vtgate_gateway_flavor(). - connection_count_vars()). - get(name, None) is None) + condition_fn=condition) # vtctl helpers diff --git a/test/vtgatev2_test.py b/test/vtgatev2_test.py index b3c41d1cf6..2c3034c8fd 100755 --- a/test/vtgatev2_test.py +++ b/test/vtgatev2_test.py @@ -937,7 +937,7 @@ class TestFailures(BaseTestCase): vtgate_conn = get_connection() port = utils.vtgate.port utils.vtgate.kill() - with self.assertRaises(dbexceptions.OperationalError): + with self.assertRaises(dbexceptions.DatabaseError): vtgate_conn._execute( 'select 1 from vt_insert_test', {}, tablet_type='replica', keyspace_name=KEYSPACE_NAME, @@ -986,7 +986,7 @@ class TestFailures(BaseTestCase): cursorclass=vtgate_cursor.StreamVTGateCursor) port = utils.vtgate.port utils.vtgate.kill() - with self.assertRaises(dbexceptions.OperationalError): + with self.assertRaises(dbexceptions.DatabaseError): stream_cursor.execute('select * from vt_insert_test', {}) vtgate_conn.close() @@ -1029,7 +1029,7 @@ class TestFailures(BaseTestCase): vtgate_conn = get_connection() port = utils.vtgate.port utils.vtgate.kill() - with self.assertRaises(dbexceptions.OperationalError): + with self.assertRaises(dbexceptions.DatabaseError): vtgate_conn.begin() restart_vtgate(port) vtgate_conn = get_connection() @@ -1127,7 +1127,7 @@ class TestFailures(BaseTestCase): # once for the _execute, once for the close's rollback). vtgate_conn = get_connection(timeout=5.0) port = utils.vtgate.port - with self.assertRaises(dbexceptions.OperationalError): + with self.assertRaises(dbexceptions.DatabaseError): vtgate_conn.begin() utils.vtgate.kill() vtgate_conn._execute( diff --git a/travis/install_grpc.sh b/travis/install_grpc.sh index d0263d7052..2334eedebf 100755 --- a/travis/install_grpc.sh +++ b/travis/install_grpc.sh @@ -33,7 +33,7 @@ fi # clone the repository, setup the submodules git clone https://github.com/grpc/grpc.git cd grpc -git checkout release-0_13_0 +git checkout v1.0.0 git submodule update --init # OSX specific setting + dependencies @@ -65,29 +65,32 @@ else make install fi -# Pin the protobuf python dependency to a specific version which is >=3.0.0a3. -# -# This prevents us from running into the bug that the protobuf package with the -# version "3.0.0-alpha-1" is treated as newer than "3.0.0a3" (alpha-3). -# See: https://github.com/google/protobuf/issues/855 -# Also discussed here: https://github.com/grpc/grpc/issues/5534 -# In particular, we hit this issue on Travis. -sed -i -e 's/protobuf>=3.0.0a3/protobuf==3.0.0a3/' setup.py - -# and now build and install gRPC python libraries -# (Dependencies like protobuf python will be installed automatically.) +# Install gRPC python libraries from PyPI. +# Dependencies like protobuf python will be installed automatically. +grpcio_ver=1.0.0 if [ -n "$grpc_dist" ]; then - $grpc_dist/usr/local/bin/pip install . + $grpc_dist/usr/local/bin/pip install --upgrade grpcio==$grpcio_ver else - pip install . + pip install --upgrade grpcio==$grpcio_ver fi # Build PHP extension, only if requested. if [ -n "$INSTALL_GRPC_PHP" ]; then echo "Building gRPC PHP extension..." cd src/php/ext/grpc + if [[ "$TRAVIS" == "true" ]]; then + # On Travis, we get an old glibc version that doesn't yet + # have clock_*() functions built in, so we need -lrt. + # Temporarily turn off --as-needed because the lib doesn't + # request rt, since it assumes a newer glibc. + export LDFLAGS="-Wl,--no-as-needed -lrt -Wl,--as-needed" + fi phpize - ./configure --enable-grpc=$grpc_dist/usr/local + if ! ./configure --enable-grpc=$grpc_dist/usr/local; then + cat config.log + echo "Failed to configure build for gRPC PHP extension." + exit 1 + fi make mkdir -p $INSTALL_GRPC_PHP mv modules/grpc.so $INSTALL_GRPC_PHP diff --git a/vendor/vendor.json b/vendor/vendor.json index d3abde91dc..68aa73329d 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -317,92 +317,92 @@ { "checksumSHA1": "nZzR5hsZaPQCTbGyICQ27/xZupw=", "path": "github.com/golang/protobuf/jsonpb", - "revision": "f592bd283e9ef86337a432eb50e592278c3d534d", - "revisionTime": "2016-08-17T17:41:13Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "uaSm4Hhyzl+DHL8kSt4mrZ7GBIk=", "path": "github.com/golang/protobuf/jsonpb/jsonpb_test_proto", - "revision": "f592bd283e9ef86337a432eb50e592278c3d534d", - "revisionTime": "2016-08-17T17:41:13Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "tqCpJbM+lI/tRCsVFcRySf0biWU=", + "checksumSHA1": "7kHC8QJD74DCyQRYTxVP5AC4m2k=", "path": "github.com/golang/protobuf/proto", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "FAcShrpHCr+JlEzLtrlXb2509ng=", + "checksumSHA1": "5CLH5JkO7pTla/+vPq8axMEjzD4=", "path": "github.com/golang/protobuf/proto/proto3_proto", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "bfRuU2CRekK0z7y9n0bGJ6Gd1Pw=", + "checksumSHA1": "FLVeQlGWyvcJ8JgcIcYgeA79mYw=", "path": "github.com/golang/protobuf/protoc-gen-go", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "XFoMKYNIsQ+Jslpxm1B8vfRQ0hI=", + "checksumSHA1": "juNiTc9bfhQYo4BkWc83sW4Z5gw=", "path": "github.com/golang/protobuf/protoc-gen-go/descriptor", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "oS4PxyTvn4pH3DAuOhnEBCKDDD0=", + "checksumSHA1": "nOoo+vN9MXF8xJw7Mto0JF+1d3Y=", "path": "github.com/golang/protobuf/protoc-gen-go/generator", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "JNLIWRMIE1PfraG3hIw0OoOnllc=", "path": "github.com/golang/protobuf/protoc-gen-go/grpc", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "7WZTRRZmINh6So4YM+K1xO1SMjo=", + "checksumSHA1": "zps2+aJoFhpFf2F8TsU9zCGXL2c=", "path": "github.com/golang/protobuf/protoc-gen-go/plugin", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "/vLtyN6HK5twSZIFerD199YTmjk=", "path": "github.com/golang/protobuf/protoc-gen-go/testdata/multi", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { - "checksumSHA1": "eQj5yhcPzMVMVgh85CFvOUHB50Q=", + "checksumSHA1": "lZFWy27Qo6+m/keDjNFYTxSmvZw=", "path": "github.com/golang/protobuf/ptypes/any", - "revision": "0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0", - "revisionTime": "2016-06-14T22:31:40Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "8gDNKfvEupesDdOCXio3AK/XVaA=", "path": "github.com/golang/protobuf/ptypes/duration", - "revision": "f592bd283e9ef86337a432eb50e592278c3d534d", - "revisionTime": "2016-08-17T17:41:13Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "wtUJRtb2jtPzrEacdsA+JRxMz2k=", "path": "github.com/golang/protobuf/ptypes/struct", - "revision": "f592bd283e9ef86337a432eb50e592278c3d534d", - "revisionTime": "2016-08-17T17:41:13Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "sfoot+dHmmOgWZS6GJ5X79ClZM0=", "path": "github.com/golang/protobuf/ptypes/timestamp", - "revision": "f592bd283e9ef86337a432eb50e592278c3d534d", - "revisionTime": "2016-08-17T17:41:13Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "Ja4i09zIVGM3NjAcTM9uOUDKNWc=", "path": "github.com/golang/protobuf/ptypes/wrappers", - "revision": "f592bd283e9ef86337a432eb50e592278c3d534d", - "revisionTime": "2016-08-17T17:41:13Z" + "revision": "1f49d83d9aa00e6ce4fc8258c71cc7786aec968a", + "revisionTime": "2016-08-24T20:12:15Z" }, { "checksumSHA1": "d22rgDYcZ/l1RPHtCokJRHAh0QI=", @@ -877,70 +877,70 @@ "revisionTime": "2016-03-31T04:59:47Z" }, { - "checksumSHA1": "i3ymhy896fkGjNVgMoh1U2DgLAk=", + "checksumSHA1": "srHpj+ntr5R5WAcm5YGH8aftlrI=", "path": "google.golang.org/grpc", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "08icuA15HRkdYCt6H+Cs90RPQsY=", "path": "google.golang.org/grpc/codes", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { - "checksumSHA1": "DIkgFG8yLaYAPpfc9jHKL28A09s=", + "checksumSHA1": "sbiWvqfhNKqrDC/nv0W/FaO3EOA=", "path": "google.golang.org/grpc/credentials", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "5R1jXc9mAXky9tPEuWMikTrwCgE=", "path": "google.golang.org/grpc/credentials/oauth", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "3Lt5hNAG8qJAYSsNghR5uA1zQns=", "path": "google.golang.org/grpc/grpclog", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "T3Q0p8kzvXFnRkMaK/G8mCv6mc0=", "path": "google.golang.org/grpc/internal", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "3EOd+KRrm4KWAih2KtOGjRLR90A=", "path": "google.golang.org/grpc/metadata", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "4GSUFhOQ0kdFlBH4D5OTeKy78z0=", "path": "google.golang.org/grpc/naming", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "3RRoLeH6X2//7tVClOVzxW2bY+E=", "path": "google.golang.org/grpc/peer", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { "checksumSHA1": "mCB3odJgVvjmrCWkgNmyN8MLbCo=", "path": "google.golang.org/grpc/test/codec_perf", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" }, { - "checksumSHA1": "VwCM20QcuDRl7xg2iD4plh4hnnE=", + "checksumSHA1": "/QpNdO+/yLHWyB545W3Jo+1FeIM=", "path": "google.golang.org/grpc/transport", - "revision": "c2c110d5cf950aef5e2af86b2f5d0a53400ff90b", - "revisionTime": "2016-08-11T17:05:11Z" + "revision": "79b7c349179cdd6efd8bac4a1ce7f01b98c16e9b", + "revisionTime": "2016-08-26T22:36:31Z" } ], "rootPath": "github.com/youtube/vitess"