Update to gRPC 1.0.0 and protobuf 3.0.0. (#2012)

This commit is contained in:
Anthony Yeh 2016-09-23 11:41:17 -07:00 коммит произвёл GitHub
Родитель b78b82efc9
Коммит 313d926f89
43 изменённых файлов: 3138 добавлений и 1317 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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": {

183
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": {

Просмотреть файл

@ -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

Просмотреть файл

@ -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"`
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -42,7 +42,7 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>0.13.1</version>
<version>${grpc.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>

Просмотреть файл

@ -63,11 +63,11 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>0.13.1</grpc.version>
<grpc.version>1.0.0</grpc.version>
<guava.version>19.0</guava.version>
<junit.version>4.12</junit.version>
<log4j.version>1.2.17</log4j.version>
<protobuf.java.version>3.0.0-beta-2</protobuf.java.version>
<protobuf.java.version>3.0.0</protobuf.java.version>
</properties>
<!-- define dependency versions -->

Просмотреть файл

@ -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

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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(

Просмотреть файл

@ -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()

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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):
"""<fill me in later!>"""
__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,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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(

Просмотреть файл

@ -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

124
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"