From 7993e269fb774865565c7b2c7b6bccd095892bf8 Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Wed, 16 Aug 2023 20:25:35 +1200 Subject: [PATCH 1/3] Add an initial implementation of insert subscriptions. This implementation also includes an example bytewax adapter which can be used to process inserts with bytewax. An example bytewax flow is shown below: ``` import uuid import btrdb from btrdb.experimental.bytewax_connectors import InsertSubscription from bytewax.dataflow import Dataflow from bytewax.connectors.stdio import StdOutput def selector(db): # Selector can be anything that returns a list of uuids. rows = db.query('select uuid from streams') uuids = [uuid.UUID(row['uuid']) for row in rows] return uuids flow = Dataflow() flow.input("realtime_sub", InsertSubscription(selector, selector_refresh_interval=30)) flow.output("print_output", StdOutput()) ``` --- btrdb/endpoint.py | 22 ++ btrdb/experimental/__init__.py | 0 btrdb/experimental/bytewax_connectors.py | 168 +++++++++++++ btrdb/grpcinterface/btrdb.proto | 17 ++ btrdb/grpcinterface/btrdb_pb2.py | 296 ++++++++++++----------- btrdb/grpcinterface/btrdb_pb2_grpc.py | 33 +++ 6 files changed, 391 insertions(+), 145 deletions(-) create mode 100644 btrdb/experimental/__init__.py create mode 100644 btrdb/experimental/bytewax_connectors.py diff --git a/btrdb/endpoint.py b/btrdb/endpoint.py index 79a3b72..b526849 100644 --- a/btrdb/endpoint.py +++ b/btrdb/endpoint.py @@ -386,3 +386,25 @@ def sql_query(self, stmt, params: typing.List): for page in self.stub.SQLQuery(request): check_proto_stat(page.stat) yield page.SQLQueryRow + + @error_handler + def subscribe(self, update_queue): + def updates(): + while True: + update = update_queue.get() + if update is None: + return + (to_add, to_remove) = update + if len(to_add) != 0: + yield btrdb_pb2.SubscriptionUpdate( + op=0, uuid=[uu.bytes for uu in to_add] + ) + if len(to_remove) != 0: + yield btrdb_pb2.SubscriptionUpdate( + op=1, uuid=[uu.bytes for uu in to_remove] + ) + + for response in self.stub.Subscribe(updates()): + check_proto_stat(response.stat) + with pa.ipc.open_stream(response.arrowBytes) as reader: + yield uuid.UUID(bytes=response.uuid), reader.read_all() diff --git a/btrdb/experimental/__init__.py b/btrdb/experimental/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/btrdb/experimental/bytewax_connectors.py b/btrdb/experimental/bytewax_connectors.py new file mode 100644 index 0000000..0f68566 --- /dev/null +++ b/btrdb/experimental/bytewax_connectors.py @@ -0,0 +1,168 @@ +import time +import queue +import threading +import weakref +import pyarrow as pa + +from bytewax.inputs import DynamicInput, StatelessSource + +import btrdb + +_empty_values = pa.Table.from_arrays( + [pa.array([]), pa.array([])], + schema=pa.schema( + [ + pa.field("time", pa.timestamp("ns", tz="UTC"), nullable=False), + pa.field("value", pa.float64(), nullable=False), + ] + ), +) + + +class InsertSubscription(DynamicInput): + def __init__( + self, + selector_fn, + selector_refresh_interval=60 * 60 * 6, + heartbeat_interval=None, + profile=None, + conn_str=None, + apikey=None, + ): + self._selector_fn = selector_fn + self._conn_str = conn_str + self._apikey = apikey + self._profile = profile + self._selector_refresh_interval = selector_refresh_interval + self._heartbeat_interval = heartbeat_interval + + class Source(StatelessSource): + def __init__( + self, + db, + selector_fn, + selector_refresh_interval, + heartbeat_interval, + worker_index, + worker_count, + ): + self._db = db + self._selector_fn = selector_fn + self._worker_index = worker_index + self._worker_count = worker_count + self._selector_refresh_interval = selector_refresh_interval + self._heartbeat_interval = heartbeat_interval + self._read_worker_exception = None + self._background_worker_exception = None + self._del_event = threading.Event() + self._update_queue = queue.Queue(1) + self._data_queue = queue.Queue(512) + + # self is wrapped in a weakref with the worker threads so + # that the worker threads keep self alive. + def read_worker(self, data): + try: + # Avoid exessive weakref lookups + # by doing the lookup upfront initially. + del_event = self._del_event + data_queue = self._data_queue + for dat in data: + if del_event.is_set(): + return + data_queue.put(dat) + except Exception as e: + self._read_worker_exception = e + + # Self is a weakref, same as above. + def background_worker(self): + try: + # Avoid exessive weakref lookups + # by doing the lookup upfront initially. + db = self._db + del_event = self._del_event + selector_fn = self._selector_fn + worker_index = self._worker_index + worker_count = self._worker_count + data_queue = self._data_queue + heartbeat_interval = self._heartbeat_interval + last_heartbeat = time.monotonic() + selector_refresh_interval = self._selector_refresh_interval + last_selector_refresh = time.monotonic() - selector_refresh_interval + current_uuids = set() + while True: + now = time.monotonic() + if (now - last_selector_refresh) >= selector_refresh_interval: + last_selector_refresh = now + next_uuids = { + uuid + for uuid in selector_fn(db) + if uuid.int % worker_count == worker_index + } + added_uuids = next_uuids - current_uuids + removed_uuids = current_uuids - next_uuids + if len(added_uuids) != 0 or len(removed_uuids) != 0: + self._update_queue.put([added_uuids, removed_uuids]) + current_uuids = next_uuids + if ( + heartbeat_interval is not None + and (now - last_heartbeat) >= heartbeat_interval + ): + last_heartbeat = now + for uuid in current_uuids: + while not del_event.is_set(): + try: + data_queue.put((uuid, _empty_values), 0.1) + break + except queue.Full: + pass + if del_event.wait(1.0): + return + except Exception as e: + self._background_worker_exception = e + + weakself = weakref.proxy(self) + data = db.ep.subscribe(self._update_queue) + self._background_worker = threading.Thread( + target=background_worker, args=[weakself], daemon=True + ) + self._read_worker = threading.Thread( + target=read_worker, args=[weakself, data], daemon=True + ) + self._background_worker.start() + self._read_worker.start() + + def next(self): + # Check if the selector thread has died. + background_worker_exception = self._background_worker_exception + if background_worker_exception is not None: + raise background_worker_exception + try: + return self._data_queue.get_nowait() + except queue.Empty: + # Check if the reason no data arrived is because + # the reader thead has died. + read_worker_exception = self._read_worker_exception + if read_worker_exception is not None: + raise read_worker_exception + return None + + def __del__(self): + # Signal workers to exit. + self._del_event.set() + # Signal the end of the subscription. + self._update_queue.put(None) + + def build(self, worker_index, worker_count): + db = btrdb.connect( + profile=self._profile, + conn_str=self._conn_str, + apikey=self._apikey, + ) + return InsertSubscription.Source( + db, + self._selector_fn, + self._selector_refresh_interval, + self._heartbeat_interval, + worker_index, + worker_count, + ) diff --git a/btrdb/grpcinterface/btrdb.proto b/btrdb/grpcinterface/btrdb.proto index 884a71c..61d2050 100644 --- a/btrdb/grpcinterface/btrdb.proto +++ b/btrdb/grpcinterface/btrdb.proto @@ -28,6 +28,7 @@ service BTrDB { rpc GetMetadataUsage(MetadataUsageParams) returns (MetadataUsageResponse); rpc GenerateCSV(GenerateCSVParams) returns (stream GenerateCSVResponse); rpc SQLQuery(SQLQueryParams) returns (stream SQLQueryResponse); + rpc Subscribe(stream SubscriptionUpdate) returns (stream SubscriptionResp); //rpc SetCompactionConfig(SetCompactionConfigParams) returns (SetCompactionConfigResponse); //rpc GetCompactionConfig(GetCompactionConfigParams) returns (GetCompactionConfigResponse); } @@ -426,3 +427,19 @@ message ReducedResolutionRange { int64 End = 2; uint32 Resolution = 3; } + +enum SubscriptionUpdateOp { + ADD_UUIDS = 0; + REMOVE_UUIDS = 1; +} + +message SubscriptionUpdate { + SubscriptionUpdateOp op = 1; + repeated bytes uuid = 2; +} + +message SubscriptionResp { + Status stat = 1; + bytes uuid = 2; + bytes arrowBytes = 3; +} diff --git a/btrdb/grpcinterface/btrdb_pb2.py b/btrdb/grpcinterface/btrdb_pb2.py index bed2b0d..0eca464 100644 --- a/btrdb/grpcinterface/btrdb_pb2.py +++ b/btrdb/grpcinterface/btrdb_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: btrdb.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -13,152 +13,158 @@ +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x62trdb.proto\x12\x05v5api\"Q\n\x0fRawValuesParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x04 \x01(\x04\"}\n\x11RawValuesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x1f\n\x06values\x18\x04 \x03(\x0b\x32\x0f.v5api.RawPoint\"u\n\x16\x41rrowRawValuesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x12\n\narrowBytes\x18\x04 \x01(\x0c\"n\n\x16\x41rrowMultiValuesParams\x12\x0c\n\x04uuid\x18\x01 \x03(\x0c\x12\x14\n\x0cversionMajor\x18\x02 \x03(\x04\x12\r\n\x05start\x18\x03 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x10\x12\x14\n\x0csnapPeriodNs\x18\x05 \x01(\x03\"K\n\x18\x41rrowMultiValuesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x12\n\narrowBytes\x18\x02 \x01(\x0c\"*\n\x0bRawPointVec\x12\x0c\n\x04time\x18\x01 \x01(\x10\x12\r\n\x05value\x18\x02 \x03(\x01\"j\n\x14\x41lignedWindowsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x04 \x01(\x04\x12\x12\n\npointWidth\x18\x05 \x01(\r\"\x83\x01\n\x16\x41lignedWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12 \n\x06values\x18\x04 \x03(\x0b\x32\x10.v5api.StatPoint\"z\n\x1b\x41rrowAlignedWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x12\n\narrowBytes\x18\x04 \x01(\x0c\"m\n\rWindowsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x04 \x01(\x04\x12\r\n\x05width\x18\x05 \x01(\x04\x12\r\n\x05\x64\x65pth\x18\x06 \x01(\r\"|\n\x0fWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12 \n\x06values\x18\x04 \x03(\x0b\x32\x10.v5api.StatPoint\"s\n\x14\x41rrowWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x12\n\narrowBytes\x18\x04 \x01(\x0c\"h\n\x10StreamInfoParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x13\n\x0bomitVersion\x18\x02 \x01(\x08\x12\x16\n\x0eomitDescriptor\x18\x03 \x01(\x08\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"\x8a\x01\n\x12StreamInfoResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12+\n\ndescriptor\x18\x04 \x01(\x0b\x32\x17.v5api.StreamDescriptor\"\x98\x01\n\x10StreamDescriptor\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x12\n\ncollection\x18\x02 \x01(\t\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\'\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x17\n\x0fpropertyVersion\x18\x05 \x01(\x04\"\x82\x01\n\x1aSetStreamAnnotationsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x1f\n\x17\x65xpectedPropertyVersion\x18\x02 \x01(\x04\x12#\n\x07\x63hanges\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x10\n\x08removals\x18\x04 \x03(\t\";\n\x1cSetStreamAnnotationsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"\x8a\x01\n\x13SetStreamTagsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x1f\n\x17\x65xpectedPropertyVersion\x18\x02 \x01(\x04\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x12\n\ncollection\x18\x04 \x01(\t\x12\x0e\n\x06remove\x18\x05 \x03(\t\"4\n\x15SetStreamTagsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"{\n\x0c\x43reateParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x12\n\ncollection\x18\x02 \x01(\t\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\'\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x12.v5api.KeyOptValue\"-\n\x0e\x43reateResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"@\n\x13MetadataUsageParams\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"y\n\x15MetadataUsageResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x1d\n\x04tags\x18\x02 \x03(\x0b\x32\x0f.v5api.KeyCount\x12$\n\x0b\x61nnotations\x18\x03 \x03(\x0b\x32\x0f.v5api.KeyCount\"&\n\x08KeyCount\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x04\"B\n\x15ListCollectionsParams\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"K\n\x17ListCollectionsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x13\n\x0b\x63ollections\x18\x02 \x03(\t\"\xab\x01\n\x13LookupStreamsParams\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x1a\n\x12isCollectionPrefix\x18\x02 \x01(\x08\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\'\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"^\n\x15LookupStreamsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12(\n\x07results\x18\x02 \x03(\x0b\x32\x17.v5api.StreamDescriptor\"S\n\rNearestParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x0c\n\x04time\x18\x02 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x03 \x01(\x04\x12\x10\n\x08\x62\x61\x63kward\x18\x04 \x01(\x08\"z\n\x0fNearestResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x1e\n\x05value\x18\x04 \x01(\x0b\x32\x0f.v5api.RawPoint\"U\n\rChangesParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x11\n\tfromMajor\x18\x02 \x01(\x04\x12\x0f\n\x07toMajor\x18\x03 \x01(\x04\x12\x12\n\nresolution\x18\x04 \x01(\r\"\x7f\n\x0f\x43hangesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12#\n\x06ranges\x18\x04 \x03(\x0b\x32\x13.v5api.ChangedRange\"#\n\tRoundSpec\x12\x0e\n\x04\x62its\x18\x02 \x01(\x05H\x00\x42\x06\n\x04spec\"\x99\x01\n\x0cInsertParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x0c\n\x04sync\x18\x02 \x01(\x08\x12(\n\x0cmerge_policy\x18\x04 \x01(\x0e\x32\x12.v5api.MergePolicy\x12\"\n\x08rounding\x18\x05 \x01(\x0b\x32\x10.v5api.RoundSpec\x12\x1f\n\x06values\x18\x03 \x03(\x0b\x32\x0f.v5api.RawPoint\"\x91\x01\n\x11\x41rrowInsertParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x0c\n\x04sync\x18\x02 \x01(\x08\x12(\n\x0cmerge_policy\x18\x03 \x01(\x0e\x32\x12.v5api.MergePolicy\x12\"\n\x08rounding\x18\x04 \x01(\x0b\x32\x10.v5api.RoundSpec\x12\x12\n\narrowBytes\x18\x05 \x01(\x0c\"Y\n\x0eInsertResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\"8\n\x0c\x44\x65leteParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\"Y\n\x0e\x44\x65leteResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\"\x0c\n\nInfoParams\"\xa2\x01\n\x0cInfoResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x19\n\x04mash\x18\x02 \x01(\x0b\x32\x0b.v5api.Mash\x12\x14\n\x0cmajorVersion\x18\x03 \x01(\r\x12\x14\n\x0cminorVersion\x18\x04 \x01(\r\x12\r\n\x05\x62uild\x18\x05 \x01(\t\x12\x1f\n\x05proxy\x18\x06 \x01(\x0b\x32\x10.v5api.ProxyInfo\"#\n\tProxyInfo\x12\x16\n\x0eproxyEndpoints\x18\x01 \x03(\t\"1\n\x11\x46\x61ultInjectParams\x12\x0c\n\x04type\x18\x01 \x01(\x04\x12\x0e\n\x06params\x18\x02 \x01(\x0c\">\n\x13\x46\x61ultInjectResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\n\n\x02rv\x18\x02 \x01(\x0c\"\x1b\n\x0b\x46lushParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\"X\n\rFlushResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\" \n\x10ObliterateParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\"1\n\x12ObliterateResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"\'\n\x08RawPoint\x12\x0c\n\x04time\x18\x01 \x01(\x10\x12\r\n\x05value\x18\x02 \x01(\x01\"`\n\tStatPoint\x12\x0c\n\x04time\x18\x01 \x01(\x10\x12\x0b\n\x03min\x18\x02 \x01(\x01\x12\x0c\n\x04mean\x18\x03 \x01(\x01\x12\x0b\n\x03max\x18\x04 \x01(\x01\x12\r\n\x05\x63ount\x18\x05 \x01(\x06\x12\x0e\n\x06stddev\x18\x06 \x01(\x01\"*\n\x0c\x43hangedRange\x12\r\n\x05start\x18\x01 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x10\">\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0b\n\x03msg\x18\x02 \x01(\t\x12\x19\n\x04mash\x18\x03 \x01(\x0b\x32\x0b.v5api.Mash\"\x98\x01\n\x04Mash\x12\x10\n\x08revision\x18\x01 \x01(\x03\x12\x0e\n\x06leader\x18\x02 \x01(\t\x12\x16\n\x0eleaderRevision\x18\x03 \x01(\x03\x12\x13\n\x0btotalWeight\x18\x04 \x01(\x03\x12\x0f\n\x07healthy\x18\x05 \x01(\x08\x12\x10\n\x08unmapped\x18\x06 \x01(\x01\x12\x1e\n\x07members\x18\x07 \x03(\x0b\x32\r.v5api.Member\"\xc3\x01\n\x06Member\x12\x0c\n\x04hash\x18\x01 \x01(\r\x12\x10\n\x08nodename\x18\x02 \x01(\t\x12\n\n\x02up\x18\x03 \x01(\x08\x12\n\n\x02in\x18\x04 \x01(\x08\x12\x0f\n\x07\x65nabled\x18\x05 \x01(\x08\x12\r\n\x05start\x18\x06 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x07 \x01(\x03\x12\x0e\n\x06weight\x18\x08 \x01(\x03\x12\x16\n\x0ereadPreference\x18\t \x01(\x01\x12\x15\n\rhttpEndpoints\x18\n \x01(\t\x12\x15\n\rgrpcEndpoints\x18\x0b \x01(\t\"8\n\x0bKeyOptValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1c\n\x03val\x18\x02 \x01(\x0b\x32\x0f.v5api.OptValue\"\x19\n\x08OptValue\x12\r\n\x05value\x18\x01 \x01(\t\"&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"?\n\x0fStreamCSVConfig\x12\x0f\n\x07version\x18\x01 \x01(\x04\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04uuid\x18\x03 \x01(\x0c\"\x9d\x02\n\x11GenerateCSVParams\x12\x35\n\tqueryType\x18\x01 \x01(\x0e\x32\".v5api.GenerateCSVParams.QueryType\x12\x11\n\tstartTime\x18\x02 \x01(\x03\x12\x0f\n\x07\x65ndTime\x18\x03 \x01(\x03\x12\x12\n\nwindowSize\x18\x04 \x01(\x04\x12\r\n\x05\x64\x65pth\x18\x05 \x01(\r\x12\x17\n\x0fincludeVersions\x18\x06 \x01(\x08\x12\'\n\x07streams\x18\x07 \x03(\x0b\x32\x16.v5api.StreamCSVConfig\"H\n\tQueryType\x12\x19\n\x15\x41LIGNED_WINDOWS_QUERY\x10\x00\x12\x11\n\rWINDOWS_QUERY\x10\x01\x12\r\n\tRAW_QUERY\x10\x02\"Q\n\x13GenerateCSVResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x10\n\x08isHeader\x18\x02 \x01(\x08\x12\x0b\n\x03row\x18\x03 \x03(\t\"J\n\x0eSQLQueryParams\x12\r\n\x05query\x18\x01 \x01(\t\x12\x0e\n\x06params\x18\x02 \x03(\t\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"D\n\x10SQLQueryResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x13\n\x0bSQLQueryRow\x18\x02 \x03(\x0c\"\x14\n\x04Role\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x94\x01\n\x19SetCompactionConfigParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x18\n\x10\x43ompactedVersion\x18\x02 \x01(\x04\x12>\n\x17reducedResolutionRanges\x18\x03 \x03(\x0b\x32\x1d.v5api.ReducedResolutionRange\x12\x0f\n\x07unused0\x18\x04 \x01(\x04\":\n\x1bSetCompactionConfigResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\")\n\x19GetCompactionConfigParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\"\xc1\x01\n\x1bGetCompactionConfigResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x1a\n\x12LatestMajorVersion\x18\x02 \x01(\x04\x12\x18\n\x10\x43ompactedVersion\x18\x03 \x01(\x04\x12>\n\x17reducedResolutionRanges\x18\x04 \x03(\x0b\x32\x1d.v5api.ReducedResolutionRange\x12\x0f\n\x07unused0\x18\x05 \x01(\x04\"H\n\x16ReducedResolutionRange\x12\r\n\x05Start\x18\x01 \x01(\x03\x12\x0b\n\x03\x45nd\x18\x02 \x01(\x03\x12\x12\n\nResolution\x18\x03 \x01(\r\"K\n\x12SubscriptionUpdate\x12\'\n\x02op\x18\x01 \x01(\x0e\x32\x1b.v5api.SubscriptionUpdateOp\x12\x0c\n\x04uuid\x18\x02 \x03(\x0c\"Q\n\x10SubscriptionResp\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x0c\n\x04uuid\x18\x02 \x01(\x0c\x12\x12\n\narrowBytes\x18\x03 \x01(\x0c*<\n\x0bMergePolicy\x12\t\n\x05NEVER\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\n\n\x06RETAIN\x10\x02\x12\x0b\n\x07REPLACE\x10\x03*7\n\x14SubscriptionUpdateOp\x12\r\n\tADD_UUIDS\x10\x00\x12\x10\n\x0cREMOVE_UUIDS\x10\x01\x32\xf8\r\n\x05\x42TrDB\x12?\n\tRawValues\x12\x16.v5api.RawValuesParams\x1a\x18.v5api.RawValuesResponse0\x01\x12I\n\x0e\x41rrowRawValues\x12\x16.v5api.RawValuesParams\x1a\x1d.v5api.ArrowRawValuesResponse0\x01\x12T\n\x10\x41rrowMultiValues\x12\x1d.v5api.ArrowMultiValuesParams\x1a\x1f.v5api.ArrowMultiValuesResponse0\x01\x12N\n\x0e\x41lignedWindows\x12\x1b.v5api.AlignedWindowsParams\x1a\x1d.v5api.AlignedWindowsResponse0\x01\x12X\n\x13\x41rrowAlignedWindows\x12\x1b.v5api.AlignedWindowsParams\x1a\".v5api.ArrowAlignedWindowsResponse0\x01\x12\x39\n\x07Windows\x12\x14.v5api.WindowsParams\x1a\x16.v5api.WindowsResponse0\x01\x12\x43\n\x0c\x41rrowWindows\x12\x14.v5api.WindowsParams\x1a\x1b.v5api.ArrowWindowsResponse0\x01\x12@\n\nStreamInfo\x12\x17.v5api.StreamInfoParams\x1a\x19.v5api.StreamInfoResponse\x12^\n\x14SetStreamAnnotations\x12!.v5api.SetStreamAnnotationsParams\x1a#.v5api.SetStreamAnnotationsResponse\x12I\n\rSetStreamTags\x12\x1a.v5api.SetStreamTagsParams\x1a\x1c.v5api.SetStreamTagsResponse\x12\x34\n\x06\x43reate\x12\x13.v5api.CreateParams\x1a\x15.v5api.CreateResponse\x12Q\n\x0fListCollections\x12\x1c.v5api.ListCollectionsParams\x1a\x1e.v5api.ListCollectionsResponse0\x01\x12K\n\rLookupStreams\x12\x1a.v5api.LookupStreamsParams\x1a\x1c.v5api.LookupStreamsResponse0\x01\x12\x37\n\x07Nearest\x12\x14.v5api.NearestParams\x1a\x16.v5api.NearestResponse\x12\x39\n\x07\x43hanges\x12\x14.v5api.ChangesParams\x1a\x16.v5api.ChangesResponse0\x01\x12\x34\n\x06Insert\x12\x13.v5api.InsertParams\x1a\x15.v5api.InsertResponse\x12>\n\x0b\x41rrowInsert\x12\x18.v5api.ArrowInsertParams\x1a\x15.v5api.InsertResponse\x12\x34\n\x06\x44\x65lete\x12\x13.v5api.DeleteParams\x1a\x15.v5api.DeleteResponse\x12.\n\x04Info\x12\x11.v5api.InfoParams\x1a\x13.v5api.InfoResponse\x12\x43\n\x0b\x46\x61ultInject\x12\x18.v5api.FaultInjectParams\x1a\x1a.v5api.FaultInjectResponse\x12\x31\n\x05\x46lush\x12\x12.v5api.FlushParams\x1a\x14.v5api.FlushResponse\x12@\n\nObliterate\x12\x17.v5api.ObliterateParams\x1a\x19.v5api.ObliterateResponse\x12L\n\x10GetMetadataUsage\x12\x1a.v5api.MetadataUsageParams\x1a\x1c.v5api.MetadataUsageResponse\x12\x45\n\x0bGenerateCSV\x12\x18.v5api.GenerateCSVParams\x1a\x1a.v5api.GenerateCSVResponse0\x01\x12<\n\x08SQLQuery\x12\x15.v5api.SQLQueryParams\x1a\x17.v5api.SQLQueryResponse0\x01\x12\x43\n\tSubscribe\x12\x19.v5api.SubscriptionUpdate\x1a\x17.v5api.SubscriptionResp(\x01\x30\x01\x62\x06proto3') -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x62trdb.proto\x12\x05v5api\"Q\n\x0fRawValuesParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x04 \x01(\x04\"}\n\x11RawValuesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x1f\n\x06values\x18\x04 \x03(\x0b\x32\x0f.v5api.RawPoint\"u\n\x16\x41rrowRawValuesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x12\n\narrowBytes\x18\x04 \x01(\x0c\"n\n\x16\x41rrowMultiValuesParams\x12\x0c\n\x04uuid\x18\x01 \x03(\x0c\x12\x14\n\x0cversionMajor\x18\x02 \x03(\x04\x12\r\n\x05start\x18\x03 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x10\x12\x14\n\x0csnapPeriodNs\x18\x05 \x01(\x03\"K\n\x18\x41rrowMultiValuesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x12\n\narrowBytes\x18\x02 \x01(\x0c\"*\n\x0bRawPointVec\x12\x0c\n\x04time\x18\x01 \x01(\x10\x12\r\n\x05value\x18\x02 \x03(\x01\"j\n\x14\x41lignedWindowsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x04 \x01(\x04\x12\x12\n\npointWidth\x18\x05 \x01(\r\"\x83\x01\n\x16\x41lignedWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12 \n\x06values\x18\x04 \x03(\x0b\x32\x10.v5api.StatPoint\"z\n\x1b\x41rrowAlignedWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x12\n\narrowBytes\x18\x04 \x01(\x0c\"m\n\rWindowsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x04 \x01(\x04\x12\r\n\x05width\x18\x05 \x01(\x04\x12\r\n\x05\x64\x65pth\x18\x06 \x01(\r\"|\n\x0fWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12 \n\x06values\x18\x04 \x03(\x0b\x32\x10.v5api.StatPoint\"s\n\x14\x41rrowWindowsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x12\n\narrowBytes\x18\x04 \x01(\x0c\"h\n\x10StreamInfoParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x13\n\x0bomitVersion\x18\x02 \x01(\x08\x12\x16\n\x0eomitDescriptor\x18\x03 \x01(\x08\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"\x8a\x01\n\x12StreamInfoResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12+\n\ndescriptor\x18\x04 \x01(\x0b\x32\x17.v5api.StreamDescriptor\"\x98\x01\n\x10StreamDescriptor\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x12\n\ncollection\x18\x02 \x01(\t\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\'\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x17\n\x0fpropertyVersion\x18\x05 \x01(\x04\"\x82\x01\n\x1aSetStreamAnnotationsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x1f\n\x17\x65xpectedPropertyVersion\x18\x02 \x01(\x04\x12#\n\x07\x63hanges\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x10\n\x08removals\x18\x04 \x03(\t\";\n\x1cSetStreamAnnotationsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"\x8a\x01\n\x13SetStreamTagsParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x1f\n\x17\x65xpectedPropertyVersion\x18\x02 \x01(\x04\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x12\n\ncollection\x18\x04 \x01(\t\x12\x0e\n\x06remove\x18\x05 \x03(\t\"4\n\x15SetStreamTagsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"{\n\x0c\x43reateParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x12\n\ncollection\x18\x02 \x01(\t\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\'\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x12.v5api.KeyOptValue\"-\n\x0e\x43reateResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"@\n\x13MetadataUsageParams\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"y\n\x15MetadataUsageResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x1d\n\x04tags\x18\x02 \x03(\x0b\x32\x0f.v5api.KeyCount\x12$\n\x0b\x61nnotations\x18\x03 \x03(\x0b\x32\x0f.v5api.KeyCount\"&\n\x08KeyCount\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x04\"B\n\x15ListCollectionsParams\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"K\n\x17ListCollectionsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x13\n\x0b\x63ollections\x18\x02 \x03(\t\"\xab\x01\n\x13LookupStreamsParams\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x1a\n\x12isCollectionPrefix\x18\x02 \x01(\x08\x12 \n\x04tags\x18\x03 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\'\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x12.v5api.KeyOptValue\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"^\n\x15LookupStreamsResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12(\n\x07results\x18\x02 \x03(\x0b\x32\x17.v5api.StreamDescriptor\"S\n\rNearestParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x0c\n\x04time\x18\x02 \x01(\x10\x12\x14\n\x0cversionMajor\x18\x03 \x01(\x04\x12\x10\n\x08\x62\x61\x63kward\x18\x04 \x01(\x08\"z\n\x0fNearestResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12\x1e\n\x05value\x18\x04 \x01(\x0b\x32\x0f.v5api.RawPoint\"U\n\rChangesParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x11\n\tfromMajor\x18\x02 \x01(\x04\x12\x0f\n\x07toMajor\x18\x03 \x01(\x04\x12\x12\n\nresolution\x18\x04 \x01(\r\"\x7f\n\x0f\x43hangesResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\x12#\n\x06ranges\x18\x04 \x03(\x0b\x32\x13.v5api.ChangedRange\"#\n\tRoundSpec\x12\x0e\n\x04\x62its\x18\x02 \x01(\x05H\x00\x42\x06\n\x04spec\"\x99\x01\n\x0cInsertParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x0c\n\x04sync\x18\x02 \x01(\x08\x12(\n\x0cmerge_policy\x18\x04 \x01(\x0e\x32\x12.v5api.MergePolicy\x12\"\n\x08rounding\x18\x05 \x01(\x0b\x32\x10.v5api.RoundSpec\x12\x1f\n\x06values\x18\x03 \x03(\x0b\x32\x0f.v5api.RawPoint\"\x91\x01\n\x11\x41rrowInsertParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x0c\n\x04sync\x18\x02 \x01(\x08\x12(\n\x0cmerge_policy\x18\x03 \x01(\x0e\x32\x12.v5api.MergePolicy\x12\"\n\x08rounding\x18\x04 \x01(\x0b\x32\x10.v5api.RoundSpec\x12\x12\n\narrowBytes\x18\x05 \x01(\x0c\"Y\n\x0eInsertResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\"8\n\x0c\x44\x65leteParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\r\n\x05start\x18\x02 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x03 \x01(\x10\"Y\n\x0e\x44\x65leteResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\"\x0c\n\nInfoParams\"\xa2\x01\n\x0cInfoResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x19\n\x04mash\x18\x02 \x01(\x0b\x32\x0b.v5api.Mash\x12\x14\n\x0cmajorVersion\x18\x03 \x01(\r\x12\x14\n\x0cminorVersion\x18\x04 \x01(\r\x12\r\n\x05\x62uild\x18\x05 \x01(\t\x12\x1f\n\x05proxy\x18\x06 \x01(\x0b\x32\x10.v5api.ProxyInfo\"#\n\tProxyInfo\x12\x16\n\x0eproxyEndpoints\x18\x01 \x03(\t\"1\n\x11\x46\x61ultInjectParams\x12\x0c\n\x04type\x18\x01 \x01(\x04\x12\x0e\n\x06params\x18\x02 \x01(\x0c\">\n\x13\x46\x61ultInjectResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\n\n\x02rv\x18\x02 \x01(\x0c\"\x1b\n\x0b\x46lushParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\"X\n\rFlushResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x14\n\x0cversionMajor\x18\x02 \x01(\x04\x12\x14\n\x0cversionMinor\x18\x03 \x01(\x04\" \n\x10ObliterateParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\"1\n\x12ObliterateResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\"\'\n\x08RawPoint\x12\x0c\n\x04time\x18\x01 \x01(\x10\x12\r\n\x05value\x18\x02 \x01(\x01\"`\n\tStatPoint\x12\x0c\n\x04time\x18\x01 \x01(\x10\x12\x0b\n\x03min\x18\x02 \x01(\x01\x12\x0c\n\x04mean\x18\x03 \x01(\x01\x12\x0b\n\x03max\x18\x04 \x01(\x01\x12\r\n\x05\x63ount\x18\x05 \x01(\x06\x12\x0e\n\x06stddev\x18\x06 \x01(\x01\"*\n\x0c\x43hangedRange\x12\r\n\x05start\x18\x01 \x01(\x10\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x10\">\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0b\n\x03msg\x18\x02 \x01(\t\x12\x19\n\x04mash\x18\x03 \x01(\x0b\x32\x0b.v5api.Mash\"\x98\x01\n\x04Mash\x12\x10\n\x08revision\x18\x01 \x01(\x03\x12\x0e\n\x06leader\x18\x02 \x01(\t\x12\x16\n\x0eleaderRevision\x18\x03 \x01(\x03\x12\x13\n\x0btotalWeight\x18\x04 \x01(\x03\x12\x0f\n\x07healthy\x18\x05 \x01(\x08\x12\x10\n\x08unmapped\x18\x06 \x01(\x01\x12\x1e\n\x07members\x18\x07 \x03(\x0b\x32\r.v5api.Member\"\xc3\x01\n\x06Member\x12\x0c\n\x04hash\x18\x01 \x01(\r\x12\x10\n\x08nodename\x18\x02 \x01(\t\x12\n\n\x02up\x18\x03 \x01(\x08\x12\n\n\x02in\x18\x04 \x01(\x08\x12\x0f\n\x07\x65nabled\x18\x05 \x01(\x08\x12\r\n\x05start\x18\x06 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x07 \x01(\x03\x12\x0e\n\x06weight\x18\x08 \x01(\x03\x12\x16\n\x0ereadPreference\x18\t \x01(\x01\x12\x15\n\rhttpEndpoints\x18\n \x01(\t\x12\x15\n\rgrpcEndpoints\x18\x0b \x01(\t\"8\n\x0bKeyOptValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1c\n\x03val\x18\x02 \x01(\x0b\x32\x0f.v5api.OptValue\"\x19\n\x08OptValue\x12\r\n\x05value\x18\x01 \x01(\t\"&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"?\n\x0fStreamCSVConfig\x12\x0f\n\x07version\x18\x01 \x01(\x04\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04uuid\x18\x03 \x01(\x0c\"\x9d\x02\n\x11GenerateCSVParams\x12\x35\n\tqueryType\x18\x01 \x01(\x0e\x32\".v5api.GenerateCSVParams.QueryType\x12\x11\n\tstartTime\x18\x02 \x01(\x03\x12\x0f\n\x07\x65ndTime\x18\x03 \x01(\x03\x12\x12\n\nwindowSize\x18\x04 \x01(\x04\x12\r\n\x05\x64\x65pth\x18\x05 \x01(\r\x12\x17\n\x0fincludeVersions\x18\x06 \x01(\x08\x12\'\n\x07streams\x18\x07 \x03(\x0b\x32\x16.v5api.StreamCSVConfig\"H\n\tQueryType\x12\x19\n\x15\x41LIGNED_WINDOWS_QUERY\x10\x00\x12\x11\n\rWINDOWS_QUERY\x10\x01\x12\r\n\tRAW_QUERY\x10\x02\"Q\n\x13GenerateCSVResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x10\n\x08isHeader\x18\x02 \x01(\x08\x12\x0b\n\x03row\x18\x03 \x03(\t\"J\n\x0eSQLQueryParams\x12\r\n\x05query\x18\x01 \x01(\t\x12\x0e\n\x06params\x18\x02 \x03(\t\x12\x19\n\x04role\x18\x64 \x01(\x0b\x32\x0b.v5api.Role\"D\n\x10SQLQueryResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x13\n\x0bSQLQueryRow\x18\x02 \x03(\x0c\"\x14\n\x04Role\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x94\x01\n\x19SetCompactionConfigParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x18\n\x10\x43ompactedVersion\x18\x02 \x01(\x04\x12>\n\x17reducedResolutionRanges\x18\x03 \x03(\x0b\x32\x1d.v5api.ReducedResolutionRange\x12\x0f\n\x07unused0\x18\x04 \x01(\x04\":\n\x1bSetCompactionConfigResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\")\n\x19GetCompactionConfigParams\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\"\xc1\x01\n\x1bGetCompactionConfigResponse\x12\x1b\n\x04stat\x18\x01 \x01(\x0b\x32\r.v5api.Status\x12\x1a\n\x12LatestMajorVersion\x18\x02 \x01(\x04\x12\x18\n\x10\x43ompactedVersion\x18\x03 \x01(\x04\x12>\n\x17reducedResolutionRanges\x18\x04 \x03(\x0b\x32\x1d.v5api.ReducedResolutionRange\x12\x0f\n\x07unused0\x18\x05 \x01(\x04\"H\n\x16ReducedResolutionRange\x12\r\n\x05Start\x18\x01 \x01(\x03\x12\x0b\n\x03\x45nd\x18\x02 \x01(\x03\x12\x12\n\nResolution\x18\x03 \x01(\r*<\n\x0bMergePolicy\x12\t\n\x05NEVER\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\n\n\x06RETAIN\x10\x02\x12\x0b\n\x07REPLACE\x10\x03\x32\xb3\r\n\x05\x42TrDB\x12?\n\tRawValues\x12\x16.v5api.RawValuesParams\x1a\x18.v5api.RawValuesResponse0\x01\x12I\n\x0e\x41rrowRawValues\x12\x16.v5api.RawValuesParams\x1a\x1d.v5api.ArrowRawValuesResponse0\x01\x12T\n\x10\x41rrowMultiValues\x12\x1d.v5api.ArrowMultiValuesParams\x1a\x1f.v5api.ArrowMultiValuesResponse0\x01\x12N\n\x0e\x41lignedWindows\x12\x1b.v5api.AlignedWindowsParams\x1a\x1d.v5api.AlignedWindowsResponse0\x01\x12X\n\x13\x41rrowAlignedWindows\x12\x1b.v5api.AlignedWindowsParams\x1a\".v5api.ArrowAlignedWindowsResponse0\x01\x12\x39\n\x07Windows\x12\x14.v5api.WindowsParams\x1a\x16.v5api.WindowsResponse0\x01\x12\x43\n\x0c\x41rrowWindows\x12\x14.v5api.WindowsParams\x1a\x1b.v5api.ArrowWindowsResponse0\x01\x12@\n\nStreamInfo\x12\x17.v5api.StreamInfoParams\x1a\x19.v5api.StreamInfoResponse\x12^\n\x14SetStreamAnnotations\x12!.v5api.SetStreamAnnotationsParams\x1a#.v5api.SetStreamAnnotationsResponse\x12I\n\rSetStreamTags\x12\x1a.v5api.SetStreamTagsParams\x1a\x1c.v5api.SetStreamTagsResponse\x12\x34\n\x06\x43reate\x12\x13.v5api.CreateParams\x1a\x15.v5api.CreateResponse\x12Q\n\x0fListCollections\x12\x1c.v5api.ListCollectionsParams\x1a\x1e.v5api.ListCollectionsResponse0\x01\x12K\n\rLookupStreams\x12\x1a.v5api.LookupStreamsParams\x1a\x1c.v5api.LookupStreamsResponse0\x01\x12\x37\n\x07Nearest\x12\x14.v5api.NearestParams\x1a\x16.v5api.NearestResponse\x12\x39\n\x07\x43hanges\x12\x14.v5api.ChangesParams\x1a\x16.v5api.ChangesResponse0\x01\x12\x34\n\x06Insert\x12\x13.v5api.InsertParams\x1a\x15.v5api.InsertResponse\x12>\n\x0b\x41rrowInsert\x12\x18.v5api.ArrowInsertParams\x1a\x15.v5api.InsertResponse\x12\x34\n\x06\x44\x65lete\x12\x13.v5api.DeleteParams\x1a\x15.v5api.DeleteResponse\x12.\n\x04Info\x12\x11.v5api.InfoParams\x1a\x13.v5api.InfoResponse\x12\x43\n\x0b\x46\x61ultInject\x12\x18.v5api.FaultInjectParams\x1a\x1a.v5api.FaultInjectResponse\x12\x31\n\x05\x46lush\x12\x12.v5api.FlushParams\x1a\x14.v5api.FlushResponse\x12@\n\nObliterate\x12\x17.v5api.ObliterateParams\x1a\x19.v5api.ObliterateResponse\x12L\n\x10GetMetadataUsage\x12\x1a.v5api.MetadataUsageParams\x1a\x1c.v5api.MetadataUsageResponse\x12\x45\n\x0bGenerateCSV\x12\x18.v5api.GenerateCSVParams\x1a\x1a.v5api.GenerateCSVResponse0\x01\x12<\n\x08SQLQuery\x12\x15.v5api.SQLQueryParams\x1a\x17.v5api.SQLQueryResponse0\x01\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'btrdb_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'btrdb_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _MERGEPOLICY._serialized_start=6305 - _MERGEPOLICY._serialized_end=6365 - _RAWVALUESPARAMS._serialized_start=22 - _RAWVALUESPARAMS._serialized_end=103 - _RAWVALUESRESPONSE._serialized_start=105 - _RAWVALUESRESPONSE._serialized_end=230 - _ARROWRAWVALUESRESPONSE._serialized_start=232 - _ARROWRAWVALUESRESPONSE._serialized_end=349 - _ARROWMULTIVALUESPARAMS._serialized_start=351 - _ARROWMULTIVALUESPARAMS._serialized_end=461 - _ARROWMULTIVALUESRESPONSE._serialized_start=463 - _ARROWMULTIVALUESRESPONSE._serialized_end=538 - _RAWPOINTVEC._serialized_start=540 - _RAWPOINTVEC._serialized_end=582 - _ALIGNEDWINDOWSPARAMS._serialized_start=584 - _ALIGNEDWINDOWSPARAMS._serialized_end=690 - _ALIGNEDWINDOWSRESPONSE._serialized_start=693 - _ALIGNEDWINDOWSRESPONSE._serialized_end=824 - _ARROWALIGNEDWINDOWSRESPONSE._serialized_start=826 - _ARROWALIGNEDWINDOWSRESPONSE._serialized_end=948 - _WINDOWSPARAMS._serialized_start=950 - _WINDOWSPARAMS._serialized_end=1059 - _WINDOWSRESPONSE._serialized_start=1061 - _WINDOWSRESPONSE._serialized_end=1185 - _ARROWWINDOWSRESPONSE._serialized_start=1187 - _ARROWWINDOWSRESPONSE._serialized_end=1302 - _STREAMINFOPARAMS._serialized_start=1304 - _STREAMINFOPARAMS._serialized_end=1408 - _STREAMINFORESPONSE._serialized_start=1411 - _STREAMINFORESPONSE._serialized_end=1549 - _STREAMDESCRIPTOR._serialized_start=1552 - _STREAMDESCRIPTOR._serialized_end=1704 - _SETSTREAMANNOTATIONSPARAMS._serialized_start=1707 - _SETSTREAMANNOTATIONSPARAMS._serialized_end=1837 - _SETSTREAMANNOTATIONSRESPONSE._serialized_start=1839 - _SETSTREAMANNOTATIONSRESPONSE._serialized_end=1898 - _SETSTREAMTAGSPARAMS._serialized_start=1901 - _SETSTREAMTAGSPARAMS._serialized_end=2039 - _SETSTREAMTAGSRESPONSE._serialized_start=2041 - _SETSTREAMTAGSRESPONSE._serialized_end=2093 - _CREATEPARAMS._serialized_start=2095 - _CREATEPARAMS._serialized_end=2218 - _CREATERESPONSE._serialized_start=2220 - _CREATERESPONSE._serialized_end=2265 - _METADATAUSAGEPARAMS._serialized_start=2267 - _METADATAUSAGEPARAMS._serialized_end=2331 - _METADATAUSAGERESPONSE._serialized_start=2333 - _METADATAUSAGERESPONSE._serialized_end=2454 - _KEYCOUNT._serialized_start=2456 - _KEYCOUNT._serialized_end=2494 - _LISTCOLLECTIONSPARAMS._serialized_start=2496 - _LISTCOLLECTIONSPARAMS._serialized_end=2562 - _LISTCOLLECTIONSRESPONSE._serialized_start=2564 - _LISTCOLLECTIONSRESPONSE._serialized_end=2639 - _LOOKUPSTREAMSPARAMS._serialized_start=2642 - _LOOKUPSTREAMSPARAMS._serialized_end=2813 - _LOOKUPSTREAMSRESPONSE._serialized_start=2815 - _LOOKUPSTREAMSRESPONSE._serialized_end=2909 - _NEARESTPARAMS._serialized_start=2911 - _NEARESTPARAMS._serialized_end=2994 - _NEARESTRESPONSE._serialized_start=2996 - _NEARESTRESPONSE._serialized_end=3118 - _CHANGESPARAMS._serialized_start=3120 - _CHANGESPARAMS._serialized_end=3205 - _CHANGESRESPONSE._serialized_start=3207 - _CHANGESRESPONSE._serialized_end=3334 - _ROUNDSPEC._serialized_start=3336 - _ROUNDSPEC._serialized_end=3371 - _INSERTPARAMS._serialized_start=3374 - _INSERTPARAMS._serialized_end=3527 - _ARROWINSERTPARAMS._serialized_start=3530 - _ARROWINSERTPARAMS._serialized_end=3675 - _INSERTRESPONSE._serialized_start=3677 - _INSERTRESPONSE._serialized_end=3766 - _DELETEPARAMS._serialized_start=3768 - _DELETEPARAMS._serialized_end=3824 - _DELETERESPONSE._serialized_start=3826 - _DELETERESPONSE._serialized_end=3915 - _INFOPARAMS._serialized_start=3917 - _INFOPARAMS._serialized_end=3929 - _INFORESPONSE._serialized_start=3932 - _INFORESPONSE._serialized_end=4094 - _PROXYINFO._serialized_start=4096 - _PROXYINFO._serialized_end=4131 - _FAULTINJECTPARAMS._serialized_start=4133 - _FAULTINJECTPARAMS._serialized_end=4182 - _FAULTINJECTRESPONSE._serialized_start=4184 - _FAULTINJECTRESPONSE._serialized_end=4246 - _FLUSHPARAMS._serialized_start=4248 - _FLUSHPARAMS._serialized_end=4275 - _FLUSHRESPONSE._serialized_start=4277 - _FLUSHRESPONSE._serialized_end=4365 - _OBLITERATEPARAMS._serialized_start=4367 - _OBLITERATEPARAMS._serialized_end=4399 - _OBLITERATERESPONSE._serialized_start=4401 - _OBLITERATERESPONSE._serialized_end=4450 - _RAWPOINT._serialized_start=4452 - _RAWPOINT._serialized_end=4491 - _STATPOINT._serialized_start=4493 - _STATPOINT._serialized_end=4589 - _CHANGEDRANGE._serialized_start=4591 - _CHANGEDRANGE._serialized_end=4633 - _STATUS._serialized_start=4635 - _STATUS._serialized_end=4697 - _MASH._serialized_start=4700 - _MASH._serialized_end=4852 - _MEMBER._serialized_start=4855 - _MEMBER._serialized_end=5050 - _KEYOPTVALUE._serialized_start=5052 - _KEYOPTVALUE._serialized_end=5108 - _OPTVALUE._serialized_start=5110 - _OPTVALUE._serialized_end=5135 - _KEYVALUE._serialized_start=5137 - _KEYVALUE._serialized_end=5175 - _STREAMCSVCONFIG._serialized_start=5177 - _STREAMCSVCONFIG._serialized_end=5240 - _GENERATECSVPARAMS._serialized_start=5243 - _GENERATECSVPARAMS._serialized_end=5528 - _GENERATECSVPARAMS_QUERYTYPE._serialized_start=5456 - _GENERATECSVPARAMS_QUERYTYPE._serialized_end=5528 - _GENERATECSVRESPONSE._serialized_start=5530 - _GENERATECSVRESPONSE._serialized_end=5611 - _SQLQUERYPARAMS._serialized_start=5613 - _SQLQUERYPARAMS._serialized_end=5687 - _SQLQUERYRESPONSE._serialized_start=5689 - _SQLQUERYRESPONSE._serialized_end=5757 - _ROLE._serialized_start=5759 - _ROLE._serialized_end=5779 - _SETCOMPACTIONCONFIGPARAMS._serialized_start=5782 - _SETCOMPACTIONCONFIGPARAMS._serialized_end=5930 - _SETCOMPACTIONCONFIGRESPONSE._serialized_start=5932 - _SETCOMPACTIONCONFIGRESPONSE._serialized_end=5990 - _GETCOMPACTIONCONFIGPARAMS._serialized_start=5992 - _GETCOMPACTIONCONFIGPARAMS._serialized_end=6033 - _GETCOMPACTIONCONFIGRESPONSE._serialized_start=6036 - _GETCOMPACTIONCONFIGRESPONSE._serialized_end=6229 - _REDUCEDRESOLUTIONRANGE._serialized_start=6231 - _REDUCEDRESOLUTIONRANGE._serialized_end=6303 - _BTRDB._serialized_start=6368 - _BTRDB._serialized_end=8083 + _globals['_MERGEPOLICY']._serialized_start=6465 + _globals['_MERGEPOLICY']._serialized_end=6525 + _globals['_SUBSCRIPTIONUPDATEOP']._serialized_start=6527 + _globals['_SUBSCRIPTIONUPDATEOP']._serialized_end=6582 + _globals['_RAWVALUESPARAMS']._serialized_start=22 + _globals['_RAWVALUESPARAMS']._serialized_end=103 + _globals['_RAWVALUESRESPONSE']._serialized_start=105 + _globals['_RAWVALUESRESPONSE']._serialized_end=230 + _globals['_ARROWRAWVALUESRESPONSE']._serialized_start=232 + _globals['_ARROWRAWVALUESRESPONSE']._serialized_end=349 + _globals['_ARROWMULTIVALUESPARAMS']._serialized_start=351 + _globals['_ARROWMULTIVALUESPARAMS']._serialized_end=461 + _globals['_ARROWMULTIVALUESRESPONSE']._serialized_start=463 + _globals['_ARROWMULTIVALUESRESPONSE']._serialized_end=538 + _globals['_RAWPOINTVEC']._serialized_start=540 + _globals['_RAWPOINTVEC']._serialized_end=582 + _globals['_ALIGNEDWINDOWSPARAMS']._serialized_start=584 + _globals['_ALIGNEDWINDOWSPARAMS']._serialized_end=690 + _globals['_ALIGNEDWINDOWSRESPONSE']._serialized_start=693 + _globals['_ALIGNEDWINDOWSRESPONSE']._serialized_end=824 + _globals['_ARROWALIGNEDWINDOWSRESPONSE']._serialized_start=826 + _globals['_ARROWALIGNEDWINDOWSRESPONSE']._serialized_end=948 + _globals['_WINDOWSPARAMS']._serialized_start=950 + _globals['_WINDOWSPARAMS']._serialized_end=1059 + _globals['_WINDOWSRESPONSE']._serialized_start=1061 + _globals['_WINDOWSRESPONSE']._serialized_end=1185 + _globals['_ARROWWINDOWSRESPONSE']._serialized_start=1187 + _globals['_ARROWWINDOWSRESPONSE']._serialized_end=1302 + _globals['_STREAMINFOPARAMS']._serialized_start=1304 + _globals['_STREAMINFOPARAMS']._serialized_end=1408 + _globals['_STREAMINFORESPONSE']._serialized_start=1411 + _globals['_STREAMINFORESPONSE']._serialized_end=1549 + _globals['_STREAMDESCRIPTOR']._serialized_start=1552 + _globals['_STREAMDESCRIPTOR']._serialized_end=1704 + _globals['_SETSTREAMANNOTATIONSPARAMS']._serialized_start=1707 + _globals['_SETSTREAMANNOTATIONSPARAMS']._serialized_end=1837 + _globals['_SETSTREAMANNOTATIONSRESPONSE']._serialized_start=1839 + _globals['_SETSTREAMANNOTATIONSRESPONSE']._serialized_end=1898 + _globals['_SETSTREAMTAGSPARAMS']._serialized_start=1901 + _globals['_SETSTREAMTAGSPARAMS']._serialized_end=2039 + _globals['_SETSTREAMTAGSRESPONSE']._serialized_start=2041 + _globals['_SETSTREAMTAGSRESPONSE']._serialized_end=2093 + _globals['_CREATEPARAMS']._serialized_start=2095 + _globals['_CREATEPARAMS']._serialized_end=2218 + _globals['_CREATERESPONSE']._serialized_start=2220 + _globals['_CREATERESPONSE']._serialized_end=2265 + _globals['_METADATAUSAGEPARAMS']._serialized_start=2267 + _globals['_METADATAUSAGEPARAMS']._serialized_end=2331 + _globals['_METADATAUSAGERESPONSE']._serialized_start=2333 + _globals['_METADATAUSAGERESPONSE']._serialized_end=2454 + _globals['_KEYCOUNT']._serialized_start=2456 + _globals['_KEYCOUNT']._serialized_end=2494 + _globals['_LISTCOLLECTIONSPARAMS']._serialized_start=2496 + _globals['_LISTCOLLECTIONSPARAMS']._serialized_end=2562 + _globals['_LISTCOLLECTIONSRESPONSE']._serialized_start=2564 + _globals['_LISTCOLLECTIONSRESPONSE']._serialized_end=2639 + _globals['_LOOKUPSTREAMSPARAMS']._serialized_start=2642 + _globals['_LOOKUPSTREAMSPARAMS']._serialized_end=2813 + _globals['_LOOKUPSTREAMSRESPONSE']._serialized_start=2815 + _globals['_LOOKUPSTREAMSRESPONSE']._serialized_end=2909 + _globals['_NEARESTPARAMS']._serialized_start=2911 + _globals['_NEARESTPARAMS']._serialized_end=2994 + _globals['_NEARESTRESPONSE']._serialized_start=2996 + _globals['_NEARESTRESPONSE']._serialized_end=3118 + _globals['_CHANGESPARAMS']._serialized_start=3120 + _globals['_CHANGESPARAMS']._serialized_end=3205 + _globals['_CHANGESRESPONSE']._serialized_start=3207 + _globals['_CHANGESRESPONSE']._serialized_end=3334 + _globals['_ROUNDSPEC']._serialized_start=3336 + _globals['_ROUNDSPEC']._serialized_end=3371 + _globals['_INSERTPARAMS']._serialized_start=3374 + _globals['_INSERTPARAMS']._serialized_end=3527 + _globals['_ARROWINSERTPARAMS']._serialized_start=3530 + _globals['_ARROWINSERTPARAMS']._serialized_end=3675 + _globals['_INSERTRESPONSE']._serialized_start=3677 + _globals['_INSERTRESPONSE']._serialized_end=3766 + _globals['_DELETEPARAMS']._serialized_start=3768 + _globals['_DELETEPARAMS']._serialized_end=3824 + _globals['_DELETERESPONSE']._serialized_start=3826 + _globals['_DELETERESPONSE']._serialized_end=3915 + _globals['_INFOPARAMS']._serialized_start=3917 + _globals['_INFOPARAMS']._serialized_end=3929 + _globals['_INFORESPONSE']._serialized_start=3932 + _globals['_INFORESPONSE']._serialized_end=4094 + _globals['_PROXYINFO']._serialized_start=4096 + _globals['_PROXYINFO']._serialized_end=4131 + _globals['_FAULTINJECTPARAMS']._serialized_start=4133 + _globals['_FAULTINJECTPARAMS']._serialized_end=4182 + _globals['_FAULTINJECTRESPONSE']._serialized_start=4184 + _globals['_FAULTINJECTRESPONSE']._serialized_end=4246 + _globals['_FLUSHPARAMS']._serialized_start=4248 + _globals['_FLUSHPARAMS']._serialized_end=4275 + _globals['_FLUSHRESPONSE']._serialized_start=4277 + _globals['_FLUSHRESPONSE']._serialized_end=4365 + _globals['_OBLITERATEPARAMS']._serialized_start=4367 + _globals['_OBLITERATEPARAMS']._serialized_end=4399 + _globals['_OBLITERATERESPONSE']._serialized_start=4401 + _globals['_OBLITERATERESPONSE']._serialized_end=4450 + _globals['_RAWPOINT']._serialized_start=4452 + _globals['_RAWPOINT']._serialized_end=4491 + _globals['_STATPOINT']._serialized_start=4493 + _globals['_STATPOINT']._serialized_end=4589 + _globals['_CHANGEDRANGE']._serialized_start=4591 + _globals['_CHANGEDRANGE']._serialized_end=4633 + _globals['_STATUS']._serialized_start=4635 + _globals['_STATUS']._serialized_end=4697 + _globals['_MASH']._serialized_start=4700 + _globals['_MASH']._serialized_end=4852 + _globals['_MEMBER']._serialized_start=4855 + _globals['_MEMBER']._serialized_end=5050 + _globals['_KEYOPTVALUE']._serialized_start=5052 + _globals['_KEYOPTVALUE']._serialized_end=5108 + _globals['_OPTVALUE']._serialized_start=5110 + _globals['_OPTVALUE']._serialized_end=5135 + _globals['_KEYVALUE']._serialized_start=5137 + _globals['_KEYVALUE']._serialized_end=5175 + _globals['_STREAMCSVCONFIG']._serialized_start=5177 + _globals['_STREAMCSVCONFIG']._serialized_end=5240 + _globals['_GENERATECSVPARAMS']._serialized_start=5243 + _globals['_GENERATECSVPARAMS']._serialized_end=5528 + _globals['_GENERATECSVPARAMS_QUERYTYPE']._serialized_start=5456 + _globals['_GENERATECSVPARAMS_QUERYTYPE']._serialized_end=5528 + _globals['_GENERATECSVRESPONSE']._serialized_start=5530 + _globals['_GENERATECSVRESPONSE']._serialized_end=5611 + _globals['_SQLQUERYPARAMS']._serialized_start=5613 + _globals['_SQLQUERYPARAMS']._serialized_end=5687 + _globals['_SQLQUERYRESPONSE']._serialized_start=5689 + _globals['_SQLQUERYRESPONSE']._serialized_end=5757 + _globals['_ROLE']._serialized_start=5759 + _globals['_ROLE']._serialized_end=5779 + _globals['_SETCOMPACTIONCONFIGPARAMS']._serialized_start=5782 + _globals['_SETCOMPACTIONCONFIGPARAMS']._serialized_end=5930 + _globals['_SETCOMPACTIONCONFIGRESPONSE']._serialized_start=5932 + _globals['_SETCOMPACTIONCONFIGRESPONSE']._serialized_end=5990 + _globals['_GETCOMPACTIONCONFIGPARAMS']._serialized_start=5992 + _globals['_GETCOMPACTIONCONFIGPARAMS']._serialized_end=6033 + _globals['_GETCOMPACTIONCONFIGRESPONSE']._serialized_start=6036 + _globals['_GETCOMPACTIONCONFIGRESPONSE']._serialized_end=6229 + _globals['_REDUCEDRESOLUTIONRANGE']._serialized_start=6231 + _globals['_REDUCEDRESOLUTIONRANGE']._serialized_end=6303 + _globals['_SUBSCRIPTIONUPDATE']._serialized_start=6305 + _globals['_SUBSCRIPTIONUPDATE']._serialized_end=6380 + _globals['_SUBSCRIPTIONRESP']._serialized_start=6382 + _globals['_SUBSCRIPTIONRESP']._serialized_end=6463 + _globals['_BTRDB']._serialized_start=6585 + _globals['_BTRDB']._serialized_end=8369 # @@protoc_insertion_point(module_scope) diff --git a/btrdb/grpcinterface/btrdb_pb2_grpc.py b/btrdb/grpcinterface/btrdb_pb2_grpc.py index 52a72bd..d05d9cf 100644 --- a/btrdb/grpcinterface/btrdb_pb2_grpc.py +++ b/btrdb/grpcinterface/btrdb_pb2_grpc.py @@ -139,6 +139,11 @@ def __init__(self, channel): request_serializer=btrdb__pb2.SQLQueryParams.SerializeToString, response_deserializer=btrdb__pb2.SQLQueryResponse.FromString, ) + self.Subscribe = channel.stream_stream( + '/v5api.BTrDB/Subscribe', + request_serializer=btrdb__pb2.SubscriptionUpdate.SerializeToString, + response_deserializer=btrdb__pb2.SubscriptionResp.FromString, + ) class BTrDBServicer(object): @@ -289,6 +294,12 @@ def GenerateCSV(self, request, context): raise NotImplementedError('Method not implemented!') def SQLQuery(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Subscribe(self, request_iterator, context): """rpc SetCompactionConfig(SetCompactionConfigParams) returns (SetCompactionConfigResponse); rpc GetCompactionConfig(GetCompactionConfigParams) returns (GetCompactionConfigResponse); """ @@ -424,6 +435,11 @@ def add_BTrDBServicer_to_server(servicer, server): request_deserializer=btrdb__pb2.SQLQueryParams.FromString, response_serializer=btrdb__pb2.SQLQueryResponse.SerializeToString, ), + 'Subscribe': grpc.stream_stream_rpc_method_handler( + servicer.Subscribe, + request_deserializer=btrdb__pb2.SubscriptionUpdate.FromString, + response_serializer=btrdb__pb2.SubscriptionResp.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'v5api.BTrDB', rpc_method_handlers) @@ -858,3 +874,20 @@ def SQLQuery(request, btrdb__pb2.SQLQueryResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Subscribe(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/v5api.BTrDB/Subscribe', + btrdb__pb2.SubscriptionUpdate.SerializeToString, + btrdb__pb2.SubscriptionResp.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) From 9b7fb1ea39cce3b875682174f5d5452567863792 Mon Sep 17 00:00:00 2001 From: Jeff Lin <42981468+jleifnf@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:56:39 -0700 Subject: [PATCH 2/3] Fix build deprecation warnings in using pyproject.toml and setuptool (#57) * update setuptools parameters for strict standards starting 2023-Oct-30 * remove invalid url for homepage of the project * remove invalid url for homepage of the project * update the docs url in pyproject.toml --- pyproject.toml | 6 ++++-- setup.cfg | 4 ++-- setup.py | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 80f656d..d3c9f94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,9 @@ version = "5.31.0" authors = [ {name="PingThingsIO", email="support@pingthings.io"}, ] +maintainers = [ + {name="PingThingsIO", email="support@pingthings.io"}, +] description = "Bindings to interact with the Berkeley Tree Database using gRPC." readme = "README.md" license = {file="LICENSE.txt"} @@ -65,8 +68,7 @@ all = [ ] [project.urls] -"Homepage" = "https://btrdb.io" -"Docs" = "https://btrdb.readthedocs.io" +"Docs" = "https://btrdb-python.readthedocs.io/" "Repository" = "https://github.com/pingthingsio/btrdb-python.git" [build-system] diff --git a/setup.cfg b/setup.cfg index 3f445b3..8d1166f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] -description-file = DESCRIPTION.md -license_file = LICENSE.txt +description_file = DESCRIPTION.md +license_files = LICENSE.txt [aliases] test=pytest diff --git a/setup.py b/setup.py index a5b82d1..df6ad76 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ REPOSITORY = "https://github.com/PingThingsIO/btrdb-python" PACKAGE = "btrdb" URL = "http://btrdb.io/" -DOCS_URL = "https://btrdb.readthedocs.io/en/latest/" +DOCS_URL = "https://btrdb-python.readthedocs.io/" ## Define the keywords KEYWORDS = ("btrdb", "berkeley", "timeseries", "database", "bindings" "gRPC") @@ -133,7 +133,6 @@ def get_description_type(path=PKG_DESCRIBE): "license": LICENSE, "author": AUTHOR, "author_email": EMAIL, - "url": URL, "maintainer": MAINTAINER, "maintainer_email": EMAIL, "project_urls": { From 8c4fed56c70269f2ab78cf0794f1d06e894c3bde Mon Sep 17 00:00:00 2001 From: Jeff Lin <42981468+jleifnf@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:11:37 -0700 Subject: [PATCH 3/3] remove deprecated columns arg from to_dataframe and arrow_to_dataframe (#59) --- btrdb/transformers.py | 29 +++-------------------------- tests/btrdb/test_transformers.py | 21 +++++++-------------- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/btrdb/transformers.py b/btrdb/transformers.py index 9bcf7b5..f01787f 100644 --- a/btrdb/transformers.py +++ b/btrdb/transformers.py @@ -138,18 +138,13 @@ def arrow_to_series(streamset, agg="mean", name_callable=None): return [arrow_df[col] for col in arrow_df] -def arrow_to_dataframe( - streamset, columns=None, agg=None, name_callable=None -) -> pd.DataFrame: +def arrow_to_dataframe(streamset, agg=None, name_callable=None) -> pd.DataFrame: """ Returns a Pandas DataFrame object indexed by time and using the values of a stream for each column. Parameters ---------- - columns: sequence - column names to use for DataFrame. Deprecated and not compatible with name_callable. - agg : List[str], default: ["mean"] Specify the StatPoint fields (e.g. aggregating function) to create the dataframe from. Must be one or more of "min", "mean", "max", "count", "stddev", or "all". This @@ -175,13 +170,6 @@ def arrow_to_dataframe( raise ImportError( f"Please install Pandas and pyarrow to use this transformation function. ErrorMessage: {err}" ) - # deprecation warning added in v5.8 - if columns: - warn( - "the columns argument is deprecated and will be removed in a future release", - DeprecationWarning, - stacklevel=2, - ) if agg is None: agg = ["mean"] @@ -227,16 +215,13 @@ def arrow_to_dataframe( return tmp.to_pandas(date_as_object=False, types_mapper=pd.ArrowDtype) -def to_dataframe(streamset, columns=None, agg="mean", name_callable=None): +def to_dataframe(streamset, agg="mean", name_callable=None): """ Returns a Pandas DataFrame object indexed by time and using the values of a stream for each column. Parameters ---------- - columns: sequence - column names to use for DataFrame. Deprecated and not compatible with name_callable. - agg : str, default: "mean" Specify the StatPoint field (e.g. aggregating function) to create the Series from. Must be one of "min", "mean", "max", "count", "stddev", or "all". This @@ -253,14 +238,6 @@ def to_dataframe(streamset, columns=None, agg="mean", name_callable=None): except ImportError: raise ImportError("Please install Pandas to use this transformation function.") - # deprecation warning added in v5.8 - if columns: - warn( - "the columns argument is deprecated and will be removed in a future release", - DeprecationWarning, - stacklevel=2, - ) - # TODO: allow this at some future point if agg == "all" and name_callable is not None: raise AttributeError( @@ -288,7 +265,7 @@ def to_dataframe(streamset, columns=None, agg="mean", name_callable=None): ] df.columns = pd.MultiIndex.from_tuples(stream_names) else: - df.columns = columns if columns else _stream_names(streamset, name_callable) + df.columns = _stream_names(streamset, name_callable) return df diff --git a/tests/btrdb/test_transformers.py b/tests/btrdb/test_transformers.py index 833de69..c7ce719 100644 --- a/tests/btrdb/test_transformers.py +++ b/tests/btrdb/test_transformers.py @@ -601,7 +601,7 @@ def test_to_series(self, streamset): def test_to_series_name_lambda(self, streamset): """ - assert to_dateframe uses name lambda + assert to_series uses name lambda """ result = streamset.to_series(name_callable=lambda s: s.name) assert [s.name for s in result] == ["stream0", "stream1", "stream2", "stream3"] @@ -691,23 +691,16 @@ def test_to_dataframe(self, streamset): df.set_index("time", inplace=True) assert to_dataframe(streamset).equals(df) - def test_to_dataframe_column_issues_warning(self, statpoint_streamset): + def test_to_dataframe_column_issues_error(self, statpoint_streamset): """ - assert to_dateframe with column argument issues warning + assert to_dateframe with column argument issues error """ columns = ["test/cats", "test/dogs", "test/horses", "test/fishes"] - with pytest.deprecated_call(): + with pytest.raises(TypeError) as unexpected_key_err: statpoint_streamset.to_dataframe(columns=columns) - - def test_to_dataframe_column(self, statpoint_streamset): - """ - assert to_dateframe with column argument actually renames columns - """ - columns = ["test/cats", "test/dogs", "test/horses", "test/fishes"] - with pytest.deprecated_call(): - df = statpoint_streamset.to_dataframe(columns=columns) - - assert df.columns.tolist() == columns + assert "got an unexpected keyword argument 'columns'" in str( + unexpected_key_err.value + ) def test_to_dataframe_multindex(self, statpoint_streamset): """