From 7ce7e62f602b0187dc7f1f5895017e116f71db6c Mon Sep 17 00:00:00 2001 From: Patrik Helia Date: Thu, 16 Apr 2020 21:06:07 +0200 Subject: [PATCH 01/11] fix: Migrated bucket should have correct retention policy. Signed-off-by: Patrik Helia --- CHANGELOG.md | 1 + tsdb/migrate/data_v1.go | 79 ++ tsdb/migrate/internal/meta.pb.go | 2011 ++++++++++++++++++++++++++++++ tsdb/migrate/migrate.go | 54 +- 4 files changed, 2143 insertions(+), 2 deletions(-) create mode 100644 tsdb/migrate/data_v1.go create mode 100644 tsdb/migrate/internal/meta.pb.go diff --git a/CHANGELOG.md b/CHANGELOG.md index e4cf20f575..6eafe86dbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bug Fixes +1. [17257](https://github.com/influxdata/influxdb/pull/17769): Fix retention policy after bucket is migrated 1. [17612](https://github.com/influxdata/influxdb/pull/17612): Fix card size and layout jank in dashboards index view 1. [17651](https://github.com/influxdata/influxdb/pull/17651): Fix check graph font and lines defaulting to black causing graph to be unreadable 1. [17660](https://github.com/influxdata/influxdb/pull/17660): Fix text wrapping display issue and popover sizing bug when adding labels to a resource diff --git a/tsdb/migrate/data_v1.go b/tsdb/migrate/data_v1.go new file mode 100644 index 0000000000..058711429e --- /dev/null +++ b/tsdb/migrate/data_v1.go @@ -0,0 +1,79 @@ +package migrate + +import ( + "github.com/gogo/protobuf/proto" + "github.com/influxdata/influxdb/v2/tsdb/migrate/internal" + "time" +) + + +//go:generate protoc --gogo_out=. internal/meta.proto + +// Data represents the top level collection of all metadata. +type Data struct { + Term uint64 // associated raft term + Index uint64 // associated raft index + ClusterID uint64 + Databases []DatabaseInfo + + // adminUserExists provides a constant time mechanism for determining + // if there is at least one admin user. + adminUserExists bool + + MaxShardGroupID uint64 + MaxShardID uint64 +} + +// unmarshal deserializes from a protobuf representation. +func (data *Data) unmarshal(pb *internal.Data) { + data.Databases = make([]DatabaseInfo, len(pb.GetDatabases())) + for i, x := range pb.GetDatabases() { + data.Databases[i].unmarshal(x) + } +} + +// UnmarshalBinary decodes the object from a binary format. +func (data *Data) UnmarshalBinary(buf []byte) error { + var pb internal.Data + if err := proto.Unmarshal(buf, &pb); err != nil { + return err + } + data.unmarshal(&pb) + return nil +} + +// DatabaseInfo represents information about a database in the system. +type DatabaseInfo struct { + Name string + DefaultRetentionPolicy string + RetentionPolicies []RetentionPolicyInfo +} + +// unmarshal deserializes from a protobuf representation. +func (di *DatabaseInfo) unmarshal(pb *internal.DatabaseInfo) { + di.Name = pb.GetName() + di.DefaultRetentionPolicy = pb.GetDefaultRetentionPolicy() + + if len(pb.GetRetentionPolicies()) > 0 { + di.RetentionPolicies = make([]RetentionPolicyInfo, len(pb.GetRetentionPolicies())) + for i, x := range pb.GetRetentionPolicies() { + di.RetentionPolicies[i].unmarshal(x) + } + } +} + +// RetentionPolicyInfo represents metadata about a retention policy. +type RetentionPolicyInfo struct { + Name string + ReplicaN int + Duration time.Duration + ShardGroupDuration time.Duration +} + +// unmarshal deserializes from a protobuf representation. +func (rpi *RetentionPolicyInfo) unmarshal(pb *internal.RetentionPolicyInfo) { + rpi.Name = pb.GetName() + rpi.ReplicaN = int(pb.GetReplicaN()) + rpi.Duration = time.Duration(pb.GetDuration()) + rpi.ShardGroupDuration = time.Duration(pb.GetShardGroupDuration()) +} diff --git a/tsdb/migrate/internal/meta.pb.go b/tsdb/migrate/internal/meta.pb.go new file mode 100644 index 0000000000..41e2c7e9e3 --- /dev/null +++ b/tsdb/migrate/internal/meta.pb.go @@ -0,0 +1,2011 @@ +// Code generated by protoc-gen-gogo. +// source: internal/meta.proto +// DO NOT EDIT! + +/* +Package meta is a generated protocol buffer package. + +It is generated from these files: + internal/meta.proto + +It has these top-level messages: + Data + NodeInfo + DatabaseInfo + RetentionPolicySpec + RetentionPolicyInfo + ShardGroupInfo + ShardInfo + SubscriptionInfo + ShardOwner + ContinuousQueryInfo + UserInfo + UserPrivilege + Command + CreateNodeCommand + DeleteNodeCommand + CreateDatabaseCommand + DropDatabaseCommand + CreateRetentionPolicyCommand + DropRetentionPolicyCommand + SetDefaultRetentionPolicyCommand + UpdateRetentionPolicyCommand + CreateShardGroupCommand + DeleteShardGroupCommand + CreateContinuousQueryCommand + DropContinuousQueryCommand + CreateUserCommand + DropUserCommand + UpdateUserCommand + SetPrivilegeCommand + SetDataCommand + SetAdminPrivilegeCommand + UpdateNodeCommand + CreateSubscriptionCommand + DropSubscriptionCommand + RemovePeerCommand + CreateMetaNodeCommand + CreateDataNodeCommand + UpdateDataNodeCommand + DeleteMetaNodeCommand + DeleteDataNodeCommand + Response + SetMetaNodeCommand + DropShardCommand +*/ +package internal + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Command_Type int32 + +const ( + Command_CreateNodeCommand Command_Type = 1 + Command_DeleteNodeCommand Command_Type = 2 + Command_CreateDatabaseCommand Command_Type = 3 + Command_DropDatabaseCommand Command_Type = 4 + Command_CreateRetentionPolicyCommand Command_Type = 5 + Command_DropRetentionPolicyCommand Command_Type = 6 + Command_SetDefaultRetentionPolicyCommand Command_Type = 7 + Command_UpdateRetentionPolicyCommand Command_Type = 8 + Command_CreateShardGroupCommand Command_Type = 9 + Command_DeleteShardGroupCommand Command_Type = 10 + Command_CreateContinuousQueryCommand Command_Type = 11 + Command_DropContinuousQueryCommand Command_Type = 12 + Command_CreateUserCommand Command_Type = 13 + Command_DropUserCommand Command_Type = 14 + Command_UpdateUserCommand Command_Type = 15 + Command_SetPrivilegeCommand Command_Type = 16 + Command_SetDataCommand Command_Type = 17 + Command_SetAdminPrivilegeCommand Command_Type = 18 + Command_UpdateNodeCommand Command_Type = 19 + Command_CreateSubscriptionCommand Command_Type = 21 + Command_DropSubscriptionCommand Command_Type = 22 + Command_RemovePeerCommand Command_Type = 23 + Command_CreateMetaNodeCommand Command_Type = 24 + Command_CreateDataNodeCommand Command_Type = 25 + Command_UpdateDataNodeCommand Command_Type = 26 + Command_DeleteMetaNodeCommand Command_Type = 27 + Command_DeleteDataNodeCommand Command_Type = 28 + Command_SetMetaNodeCommand Command_Type = 29 + Command_DropShardCommand Command_Type = 30 +) + +var Command_Type_name = map[int32]string{ + 1: "CreateNodeCommand", + 2: "DeleteNodeCommand", + 3: "CreateDatabaseCommand", + 4: "DropDatabaseCommand", + 5: "CreateRetentionPolicyCommand", + 6: "DropRetentionPolicyCommand", + 7: "SetDefaultRetentionPolicyCommand", + 8: "UpdateRetentionPolicyCommand", + 9: "CreateShardGroupCommand", + 10: "DeleteShardGroupCommand", + 11: "CreateContinuousQueryCommand", + 12: "DropContinuousQueryCommand", + 13: "CreateUserCommand", + 14: "DropUserCommand", + 15: "UpdateUserCommand", + 16: "SetPrivilegeCommand", + 17: "SetDataCommand", + 18: "SetAdminPrivilegeCommand", + 19: "UpdateNodeCommand", + 21: "CreateSubscriptionCommand", + 22: "DropSubscriptionCommand", + 23: "RemovePeerCommand", + 24: "CreateMetaNodeCommand", + 25: "CreateDataNodeCommand", + 26: "UpdateDataNodeCommand", + 27: "DeleteMetaNodeCommand", + 28: "DeleteDataNodeCommand", + 29: "SetMetaNodeCommand", + 30: "DropShardCommand", +} +var Command_Type_value = map[string]int32{ + "CreateNodeCommand": 1, + "DeleteNodeCommand": 2, + "CreateDatabaseCommand": 3, + "DropDatabaseCommand": 4, + "CreateRetentionPolicyCommand": 5, + "DropRetentionPolicyCommand": 6, + "SetDefaultRetentionPolicyCommand": 7, + "UpdateRetentionPolicyCommand": 8, + "CreateShardGroupCommand": 9, + "DeleteShardGroupCommand": 10, + "CreateContinuousQueryCommand": 11, + "DropContinuousQueryCommand": 12, + "CreateUserCommand": 13, + "DropUserCommand": 14, + "UpdateUserCommand": 15, + "SetPrivilegeCommand": 16, + "SetDataCommand": 17, + "SetAdminPrivilegeCommand": 18, + "UpdateNodeCommand": 19, + "CreateSubscriptionCommand": 21, + "DropSubscriptionCommand": 22, + "RemovePeerCommand": 23, + "CreateMetaNodeCommand": 24, + "CreateDataNodeCommand": 25, + "UpdateDataNodeCommand": 26, + "DeleteMetaNodeCommand": 27, + "DeleteDataNodeCommand": 28, + "SetMetaNodeCommand": 29, + "DropShardCommand": 30, +} + +func (x Command_Type) Enum() *Command_Type { + p := new(Command_Type) + *p = x + return p +} +func (x Command_Type) String() string { + return proto.EnumName(Command_Type_name, int32(x)) +} +func (x *Command_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Command_Type_value, data, "Command_Type") + if err != nil { + return err + } + *x = Command_Type(value) + return nil +} +func (Command_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMeta, []int{12, 0} } + +type Data struct { + Term *uint64 `protobuf:"varint,1,req,name=Term" json:"Term,omitempty"` + Index *uint64 `protobuf:"varint,2,req,name=Index" json:"Index,omitempty"` + ClusterID *uint64 `protobuf:"varint,3,req,name=ClusterID" json:"ClusterID,omitempty"` + Nodes []*NodeInfo `protobuf:"bytes,4,rep,name=Nodes" json:"Nodes,omitempty"` + Databases []*DatabaseInfo `protobuf:"bytes,5,rep,name=Databases" json:"Databases,omitempty"` + Users []*UserInfo `protobuf:"bytes,6,rep,name=Users" json:"Users,omitempty"` + MaxNodeID *uint64 `protobuf:"varint,7,req,name=MaxNodeID" json:"MaxNodeID,omitempty"` + MaxShardGroupID *uint64 `protobuf:"varint,8,req,name=MaxShardGroupID" json:"MaxShardGroupID,omitempty"` + MaxShardID *uint64 `protobuf:"varint,9,req,name=MaxShardID" json:"MaxShardID,omitempty"` + // added for 0.10.0 + DataNodes []*NodeInfo `protobuf:"bytes,10,rep,name=DataNodes" json:"DataNodes,omitempty"` + MetaNodes []*NodeInfo `protobuf:"bytes,11,rep,name=MetaNodes" json:"MetaNodes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Data) Reset() { *m = Data{} } +func (m *Data) String() string { return proto.CompactTextString(m) } +func (*Data) ProtoMessage() {} +func (*Data) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{0} } + +func (m *Data) GetTerm() uint64 { + if m != nil && m.Term != nil { + return *m.Term + } + return 0 +} + +func (m *Data) GetIndex() uint64 { + if m != nil && m.Index != nil { + return *m.Index + } + return 0 +} + +func (m *Data) GetClusterID() uint64 { + if m != nil && m.ClusterID != nil { + return *m.ClusterID + } + return 0 +} + +func (m *Data) GetNodes() []*NodeInfo { + if m != nil { + return m.Nodes + } + return nil +} + +func (m *Data) GetDatabases() []*DatabaseInfo { + if m != nil { + return m.Databases + } + return nil +} + +func (m *Data) GetUsers() []*UserInfo { + if m != nil { + return m.Users + } + return nil +} + +func (m *Data) GetMaxNodeID() uint64 { + if m != nil && m.MaxNodeID != nil { + return *m.MaxNodeID + } + return 0 +} + +func (m *Data) GetMaxShardGroupID() uint64 { + if m != nil && m.MaxShardGroupID != nil { + return *m.MaxShardGroupID + } + return 0 +} + +func (m *Data) GetMaxShardID() uint64 { + if m != nil && m.MaxShardID != nil { + return *m.MaxShardID + } + return 0 +} + +func (m *Data) GetDataNodes() []*NodeInfo { + if m != nil { + return m.DataNodes + } + return nil +} + +func (m *Data) GetMetaNodes() []*NodeInfo { + if m != nil { + return m.MetaNodes + } + return nil +} + +type NodeInfo struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + Host *string `protobuf:"bytes,2,req,name=Host" json:"Host,omitempty"` + TCPHost *string `protobuf:"bytes,3,opt,name=TCPHost" json:"TCPHost,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NodeInfo) Reset() { *m = NodeInfo{} } +func (m *NodeInfo) String() string { return proto.CompactTextString(m) } +func (*NodeInfo) ProtoMessage() {} +func (*NodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{1} } + +func (m *NodeInfo) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *NodeInfo) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *NodeInfo) GetTCPHost() string { + if m != nil && m.TCPHost != nil { + return *m.TCPHost + } + return "" +} + +type DatabaseInfo struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + DefaultRetentionPolicy *string `protobuf:"bytes,2,req,name=DefaultRetentionPolicy" json:"DefaultRetentionPolicy,omitempty"` + RetentionPolicies []*RetentionPolicyInfo `protobuf:"bytes,3,rep,name=RetentionPolicies" json:"RetentionPolicies,omitempty"` + ContinuousQueries []*ContinuousQueryInfo `protobuf:"bytes,4,rep,name=ContinuousQueries" json:"ContinuousQueries,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DatabaseInfo) Reset() { *m = DatabaseInfo{} } +func (m *DatabaseInfo) String() string { return proto.CompactTextString(m) } +func (*DatabaseInfo) ProtoMessage() {} +func (*DatabaseInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{2} } + +func (m *DatabaseInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DatabaseInfo) GetDefaultRetentionPolicy() string { + if m != nil && m.DefaultRetentionPolicy != nil { + return *m.DefaultRetentionPolicy + } + return "" +} + +func (m *DatabaseInfo) GetRetentionPolicies() []*RetentionPolicyInfo { + if m != nil { + return m.RetentionPolicies + } + return nil +} + +func (m *DatabaseInfo) GetContinuousQueries() []*ContinuousQueryInfo { + if m != nil { + return m.ContinuousQueries + } + return nil +} + +type RetentionPolicySpec struct { + Name *string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` + Duration *int64 `protobuf:"varint,2,opt,name=Duration" json:"Duration,omitempty"` + ShardGroupDuration *int64 `protobuf:"varint,3,opt,name=ShardGroupDuration" json:"ShardGroupDuration,omitempty"` + ReplicaN *uint32 `protobuf:"varint,4,opt,name=ReplicaN" json:"ReplicaN,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RetentionPolicySpec) Reset() { *m = RetentionPolicySpec{} } +func (m *RetentionPolicySpec) String() string { return proto.CompactTextString(m) } +func (*RetentionPolicySpec) ProtoMessage() {} +func (*RetentionPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{3} } + +func (m *RetentionPolicySpec) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *RetentionPolicySpec) GetDuration() int64 { + if m != nil && m.Duration != nil { + return *m.Duration + } + return 0 +} + +func (m *RetentionPolicySpec) GetShardGroupDuration() int64 { + if m != nil && m.ShardGroupDuration != nil { + return *m.ShardGroupDuration + } + return 0 +} + +func (m *RetentionPolicySpec) GetReplicaN() uint32 { + if m != nil && m.ReplicaN != nil { + return *m.ReplicaN + } + return 0 +} + +type RetentionPolicyInfo struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Duration *int64 `protobuf:"varint,2,req,name=Duration" json:"Duration,omitempty"` + ShardGroupDuration *int64 `protobuf:"varint,3,req,name=ShardGroupDuration" json:"ShardGroupDuration,omitempty"` + ReplicaN *uint32 `protobuf:"varint,4,req,name=ReplicaN" json:"ReplicaN,omitempty"` + ShardGroups []*ShardGroupInfo `protobuf:"bytes,5,rep,name=ShardGroups" json:"ShardGroups,omitempty"` + Subscriptions []*SubscriptionInfo `protobuf:"bytes,6,rep,name=Subscriptions" json:"Subscriptions,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RetentionPolicyInfo) Reset() { *m = RetentionPolicyInfo{} } +func (m *RetentionPolicyInfo) String() string { return proto.CompactTextString(m) } +func (*RetentionPolicyInfo) ProtoMessage() {} +func (*RetentionPolicyInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{4} } + +func (m *RetentionPolicyInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *RetentionPolicyInfo) GetDuration() int64 { + if m != nil && m.Duration != nil { + return *m.Duration + } + return 0 +} + +func (m *RetentionPolicyInfo) GetShardGroupDuration() int64 { + if m != nil && m.ShardGroupDuration != nil { + return *m.ShardGroupDuration + } + return 0 +} + +func (m *RetentionPolicyInfo) GetReplicaN() uint32 { + if m != nil && m.ReplicaN != nil { + return *m.ReplicaN + } + return 0 +} + +func (m *RetentionPolicyInfo) GetShardGroups() []*ShardGroupInfo { + if m != nil { + return m.ShardGroups + } + return nil +} + +func (m *RetentionPolicyInfo) GetSubscriptions() []*SubscriptionInfo { + if m != nil { + return m.Subscriptions + } + return nil +} + +type ShardGroupInfo struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + StartTime *int64 `protobuf:"varint,2,req,name=StartTime" json:"StartTime,omitempty"` + EndTime *int64 `protobuf:"varint,3,req,name=EndTime" json:"EndTime,omitempty"` + DeletedAt *int64 `protobuf:"varint,4,req,name=DeletedAt" json:"DeletedAt,omitempty"` + Shards []*ShardInfo `protobuf:"bytes,5,rep,name=Shards" json:"Shards,omitempty"` + TruncatedAt *int64 `protobuf:"varint,6,opt,name=TruncatedAt" json:"TruncatedAt,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ShardGroupInfo) Reset() { *m = ShardGroupInfo{} } +func (m *ShardGroupInfo) String() string { return proto.CompactTextString(m) } +func (*ShardGroupInfo) ProtoMessage() {} +func (*ShardGroupInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{5} } + +func (m *ShardGroupInfo) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *ShardGroupInfo) GetStartTime() int64 { + if m != nil && m.StartTime != nil { + return *m.StartTime + } + return 0 +} + +func (m *ShardGroupInfo) GetEndTime() int64 { + if m != nil && m.EndTime != nil { + return *m.EndTime + } + return 0 +} + +func (m *ShardGroupInfo) GetDeletedAt() int64 { + if m != nil && m.DeletedAt != nil { + return *m.DeletedAt + } + return 0 +} + +func (m *ShardGroupInfo) GetShards() []*ShardInfo { + if m != nil { + return m.Shards + } + return nil +} + +func (m *ShardGroupInfo) GetTruncatedAt() int64 { + if m != nil && m.TruncatedAt != nil { + return *m.TruncatedAt + } + return 0 +} + +type ShardInfo struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + OwnerIDs []uint64 `protobuf:"varint,2,rep,name=OwnerIDs" json:"OwnerIDs,omitempty"` + Owners []*ShardOwner `protobuf:"bytes,3,rep,name=Owners" json:"Owners,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ShardInfo) Reset() { *m = ShardInfo{} } +func (m *ShardInfo) String() string { return proto.CompactTextString(m) } +func (*ShardInfo) ProtoMessage() {} +func (*ShardInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{6} } + +func (m *ShardInfo) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *ShardInfo) GetOwnerIDs() []uint64 { + if m != nil { + return m.OwnerIDs + } + return nil +} + +func (m *ShardInfo) GetOwners() []*ShardOwner { + if m != nil { + return m.Owners + } + return nil +} + +type SubscriptionInfo struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Mode *string `protobuf:"bytes,2,req,name=Mode" json:"Mode,omitempty"` + Destinations []string `protobuf:"bytes,3,rep,name=Destinations" json:"Destinations,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SubscriptionInfo) Reset() { *m = SubscriptionInfo{} } +func (m *SubscriptionInfo) String() string { return proto.CompactTextString(m) } +func (*SubscriptionInfo) ProtoMessage() {} +func (*SubscriptionInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{7} } + +func (m *SubscriptionInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *SubscriptionInfo) GetMode() string { + if m != nil && m.Mode != nil { + return *m.Mode + } + return "" +} + +func (m *SubscriptionInfo) GetDestinations() []string { + if m != nil { + return m.Destinations + } + return nil +} + +type ShardOwner struct { + NodeID *uint64 `protobuf:"varint,1,req,name=NodeID" json:"NodeID,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ShardOwner) Reset() { *m = ShardOwner{} } +func (m *ShardOwner) String() string { return proto.CompactTextString(m) } +func (*ShardOwner) ProtoMessage() {} +func (*ShardOwner) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{8} } + +func (m *ShardOwner) GetNodeID() uint64 { + if m != nil && m.NodeID != nil { + return *m.NodeID + } + return 0 +} + +type ContinuousQueryInfo struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Query *string `protobuf:"bytes,2,req,name=Query" json:"Query,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ContinuousQueryInfo) Reset() { *m = ContinuousQueryInfo{} } +func (m *ContinuousQueryInfo) String() string { return proto.CompactTextString(m) } +func (*ContinuousQueryInfo) ProtoMessage() {} +func (*ContinuousQueryInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{9} } + +func (m *ContinuousQueryInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *ContinuousQueryInfo) GetQuery() string { + if m != nil && m.Query != nil { + return *m.Query + } + return "" +} + +type UserInfo struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Hash *string `protobuf:"bytes,2,req,name=Hash" json:"Hash,omitempty"` + Admin *bool `protobuf:"varint,3,req,name=Admin" json:"Admin,omitempty"` + Privileges []*UserPrivilege `protobuf:"bytes,4,rep,name=Privileges" json:"Privileges,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UserInfo) Reset() { *m = UserInfo{} } +func (m *UserInfo) String() string { return proto.CompactTextString(m) } +func (*UserInfo) ProtoMessage() {} +func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{10} } + +func (m *UserInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *UserInfo) GetHash() string { + if m != nil && m.Hash != nil { + return *m.Hash + } + return "" +} + +func (m *UserInfo) GetAdmin() bool { + if m != nil && m.Admin != nil { + return *m.Admin + } + return false +} + +func (m *UserInfo) GetPrivileges() []*UserPrivilege { + if m != nil { + return m.Privileges + } + return nil +} + +type UserPrivilege struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Privilege *int32 `protobuf:"varint,2,req,name=Privilege" json:"Privilege,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UserPrivilege) Reset() { *m = UserPrivilege{} } +func (m *UserPrivilege) String() string { return proto.CompactTextString(m) } +func (*UserPrivilege) ProtoMessage() {} +func (*UserPrivilege) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{11} } + +func (m *UserPrivilege) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *UserPrivilege) GetPrivilege() int32 { + if m != nil && m.Privilege != nil { + return *m.Privilege + } + return 0 +} + +type Command struct { + Type *Command_Type `protobuf:"varint,1,req,name=type,enum=meta.Command_Type" json:"type,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Command) Reset() { *m = Command{} } +func (m *Command) String() string { return proto.CompactTextString(m) } +func (*Command) ProtoMessage() {} +func (*Command) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{12} } + +var extRange_Command = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Command) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Command +} + +func (m *Command) GetType() Command_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Command_CreateNodeCommand +} + +// This isn't used in >= 0.10.0. Kept around for upgrade purposes. Instead +// look at CreateDataNodeCommand and CreateMetaNodeCommand +type CreateNodeCommand struct { + Host *string `protobuf:"bytes,1,req,name=Host" json:"Host,omitempty"` + Rand *uint64 `protobuf:"varint,2,req,name=Rand" json:"Rand,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateNodeCommand) Reset() { *m = CreateNodeCommand{} } +func (m *CreateNodeCommand) String() string { return proto.CompactTextString(m) } +func (*CreateNodeCommand) ProtoMessage() {} +func (*CreateNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{13} } + +func (m *CreateNodeCommand) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *CreateNodeCommand) GetRand() uint64 { + if m != nil && m.Rand != nil { + return *m.Rand + } + return 0 +} + +var E_CreateNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateNodeCommand)(nil), + Field: 101, + Name: "meta.CreateNodeCommand.command", + Tag: "bytes,101,opt,name=command", + Filename: "internal/meta.proto", +} + +type DeleteNodeCommand struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + Force *bool `protobuf:"varint,2,req,name=Force" json:"Force,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteNodeCommand) Reset() { *m = DeleteNodeCommand{} } +func (m *DeleteNodeCommand) String() string { return proto.CompactTextString(m) } +func (*DeleteNodeCommand) ProtoMessage() {} +func (*DeleteNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{14} } + +func (m *DeleteNodeCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *DeleteNodeCommand) GetForce() bool { + if m != nil && m.Force != nil { + return *m.Force + } + return false +} + +var E_DeleteNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DeleteNodeCommand)(nil), + Field: 102, + Name: "meta.DeleteNodeCommand.command", + Tag: "bytes,102,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateDatabaseCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + RetentionPolicy *RetentionPolicyInfo `protobuf:"bytes,2,opt,name=RetentionPolicy" json:"RetentionPolicy,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateDatabaseCommand) Reset() { *m = CreateDatabaseCommand{} } +func (m *CreateDatabaseCommand) String() string { return proto.CompactTextString(m) } +func (*CreateDatabaseCommand) ProtoMessage() {} +func (*CreateDatabaseCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{15} } + +func (m *CreateDatabaseCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CreateDatabaseCommand) GetRetentionPolicy() *RetentionPolicyInfo { + if m != nil { + return m.RetentionPolicy + } + return nil +} + +var E_CreateDatabaseCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateDatabaseCommand)(nil), + Field: 103, + Name: "meta.CreateDatabaseCommand.command", + Tag: "bytes,103,opt,name=command", + Filename: "internal/meta.proto", +} + +type DropDatabaseCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DropDatabaseCommand) Reset() { *m = DropDatabaseCommand{} } +func (m *DropDatabaseCommand) String() string { return proto.CompactTextString(m) } +func (*DropDatabaseCommand) ProtoMessage() {} +func (*DropDatabaseCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{16} } + +func (m *DropDatabaseCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +var E_DropDatabaseCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DropDatabaseCommand)(nil), + Field: 104, + Name: "meta.DropDatabaseCommand.command", + Tag: "bytes,104,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateRetentionPolicyCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + RetentionPolicy *RetentionPolicyInfo `protobuf:"bytes,2,req,name=RetentionPolicy" json:"RetentionPolicy,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateRetentionPolicyCommand) Reset() { *m = CreateRetentionPolicyCommand{} } +func (m *CreateRetentionPolicyCommand) String() string { return proto.CompactTextString(m) } +func (*CreateRetentionPolicyCommand) ProtoMessage() {} +func (*CreateRetentionPolicyCommand) Descriptor() ([]byte, []int) { + return fileDescriptorMeta, []int{17} +} + +func (m *CreateRetentionPolicyCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *CreateRetentionPolicyCommand) GetRetentionPolicy() *RetentionPolicyInfo { + if m != nil { + return m.RetentionPolicy + } + return nil +} + +var E_CreateRetentionPolicyCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateRetentionPolicyCommand)(nil), + Field: 105, + Name: "meta.CreateRetentionPolicyCommand.command", + Tag: "bytes,105,opt,name=command", + Filename: "internal/meta.proto", +} + +type DropRetentionPolicyCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Name *string `protobuf:"bytes,2,req,name=Name" json:"Name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DropRetentionPolicyCommand) Reset() { *m = DropRetentionPolicyCommand{} } +func (m *DropRetentionPolicyCommand) String() string { return proto.CompactTextString(m) } +func (*DropRetentionPolicyCommand) ProtoMessage() {} +func (*DropRetentionPolicyCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{18} } + +func (m *DropRetentionPolicyCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *DropRetentionPolicyCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +var E_DropRetentionPolicyCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DropRetentionPolicyCommand)(nil), + Field: 106, + Name: "meta.DropRetentionPolicyCommand.command", + Tag: "bytes,106,opt,name=command", + Filename: "internal/meta.proto", +} + +type SetDefaultRetentionPolicyCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Name *string `protobuf:"bytes,2,req,name=Name" json:"Name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetDefaultRetentionPolicyCommand) Reset() { *m = SetDefaultRetentionPolicyCommand{} } +func (m *SetDefaultRetentionPolicyCommand) String() string { return proto.CompactTextString(m) } +func (*SetDefaultRetentionPolicyCommand) ProtoMessage() {} +func (*SetDefaultRetentionPolicyCommand) Descriptor() ([]byte, []int) { + return fileDescriptorMeta, []int{19} +} + +func (m *SetDefaultRetentionPolicyCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *SetDefaultRetentionPolicyCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +var E_SetDefaultRetentionPolicyCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*SetDefaultRetentionPolicyCommand)(nil), + Field: 107, + Name: "meta.SetDefaultRetentionPolicyCommand.command", + Tag: "bytes,107,opt,name=command", + Filename: "internal/meta.proto", +} + +type UpdateRetentionPolicyCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Name *string `protobuf:"bytes,2,req,name=Name" json:"Name,omitempty"` + NewName *string `protobuf:"bytes,3,opt,name=NewName" json:"NewName,omitempty"` + Duration *int64 `protobuf:"varint,4,opt,name=Duration" json:"Duration,omitempty"` + ReplicaN *uint32 `protobuf:"varint,5,opt,name=ReplicaN" json:"ReplicaN,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateRetentionPolicyCommand) Reset() { *m = UpdateRetentionPolicyCommand{} } +func (m *UpdateRetentionPolicyCommand) String() string { return proto.CompactTextString(m) } +func (*UpdateRetentionPolicyCommand) ProtoMessage() {} +func (*UpdateRetentionPolicyCommand) Descriptor() ([]byte, []int) { + return fileDescriptorMeta, []int{20} +} + +func (m *UpdateRetentionPolicyCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *UpdateRetentionPolicyCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *UpdateRetentionPolicyCommand) GetNewName() string { + if m != nil && m.NewName != nil { + return *m.NewName + } + return "" +} + +func (m *UpdateRetentionPolicyCommand) GetDuration() int64 { + if m != nil && m.Duration != nil { + return *m.Duration + } + return 0 +} + +func (m *UpdateRetentionPolicyCommand) GetReplicaN() uint32 { + if m != nil && m.ReplicaN != nil { + return *m.ReplicaN + } + return 0 +} + +var E_UpdateRetentionPolicyCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*UpdateRetentionPolicyCommand)(nil), + Field: 108, + Name: "meta.UpdateRetentionPolicyCommand.command", + Tag: "bytes,108,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateShardGroupCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Policy *string `protobuf:"bytes,2,req,name=Policy" json:"Policy,omitempty"` + Timestamp *int64 `protobuf:"varint,3,req,name=Timestamp" json:"Timestamp,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateShardGroupCommand) Reset() { *m = CreateShardGroupCommand{} } +func (m *CreateShardGroupCommand) String() string { return proto.CompactTextString(m) } +func (*CreateShardGroupCommand) ProtoMessage() {} +func (*CreateShardGroupCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{21} } + +func (m *CreateShardGroupCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *CreateShardGroupCommand) GetPolicy() string { + if m != nil && m.Policy != nil { + return *m.Policy + } + return "" +} + +func (m *CreateShardGroupCommand) GetTimestamp() int64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +var E_CreateShardGroupCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateShardGroupCommand)(nil), + Field: 109, + Name: "meta.CreateShardGroupCommand.command", + Tag: "bytes,109,opt,name=command", + Filename: "internal/meta.proto", +} + +type DeleteShardGroupCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Policy *string `protobuf:"bytes,2,req,name=Policy" json:"Policy,omitempty"` + ShardGroupID *uint64 `protobuf:"varint,3,req,name=ShardGroupID" json:"ShardGroupID,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteShardGroupCommand) Reset() { *m = DeleteShardGroupCommand{} } +func (m *DeleteShardGroupCommand) String() string { return proto.CompactTextString(m) } +func (*DeleteShardGroupCommand) ProtoMessage() {} +func (*DeleteShardGroupCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{22} } + +func (m *DeleteShardGroupCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *DeleteShardGroupCommand) GetPolicy() string { + if m != nil && m.Policy != nil { + return *m.Policy + } + return "" +} + +func (m *DeleteShardGroupCommand) GetShardGroupID() uint64 { + if m != nil && m.ShardGroupID != nil { + return *m.ShardGroupID + } + return 0 +} + +var E_DeleteShardGroupCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DeleteShardGroupCommand)(nil), + Field: 110, + Name: "meta.DeleteShardGroupCommand.command", + Tag: "bytes,110,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateContinuousQueryCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Name *string `protobuf:"bytes,2,req,name=Name" json:"Name,omitempty"` + Query *string `protobuf:"bytes,3,req,name=Query" json:"Query,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateContinuousQueryCommand) Reset() { *m = CreateContinuousQueryCommand{} } +func (m *CreateContinuousQueryCommand) String() string { return proto.CompactTextString(m) } +func (*CreateContinuousQueryCommand) ProtoMessage() {} +func (*CreateContinuousQueryCommand) Descriptor() ([]byte, []int) { + return fileDescriptorMeta, []int{23} +} + +func (m *CreateContinuousQueryCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *CreateContinuousQueryCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CreateContinuousQueryCommand) GetQuery() string { + if m != nil && m.Query != nil { + return *m.Query + } + return "" +} + +var E_CreateContinuousQueryCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateContinuousQueryCommand)(nil), + Field: 111, + Name: "meta.CreateContinuousQueryCommand.command", + Tag: "bytes,111,opt,name=command", + Filename: "internal/meta.proto", +} + +type DropContinuousQueryCommand struct { + Database *string `protobuf:"bytes,1,req,name=Database" json:"Database,omitempty"` + Name *string `protobuf:"bytes,2,req,name=Name" json:"Name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DropContinuousQueryCommand) Reset() { *m = DropContinuousQueryCommand{} } +func (m *DropContinuousQueryCommand) String() string { return proto.CompactTextString(m) } +func (*DropContinuousQueryCommand) ProtoMessage() {} +func (*DropContinuousQueryCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{24} } + +func (m *DropContinuousQueryCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *DropContinuousQueryCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +var E_DropContinuousQueryCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DropContinuousQueryCommand)(nil), + Field: 112, + Name: "meta.DropContinuousQueryCommand.command", + Tag: "bytes,112,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateUserCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Hash *string `protobuf:"bytes,2,req,name=Hash" json:"Hash,omitempty"` + Admin *bool `protobuf:"varint,3,req,name=Admin" json:"Admin,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateUserCommand) Reset() { *m = CreateUserCommand{} } +func (m *CreateUserCommand) String() string { return proto.CompactTextString(m) } +func (*CreateUserCommand) ProtoMessage() {} +func (*CreateUserCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{25} } + +func (m *CreateUserCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CreateUserCommand) GetHash() string { + if m != nil && m.Hash != nil { + return *m.Hash + } + return "" +} + +func (m *CreateUserCommand) GetAdmin() bool { + if m != nil && m.Admin != nil { + return *m.Admin + } + return false +} + +var E_CreateUserCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateUserCommand)(nil), + Field: 113, + Name: "meta.CreateUserCommand.command", + Tag: "bytes,113,opt,name=command", + Filename: "internal/meta.proto", +} + +type DropUserCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DropUserCommand) Reset() { *m = DropUserCommand{} } +func (m *DropUserCommand) String() string { return proto.CompactTextString(m) } +func (*DropUserCommand) ProtoMessage() {} +func (*DropUserCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{26} } + +func (m *DropUserCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +var E_DropUserCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DropUserCommand)(nil), + Field: 114, + Name: "meta.DropUserCommand.command", + Tag: "bytes,114,opt,name=command", + Filename: "internal/meta.proto", +} + +type UpdateUserCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Hash *string `protobuf:"bytes,2,req,name=Hash" json:"Hash,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateUserCommand) Reset() { *m = UpdateUserCommand{} } +func (m *UpdateUserCommand) String() string { return proto.CompactTextString(m) } +func (*UpdateUserCommand) ProtoMessage() {} +func (*UpdateUserCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{27} } + +func (m *UpdateUserCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *UpdateUserCommand) GetHash() string { + if m != nil && m.Hash != nil { + return *m.Hash + } + return "" +} + +var E_UpdateUserCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*UpdateUserCommand)(nil), + Field: 115, + Name: "meta.UpdateUserCommand.command", + Tag: "bytes,115,opt,name=command", + Filename: "internal/meta.proto", +} + +type SetPrivilegeCommand struct { + Username *string `protobuf:"bytes,1,req,name=Username" json:"Username,omitempty"` + Database *string `protobuf:"bytes,2,req,name=Database" json:"Database,omitempty"` + Privilege *int32 `protobuf:"varint,3,req,name=Privilege" json:"Privilege,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetPrivilegeCommand) Reset() { *m = SetPrivilegeCommand{} } +func (m *SetPrivilegeCommand) String() string { return proto.CompactTextString(m) } +func (*SetPrivilegeCommand) ProtoMessage() {} +func (*SetPrivilegeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{28} } + +func (m *SetPrivilegeCommand) GetUsername() string { + if m != nil && m.Username != nil { + return *m.Username + } + return "" +} + +func (m *SetPrivilegeCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *SetPrivilegeCommand) GetPrivilege() int32 { + if m != nil && m.Privilege != nil { + return *m.Privilege + } + return 0 +} + +var E_SetPrivilegeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*SetPrivilegeCommand)(nil), + Field: 116, + Name: "meta.SetPrivilegeCommand.command", + Tag: "bytes,116,opt,name=command", + Filename: "internal/meta.proto", +} + +type SetDataCommand struct { + Data *Data `protobuf:"bytes,1,req,name=Data" json:"Data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetDataCommand) Reset() { *m = SetDataCommand{} } +func (m *SetDataCommand) String() string { return proto.CompactTextString(m) } +func (*SetDataCommand) ProtoMessage() {} +func (*SetDataCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{29} } + +func (m *SetDataCommand) GetData() *Data { + if m != nil { + return m.Data + } + return nil +} + +var E_SetDataCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*SetDataCommand)(nil), + Field: 117, + Name: "meta.SetDataCommand.command", + Tag: "bytes,117,opt,name=command", + Filename: "internal/meta.proto", +} + +type SetAdminPrivilegeCommand struct { + Username *string `protobuf:"bytes,1,req,name=Username" json:"Username,omitempty"` + Admin *bool `protobuf:"varint,2,req,name=Admin" json:"Admin,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetAdminPrivilegeCommand) Reset() { *m = SetAdminPrivilegeCommand{} } +func (m *SetAdminPrivilegeCommand) String() string { return proto.CompactTextString(m) } +func (*SetAdminPrivilegeCommand) ProtoMessage() {} +func (*SetAdminPrivilegeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{30} } + +func (m *SetAdminPrivilegeCommand) GetUsername() string { + if m != nil && m.Username != nil { + return *m.Username + } + return "" +} + +func (m *SetAdminPrivilegeCommand) GetAdmin() bool { + if m != nil && m.Admin != nil { + return *m.Admin + } + return false +} + +var E_SetAdminPrivilegeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*SetAdminPrivilegeCommand)(nil), + Field: 118, + Name: "meta.SetAdminPrivilegeCommand.command", + Tag: "bytes,118,opt,name=command", + Filename: "internal/meta.proto", +} + +type UpdateNodeCommand struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + Host *string `protobuf:"bytes,2,req,name=Host" json:"Host,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateNodeCommand) Reset() { *m = UpdateNodeCommand{} } +func (m *UpdateNodeCommand) String() string { return proto.CompactTextString(m) } +func (*UpdateNodeCommand) ProtoMessage() {} +func (*UpdateNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{31} } + +func (m *UpdateNodeCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *UpdateNodeCommand) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +var E_UpdateNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*UpdateNodeCommand)(nil), + Field: 119, + Name: "meta.UpdateNodeCommand.command", + Tag: "bytes,119,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateSubscriptionCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Database *string `protobuf:"bytes,2,req,name=Database" json:"Database,omitempty"` + RetentionPolicy *string `protobuf:"bytes,3,req,name=RetentionPolicy" json:"RetentionPolicy,omitempty"` + Mode *string `protobuf:"bytes,4,req,name=Mode" json:"Mode,omitempty"` + Destinations []string `protobuf:"bytes,5,rep,name=Destinations" json:"Destinations,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateSubscriptionCommand) Reset() { *m = CreateSubscriptionCommand{} } +func (m *CreateSubscriptionCommand) String() string { return proto.CompactTextString(m) } +func (*CreateSubscriptionCommand) ProtoMessage() {} +func (*CreateSubscriptionCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{32} } + +func (m *CreateSubscriptionCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CreateSubscriptionCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *CreateSubscriptionCommand) GetRetentionPolicy() string { + if m != nil && m.RetentionPolicy != nil { + return *m.RetentionPolicy + } + return "" +} + +func (m *CreateSubscriptionCommand) GetMode() string { + if m != nil && m.Mode != nil { + return *m.Mode + } + return "" +} + +func (m *CreateSubscriptionCommand) GetDestinations() []string { + if m != nil { + return m.Destinations + } + return nil +} + +var E_CreateSubscriptionCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateSubscriptionCommand)(nil), + Field: 121, + Name: "meta.CreateSubscriptionCommand.command", + Tag: "bytes,121,opt,name=command", + Filename: "internal/meta.proto", +} + +type DropSubscriptionCommand struct { + Name *string `protobuf:"bytes,1,req,name=Name" json:"Name,omitempty"` + Database *string `protobuf:"bytes,2,req,name=Database" json:"Database,omitempty"` + RetentionPolicy *string `protobuf:"bytes,3,req,name=RetentionPolicy" json:"RetentionPolicy,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DropSubscriptionCommand) Reset() { *m = DropSubscriptionCommand{} } +func (m *DropSubscriptionCommand) String() string { return proto.CompactTextString(m) } +func (*DropSubscriptionCommand) ProtoMessage() {} +func (*DropSubscriptionCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{33} } + +func (m *DropSubscriptionCommand) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DropSubscriptionCommand) GetDatabase() string { + if m != nil && m.Database != nil { + return *m.Database + } + return "" +} + +func (m *DropSubscriptionCommand) GetRetentionPolicy() string { + if m != nil && m.RetentionPolicy != nil { + return *m.RetentionPolicy + } + return "" +} + +var E_DropSubscriptionCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DropSubscriptionCommand)(nil), + Field: 122, + Name: "meta.DropSubscriptionCommand.command", + Tag: "bytes,122,opt,name=command", + Filename: "internal/meta.proto", +} + +type RemovePeerCommand struct { + ID *uint64 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` + Addr *string `protobuf:"bytes,2,req,name=Addr" json:"Addr,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RemovePeerCommand) Reset() { *m = RemovePeerCommand{} } +func (m *RemovePeerCommand) String() string { return proto.CompactTextString(m) } +func (*RemovePeerCommand) ProtoMessage() {} +func (*RemovePeerCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{34} } + +func (m *RemovePeerCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *RemovePeerCommand) GetAddr() string { + if m != nil && m.Addr != nil { + return *m.Addr + } + return "" +} + +var E_RemovePeerCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*RemovePeerCommand)(nil), + Field: 123, + Name: "meta.RemovePeerCommand.command", + Tag: "bytes,123,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateMetaNodeCommand struct { + HTTPAddr *string `protobuf:"bytes,1,req,name=HTTPAddr" json:"HTTPAddr,omitempty"` + TCPAddr *string `protobuf:"bytes,2,req,name=TCPAddr" json:"TCPAddr,omitempty"` + Rand *uint64 `protobuf:"varint,3,req,name=Rand" json:"Rand,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateMetaNodeCommand) Reset() { *m = CreateMetaNodeCommand{} } +func (m *CreateMetaNodeCommand) String() string { return proto.CompactTextString(m) } +func (*CreateMetaNodeCommand) ProtoMessage() {} +func (*CreateMetaNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{35} } + +func (m *CreateMetaNodeCommand) GetHTTPAddr() string { + if m != nil && m.HTTPAddr != nil { + return *m.HTTPAddr + } + return "" +} + +func (m *CreateMetaNodeCommand) GetTCPAddr() string { + if m != nil && m.TCPAddr != nil { + return *m.TCPAddr + } + return "" +} + +func (m *CreateMetaNodeCommand) GetRand() uint64 { + if m != nil && m.Rand != nil { + return *m.Rand + } + return 0 +} + +var E_CreateMetaNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateMetaNodeCommand)(nil), + Field: 124, + Name: "meta.CreateMetaNodeCommand.command", + Tag: "bytes,124,opt,name=command", + Filename: "internal/meta.proto", +} + +type CreateDataNodeCommand struct { + HTTPAddr *string `protobuf:"bytes,1,req,name=HTTPAddr" json:"HTTPAddr,omitempty"` + TCPAddr *string `protobuf:"bytes,2,req,name=TCPAddr" json:"TCPAddr,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateDataNodeCommand) Reset() { *m = CreateDataNodeCommand{} } +func (m *CreateDataNodeCommand) String() string { return proto.CompactTextString(m) } +func (*CreateDataNodeCommand) ProtoMessage() {} +func (*CreateDataNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{36} } + +func (m *CreateDataNodeCommand) GetHTTPAddr() string { + if m != nil && m.HTTPAddr != nil { + return *m.HTTPAddr + } + return "" +} + +func (m *CreateDataNodeCommand) GetTCPAddr() string { + if m != nil && m.TCPAddr != nil { + return *m.TCPAddr + } + return "" +} + +var E_CreateDataNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*CreateDataNodeCommand)(nil), + Field: 125, + Name: "meta.CreateDataNodeCommand.command", + Tag: "bytes,125,opt,name=command", + Filename: "internal/meta.proto", +} + +type UpdateDataNodeCommand struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + Host *string `protobuf:"bytes,2,req,name=Host" json:"Host,omitempty"` + TCPHost *string `protobuf:"bytes,3,req,name=TCPHost" json:"TCPHost,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateDataNodeCommand) Reset() { *m = UpdateDataNodeCommand{} } +func (m *UpdateDataNodeCommand) String() string { return proto.CompactTextString(m) } +func (*UpdateDataNodeCommand) ProtoMessage() {} +func (*UpdateDataNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{37} } + +func (m *UpdateDataNodeCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +func (m *UpdateDataNodeCommand) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *UpdateDataNodeCommand) GetTCPHost() string { + if m != nil && m.TCPHost != nil { + return *m.TCPHost + } + return "" +} + +var E_UpdateDataNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*UpdateDataNodeCommand)(nil), + Field: 126, + Name: "meta.UpdateDataNodeCommand.command", + Tag: "bytes,126,opt,name=command", + Filename: "internal/meta.proto", +} + +type DeleteMetaNodeCommand struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteMetaNodeCommand) Reset() { *m = DeleteMetaNodeCommand{} } +func (m *DeleteMetaNodeCommand) String() string { return proto.CompactTextString(m) } +func (*DeleteMetaNodeCommand) ProtoMessage() {} +func (*DeleteMetaNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{38} } + +func (m *DeleteMetaNodeCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +var E_DeleteMetaNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DeleteMetaNodeCommand)(nil), + Field: 127, + Name: "meta.DeleteMetaNodeCommand.command", + Tag: "bytes,127,opt,name=command", + Filename: "internal/meta.proto", +} + +type DeleteDataNodeCommand struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteDataNodeCommand) Reset() { *m = DeleteDataNodeCommand{} } +func (m *DeleteDataNodeCommand) String() string { return proto.CompactTextString(m) } +func (*DeleteDataNodeCommand) ProtoMessage() {} +func (*DeleteDataNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{39} } + +func (m *DeleteDataNodeCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +var E_DeleteDataNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DeleteDataNodeCommand)(nil), + Field: 128, + Name: "meta.DeleteDataNodeCommand.command", + Tag: "bytes,128,opt,name=command", + Filename: "internal/meta.proto", +} + +type Response struct { + OK *bool `protobuf:"varint,1,req,name=OK" json:"OK,omitempty"` + Error *string `protobuf:"bytes,2,opt,name=Error" json:"Error,omitempty"` + Index *uint64 `protobuf:"varint,3,opt,name=Index" json:"Index,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{40} } + +func (m *Response) GetOK() bool { + if m != nil && m.OK != nil { + return *m.OK + } + return false +} + +func (m *Response) GetError() string { + if m != nil && m.Error != nil { + return *m.Error + } + return "" +} + +func (m *Response) GetIndex() uint64 { + if m != nil && m.Index != nil { + return *m.Index + } + return 0 +} + +// SetMetaNodeCommand is for the initial metanode in a cluster or +// if the single host restarts and its hostname changes, this will update it +type SetMetaNodeCommand struct { + HTTPAddr *string `protobuf:"bytes,1,req,name=HTTPAddr" json:"HTTPAddr,omitempty"` + TCPAddr *string `protobuf:"bytes,2,req,name=TCPAddr" json:"TCPAddr,omitempty"` + Rand *uint64 `protobuf:"varint,3,req,name=Rand" json:"Rand,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetMetaNodeCommand) Reset() { *m = SetMetaNodeCommand{} } +func (m *SetMetaNodeCommand) String() string { return proto.CompactTextString(m) } +func (*SetMetaNodeCommand) ProtoMessage() {} +func (*SetMetaNodeCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{41} } + +func (m *SetMetaNodeCommand) GetHTTPAddr() string { + if m != nil && m.HTTPAddr != nil { + return *m.HTTPAddr + } + return "" +} + +func (m *SetMetaNodeCommand) GetTCPAddr() string { + if m != nil && m.TCPAddr != nil { + return *m.TCPAddr + } + return "" +} + +func (m *SetMetaNodeCommand) GetRand() uint64 { + if m != nil && m.Rand != nil { + return *m.Rand + } + return 0 +} + +var E_SetMetaNodeCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*SetMetaNodeCommand)(nil), + Field: 129, + Name: "meta.SetMetaNodeCommand.command", + Tag: "bytes,129,opt,name=command", + Filename: "internal/meta.proto", +} + +type DropShardCommand struct { + ID *uint64 `protobuf:"varint,1,req,name=ID" json:"ID,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DropShardCommand) Reset() { *m = DropShardCommand{} } +func (m *DropShardCommand) String() string { return proto.CompactTextString(m) } +func (*DropShardCommand) ProtoMessage() {} +func (*DropShardCommand) Descriptor() ([]byte, []int) { return fileDescriptorMeta, []int{42} } + +func (m *DropShardCommand) GetID() uint64 { + if m != nil && m.ID != nil { + return *m.ID + } + return 0 +} + +var E_DropShardCommand_Command = &proto.ExtensionDesc{ + ExtendedType: (*Command)(nil), + ExtensionType: (*DropShardCommand)(nil), + Field: 130, + Name: "meta.DropShardCommand.command", + Tag: "bytes,130,opt,name=command", + Filename: "internal/meta.proto", +} + +func init() { + proto.RegisterType((*Data)(nil), "meta.Data") + proto.RegisterType((*NodeInfo)(nil), "meta.NodeInfo") + proto.RegisterType((*DatabaseInfo)(nil), "meta.DatabaseInfo") + proto.RegisterType((*RetentionPolicySpec)(nil), "meta.RetentionPolicySpec") + proto.RegisterType((*RetentionPolicyInfo)(nil), "meta.RetentionPolicyInfo") + proto.RegisterType((*ShardGroupInfo)(nil), "meta.ShardGroupInfo") + proto.RegisterType((*ShardInfo)(nil), "meta.ShardInfo") + proto.RegisterType((*SubscriptionInfo)(nil), "meta.SubscriptionInfo") + proto.RegisterType((*ShardOwner)(nil), "meta.ShardOwner") + proto.RegisterType((*ContinuousQueryInfo)(nil), "meta.ContinuousQueryInfo") + proto.RegisterType((*UserInfo)(nil), "meta.UserInfo") + proto.RegisterType((*UserPrivilege)(nil), "meta.UserPrivilege") + proto.RegisterType((*Command)(nil), "meta.Command") + proto.RegisterType((*CreateNodeCommand)(nil), "meta.CreateNodeCommand") + proto.RegisterType((*DeleteNodeCommand)(nil), "meta.DeleteNodeCommand") + proto.RegisterType((*CreateDatabaseCommand)(nil), "meta.CreateDatabaseCommand") + proto.RegisterType((*DropDatabaseCommand)(nil), "meta.DropDatabaseCommand") + proto.RegisterType((*CreateRetentionPolicyCommand)(nil), "meta.CreateRetentionPolicyCommand") + proto.RegisterType((*DropRetentionPolicyCommand)(nil), "meta.DropRetentionPolicyCommand") + proto.RegisterType((*SetDefaultRetentionPolicyCommand)(nil), "meta.SetDefaultRetentionPolicyCommand") + proto.RegisterType((*UpdateRetentionPolicyCommand)(nil), "meta.UpdateRetentionPolicyCommand") + proto.RegisterType((*CreateShardGroupCommand)(nil), "meta.CreateShardGroupCommand") + proto.RegisterType((*DeleteShardGroupCommand)(nil), "meta.DeleteShardGroupCommand") + proto.RegisterType((*CreateContinuousQueryCommand)(nil), "meta.CreateContinuousQueryCommand") + proto.RegisterType((*DropContinuousQueryCommand)(nil), "meta.DropContinuousQueryCommand") + proto.RegisterType((*CreateUserCommand)(nil), "meta.CreateUserCommand") + proto.RegisterType((*DropUserCommand)(nil), "meta.DropUserCommand") + proto.RegisterType((*UpdateUserCommand)(nil), "meta.UpdateUserCommand") + proto.RegisterType((*SetPrivilegeCommand)(nil), "meta.SetPrivilegeCommand") + proto.RegisterType((*SetDataCommand)(nil), "meta.SetDataCommand") + proto.RegisterType((*SetAdminPrivilegeCommand)(nil), "meta.SetAdminPrivilegeCommand") + proto.RegisterType((*UpdateNodeCommand)(nil), "meta.UpdateNodeCommand") + proto.RegisterType((*CreateSubscriptionCommand)(nil), "meta.CreateSubscriptionCommand") + proto.RegisterType((*DropSubscriptionCommand)(nil), "meta.DropSubscriptionCommand") + proto.RegisterType((*RemovePeerCommand)(nil), "meta.RemovePeerCommand") + proto.RegisterType((*CreateMetaNodeCommand)(nil), "meta.CreateMetaNodeCommand") + proto.RegisterType((*CreateDataNodeCommand)(nil), "meta.CreateDataNodeCommand") + proto.RegisterType((*UpdateDataNodeCommand)(nil), "meta.UpdateDataNodeCommand") + proto.RegisterType((*DeleteMetaNodeCommand)(nil), "meta.DeleteMetaNodeCommand") + proto.RegisterType((*DeleteDataNodeCommand)(nil), "meta.DeleteDataNodeCommand") + proto.RegisterType((*Response)(nil), "meta.Response") + proto.RegisterType((*SetMetaNodeCommand)(nil), "meta.SetMetaNodeCommand") + proto.RegisterType((*DropShardCommand)(nil), "meta.DropShardCommand") + proto.RegisterEnum("meta.Command_Type", Command_Type_name, Command_Type_value) + proto.RegisterExtension(E_CreateNodeCommand_Command) + proto.RegisterExtension(E_DeleteNodeCommand_Command) + proto.RegisterExtension(E_CreateDatabaseCommand_Command) + proto.RegisterExtension(E_DropDatabaseCommand_Command) + proto.RegisterExtension(E_CreateRetentionPolicyCommand_Command) + proto.RegisterExtension(E_DropRetentionPolicyCommand_Command) + proto.RegisterExtension(E_SetDefaultRetentionPolicyCommand_Command) + proto.RegisterExtension(E_UpdateRetentionPolicyCommand_Command) + proto.RegisterExtension(E_CreateShardGroupCommand_Command) + proto.RegisterExtension(E_DeleteShardGroupCommand_Command) + proto.RegisterExtension(E_CreateContinuousQueryCommand_Command) + proto.RegisterExtension(E_DropContinuousQueryCommand_Command) + proto.RegisterExtension(E_CreateUserCommand_Command) + proto.RegisterExtension(E_DropUserCommand_Command) + proto.RegisterExtension(E_UpdateUserCommand_Command) + proto.RegisterExtension(E_SetPrivilegeCommand_Command) + proto.RegisterExtension(E_SetDataCommand_Command) + proto.RegisterExtension(E_SetAdminPrivilegeCommand_Command) + proto.RegisterExtension(E_UpdateNodeCommand_Command) + proto.RegisterExtension(E_CreateSubscriptionCommand_Command) + proto.RegisterExtension(E_DropSubscriptionCommand_Command) + proto.RegisterExtension(E_RemovePeerCommand_Command) + proto.RegisterExtension(E_CreateMetaNodeCommand_Command) + proto.RegisterExtension(E_CreateDataNodeCommand_Command) + proto.RegisterExtension(E_UpdateDataNodeCommand_Command) + proto.RegisterExtension(E_DeleteMetaNodeCommand_Command) + proto.RegisterExtension(E_DeleteDataNodeCommand_Command) + proto.RegisterExtension(E_SetMetaNodeCommand_Command) + proto.RegisterExtension(E_DropShardCommand_Command) +} + +func init() { proto.RegisterFile("internal/meta.proto", fileDescriptorMeta) } + +var fileDescriptorMeta = []byte{ + // 1808 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4b, 0x6f, 0x1c, 0xc7, + 0x11, 0x46, 0xcf, 0x3e, 0xb8, 0x5b, 0x7c, 0xaa, 0xf9, 0x1a, 0x4a, 0x14, 0xb3, 0x18, 0x08, 0xca, + 0x22, 0x08, 0x98, 0x60, 0x03, 0xe8, 0x94, 0x97, 0xc4, 0x95, 0xc4, 0x85, 0xc0, 0x47, 0x66, 0xa9, + 0x6b, 0x80, 0x11, 0xb7, 0x25, 0x6e, 0xb2, 0x3b, 0xb3, 0x99, 0x99, 0x95, 0xc4, 0x28, 0x4c, 0x18, + 0x5f, 0x7c, 0xb5, 0x61, 0x18, 0x3e, 0xe8, 0x66, 0x1f, 0x7c, 0x34, 0x0c, 0x03, 0x06, 0x0c, 0x9f, + 0x7c, 0xf7, 0x1f, 0xf0, 0x7f, 0xb0, 0xcf, 0xbe, 0x1a, 0xdd, 0x3d, 0x3d, 0xdd, 0x33, 0xd3, 0x3d, + 0x24, 0x65, 0xf9, 0x36, 0x5d, 0x55, 0xdd, 0xf5, 0x55, 0x75, 0x75, 0x75, 0x55, 0x0f, 0x2c, 0x0f, + 0xfd, 0x98, 0x84, 0xbe, 0x37, 0xfa, 0xdd, 0x98, 0xc4, 0xde, 0xf6, 0x24, 0x0c, 0xe2, 0x00, 0x57, + 0xe9, 0xb7, 0xf3, 0x5e, 0x05, 0xaa, 0x5d, 0x2f, 0xf6, 0x30, 0x86, 0xea, 0x11, 0x09, 0xc7, 0x36, + 0x6a, 0x59, 0xed, 0xaa, 0xcb, 0xbe, 0xf1, 0x0a, 0xd4, 0x7a, 0xfe, 0x80, 0xbc, 0xb4, 0x2d, 0x46, + 0xe4, 0x03, 0xbc, 0x09, 0xcd, 0x9d, 0xd1, 0x34, 0x8a, 0x49, 0xd8, 0xeb, 0xda, 0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, 0x90, 0x5d, 0xbd, 0x10, 0xdd, + 0x9b, 0xd0, 0xec, 0xc7, 0x5e, 0x18, 0x1f, 0x0d, 0xc7, 0x24, 0xf1, 0x80, 0x24, 0xd0, 0x38, 0xbf, + 0xef, 0x0f, 0x18, 0x8f, 0xdb, 0x2d, 0x86, 0x74, 0x5e, 0x97, 0x8c, 0x48, 0x4c, 0x06, 0x77, 0x63, + 0x66, 0x6d, 0xc5, 0x95, 0x04, 0xfc, 0x6b, 0xa8, 0x33, 0xbd, 0xc2, 0xd2, 0x45, 0xc5, 0x52, 0x06, + 0x34, 0x61, 0xe3, 0x16, 0xcc, 0x1e, 0x85, 0x53, 0xff, 0xd8, 0xe3, 0x0b, 0xd5, 0xd9, 0x86, 0xab, + 0x24, 0x87, 0x40, 0x33, 0x9d, 0x56, 0x40, 0xbf, 0x05, 0x8d, 0x83, 0x17, 0x3e, 0x4d, 0x82, 0x91, + 0x6d, 0xb5, 0x2a, 0xed, 0xea, 0x3d, 0xcb, 0x46, 0x6e, 0x4a, 0xc3, 0x6d, 0xa8, 0xb3, 0x6f, 0x71, + 0x4a, 0x96, 0x14, 0x1c, 0x8c, 0xe1, 0x26, 0x7c, 0xe7, 0xef, 0xb0, 0x94, 0xf7, 0xa6, 0x36, 0x60, + 0x30, 0x54, 0xf7, 0x82, 0x01, 0x11, 0xd9, 0x80, 0x7e, 0x63, 0x07, 0xe6, 0xba, 0x24, 0x8a, 0x87, + 0xbe, 0xc7, 0xf7, 0x88, 0xea, 0x6a, 0xba, 0x19, 0x9a, 0x73, 0x0b, 0x40, 0x6a, 0xc5, 0x6b, 0x50, + 0x4f, 0x12, 0x26, 0xb7, 0x25, 0x19, 0x39, 0x7f, 0x81, 0x65, 0xcd, 0xc1, 0xd3, 0x02, 0x59, 0x81, + 0x1a, 0x13, 0x48, 0x90, 0xf0, 0x81, 0x73, 0x06, 0x0d, 0x91, 0x9f, 0x4d, 0xf0, 0x77, 0xbd, 0xe8, + 0x24, 0x4d, 0x66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c, 0xd4, 0x78, 0x29, 0xb3, 0x42, 0xda, 0xfb, 0x05, 0x32, + 0x5e, 0xab, 0xa5, 0xa6, 0xae, 0x41, 0x3d, 0xd3, 0xca, 0x25, 0x23, 0x5a, 0xec, 0xd0, 0xba, 0x39, + 0x8a, 0xbd, 0xf1, 0x24, 0xa9, 0xa5, 0x25, 0xa1, 0xf3, 0xc0, 0x08, 0x7d, 0xcc, 0xa0, 0xdf, 0x54, + 0x43, 0xbd, 0x00, 0x48, 0xa2, 0xfe, 0x0a, 0x19, 0xef, 0xfb, 0x37, 0x42, 0xed, 0xc0, 0x5c, 0xa6, + 0x75, 0xe7, 0x4f, 0x0f, 0x19, 0x5a, 0x09, 0x76, 0x5f, 0xc5, 0x6e, 0x80, 0x25, 0xb1, 0x7f, 0x8e, + 0xca, 0xcb, 0x91, 0x2b, 0x47, 0x58, 0x5a, 0x21, 0x57, 0x94, 0x0a, 0xb9, 0x24, 0x4a, 0x82, 0x62, + 0x56, 0xd1, 0x23, 0x29, 0x66, 0x95, 0xb7, 0x83, 0xb8, 0x24, 0xab, 0x4c, 0xf2, 0x59, 0xe5, 0x22, + 0x64, 0x1f, 0x20, 0x4d, 0x69, 0xf6, 0xf3, 0x5a, 0x82, 0x92, 0xcb, 0xf7, 0x5f, 0xc5, 0x9b, 0x5f, + 0x51, 0x2b, 0x51, 0x91, 0x42, 0x61, 0xa8, 0xbd, 0xbf, 0xfe, 0x6c, 0x54, 0x14, 0x32, 0x45, 0xab, + 0xd2, 0x0f, 0x5a, 0x35, 0x67, 0x9a, 0x52, 0xf3, 0xb2, 0xb6, 0x97, 0x58, 0x19, 0xa9, 0x56, 0x16, + 0x14, 0x48, 0xf5, 0x9f, 0x21, 0x6d, 0x4d, 0x4b, 0xc3, 0x81, 0xca, 0xfb, 0x12, 0x45, 0x3a, 0xce, + 0x84, 0x8a, 0x55, 0xd6, 0x28, 0x55, 0x72, 0x8d, 0x52, 0xc9, 0x65, 0x1f, 0xab, 0x97, 0xbd,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30, 0x6d, 0xf7, 0x2a, 0x4a, 0xbb, 0x67, 0x6e, 0x5e, 0xfe, 0x53, + 0x6c, 0x5e, 0x72, 0x30, 0x32, 0xd7, 0x91, 0xbe, 0x2d, 0x7e, 0x33, 0xa4, 0x25, 0xa8, 0xce, 0xf4, + 0x2d, 0x95, 0x16, 0xd5, 0x6b, 0x64, 0xe8, 0xc8, 0xaf, 0xfe, 0x13, 0xc0, 0x52, 0x7e, 0x02, 0x94, + 0xa0, 0xfb, 0xaf, 0x8a, 0x4e, 0xab, 0x5a, 0x6d, 0xf8, 0xf4, 0x6f, 0x02, 0x79, 0x70, 0x25, 0xea, + 0xfe, 0xa7, 0xaa, 0xd3, 0x2e, 0x26, 0xd5, 0xf9, 0x86, 0x77, 0x86, 0x82, 0xba, 0xfb, 0x46, 0x75, + 0xe7, 0xa8, 0xa8, 0xcf, 0x68, 0xde, 0x03, 0x5a, 0xca, 0x47, 0x93, 0xc0, 0x8f, 0x08, 0x55, 0x71, + 0xf0, 0x88, 0xa9, 0x68, 0xb8, 0xd6, 0xc1, 0x23, 0x9a, 0xe5, 0xef, 0x87, 0x61, 0x10, 0xb2, 0x66, + 0xbb, 0xe9, 0xf2, 0x81, 0xfc, 0x37, 0x56, 0x61, 0xe7, 0x8a, 0x0f, 0x9c, 0x8f, 0x91, 0xee, 0x15, + 0xe4, 0x2d, 0x9e, 0x00, 0xf3, 0x05, 0xfb, 0x7f, 0x6e, 0xaf, 0x9d, 0xde, 0x2e, 0x46, 0xe7, 0x0e, + 0x8a, 0x2f, 0x32, 0x05, 0xbf, 0x9a, 0xf3, 0xc1, 0x3b, 0x5c, 0xcf, 0x9a, 0x92, 0x91, 0x94, 0x85, + 0x52, 0x2d, 0x3f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x04, 0x86, 0xd9, 0x75, 0x1c, 0x00, 0x00, +} diff --git a/tsdb/migrate/migrate.go b/tsdb/migrate/migrate.go index 8d3799401d..ac8adff370 100644 --- a/tsdb/migrate/migrate.go +++ b/tsdb/migrate/migrate.go @@ -45,6 +45,8 @@ const ( 4 // Size in bytes of block tsmKeyFieldSeparator1x = "#!~#" // tsm1 key field separator. + + metaFile = "meta.db" // Default name of meta database ) type Config struct { @@ -267,10 +269,24 @@ func (m *Migrator) createBucket(db, rp string) (influxdb.ID, error) { return bucket.ID, nil } + retName := "" + retDuration := time.Duration(0) + + if rp != "" { + retentionPolicyInfo, err := m.getRetentionPolicy(db, rp) + if err != nil { + return 0, err + } + retName = retentionPolicyInfo.Name + retDuration = retentionPolicyInfo.Duration + } + if !m.DryRun { bucket = &influxdb.Bucket{ - Name: name, - OrgID: m.DestOrg, + OrgID: m.DestOrg, + Name: name, + RetentionPolicyName: retName, + RetentionPeriod: retDuration, } if err := m.metaSvc.CreateBucket(context.Background(), bucket); err != nil { return 0, err @@ -283,6 +299,40 @@ func (m *Migrator) createBucket(db, rp string) (influxdb.ID, error) { return bucket.ID, nil } +// Load and extract retention policy from meta.db +func (m *Migrator) getRetentionPolicy(dbFilter, rpFilter string) (*RetentionPolicyInfo, error) { + file := filepath.Join(m.SourcePath, "meta/"+metaFile) + + f, err := os.Open(file) + if err != nil { + if os.IsNotExist(err) { + return nil, err + } + return nil, err + } + defer f.Close() + + data, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + var cacheData = new(Data) + cacheData.UnmarshalBinary(data) + + for _, database := range cacheData.Databases { + if database.Name == dbFilter { + for _, retPolicy := range database.RetentionPolicies { + if retPolicy.Name == rpFilter { + return &retPolicy, nil + } + } + } + } + + return nil, errors.New("Unable to find retention policy") +} + // Process1xShard migrates the TSM data in a single 1.x shard to the 2.x data directory. // // First, the shard is checked to determine it's fully compacted. Hot shards are From 69820c08a4ab2c317336193d62a290b5dfec1f27 Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Tue, 14 Apr 2020 16:30:06 -0700 Subject: [PATCH 02/11] feat(tsdb): Add maximum timestamp to MeasurementField This is require in order to correctly merge results from multiple sources. --- tsdb/cursors/schema.go | 5 +++-- tsdb/tsm1/engine_measurement_schema.go | 4 ++-- tsdb/tsm1/engine_measurement_schema_test.go | 22 ++++++++++----------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tsdb/cursors/schema.go b/tsdb/cursors/schema.go index 014f00a3ea..6107e78629 100644 --- a/tsdb/cursors/schema.go +++ b/tsdb/cursors/schema.go @@ -13,8 +13,9 @@ const ( ) type MeasurementField struct { - Key string - Type FieldType + Key string + Type FieldType + Timestamp int64 } type MeasurementFields struct { diff --git a/tsdb/tsm1/engine_measurement_schema.go b/tsdb/tsm1/engine_measurement_schema.go index 4ae7699332..fe9b32559e 100644 --- a/tsdb/tsm1/engine_measurement_schema.go +++ b/tsdb/tsm1/engine_measurement_schema.go @@ -301,7 +301,7 @@ func (e *Engine) fieldsPredicate(ctx context.Context, orgID influxdb.ID, bucketI vals := make([]cursors.MeasurementField, 0, len(tsmValues)) for key, val := range tsmValues { - vals = append(vals, cursors.MeasurementField{Key: key, Type: val.typ}) + vals = append(vals, cursors.MeasurementField{Key: key, Type: val.typ, Timestamp: val.max}) } return cursors.NewMeasurementFieldsSliceIteratorWithStats([]cursors.MeasurementFields{{Fields: vals}}, stats), nil @@ -403,7 +403,7 @@ func (e *Engine) fieldsNoPredicate(ctx context.Context, orgID influxdb.ID, bucke vals := make([]cursors.MeasurementField, 0, len(tsmValues)) for key, val := range tsmValues { - vals = append(vals, cursors.MeasurementField{Key: key, Type: val.typ}) + vals = append(vals, cursors.MeasurementField{Key: key, Type: val.typ, Timestamp: val.max}) } return cursors.NewMeasurementFieldsSliceIteratorWithStats([]cursors.MeasurementFields{{Fields: vals}}, stats), nil diff --git a/tsdb/tsm1/engine_measurement_schema_test.go b/tsdb/tsm1/engine_measurement_schema_test.go index 726971e9cb..aeb49ff912 100644 --- a/tsdb/tsm1/engine_measurement_schema_test.go +++ b/tsdb/tsm1/engine_measurement_schema_test.go @@ -877,7 +877,7 @@ m10,foo=v barS="60" 501 min: 0, max: 300, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String}, {Key: "f", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String, Timestamp: 209}, {Key: "f", Type: cursors.Float, Timestamp: 201}}, expStats: makeStats(12), }, { @@ -888,7 +888,7 @@ m10,foo=v barS="60" 501 min: 0, max: 199, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer}, {Key: "f", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer, Timestamp: 109}, {Key: "f", Type: cursors.Float, Timestamp: 109}}, expStats: makeStats(12), }, { @@ -899,7 +899,7 @@ m10,foo=v barS="60" 501 min: 0, max: 1000, }, - exp: []cursors.MeasurementField{{Key: "b", Type: cursors.Boolean}}, + exp: []cursors.MeasurementField{{Key: "b", Type: cursors.Boolean, Timestamp: 201}}, expStats: makeStats(1), }, { @@ -910,7 +910,7 @@ m10,foo=v barS="60" 501 min: 0, max: 199, }, - exp: []cursors.MeasurementField{{Key: "barF", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "barF", Type: cursors.Float, Timestamp: 101}}, expStats: makeStats(1), }, { @@ -921,7 +921,7 @@ m10,foo=v barS="60" 501 min: 200, max: 299, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String}, {Key: "f", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String, Timestamp: 209}, {Key: "f", Type: cursors.Float, Timestamp: 201}}, expStats: makeStats(6), }, { @@ -932,7 +932,7 @@ m10,foo=v barS="60" 501 min: 109, max: 109, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer}, {Key: "f", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer, Timestamp: 109}, {Key: "f", Type: cursors.Float, Timestamp: 109}}, expStats: makeStats(6), }, { @@ -943,7 +943,7 @@ m10,foo=v barS="60" 501 min: 201, max: 201, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer}, {Key: "f", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer, Timestamp: 202}, {Key: "f", Type: cursors.Float, Timestamp: 201}}, expStats: makeStats(6), }, { @@ -954,7 +954,7 @@ m10,foo=v barS="60" 501 min: 202, max: 202, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String, Timestamp: 209}}, expStats: makeStats(6), }, { @@ -990,7 +990,7 @@ m10,foo=v barS="60" 501 max: 300, expr: `tag10 = 'v10'`, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer}, {Key: "f", Type: cursors.Float}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.Integer, Timestamp: 202}, {Key: "f", Type: cursors.Float, Timestamp: 201}}, expStats: makeStats(3), }, { @@ -1002,7 +1002,7 @@ m10,foo=v barS="60" 501 max: 300, expr: `tag10 = 'v11'`, }, - exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String}}, + exp: []cursors.MeasurementField{{Key: "i", Type: cursors.String, Timestamp: 209}}, expStats: makeStats(3), }, @@ -1017,7 +1017,7 @@ m10,foo=v barS="60" 501 min: 0, max: 1000, }, - exp: []cursors.MeasurementField{{Key: "barF", Type: cursors.Float}, {Key: "barS", Type: cursors.String}}, + exp: []cursors.MeasurementField{{Key: "barF", Type: cursors.Float, Timestamp: 101}, {Key: "barS", Type: cursors.String, Timestamp: 501}}, expStats: makeStats(1), }, From 0d998c269af98dbdd04fc5a311fe494cf877e4c7 Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Tue, 14 Apr 2020 16:30:36 -0700 Subject: [PATCH 03/11] chore(storage): Fix code documentation comments --- storage/engine_measurement_schema.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/engine_measurement_schema.go b/storage/engine_measurement_schema.go index 6af6c09833..137a044ac0 100644 --- a/storage/engine_measurement_schema.go +++ b/storage/engine_measurement_schema.go @@ -45,7 +45,7 @@ func (e *Engine) MeasurementTagValues(ctx context.Context, orgID, bucketID influ // MeasurementTagKeys returns an iterator which enumerates the tag keys for the given // bucket and measurement, filtered using the optional the predicate and limited to the -//// time range [start, end]. +// time range [start, end]. // // MeasurementTagKeys will always return a StringIterator if there is no error. // @@ -63,7 +63,7 @@ func (e *Engine) MeasurementTagKeys(ctx context.Context, orgID, bucketID influxd // MeasurementFields returns an iterator which enumerates the field schema for the given // bucket and measurement, filtered using the optional the predicate and limited to the -//// time range [start, end]. +// time range [start, end]. // // MeasurementFields will always return a MeasurementFieldsIterator if there is no error. // From 6325591debe411242876288e64bea4dd30b56b1e Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Tue, 14 Apr 2020 16:33:54 -0700 Subject: [PATCH 04/11] feat(storage): New data types for measurement schema gRPC APIs This commit * adds new request and response data types for schema gRPC calls * adds fmt.Stringer implementation to cursors.FieldType * adds APIs to sort a slice of MeasurementField values, * upgrades the gogo protobuf package to v1.3.1, which includes improvements to serialization. --- go.mod | 2 +- go.sum | 4 + storage/reads/datatypes/predicate.pb.go | 496 ++- storage/reads/datatypes/storage_common.pb.go | 3111 ++++++++++++++---- storage/reads/datatypes/storage_common.proto | 53 +- tsdb/cursors/fieldtype_string.go | 28 + tsdb/cursors/gen.go | 1 + tsdb/cursors/schema.go | 70 +- tsdb/cursors/schema_test.go | 310 ++ 9 files changed, 3031 insertions(+), 1044 deletions(-) create mode 100644 tsdb/cursors/fieldtype_string.go create mode 100644 tsdb/cursors/schema_test.go diff --git a/go.mod b/go.mod index f7e498a5d1..485ef13681 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493 // indirect github.com/go-chi/chi v4.1.0+incompatible - github.com/gogo/protobuf v1.2.1 + github.com/gogo/protobuf v1.3.1 github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021 github.com/golang/protobuf v1.3.2 github.com/golang/snappy v0.0.1 diff --git a/go.sum b/go.sum index 1036dc4e69..b7c905552a 100644 --- a/go.sum +++ b/go.sum @@ -137,6 +137,8 @@ github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021 h1:HYV500jCgk+IC68L5sWrLFIWMpaUFfXXpJSAb7XOoBk= github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec h1:lJwO/92dFXWeXOZdoGXgptLmNLwynMSHUmU6besqtiw= @@ -279,6 +281,7 @@ github.com/kamilsk/retry v0.0.0-20181229152359-495c1d672c93/go.mod h1:vW4uuVWZOG github.com/kevinburke/go-bindata v3.11.0+incompatible h1:RcC+GJNmrBHbGaOpQ9MBD8z22rdzlIm0esDRDkyxd4s= github.com/kevinburke/go-bindata v3.11.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= @@ -574,6 +577,7 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= diff --git a/storage/reads/datatypes/predicate.pb.go b/storage/reads/datatypes/predicate.pb.go index 068385c250..1546df83ed 100644 --- a/storage/reads/datatypes/predicate.pb.go +++ b/storage/reads/datatypes/predicate.pb.go @@ -10,6 +10,7 @@ import ( proto "github.com/gogo/protobuf/proto" io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -21,7 +22,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Node_Type int32 @@ -163,7 +164,7 @@ func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Node.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -189,34 +190,34 @@ type isNode_Value interface { } type Node_StringValue struct { - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` } type Node_BooleanValue struct { - BooleanValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` + BooleanValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` } type Node_IntegerValue struct { - IntegerValue int64 `protobuf:"varint,5,opt,name=int_value,json=intValue,proto3,oneof"` + IntegerValue int64 `protobuf:"varint,5,opt,name=int_value,json=intValue,proto3,oneof" json:"int_value,omitempty"` } type Node_UnsignedValue struct { - UnsignedValue uint64 `protobuf:"varint,6,opt,name=uint_value,json=uintValue,proto3,oneof"` + UnsignedValue uint64 `protobuf:"varint,6,opt,name=uint_value,json=uintValue,proto3,oneof" json:"uint_value,omitempty"` } type Node_FloatValue struct { - FloatValue float64 `protobuf:"fixed64,7,opt,name=float_value,json=floatValue,proto3,oneof"` + FloatValue float64 `protobuf:"fixed64,7,opt,name=float_value,json=floatValue,proto3,oneof" json:"float_value,omitempty"` } type Node_RegexValue struct { - RegexValue string `protobuf:"bytes,8,opt,name=regex_value,json=regexValue,proto3,oneof"` + RegexValue string `protobuf:"bytes,8,opt,name=regex_value,json=regexValue,proto3,oneof" json:"regex_value,omitempty"` } type Node_TagRefValue struct { - TagRefValue string `protobuf:"bytes,9,opt,name=tag_ref_value,json=tagRefValue,proto3,oneof"` + TagRefValue string `protobuf:"bytes,9,opt,name=tag_ref_value,json=tagRefValue,proto3,oneof" json:"tag_ref_value,omitempty"` } type Node_FieldRefValue struct { - FieldRefValue string `protobuf:"bytes,10,opt,name=field_ref_value,json=fieldRefValue,proto3,oneof"` + FieldRefValue string `protobuf:"bytes,10,opt,name=field_ref_value,json=fieldRefValue,proto3,oneof" json:"field_ref_value,omitempty"` } type Node_Logical_ struct { - Logical Node_Logical `protobuf:"varint,11,opt,name=logical,proto3,enum=influxdata.platform.storage.Node_Logical,oneof"` + Logical Node_Logical `protobuf:"varint,11,opt,name=logical,proto3,enum=influxdata.platform.storage.Node_Logical,oneof" json:"logical,omitempty"` } type Node_Comparison_ struct { - Comparison Node_Comparison `protobuf:"varint,12,opt,name=comparison,proto3,enum=influxdata.platform.storage.Node_Comparison,oneof"` + Comparison Node_Comparison `protobuf:"varint,12,opt,name=comparison,proto3,enum=influxdata.platform.storage.Node_Comparison,oneof" json:"comparison,omitempty"` } func (*Node_StringValue) isNode_Value() {} @@ -321,9 +322,9 @@ func (m *Node) GetComparison() Node_Comparison { return ComparisonEqual } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Node) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Node_OneofMarshaler, _Node_OneofUnmarshaler, _Node_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Node) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*Node_StringValue)(nil), (*Node_BooleanValue)(nil), (*Node_IntegerValue)(nil), @@ -337,174 +338,6 @@ func (*Node) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, f } } -func _Node_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Node) - // value - switch x := m.Value.(type) { - case *Node_StringValue: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.StringValue) - case *Node_BooleanValue: - t := uint64(0) - if x.BooleanValue { - t = 1 - } - _ = b.EncodeVarint(4<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *Node_IntegerValue: - _ = b.EncodeVarint(5<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.IntegerValue)) - case *Node_UnsignedValue: - _ = b.EncodeVarint(6<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.UnsignedValue)) - case *Node_FloatValue: - _ = b.EncodeVarint(7<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.FloatValue)) - case *Node_RegexValue: - _ = b.EncodeVarint(8<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.RegexValue) - case *Node_TagRefValue: - _ = b.EncodeVarint(9<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.TagRefValue) - case *Node_FieldRefValue: - _ = b.EncodeVarint(10<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.FieldRefValue) - case *Node_Logical_: - _ = b.EncodeVarint(11<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Logical)) - case *Node_Comparison_: - _ = b.EncodeVarint(12<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Comparison)) - case nil: - default: - return fmt.Errorf("Node.Value has unexpected type %T", x) - } - return nil -} - -func _Node_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Node) - switch tag { - case 3: // value.string_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Value = &Node_StringValue{x} - return true, err - case 4: // value.bool_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Value = &Node_BooleanValue{x != 0} - return true, err - case 5: // value.int_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Value = &Node_IntegerValue{int64(x)} - return true, err - case 6: // value.uint_value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Value = &Node_UnsignedValue{x} - return true, err - case 7: // value.float_value - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Value = &Node_FloatValue{math.Float64frombits(x)} - return true, err - case 8: // value.regex_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Value = &Node_RegexValue{x} - return true, err - case 9: // value.tag_ref_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Value = &Node_TagRefValue{x} - return true, err - case 10: // value.field_ref_value - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Value = &Node_FieldRefValue{x} - return true, err - case 11: // value.logical - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Value = &Node_Logical_{Node_Logical(x)} - return true, err - case 12: // value.comparison - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Value = &Node_Comparison_{Node_Comparison(x)} - return true, err - default: - return false, nil - } -} - -func _Node_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Node) - // value - switch x := m.Value.(type) { - case *Node_StringValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.StringValue))) - n += len(x.StringValue) - case *Node_BooleanValue: - n += 1 // tag and wire - n += 1 - case *Node_IntegerValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.IntegerValue)) - case *Node_UnsignedValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.UnsignedValue)) - case *Node_FloatValue: - n += 1 // tag and wire - n += 8 - case *Node_RegexValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.RegexValue))) - n += len(x.RegexValue) - case *Node_TagRefValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.TagRefValue))) - n += len(x.TagRefValue) - case *Node_FieldRefValue: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.FieldRefValue))) - n += len(x.FieldRefValue) - case *Node_Logical_: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Logical)) - case *Node_Comparison_: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Comparison)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type Predicate struct { Root *Node `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` } @@ -523,7 +356,7 @@ func (m *Predicate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Predicate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -621,7 +454,7 @@ var fileDescriptor_87cba9804b436f42 = []byte{ func (m *Node) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -629,121 +462,184 @@ func (m *Node) Marshal() (dAtA []byte, err error) { } func (m *Node) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.NodeType != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintPredicate(dAtA, i, uint64(m.NodeType)) - } - if len(m.Children) > 0 { - for _, msg := range m.Children { - dAtA[i] = 0x12 - i++ - i = encodeVarintPredicate(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i += n } } - if m.Value != nil { - nn1, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + if len(m.Children) > 0 { + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Children[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPredicate(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i += nn1 } - return i, nil + if m.NodeType != 0 { + i = encodeVarintPredicate(dAtA, i, uint64(m.NodeType)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *Node_StringValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x1a - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.StringValue) + copy(dAtA[i:], m.StringValue) i = encodeVarintPredicate(dAtA, i, uint64(len(m.StringValue))) - i += copy(dAtA[i:], m.StringValue) - return i, nil + i-- + dAtA[i] = 0x1a + return len(dAtA) - i, nil } func (m *Node_BooleanValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x20 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_BooleanValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- if m.BooleanValue { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ - return i, nil + i-- + dAtA[i] = 0x20 + return len(dAtA) - i, nil } func (m *Node_IntegerValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x28 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_IntegerValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) i = encodeVarintPredicate(dAtA, i, uint64(m.IntegerValue)) - return i, nil + i-- + dAtA[i] = 0x28 + return len(dAtA) - i, nil } func (m *Node_UnsignedValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x30 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_UnsignedValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) i = encodeVarintPredicate(dAtA, i, uint64(m.UnsignedValue)) - return i, nil + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil } func (m *Node_FloatValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x39 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_FloatValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue)))) - i += 8 - return i, nil + i-- + dAtA[i] = 0x39 + return len(dAtA) - i, nil } func (m *Node_RegexValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x42 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_RegexValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.RegexValue) + copy(dAtA[i:], m.RegexValue) i = encodeVarintPredicate(dAtA, i, uint64(len(m.RegexValue))) - i += copy(dAtA[i:], m.RegexValue) - return i, nil + i-- + dAtA[i] = 0x42 + return len(dAtA) - i, nil } func (m *Node_TagRefValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x4a - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_TagRefValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.TagRefValue) + copy(dAtA[i:], m.TagRefValue) i = encodeVarintPredicate(dAtA, i, uint64(len(m.TagRefValue))) - i += copy(dAtA[i:], m.TagRefValue) - return i, nil + i-- + dAtA[i] = 0x4a + return len(dAtA) - i, nil } func (m *Node_FieldRefValue) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x52 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_FieldRefValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.FieldRefValue) + copy(dAtA[i:], m.FieldRefValue) i = encodeVarintPredicate(dAtA, i, uint64(len(m.FieldRefValue))) - i += copy(dAtA[i:], m.FieldRefValue) - return i, nil + i-- + dAtA[i] = 0x52 + return len(dAtA) - i, nil } func (m *Node_Logical_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x58 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_Logical_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) i = encodeVarintPredicate(dAtA, i, uint64(m.Logical)) - return i, nil + i-- + dAtA[i] = 0x58 + return len(dAtA) - i, nil } func (m *Node_Comparison_) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x60 - i++ + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node_Comparison_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) i = encodeVarintPredicate(dAtA, i, uint64(m.Comparison)) - return i, nil + i-- + dAtA[i] = 0x60 + return len(dAtA) - i, nil } func (m *Predicate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -751,31 +647,40 @@ func (m *Predicate) Marshal() (dAtA []byte, err error) { } func (m *Predicate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Predicate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Root != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintPredicate(dAtA, i, uint64(m.Root.Size())) - n2, err := m.Root.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Root.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPredicate(dAtA, i, uint64(size)) } - i += n2 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func encodeVarintPredicate(dAtA []byte, offset int, v uint64) int { + offset -= sovPredicate(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *Node) Size() (n int) { if m == nil { @@ -906,14 +811,7 @@ func (m *Predicate) Size() (n int) { } func sovPredicate(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + return (math_bits.Len64(x|1) + 6) / 7 } func sozPredicate(x uint64) (n int) { return sovPredicate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -1356,6 +1254,7 @@ func (m *Predicate) Unmarshal(dAtA []byte) error { func skipPredicate(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1387,10 +1286,8 @@ func skipPredicate(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1411,55 +1308,30 @@ func skipPredicate(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthPredicate } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthPredicate - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPredicate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipPredicate(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthPredicate - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPredicate + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthPredicate + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthPredicate = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPredicate = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthPredicate = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPredicate = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPredicate = fmt.Errorf("proto: unexpected end of group") ) diff --git a/storage/reads/datatypes/storage_common.pb.go b/storage/reads/datatypes/storage_common.pb.go index 84e216d709..7c7bd4f347 100644 --- a/storage/reads/datatypes/storage_common.pb.go +++ b/storage/reads/datatypes/storage_common.pb.go @@ -11,6 +11,7 @@ import ( types "github.com/gogo/protobuf/types" io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -22,7 +23,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ReadGroupRequest_Group int32 @@ -175,6 +176,43 @@ func (ReadResponse_DataType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_715e4bf4cdf1f73d, []int{4, 1} } +type MeasurementFieldsResponse_FieldType int32 + +const ( + FieldTypeFloat MeasurementFieldsResponse_FieldType = 0 + FieldTypeInteger MeasurementFieldsResponse_FieldType = 1 + FieldTypeUnsigned MeasurementFieldsResponse_FieldType = 2 + FieldTypeString MeasurementFieldsResponse_FieldType = 3 + FieldTypeBoolean MeasurementFieldsResponse_FieldType = 4 + FieldTypeUndefined MeasurementFieldsResponse_FieldType = 5 +) + +var MeasurementFieldsResponse_FieldType_name = map[int32]string{ + 0: "FLOAT", + 1: "INTEGER", + 2: "UNSIGNED", + 3: "STRING", + 4: "BOOLEAN", + 5: "UNDEFINED", +} + +var MeasurementFieldsResponse_FieldType_value = map[string]int32{ + "FLOAT": 0, + "INTEGER": 1, + "UNSIGNED": 2, + "STRING": 3, + "BOOLEAN": 4, + "UNDEFINED": 5, +} + +func (x MeasurementFieldsResponse_FieldType) String() string { + return proto.EnumName(MeasurementFieldsResponse_FieldType_name, int32(x)) +} + +func (MeasurementFieldsResponse_FieldType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{14, 0} +} + type ReadFilterRequest struct { ReadSource *types.Any `protobuf:"bytes,1,opt,name=read_source,json=readSource,proto3" json:"read_source,omitempty"` Range TimestampRange `protobuf:"bytes,2,opt,name=range,proto3" json:"range"` @@ -195,7 +233,7 @@ func (m *ReadFilterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return xxx_messageInfo_ReadFilterRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -240,7 +278,7 @@ func (m *ReadGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_ReadGroupRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -277,7 +315,7 @@ func (m *Aggregate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Aggregate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -315,7 +353,7 @@ func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Tag.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -353,7 +391,7 @@ func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return xxx_messageInfo_ReadResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -398,7 +436,7 @@ func (m *ReadResponse_Frame) XXX_Marshal(b []byte, deterministic bool) ([]byte, return xxx_messageInfo_ReadResponse_Frame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -424,25 +462,25 @@ type isReadResponse_Frame_Data interface { } type ReadResponse_Frame_Group struct { - Group *ReadResponse_GroupFrame `protobuf:"bytes,7,opt,name=group,proto3,oneof"` + Group *ReadResponse_GroupFrame `protobuf:"bytes,7,opt,name=group,proto3,oneof" json:"group,omitempty"` } type ReadResponse_Frame_Series struct { - Series *ReadResponse_SeriesFrame `protobuf:"bytes,1,opt,name=series,proto3,oneof"` + Series *ReadResponse_SeriesFrame `protobuf:"bytes,1,opt,name=series,proto3,oneof" json:"series,omitempty"` } type ReadResponse_Frame_FloatPoints struct { - FloatPoints *ReadResponse_FloatPointsFrame `protobuf:"bytes,2,opt,name=float_points,json=floatPoints,proto3,oneof"` + FloatPoints *ReadResponse_FloatPointsFrame `protobuf:"bytes,2,opt,name=float_points,json=floatPoints,proto3,oneof" json:"float_points,omitempty"` } type ReadResponse_Frame_IntegerPoints struct { - IntegerPoints *ReadResponse_IntegerPointsFrame `protobuf:"bytes,3,opt,name=integer_points,json=integerPoints,proto3,oneof"` + IntegerPoints *ReadResponse_IntegerPointsFrame `protobuf:"bytes,3,opt,name=integer_points,json=integerPoints,proto3,oneof" json:"integer_points,omitempty"` } type ReadResponse_Frame_UnsignedPoints struct { - UnsignedPoints *ReadResponse_UnsignedPointsFrame `protobuf:"bytes,4,opt,name=unsigned_points,json=unsignedPoints,proto3,oneof"` + UnsignedPoints *ReadResponse_UnsignedPointsFrame `protobuf:"bytes,4,opt,name=unsigned_points,json=unsignedPoints,proto3,oneof" json:"unsigned_points,omitempty"` } type ReadResponse_Frame_BooleanPoints struct { - BooleanPoints *ReadResponse_BooleanPointsFrame `protobuf:"bytes,5,opt,name=boolean_points,json=booleanPoints,proto3,oneof"` + BooleanPoints *ReadResponse_BooleanPointsFrame `protobuf:"bytes,5,opt,name=boolean_points,json=booleanPoints,proto3,oneof" json:"boolean_points,omitempty"` } type ReadResponse_Frame_StringPoints struct { - StringPoints *ReadResponse_StringPointsFrame `protobuf:"bytes,6,opt,name=string_points,json=stringPoints,proto3,oneof"` + StringPoints *ReadResponse_StringPointsFrame `protobuf:"bytes,6,opt,name=string_points,json=stringPoints,proto3,oneof" json:"string_points,omitempty"` } func (*ReadResponse_Frame_Group) isReadResponse_Frame_Data() {} @@ -509,9 +547,9 @@ func (m *ReadResponse_Frame) GetStringPoints() *ReadResponse_StringPointsFrame { return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ReadResponse_Frame) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ReadResponse_Frame_OneofMarshaler, _ReadResponse_Frame_OneofUnmarshaler, _ReadResponse_Frame_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*ReadResponse_Frame) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*ReadResponse_Frame_Group)(nil), (*ReadResponse_Frame_Series)(nil), (*ReadResponse_Frame_FloatPoints)(nil), @@ -522,162 +560,6 @@ func (*ReadResponse_Frame) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Bu } } -func _ReadResponse_Frame_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ReadResponse_Frame) - // data - switch x := m.Data.(type) { - case *ReadResponse_Frame_Group: - _ = b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Group); err != nil { - return err - } - case *ReadResponse_Frame_Series: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Series); err != nil { - return err - } - case *ReadResponse_Frame_FloatPoints: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.FloatPoints); err != nil { - return err - } - case *ReadResponse_Frame_IntegerPoints: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.IntegerPoints); err != nil { - return err - } - case *ReadResponse_Frame_UnsignedPoints: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.UnsignedPoints); err != nil { - return err - } - case *ReadResponse_Frame_BooleanPoints: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.BooleanPoints); err != nil { - return err - } - case *ReadResponse_Frame_StringPoints: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.StringPoints); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("ReadResponse_Frame.Data has unexpected type %T", x) - } - return nil -} - -func _ReadResponse_Frame_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ReadResponse_Frame) - switch tag { - case 7: // data.group - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_GroupFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_Group{msg} - return true, err - case 1: // data.series - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_SeriesFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_Series{msg} - return true, err - case 2: // data.float_points - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_FloatPointsFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_FloatPoints{msg} - return true, err - case 3: // data.integer_points - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_IntegerPointsFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_IntegerPoints{msg} - return true, err - case 4: // data.unsigned_points - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_UnsignedPointsFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_UnsignedPoints{msg} - return true, err - case 5: // data.boolean_points - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_BooleanPointsFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_BooleanPoints{msg} - return true, err - case 6: // data.string_points - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ReadResponse_StringPointsFrame) - err := b.DecodeMessage(msg) - m.Data = &ReadResponse_Frame_StringPoints{msg} - return true, err - default: - return false, nil - } -} - -func _ReadResponse_Frame_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ReadResponse_Frame) - // data - switch x := m.Data.(type) { - case *ReadResponse_Frame_Group: - s := proto.Size(x.Group) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ReadResponse_Frame_Series: - s := proto.Size(x.Series) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ReadResponse_Frame_FloatPoints: - s := proto.Size(x.FloatPoints) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ReadResponse_Frame_IntegerPoints: - s := proto.Size(x.IntegerPoints) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ReadResponse_Frame_UnsignedPoints: - s := proto.Size(x.UnsignedPoints) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ReadResponse_Frame_BooleanPoints: - s := proto.Size(x.BooleanPoints) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ReadResponse_Frame_StringPoints: - s := proto.Size(x.StringPoints) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type ReadResponse_GroupFrame struct { // TagKeys TagKeys [][]byte `protobuf:"bytes,1,rep,name=tag_keys,json=tagKeys,proto3" json:"tag_keys,omitempty"` @@ -699,7 +581,7 @@ func (m *ReadResponse_GroupFrame) XXX_Marshal(b []byte, deterministic bool) ([]b return xxx_messageInfo_ReadResponse_GroupFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -737,7 +619,7 @@ func (m *ReadResponse_SeriesFrame) XXX_Marshal(b []byte, deterministic bool) ([] return xxx_messageInfo_ReadResponse_SeriesFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -775,7 +657,7 @@ func (m *ReadResponse_FloatPointsFrame) XXX_Marshal(b []byte, deterministic bool return xxx_messageInfo_ReadResponse_FloatPointsFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -813,7 +695,7 @@ func (m *ReadResponse_IntegerPointsFrame) XXX_Marshal(b []byte, deterministic bo return xxx_messageInfo_ReadResponse_IntegerPointsFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -851,7 +733,7 @@ func (m *ReadResponse_UnsignedPointsFrame) XXX_Marshal(b []byte, deterministic b return xxx_messageInfo_ReadResponse_UnsignedPointsFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -889,7 +771,7 @@ func (m *ReadResponse_BooleanPointsFrame) XXX_Marshal(b []byte, deterministic bo return xxx_messageInfo_ReadResponse_BooleanPointsFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -927,7 +809,7 @@ func (m *ReadResponse_StringPointsFrame) XXX_Marshal(b []byte, deterministic boo return xxx_messageInfo_ReadResponse_StringPointsFrame.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -964,7 +846,7 @@ func (m *CapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_CapabilitiesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1005,7 +887,7 @@ func (m *TimestampRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_TimestampRange.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1045,7 +927,7 @@ func (m *TagKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return xxx_messageInfo_TagKeysRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1086,7 +968,7 @@ func (m *TagValuesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return xxx_messageInfo_TagValuesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1124,7 +1006,7 @@ func (m *StringValuesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return xxx_messageInfo_StringValuesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := m.MarshalTo(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } @@ -1143,12 +1025,254 @@ func (m *StringValuesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_StringValuesResponse proto.InternalMessageInfo +// MeasurementNamesRequest is the request message for Storage.MeasurementNames. +type MeasurementNamesRequest struct { + Source *types.Any `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Range TimestampRange `protobuf:"bytes,2,opt,name=range,proto3" json:"range"` +} + +func (m *MeasurementNamesRequest) Reset() { *m = MeasurementNamesRequest{} } +func (m *MeasurementNamesRequest) String() string { return proto.CompactTextString(m) } +func (*MeasurementNamesRequest) ProtoMessage() {} +func (*MeasurementNamesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{10} +} +func (m *MeasurementNamesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MeasurementNamesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MeasurementNamesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MeasurementNamesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MeasurementNamesRequest.Merge(m, src) +} +func (m *MeasurementNamesRequest) XXX_Size() int { + return m.Size() +} +func (m *MeasurementNamesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MeasurementNamesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MeasurementNamesRequest proto.InternalMessageInfo + +// MeasurementTagKeysRequest is the request message for Storage.MeasurementTagKeys. +type MeasurementTagKeysRequest struct { + Source *types.Any `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Measurement string `protobuf:"bytes,2,opt,name=measurement,proto3" json:"measurement,omitempty"` + Range TimestampRange `protobuf:"bytes,3,opt,name=range,proto3" json:"range"` + Predicate *Predicate `protobuf:"bytes,4,opt,name=predicate,proto3" json:"predicate,omitempty"` +} + +func (m *MeasurementTagKeysRequest) Reset() { *m = MeasurementTagKeysRequest{} } +func (m *MeasurementTagKeysRequest) String() string { return proto.CompactTextString(m) } +func (*MeasurementTagKeysRequest) ProtoMessage() {} +func (*MeasurementTagKeysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{11} +} +func (m *MeasurementTagKeysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MeasurementTagKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MeasurementTagKeysRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MeasurementTagKeysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MeasurementTagKeysRequest.Merge(m, src) +} +func (m *MeasurementTagKeysRequest) XXX_Size() int { + return m.Size() +} +func (m *MeasurementTagKeysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MeasurementTagKeysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MeasurementTagKeysRequest proto.InternalMessageInfo + +// MeasurementTagValuesRequest is the request message for Storage.MeasurementTagValues. +type MeasurementTagValuesRequest struct { + Source *types.Any `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Measurement string `protobuf:"bytes,2,opt,name=measurement,proto3" json:"measurement,omitempty"` + TagKey string `protobuf:"bytes,3,opt,name=tag_key,json=tagKey,proto3" json:"tag_key,omitempty"` + Range TimestampRange `protobuf:"bytes,4,opt,name=range,proto3" json:"range"` + Predicate *Predicate `protobuf:"bytes,5,opt,name=predicate,proto3" json:"predicate,omitempty"` +} + +func (m *MeasurementTagValuesRequest) Reset() { *m = MeasurementTagValuesRequest{} } +func (m *MeasurementTagValuesRequest) String() string { return proto.CompactTextString(m) } +func (*MeasurementTagValuesRequest) ProtoMessage() {} +func (*MeasurementTagValuesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{12} +} +func (m *MeasurementTagValuesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MeasurementTagValuesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MeasurementTagValuesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MeasurementTagValuesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MeasurementTagValuesRequest.Merge(m, src) +} +func (m *MeasurementTagValuesRequest) XXX_Size() int { + return m.Size() +} +func (m *MeasurementTagValuesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MeasurementTagValuesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MeasurementTagValuesRequest proto.InternalMessageInfo + +// MeasurementFieldsRequest is the request message for Storage.MeasurementFields. +type MeasurementFieldsRequest struct { + Source *types.Any `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Measurement string `protobuf:"bytes,2,opt,name=measurement,proto3" json:"measurement,omitempty"` + Range TimestampRange `protobuf:"bytes,3,opt,name=range,proto3" json:"range"` + Predicate *Predicate `protobuf:"bytes,4,opt,name=predicate,proto3" json:"predicate,omitempty"` +} + +func (m *MeasurementFieldsRequest) Reset() { *m = MeasurementFieldsRequest{} } +func (m *MeasurementFieldsRequest) String() string { return proto.CompactTextString(m) } +func (*MeasurementFieldsRequest) ProtoMessage() {} +func (*MeasurementFieldsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{13} +} +func (m *MeasurementFieldsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MeasurementFieldsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MeasurementFieldsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MeasurementFieldsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MeasurementFieldsRequest.Merge(m, src) +} +func (m *MeasurementFieldsRequest) XXX_Size() int { + return m.Size() +} +func (m *MeasurementFieldsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MeasurementFieldsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MeasurementFieldsRequest proto.InternalMessageInfo + +type MeasurementFieldsResponse struct { + Fields []MeasurementFieldsResponse_MessageField `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields"` +} + +func (m *MeasurementFieldsResponse) Reset() { *m = MeasurementFieldsResponse{} } +func (m *MeasurementFieldsResponse) String() string { return proto.CompactTextString(m) } +func (*MeasurementFieldsResponse) ProtoMessage() {} +func (*MeasurementFieldsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{14} +} +func (m *MeasurementFieldsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MeasurementFieldsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MeasurementFieldsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MeasurementFieldsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MeasurementFieldsResponse.Merge(m, src) +} +func (m *MeasurementFieldsResponse) XXX_Size() int { + return m.Size() +} +func (m *MeasurementFieldsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MeasurementFieldsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MeasurementFieldsResponse proto.InternalMessageInfo + +type MeasurementFieldsResponse_MessageField struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Type MeasurementFieldsResponse_FieldType `protobuf:"varint,2,opt,name=type,proto3,enum=influxdata.platform.storage.MeasurementFieldsResponse_FieldType" json:"type,omitempty"` + Timestamp int64 `protobuf:"fixed64,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *MeasurementFieldsResponse_MessageField) Reset() { + *m = MeasurementFieldsResponse_MessageField{} +} +func (m *MeasurementFieldsResponse_MessageField) String() string { return proto.CompactTextString(m) } +func (*MeasurementFieldsResponse_MessageField) ProtoMessage() {} +func (*MeasurementFieldsResponse_MessageField) Descriptor() ([]byte, []int) { + return fileDescriptor_715e4bf4cdf1f73d, []int{14, 0} +} +func (m *MeasurementFieldsResponse_MessageField) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MeasurementFieldsResponse_MessageField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MeasurementFieldsResponse_MessageField.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MeasurementFieldsResponse_MessageField) XXX_Merge(src proto.Message) { + xxx_messageInfo_MeasurementFieldsResponse_MessageField.Merge(m, src) +} +func (m *MeasurementFieldsResponse_MessageField) XXX_Size() int { + return m.Size() +} +func (m *MeasurementFieldsResponse_MessageField) XXX_DiscardUnknown() { + xxx_messageInfo_MeasurementFieldsResponse_MessageField.DiscardUnknown(m) +} + +var xxx_messageInfo_MeasurementFieldsResponse_MessageField proto.InternalMessageInfo + func init() { proto.RegisterEnum("influxdata.platform.storage.ReadGroupRequest_Group", ReadGroupRequest_Group_name, ReadGroupRequest_Group_value) proto.RegisterEnum("influxdata.platform.storage.ReadGroupRequest_HintFlags", ReadGroupRequest_HintFlags_name, ReadGroupRequest_HintFlags_value) proto.RegisterEnum("influxdata.platform.storage.Aggregate_AggregateType", Aggregate_AggregateType_name, Aggregate_AggregateType_value) proto.RegisterEnum("influxdata.platform.storage.ReadResponse_FrameType", ReadResponse_FrameType_name, ReadResponse_FrameType_value) proto.RegisterEnum("influxdata.platform.storage.ReadResponse_DataType", ReadResponse_DataType_name, ReadResponse_DataType_value) + proto.RegisterEnum("influxdata.platform.storage.MeasurementFieldsResponse_FieldType", MeasurementFieldsResponse_FieldType_name, MeasurementFieldsResponse_FieldType_value) proto.RegisterType((*ReadFilterRequest)(nil), "influxdata.platform.storage.ReadFilterRequest") proto.RegisterType((*ReadGroupRequest)(nil), "influxdata.platform.storage.ReadGroupRequest") proto.RegisterType((*Aggregate)(nil), "influxdata.platform.storage.Aggregate") @@ -1168,106 +1292,128 @@ func init() { proto.RegisterType((*TagKeysRequest)(nil), "influxdata.platform.storage.TagKeysRequest") proto.RegisterType((*TagValuesRequest)(nil), "influxdata.platform.storage.TagValuesRequest") proto.RegisterType((*StringValuesResponse)(nil), "influxdata.platform.storage.StringValuesResponse") + proto.RegisterType((*MeasurementNamesRequest)(nil), "influxdata.platform.storage.MeasurementNamesRequest") + proto.RegisterType((*MeasurementTagKeysRequest)(nil), "influxdata.platform.storage.MeasurementTagKeysRequest") + proto.RegisterType((*MeasurementTagValuesRequest)(nil), "influxdata.platform.storage.MeasurementTagValuesRequest") + proto.RegisterType((*MeasurementFieldsRequest)(nil), "influxdata.platform.storage.MeasurementFieldsRequest") + proto.RegisterType((*MeasurementFieldsResponse)(nil), "influxdata.platform.storage.MeasurementFieldsResponse") + proto.RegisterType((*MeasurementFieldsResponse_MessageField)(nil), "influxdata.platform.storage.MeasurementFieldsResponse.MessageField") } func init() { proto.RegisterFile("storage_common.proto", fileDescriptor_715e4bf4cdf1f73d) } var fileDescriptor_715e4bf4cdf1f73d = []byte{ - // 1402 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcd, 0x6f, 0x1a, 0xd7, - 0x16, 0x67, 0xf8, 0x34, 0x07, 0x8c, 0xc7, 0x37, 0xbc, 0x3c, 0x67, 0xf2, 0x02, 0xf3, 0xd0, 0x53, - 0x9e, 0xa5, 0xa6, 0x58, 0x72, 0x52, 0x35, 0x4a, 0xdb, 0x85, 0x71, 0xb0, 0xa1, 0xb1, 0xc1, 0x1a, - 0x70, 0xa4, 0x76, 0x83, 0xae, 0xed, 0xeb, 0xc9, 0x28, 0x30, 0x33, 0x9d, 0xb9, 0x44, 0x46, 0xea, - 0xa6, 0xbb, 0x88, 0x55, 0xbb, 0xad, 0x84, 0x54, 0xa9, 0xcb, 0xee, 0xfb, 0x37, 0x64, 0x51, 0xa9, - 0x59, 0x76, 0x85, 0x5a, 0x22, 0x55, 0xea, 0xbf, 0xd0, 0x55, 0x75, 0xef, 0x9d, 0x0b, 0x83, 0x1d, - 0xb9, 0xb0, 0xab, 0xb2, 0x3b, 0xf7, 0x7c, 0xfc, 0xce, 0xc7, 0x9c, 0x0f, 0x80, 0xbc, 0x4f, 0x1d, - 0x0f, 0x9b, 0xa4, 0x73, 0xea, 0xf4, 0x7a, 0x8e, 0x5d, 0x76, 0x3d, 0x87, 0x3a, 0xe8, 0xb6, 0x65, - 0x9f, 0x77, 0xfb, 0x17, 0x67, 0x98, 0xe2, 0xb2, 0xdb, 0xc5, 0xf4, 0xdc, 0xf1, 0x7a, 0xe5, 0x40, - 0x53, 0xcb, 0x9b, 0x8e, 0xe9, 0x70, 0xbd, 0x2d, 0x46, 0x09, 0x13, 0xed, 0xb6, 0xe9, 0x38, 0x66, - 0x97, 0x6c, 0xf1, 0xd7, 0x49, 0xff, 0x7c, 0x8b, 0xf4, 0x5c, 0x3a, 0x08, 0x84, 0xb7, 0x2e, 0x0b, - 0xb1, 0x2d, 0x45, 0x6b, 0xae, 0x47, 0xce, 0xac, 0x53, 0x4c, 0x89, 0x60, 0x94, 0xfe, 0x50, 0x60, - 0xdd, 0x20, 0xf8, 0x6c, 0xcf, 0xea, 0x52, 0xe2, 0x19, 0xe4, 0x8b, 0x3e, 0xf1, 0x29, 0xaa, 0x42, - 0xc6, 0x23, 0xf8, 0xac, 0xe3, 0x3b, 0x7d, 0xef, 0x94, 0x6c, 0x28, 0xba, 0xb2, 0x99, 0xd9, 0xce, - 0x97, 0x05, 0x6e, 0x59, 0xe2, 0x96, 0x77, 0xec, 0x41, 0x25, 0x37, 0x19, 0x17, 0x81, 0x21, 0xb4, - 0xb8, 0xae, 0x01, 0xde, 0x94, 0x46, 0xfb, 0x90, 0xf0, 0xb0, 0x6d, 0x92, 0x8d, 0x28, 0x07, 0x78, - 0xaf, 0x7c, 0x4d, 0xa2, 0xe5, 0xb6, 0xd5, 0x23, 0x3e, 0xc5, 0x3d, 0xd7, 0x60, 0x26, 0x95, 0xf8, - 0xab, 0x71, 0x31, 0x62, 0x08, 0x7b, 0xf4, 0x18, 0xd2, 0xd3, 0xc0, 0x37, 0x62, 0x1c, 0xec, 0xee, - 0xb5, 0x60, 0x47, 0x52, 0xdb, 0x98, 0x19, 0x96, 0x7e, 0x4a, 0x80, 0xca, 0x22, 0xdd, 0xf7, 0x9c, - 0xbe, 0xfb, 0x4e, 0xa7, 0x8a, 0xee, 0x01, 0x98, 0x2c, 0xcb, 0xce, 0x73, 0x32, 0xf0, 0x37, 0xe2, - 0x7a, 0x6c, 0x33, 0x5d, 0x59, 0x9d, 0x8c, 0x8b, 0x69, 0x9e, 0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x93, 0x9d, 0x7e, 0xcb, 0xc9, 0x4e, 0x07, - 0x27, 0xfb, 0x51, 0xf4, 0xa1, 0x52, 0x7a, 0x08, 0xb9, 0xf9, 0x1f, 0xc0, 0x4c, 0xd7, 0xa7, 0xd8, - 0xa3, 0xdc, 0x3e, 0x66, 0x88, 0x07, 0xc3, 0x24, 0xf6, 0x19, 0xb7, 0x8f, 0x19, 0x8c, 0x2c, 0xfd, - 0xae, 0x40, 0x4e, 0x2e, 0x99, 0xd9, 0xcf, 0x77, 0x36, 0xda, 0x0b, 0xff, 0x7c, 0x6f, 0x63, 0xd3, - 0x97, 0x3f, 0xdf, 0xe9, 0x94, 0xfe, 0xa7, 0xfd, 0x53, 0xf9, 0x2a, 0x0a, 0x6a, 0x1b, 0x9b, 0x4f, - 0x79, 0x87, 0xbf, 0xd3, 0xa9, 0xa2, 0x7f, 0x43, 0x2a, 0xb8, 0x25, 0xfc, 0x8e, 0xa7, 0x8d, 0xa4, - 0xb8, 0x1e, 0xa5, 0x32, 0xe4, 0x45, 0x67, 0xcb, 0x2a, 0x04, 0x8d, 0x3c, 0xdb, 0x03, 0xfc, 0xf4, - 0xc8, 0x3d, 0x50, 0xf9, 0xff, 0xab, 0xdf, 0x0a, 0x91, 0x57, 0x93, 0x82, 0xf2, 0x7a, 0x52, 0x50, - 0x7e, 0x9d, 0x14, 0x94, 0xaf, 0xdf, 0x14, 0x22, 0xaf, 0xdf, 0x14, 0x22, 0xbf, 0xbc, 0x29, 0x44, - 0x3e, 0xe7, 0x8b, 0x9f, 0xed, 0x7d, 0xff, 0x24, 0xc9, 0x4b, 0x75, 0xff, 0xaf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x74, 0x0c, 0xf0, 0x4c, 0x8d, 0x0f, 0x00, 0x00, + // 1652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0xcd, 0x6f, 0x23, 0x49, + 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xef, 0x11, 0x47, 0x27, 0xbf, 0x18, 0x11, 0xd7, 0x43, 0x55, 0x48, 0x3b, + 0x04, 0x77, 0x3b, 0xae, 0x3d, 0x72, 0x2e, 0x49, 0x5e, 0xd2, 0xa4, 0x9d, 0xf4, 0x5e, 0xae, 0xcc, + 0x71, 0xcb, 0x02, 0xb7, 0xbc, 0x6f, 0x8d, 0x2b, 0xd9, 0xf9, 0xac, 0x08, 0x14, 0xa1, 0xc5, 0x64, + 0x75, 0x70, 0x82, 0x33, 0x3a, 0x86, 0x84, 0x83, 0x2d, 0x83, 0xe4, 0xa3, 0x0c, 0xe0, 0xbb, 0xe5, + 0x7b, 0x62, 0x29, 0xb7, 0xcd, 0x01, 0x71, 0x3d, 0x3c, 0x18, 0xea, 0x54, 0xa5, 0x12, 0x7f, 0x39, + 0x2b, 0x46, 0x74, 0xae, 0x8f, 0x0e, 0x41, 0x0e, 0x1c, 0xcf, 0xc7, 0x18, 0xd8, 0x47, 0xf7, 0x82, + 0x9d, 0x09, 0x69, 0x7d, 0xa1, 0x58, 0xfa, 0x73, 0x02, 0x14, 0xea, 0xe9, 0xb1, 0x63, 0x8f, 0x86, + 0xef, 0x74, 0xa8, 0xe8, 0x19, 0x80, 0x41, 0xa3, 0xec, 0x7c, 0x41, 0xc6, 0x6e, 0x3e, 0xae, 0xc5, + 0x76, 0xe4, 0xca, 0xe6, 0x7c, 0x56, 0x94, 0x59, 0xec, 0x2f, 0xc8, 0xd8, 0xd5, 0x65, 0x43, 0x1c, + 0x51, 0x1d, 0x12, 0xec, 0x92, 0x4f, 0x68, 0xd2, 0x4e, 0x76, 0xef, 0xe3, 0x7b, 0xed, 0xdd, 0xcc, + 0x60, 0x99, 0x5f, 0x38, 0x02, 0x75, 0x1f, 0x1b, 0x86, 0x43, 0x0c, 0xea, 0x7e, 0x72, 0x05, 0xf7, + 0xf7, 0x85, 0xb4, 0xbe, 0x50, 0x44, 0xcf, 0x20, 0xf1, 0xb9, 0x69, 0x79, 0x6e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, 0xa7, 0xc4, + 0x75, 0xb1, 0x41, 0x18, 0x35, 0xf8, 0xa5, 0x63, 0x22, 0xea, 0x6f, 0x24, 0xc8, 0x84, 0xd9, 0x77, + 0x0c, 0xae, 0xb6, 0xff, 0x23, 0xcd, 0xf7, 0xc3, 0x9f, 0xbc, 0xa5, 0x0f, 0xec, 0xba, 0xf8, 0xa9, + 0x46, 0x1f, 0x80, 0x1c, 0xec, 0x32, 0xec, 0x63, 0x28, 0xfa, 0x82, 0x50, 0xba, 0x96, 0x40, 0x0e, + 0x34, 0xd0, 0xd3, 0xc5, 0xbe, 0xc1, 0x06, 0x7d, 0xc0, 0xe1, 0x0b, 0xc7, 0x87, 0xe1, 0x85, 0x83, + 0x6d, 0x13, 0x81, 0x80, 0xd8, 0x38, 0xbe, 0xb9, 0xb4, 0x71, 0xb0, 0xbf, 0xf6, 0x40, 0x26, 0x58, + 0x39, 0x8a, 0xc1, 0x42, 0xe1, 0x6f, 0x1c, 0x81, 0x08, 0x7f, 0x77, 0xa9, 0x21, 0xb1, 0x93, 0xc4, + 0x6f, 0x18, 0x12, 0x4b, 0xc9, 0xb7, 0x41, 0x3e, 0x6f, 0x1c, 0x56, 0x8f, 0xea, 0xd4, 0x52, 0x82, + 0xff, 0xde, 0x87, 0x2c, 0x75, 0x49, 0xcf, 0xb4, 0x48, 0x97, 0xef, 0x26, 0x95, 0xef, 0xbc, 0xfc, + 0x7b, 0x21, 0xf2, 0x72, 0x5e, 0x90, 0x5e, 0xcd, 0x0b, 0xd2, 0xdf, 0xe6, 0x05, 0xe9, 0xeb, 0xeb, + 0x42, 0xe4, 0xd5, 0x75, 0x21, 0xf2, 0xd7, 0xeb, 0x42, 0xe4, 0xe7, 0x6c, 0x35, 0xa7, 0xb9, 0x72, + 0x2f, 0x92, 0xac, 0xda, 0x3f, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x2f, 0x94, + 0x12, 0x15, 0x00, 0x00, } func (m *ReadFilterRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1275,45 +1421,56 @@ func (m *ReadFilterRequest) Marshal() (dAtA []byte, err error) { } func (m *ReadFilterRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadFilterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ReadSource != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.ReadSource.Size())) - n1, err := m.ReadSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Range.Size())) - n2, err := m.Range.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Predicate.Size())) - n3, err := m.Predicate.MarshalTo(dAtA[i:]) + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n3 + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + if m.ReadSource != nil { + { + size, err := m.ReadSource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadGroupRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1321,81 +1478,88 @@ func (m *ReadGroupRequest) Marshal() (dAtA []byte, err error) { } func (m *ReadGroupRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadGroupRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.ReadSource != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.ReadSource.Size())) - n4, err := m.ReadSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Range.Size())) - n5, err := m.Range.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - if m.Predicate != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Predicate.Size())) - n6, err := m.Predicate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if len(m.GroupKeys) > 0 { - for _, s := range m.GroupKeys { - dAtA[i] = 0x22 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.Group != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Group)) + if m.Hints != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Hints)) + i-- + dAtA[i] = 0x3d } if m.Aggregate != nil { + { + size, err := m.Aggregate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x32 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Aggregate.Size())) - n7, err := m.Aggregate.MarshalTo(dAtA[i:]) + } + if m.Group != 0 { + i = encodeVarintStorageCommon(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x28 + } + if len(m.GroupKeys) > 0 { + for iNdEx := len(m.GroupKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GroupKeys[iNdEx]) + copy(dAtA[i:], m.GroupKeys[iNdEx]) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.GroupKeys[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n7 + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - if m.Hints != 0 { - dAtA[i] = 0x3d - i++ - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Hints)) - i += 4 + i-- + dAtA[i] = 0x12 + if m.ReadSource != nil { + { + size, err := m.ReadSource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *Aggregate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1403,22 +1567,27 @@ func (m *Aggregate) Marshal() (dAtA []byte, err error) { } func (m *Aggregate) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Aggregate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Type != 0 { - dAtA[i] = 0x8 - i++ i = encodeVarintStorageCommon(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - return i, nil + return len(dAtA) - i, nil } func (m *Tag) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1426,29 +1595,36 @@ func (m *Tag) Marshal() (dAtA []byte, err error) { } func (m *Tag) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tag) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ + i -= len(m.Value) + copy(dAtA[i:], m.Value) i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1456,29 +1632,36 @@ func (m *ReadResponse) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Frames) > 0 { - for _, msg := range m.Frames { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Frames) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Frames[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1486,122 +1669,178 @@ func (m *ReadResponse_Frame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_Frame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if m.Data != nil { - nn8, err := m.Data.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size := m.Data.Size() + i -= size + if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } } - i += nn8 } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_Series) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_Series) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Series != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Series.Size())) - n9, err := m.Series.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Series.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n9 + i-- + dAtA[i] = 0xa } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_FloatPoints) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_FloatPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.FloatPoints != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.FloatPoints.Size())) - n10, err := m.FloatPoints.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.FloatPoints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n10 + i-- + dAtA[i] = 0x12 } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_IntegerPoints) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_IntegerPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.IntegerPoints != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.IntegerPoints.Size())) - n11, err := m.IntegerPoints.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.IntegerPoints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n11 + i-- + dAtA[i] = 0x1a } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_UnsignedPoints) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_UnsignedPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.UnsignedPoints != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.UnsignedPoints.Size())) - n12, err := m.UnsignedPoints.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.UnsignedPoints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n12 + i-- + dAtA[i] = 0x22 } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_BooleanPoints) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_BooleanPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.BooleanPoints != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.BooleanPoints.Size())) - n13, err := m.BooleanPoints.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.BooleanPoints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n13 + i-- + dAtA[i] = 0x2a } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_StringPoints) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_StringPoints) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.StringPoints != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.StringPoints.Size())) - n14, err := m.StringPoints.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.StringPoints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n14 + i-- + dAtA[i] = 0x32 } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_Frame_Group) MarshalTo(dAtA []byte) (int, error) { - i := 0 + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_Frame_Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) if m.Group != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Group.Size())) - n15, err := m.Group.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + { + size, err := m.Group.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n15 + i-- + dAtA[i] = 0x3a } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_GroupFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1609,33 +1848,40 @@ func (m *ReadResponse_GroupFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_GroupFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_GroupFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.TagKeys) > 0 { - for _, b := range m.TagKeys { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } if len(m.PartitionKeyVals) > 0 { - for _, b := range m.PartitionKeyVals { + for iNdEx := len(m.PartitionKeyVals) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PartitionKeyVals[iNdEx]) + copy(dAtA[i:], m.PartitionKeyVals[iNdEx]) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.PartitionKeyVals[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - return i, nil + if len(m.TagKeys) > 0 { + for iNdEx := len(m.TagKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TagKeys[iNdEx]) + copy(dAtA[i:], m.TagKeys[iNdEx]) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.TagKeys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } func (m *ReadResponse_SeriesFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1643,34 +1889,41 @@ func (m *ReadResponse_SeriesFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_SeriesFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_SeriesFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l + if m.DataType != 0 { + i = encodeVarintStorageCommon(dAtA, i, uint64(m.DataType)) + i-- + dAtA[i] = 0x10 + } if len(m.Tags) > 0 { - for _, msg := range m.Tags { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - i += n + i-- + dAtA[i] = 0xa } } - if m.DataType != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.DataType)) - } - return i, nil + return len(dAtA) - i, nil } func (m *ReadResponse_FloatPointsFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1678,36 +1931,41 @@ func (m *ReadResponse_FloatPointsFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_FloatPointsFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_FloatPointsFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Timestamps) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) - for _, num := range m.Timestamps { - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } if len(m.Values) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Values)*8)) - for _, num := range m.Values { - f16 := math.Float64bits(float64(num)) - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f16)) - i += 8 + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + f15 := math.Float64bits(float64(m.Values[iNdEx])) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f15)) } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Values)*8)) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Timestamps) > 0 { + for iNdEx := len(m.Timestamps) - 1; iNdEx >= 0; iNdEx-- { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Timestamps[iNdEx])) + } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadResponse_IntegerPointsFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1715,44 +1973,50 @@ func (m *ReadResponse_IntegerPointsFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_IntegerPointsFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_IntegerPointsFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Timestamps) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) - for _, num := range m.Timestamps { - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } if len(m.Values) > 0 { - dAtA18 := make([]byte, len(m.Values)*10) - var j17 int + dAtA17 := make([]byte, len(m.Values)*10) + var j16 int for _, num1 := range m.Values { num := uint64(num1) for num >= 1<<7 { - dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j17++ + j16++ } - dAtA18[j17] = uint8(num) - j17++ + dAtA17[j16] = uint8(num) + j16++ } + i -= j16 + copy(dAtA[i:], dAtA17[:j16]) + i = encodeVarintStorageCommon(dAtA, i, uint64(j16)) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(j17)) - i += copy(dAtA[i:], dAtA18[:j17]) } - return i, nil + if len(m.Timestamps) > 0 { + for iNdEx := len(m.Timestamps) - 1; iNdEx >= 0; iNdEx-- { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Timestamps[iNdEx])) + } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadResponse_UnsignedPointsFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1760,43 +2024,49 @@ func (m *ReadResponse_UnsignedPointsFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_UnsignedPointsFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_UnsignedPointsFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Timestamps) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) - for _, num := range m.Timestamps { - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } if len(m.Values) > 0 { - dAtA20 := make([]byte, len(m.Values)*10) - var j19 int + dAtA19 := make([]byte, len(m.Values)*10) + var j18 int for _, num := range m.Values { for num >= 1<<7 { - dAtA20[j19] = uint8(uint64(num)&0x7f | 0x80) + dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j19++ + j18++ } - dAtA20[j19] = uint8(num) - j19++ + dAtA19[j18] = uint8(num) + j18++ } + i -= j18 + copy(dAtA[i:], dAtA19[:j18]) + i = encodeVarintStorageCommon(dAtA, i, uint64(j18)) + i-- dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(j19)) - i += copy(dAtA[i:], dAtA20[:j19]) } - return i, nil + if len(m.Timestamps) > 0 { + for iNdEx := len(m.Timestamps) - 1; iNdEx >= 0; iNdEx-- { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Timestamps[iNdEx])) + } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadResponse_BooleanPointsFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1804,39 +2074,44 @@ func (m *ReadResponse_BooleanPointsFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_BooleanPointsFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_BooleanPointsFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Timestamps) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) - for _, num := range m.Timestamps { - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } if len(m.Values) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Values))) - for _, b := range m.Values { - if b { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.Values[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } - i++ } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Values))) + i-- + dAtA[i] = 0x12 } - return i, nil + if len(m.Timestamps) > 0 { + for iNdEx := len(m.Timestamps) - 1; iNdEx >= 0; iNdEx-- { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Timestamps[iNdEx])) + } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *ReadResponse_StringPointsFrame) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1844,41 +2119,40 @@ func (m *ReadResponse_StringPointsFrame) Marshal() (dAtA []byte, err error) { } func (m *ReadResponse_StringPointsFrame) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReadResponse_StringPointsFrame) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if len(m.Timestamps) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) - for _, num := range m.Timestamps { - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } if len(m.Values) > 0 { - for _, s := range m.Values { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) } } - return i, nil + if len(m.Timestamps) > 0 { + for iNdEx := len(m.Timestamps) - 1; iNdEx >= 0; iNdEx-- { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Timestamps[iNdEx])) + } + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Timestamps)*8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *CapabilitiesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1886,34 +2160,41 @@ func (m *CapabilitiesResponse) Marshal() (dAtA []byte, err error) { } func (m *CapabilitiesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CapabilitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Caps) > 0 { - for k, _ := range m.Caps { - dAtA[i] = 0xa - i++ + for k := range m.Caps { v := m.Caps[k] - mapSize := 1 + len(k) + sovStorageCommon(uint64(len(k))) + 1 + len(v) + sovStorageCommon(uint64(len(v))) - i = encodeVarintStorageCommon(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ + baseI := i + i -= len(v) + copy(dAtA[i:], v) i = encodeVarintStorageCommon(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintStorageCommon(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - return i, nil + return len(dAtA) - i, nil } func (m *TimestampRange) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1921,27 +2202,32 @@ func (m *TimestampRange) Marshal() (dAtA []byte, err error) { } func (m *TimestampRange) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimestampRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.Start != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Start)) - } if m.End != 0 { - dAtA[i] = 0x10 - i++ i = encodeVarintStorageCommon(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x10 } - return i, nil + if m.Start != 0 { + i = encodeVarintStorageCommon(dAtA, i, uint64(m.Start)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } func (m *TagKeysRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1949,45 +2235,56 @@ func (m *TagKeysRequest) Marshal() (dAtA []byte, err error) { } func (m *TagKeysRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TagsSource != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.TagsSource.Size())) - n21, err := m.TagsSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Range.Size())) - n22, err := m.Range.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x1a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Predicate.Size())) - n23, err := m.Predicate.MarshalTo(dAtA[i:]) + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } - i += n23 + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) } - return i, nil + i-- + dAtA[i] = 0x12 + if m.TagsSource != nil { + { + size, err := m.TagsSource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *TagValuesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -1995,51 +2292,63 @@ func (m *TagValuesRequest) Marshal() (dAtA []byte, err error) { } func (m *TagValuesRequest) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TagValuesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l - if m.TagsSource != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.TagsSource.Size())) - n24, err := m.TagsSource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Range.Size())) - n25, err := m.Range.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n25 - if m.Predicate != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(m.Predicate.Size())) - n26, err := m.Predicate.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } if len(m.TagKey) > 0 { - dAtA[i] = 0x22 - i++ + i -= len(m.TagKey) + copy(dAtA[i:], m.TagKey) i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.TagKey))) - i += copy(dAtA[i:], m.TagKey) + i-- + dAtA[i] = 0x22 } - return i, nil + if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.TagsSource != nil { + { + size, err := m.TagsSource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *StringValuesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } @@ -2047,29 +2356,359 @@ func (m *StringValuesResponse) Marshal() (dAtA []byte, err error) { } func (m *StringValuesResponse) MarshalTo(dAtA []byte) (int, error) { - var i int + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StringValuesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) _ = i var l int _ = l if len(m.Values) > 0 { - for _, b := range m.Values { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- dAtA[i] = 0xa - i++ - i = encodeVarintStorageCommon(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) } } - return i, nil + return len(dAtA) - i, nil +} + +func (m *MeasurementNamesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeasurementNamesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MeasurementNamesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MeasurementTagKeysRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeasurementTagKeysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MeasurementTagKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Measurement) > 0 { + i -= len(m.Measurement) + copy(dAtA[i:], m.Measurement) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Measurement))) + i-- + dAtA[i] = 0x12 + } + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MeasurementTagValuesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeasurementTagValuesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MeasurementTagValuesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.TagKey) > 0 { + i -= len(m.TagKey) + copy(dAtA[i:], m.TagKey) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.TagKey))) + i-- + dAtA[i] = 0x1a + } + if len(m.Measurement) > 0 { + i -= len(m.Measurement) + copy(dAtA[i:], m.Measurement) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Measurement))) + i-- + dAtA[i] = 0x12 + } + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MeasurementFieldsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeasurementFieldsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MeasurementFieldsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Predicate != nil { + { + size, err := m.Predicate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Range.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Measurement) > 0 { + i -= len(m.Measurement) + copy(dAtA[i:], m.Measurement) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Measurement))) + i-- + dAtA[i] = 0x12 + } + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MeasurementFieldsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeasurementFieldsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MeasurementFieldsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Fields) > 0 { + for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Fields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorageCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MeasurementFieldsResponse_MessageField) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MeasurementFieldsResponse_MessageField) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MeasurementFieldsResponse_MessageField) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Timestamp != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Timestamp)) + i-- + dAtA[i] = 0x19 + } + if m.Type != 0 { + i = encodeVarintStorageCommon(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintStorageCommon(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func encodeVarintStorageCommon(dAtA []byte, offset int, v uint64) int { + offset -= sovStorageCommon(v) + base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) - return offset + 1 + return base } func (m *ReadFilterRequest) Size() (n int) { if m == nil { @@ -2479,16 +3118,131 @@ func (m *StringValuesResponse) Size() (n int) { return n } -func sovStorageCommon(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break +func (m *MeasurementNamesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = m.Range.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + return n +} + +func (m *MeasurementTagKeysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = len(m.Measurement) + if l > 0 { + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = m.Range.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + if m.Predicate != nil { + l = m.Predicate.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + return n +} + +func (m *MeasurementTagValuesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = len(m.Measurement) + if l > 0 { + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = len(m.TagKey) + if l > 0 { + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = m.Range.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + if m.Predicate != nil { + l = m.Predicate.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + return n +} + +func (m *MeasurementFieldsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = len(m.Measurement) + if l > 0 { + n += 1 + l + sovStorageCommon(uint64(l)) + } + l = m.Range.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + if m.Predicate != nil { + l = m.Predicate.Size() + n += 1 + l + sovStorageCommon(uint64(l)) + } + return n +} + +func (m *MeasurementFieldsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fields) > 0 { + for _, e := range m.Fields { + l = e.Size() + n += 1 + l + sovStorageCommon(uint64(l)) } } return n } + +func (m *MeasurementFieldsResponse_MessageField) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovStorageCommon(uint64(l)) + } + if m.Type != 0 { + n += 1 + sovStorageCommon(uint64(m.Type)) + } + if m.Timestamp != 0 { + n += 9 + } + return n +} + +func sovStorageCommon(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} func sozStorageCommon(x uint64) (n int) { return sovStorageCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } @@ -5243,9 +5997,935 @@ func (m *StringValuesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MeasurementNamesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeasurementNamesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeasurementNamesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &types.Any{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorageCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeasurementTagKeysRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeasurementTagKeysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeasurementTagKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &types.Any{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Measurement", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Measurement = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Predicate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Predicate == nil { + m.Predicate = &Predicate{} + } + if err := m.Predicate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorageCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeasurementTagValuesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeasurementTagValuesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeasurementTagValuesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &types.Any{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Measurement", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Measurement = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TagKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TagKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Predicate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Predicate == nil { + m.Predicate = &Predicate{} + } + if err := m.Predicate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorageCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeasurementFieldsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeasurementFieldsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeasurementFieldsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &types.Any{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Measurement", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Measurement = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Predicate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Predicate == nil { + m.Predicate = &Predicate{} + } + if err := m.Predicate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorageCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeasurementFieldsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MeasurementFieldsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MeasurementFieldsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fields = append(m.Fields, MeasurementFieldsResponse_MessageField{}) + if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorageCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MeasurementFieldsResponse_MessageField) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MessageField: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageField: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorageCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorageCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorageCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= MeasurementFieldsResponse_FieldType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Timestamp = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + default: + iNdEx = preIndex + skippy, err := skipStorageCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthStorageCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipStorageCommon(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 + depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -5277,10 +6957,8 @@ func skipStorageCommon(dAtA []byte) (n int, err error) { break } } - return iNdEx, nil case 1: iNdEx += 8 - return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -5301,55 +6979,30 @@ func skipStorageCommon(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthStorageCommon } iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthStorageCommon - } - return iNdEx, nil case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStorageCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipStorageCommon(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthStorageCommon - } - } - return iNdEx, nil + depth++ case 4: - return iNdEx, nil + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStorageCommon + } + depth-- case 5: iNdEx += 4 - return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } + if iNdEx < 0 { + return 0, ErrInvalidLengthStorageCommon + } + if depth == 0 { + return iNdEx, nil + } } - panic("unreachable") + return 0, io.ErrUnexpectedEOF } var ( - ErrInvalidLengthStorageCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStorageCommon = fmt.Errorf("proto: integer overflow") + ErrInvalidLengthStorageCommon = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStorageCommon = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStorageCommon = fmt.Errorf("proto: unexpected end of group") ) diff --git a/storage/reads/datatypes/storage_common.proto b/storage/reads/datatypes/storage_common.proto index 3f990d4717..3544aa4097 100644 --- a/storage/reads/datatypes/storage_common.proto +++ b/storage/reads/datatypes/storage_common.proto @@ -3,7 +3,6 @@ package influxdata.platform.storage; option go_package = "datatypes"; import "gogoproto/gogo.proto"; -import "google/protobuf/empty.proto"; import "google/protobuf/any.proto"; import "predicate.proto"; @@ -179,3 +178,55 @@ message TagValuesRequest { message StringValuesResponse { repeated bytes values = 1; } + +// MeasurementNamesRequest is the request message for Storage.MeasurementNames. +message MeasurementNamesRequest { + google.protobuf.Any source = 1; + TimestampRange range = 2 [(gogoproto.nullable) = false]; +} + +// MeasurementTagKeysRequest is the request message for Storage.MeasurementTagKeys. +message MeasurementTagKeysRequest { + google.protobuf.Any source = 1; + string measurement = 2; + TimestampRange range = 3 [(gogoproto.nullable) = false]; + Predicate predicate = 4; +} + +// MeasurementTagValuesRequest is the request message for Storage.MeasurementTagValues. +message MeasurementTagValuesRequest { + google.protobuf.Any source = 1; + string measurement = 2; + string tag_key = 3; + TimestampRange range = 4 [(gogoproto.nullable) = false]; + Predicate predicate = 5; +} + +// MeasurementFieldsRequest is the request message for Storage.MeasurementFields. +message MeasurementFieldsRequest { + google.protobuf.Any source = 1; + string measurement = 2; + TimestampRange range = 3 [(gogoproto.nullable) = false]; + Predicate predicate = 4; +} + +message MeasurementFieldsResponse { + enum FieldType { + option (gogoproto.goproto_enum_prefix) = false; + + FLOAT = 0 [(gogoproto.enumvalue_customname) = "FieldTypeFloat"]; + INTEGER = 1 [(gogoproto.enumvalue_customname) = "FieldTypeInteger"]; + UNSIGNED = 2 [(gogoproto.enumvalue_customname) = "FieldTypeUnsigned"]; + STRING = 3 [(gogoproto.enumvalue_customname) = "FieldTypeString"]; + BOOLEAN = 4 [(gogoproto.enumvalue_customname) = "FieldTypeBoolean"]; + UNDEFINED = 5 [(gogoproto.enumvalue_customname) = "FieldTypeUndefined"]; + } + + message MessageField { + string key = 1; + FieldType type = 2; + sfixed64 timestamp = 3; + } + + repeated MessageField fields = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/tsdb/cursors/fieldtype_string.go b/tsdb/cursors/fieldtype_string.go new file mode 100644 index 0000000000..79414dcc22 --- /dev/null +++ b/tsdb/cursors/fieldtype_string.go @@ -0,0 +1,28 @@ +// Code generated by "stringer -type FieldType"; DO NOT EDIT. + +package cursors + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[Float-0] + _ = x[Integer-1] + _ = x[Unsigned-2] + _ = x[String-3] + _ = x[Boolean-4] + _ = x[Undefined-5] +} + +const _FieldType_name = "FloatIntegerUnsignedStringBooleanUndefined" + +var _FieldType_index = [...]uint8{0, 5, 12, 20, 26, 33, 42} + +func (i FieldType) String() string { + if i < 0 || i >= FieldType(len(_FieldType_index)-1) { + return "FieldType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _FieldType_name[_FieldType_index[i]:_FieldType_index[i+1]] +} diff --git a/tsdb/cursors/gen.go b/tsdb/cursors/gen.go index 63316e5c09..40bcfb2a3c 100644 --- a/tsdb/cursors/gen.go +++ b/tsdb/cursors/gen.go @@ -1,3 +1,4 @@ package cursors //go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl -data=@arrayvalues.gen.go.tmpldata arrayvalues.gen.go.tmpl +//go:generate stringer -type FieldType diff --git a/tsdb/cursors/schema.go b/tsdb/cursors/schema.go index 6107e78629..bf8e1a29ed 100644 --- a/tsdb/cursors/schema.go +++ b/tsdb/cursors/schema.go @@ -1,5 +1,7 @@ package cursors +import "github.com/influxdata/influxql" + // FieldType represents the primitive field data types available in tsm. type FieldType int @@ -7,17 +9,83 @@ const ( Float FieldType = iota // means the data type is a float Integer // means the data type is an integer Unsigned // means the data type is an unsigned integer - Boolean // means the data type is a boolean String // means the data type is a string of text + Boolean // means the data type is a boolean Undefined // means the data type in unknown or undefined ) +var ( + fieldTypeToDataTypeMapping = [8]influxql.DataType{ + Float: influxql.Float, + Integer: influxql.Integer, + Unsigned: influxql.Unsigned, + String: influxql.String, + Boolean: influxql.Boolean, + Undefined: influxql.Unknown, + 6: influxql.Unknown, + 7: influxql.Unknown, + } +) + +// IsLower returns true if the other FieldType has greater precedence than the +// current value. Undefined has the lowest precedence. +func (ft FieldType) IsLower(other FieldType) bool { return other < ft } + +// FieldTypeToDataType returns the equivalent influxql DataType for the field type ft +func FieldTypeToDataType(ft FieldType) influxql.DataType { + return fieldTypeToDataTypeMapping[ft&7] +} + type MeasurementField struct { Key string Type FieldType Timestamp int64 } +// MeasurementFieldSlice implements sort.Interface and sorts +// the slice from lowest to highest precedence. Use sort.Reverse +// to sort from highest to lowest. +type MeasurementFieldSlice []MeasurementField + +func (m MeasurementFieldSlice) Len() int { + return len(m) +} + +func (m MeasurementFieldSlice) Less(i, j int) bool { + ii, jj := &m[i], &m[j] + return ii.Key < jj.Key || + (ii.Key == jj.Key && + (ii.Timestamp < jj.Timestamp || + (ii.Timestamp == jj.Timestamp && ii.Type.IsLower(jj.Type)))) +} + +func (m MeasurementFieldSlice) Swap(i, j int) { + m[i], m[j] = m[j], m[i] +} + +// UniqueByKey performs an in-place update of m, removing duplicate elements +// by Key, keeping the first occurrence of each. If the slice is not sorted, +// the behavior of UniqueByKey is undefined. +func (m *MeasurementFieldSlice) UniqueByKey() { + mm := *m + if len(mm) < 2 { + return + } + + j := 0 + for i := 1; i < len(mm); i++ { + if mm[j].Key != mm[i].Key { + j++ + if j != i { + // optimization: skip copy if j == i + mm[j] = mm[i] + } + } + } + + *m = mm[:j+1] +} + type MeasurementFields struct { Fields []MeasurementField } diff --git a/tsdb/cursors/schema_test.go b/tsdb/cursors/schema_test.go new file mode 100644 index 0000000000..a7ac5f4d62 --- /dev/null +++ b/tsdb/cursors/schema_test.go @@ -0,0 +1,310 @@ +package cursors_test + +import ( + "math/rand" + "sort" + "testing" + + "github.com/influxdata/influxdb/v2/pkg/testing/assert" + "github.com/influxdata/influxdb/v2/tsdb/cursors" +) + +// Verifies FieldType precedence behavior is equivalent to influxql.DataType#LessThan +func TestFieldTypeDataTypePrecedenceEquivalence(t *testing.T) { + var fieldTypes = []cursors.FieldType{ + cursors.Float, + cursors.Integer, + cursors.Unsigned, + cursors.Boolean, + cursors.String, + cursors.Undefined, + } + + for _, fta := range fieldTypes { + for _, ftb := range fieldTypes { + if fta == ftb { + continue + } + + got := fta.IsLower(ftb) + exp := cursors.FieldTypeToDataType(fta).LessThan(cursors.FieldTypeToDataType(ftb)) + assert.Equal(t, got, exp, "failed %s.LessThan(%s)", fta.String(), ftb.String()) + } + } +} + +// Verifies sorting behavior of MeasurementFieldSlice +func TestMeasurementFieldSliceSort(t *testing.T) { + mfs := func(d ...cursors.MeasurementField) cursors.MeasurementFieldSlice { + return d + } + + mf := func(key string, timestamp int64, ft cursors.FieldType) cursors.MeasurementField { + return cursors.MeasurementField{ + Key: key, + Type: ft, + Timestamp: timestamp, + } + } + + fltF := func(key string, ts int64) cursors.MeasurementField { + return mf(key, ts, cursors.Float) + } + intF := func(key string, ts int64) cursors.MeasurementField { + return mf(key, ts, cursors.Integer) + } + strF := func(key string, ts int64) cursors.MeasurementField { + return mf(key, ts, cursors.String) + } + blnF := func(key string, ts int64) cursors.MeasurementField { + return mf(key, ts, cursors.Boolean) + } + + cases := []struct { + name string + in cursors.MeasurementFieldSlice + exp cursors.MeasurementFieldSlice + }{ + { + name: "keys:diff types:same ts:same", + in: mfs( + fltF("bbb", 0), + fltF("aaa", 0), + fltF("ccc", 0), + ), + exp: mfs( + fltF("aaa", 0), + fltF("bbb", 0), + fltF("ccc", 0), + ), + }, + { + name: "keys:same types:same ts:diff", + in: mfs( + fltF("aaa", 10), + fltF("ccc", 20), + fltF("aaa", 0), + fltF("ccc", 0), + ), + exp: mfs( + fltF("aaa", 0), + fltF("aaa", 10), + fltF("ccc", 0), + fltF("ccc", 20), + ), + }, + { + name: "keys:same types:diff ts:same", + in: mfs( + strF("aaa", 0), + intF("aaa", 0), + fltF("aaa", 0), + blnF("aaa", 0), + ), + exp: mfs( + blnF("aaa", 0), + strF("aaa", 0), + intF("aaa", 0), + fltF("aaa", 0), + ), + }, + { + name: "keys:same types:diff ts:diff", + in: mfs( + strF("aaa", 20), + intF("aaa", 10), + fltF("aaa", 0), + blnF("aaa", 30), + ), + exp: mfs( + fltF("aaa", 0), + intF("aaa", 10), + strF("aaa", 20), + blnF("aaa", 30), + ), + }, + { + name: "keys:diff types:diff ts:diff", + in: mfs( + intF("ccc", 10), + blnF("fff", 30), + strF("aaa", 20), + fltF("ddd", 0), + ), + exp: mfs( + strF("aaa", 20), + intF("ccc", 10), + fltF("ddd", 0), + blnF("fff", 30), + ), + }, + { + name: "keys:many types:many ts:same", + in: mfs( + intF("ccc", 10), + blnF("fff", 30), + strF("aaa", 20), + fltF("ddd", 0), + fltF("ccc", 10), + strF("fff", 30), + intF("aaa", 20), + blnF("ddd", 0), + ), + exp: mfs( + strF("aaa", 20), + intF("aaa", 20), + intF("ccc", 10), + fltF("ccc", 10), + blnF("ddd", 0), + fltF("ddd", 0), + blnF("fff", 30), + strF("fff", 30), + ), + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + got := tc.in + + // randomize order using fixed seed to + // ensure tests are deterministic on a given platform + rand.Seed(100) + for i := 0; i < 5; i++ { + rand.Shuffle(len(got), func(i, j int) { + got[i], got[j] = got[j], got[i] + }) + + sort.Sort(got) + assert.Equal(t, got, tc.exp, "failed at index", i) + } + }) + } +} + +func TestMeasurementFieldSlice_UniqueByKey(t *testing.T) { + mfs := func(d ...cursors.MeasurementField) cursors.MeasurementFieldSlice { + return d + } + + mf := func(key string, timestamp int64, ft cursors.FieldType) cursors.MeasurementField { + return cursors.MeasurementField{ + Key: key, + Type: ft, + Timestamp: timestamp, + } + } + + fltF := func(key string, ts int64) cursors.MeasurementField { + return mf(key, ts, cursors.Float) + } + + t.Run("multiple start end", func(t *testing.T) { + got := mfs( + fltF("aaa", 0), + fltF("aaa", 10), + fltF("bbb", 10), + fltF("ccc", 10), + fltF("ccc", 20), + ) + + exp := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + fltF("ccc", 10), + ) + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) + + t.Run("multiple at end", func(t *testing.T) { + got := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + fltF("ccc", 10), + fltF("ccc", 20), + fltF("ccc", 30), + ) + + exp := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + fltF("ccc", 10), + ) + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) + + t.Run("no duplicates many", func(t *testing.T) { + got := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + fltF("ccc", 20), + ) + + exp := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + fltF("ccc", 20), + ) + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) + + t.Run("no duplicates two elements", func(t *testing.T) { + got := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + ) + + exp := mfs( + fltF("aaa", 0), + fltF("bbb", 10), + ) + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) + + t.Run("duplicates one key", func(t *testing.T) { + got := mfs( + fltF("aaa", 0), + fltF("aaa", 10), + fltF("aaa", 10), + fltF("aaa", 10), + fltF("aaa", 10), + fltF("aaa", 10), + ) + + exp := mfs( + fltF("aaa", 0), + ) + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) + + t.Run("one element", func(t *testing.T) { + got := mfs( + fltF("aaa", 0), + ) + + exp := mfs( + fltF("aaa", 0), + ) + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) + + t.Run("empty", func(t *testing.T) { + got := mfs() + exp := mfs() + + got.UniqueByKey() + assert.Equal(t, got, exp) + }) +} From c76f30682c55f958d60727216e730b173d141104 Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Thu, 16 Apr 2020 15:19:28 -0700 Subject: [PATCH 05/11] fix(storage): Feedback in response to PR review * Adds clarifying documentation * Regenerate protocol buffers with updated documentation --- storage/reads/datatypes/storage_common.pb.go | 4 +++- storage/reads/datatypes/storage_common.proto | 4 +++- tsdb/cursors/schema.go | 17 +++++++++-------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/storage/reads/datatypes/storage_common.pb.go b/storage/reads/datatypes/storage_common.pb.go index 7c7bd4f347..de6f0bb776 100644 --- a/storage/reads/datatypes/storage_common.pb.go +++ b/storage/reads/datatypes/storage_common.pb.go @@ -987,7 +987,8 @@ func (m *TagValuesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_TagValuesRequest proto.InternalMessageInfo -// Response message for Storage.TagKeys and Storage.TagValues. +// Response message for Storage.TagKeys, Storage.TagValues Storage.MeasurementNames, +// Storage.MeasurementTagKeys and Storage.MeasurementTagValues. type StringValuesResponse struct { Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` } @@ -1188,6 +1189,7 @@ func (m *MeasurementFieldsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MeasurementFieldsRequest proto.InternalMessageInfo +// MeasurementFieldsResponse is the response message for Storage.MeasurementFields. type MeasurementFieldsResponse struct { Fields []MeasurementFieldsResponse_MessageField `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields"` } diff --git a/storage/reads/datatypes/storage_common.proto b/storage/reads/datatypes/storage_common.proto index 3544aa4097..c3b55cd033 100644 --- a/storage/reads/datatypes/storage_common.proto +++ b/storage/reads/datatypes/storage_common.proto @@ -174,7 +174,8 @@ message TagValuesRequest { string tag_key = 4; } -// Response message for Storage.TagKeys and Storage.TagValues. +// Response message for Storage.TagKeys, Storage.TagValues Storage.MeasurementNames, +// Storage.MeasurementTagKeys and Storage.MeasurementTagValues. message StringValuesResponse { repeated bytes values = 1; } @@ -210,6 +211,7 @@ message MeasurementFieldsRequest { Predicate predicate = 4; } +// MeasurementFieldsResponse is the response message for Storage.MeasurementFields. message MeasurementFieldsResponse { enum FieldType { option (gogoproto.goproto_enum_prefix) = false; diff --git a/tsdb/cursors/schema.go b/tsdb/cursors/schema.go index bf8e1a29ed..2b21aec65b 100644 --- a/tsdb/cursors/schema.go +++ b/tsdb/cursors/schema.go @@ -27,19 +27,20 @@ var ( } ) -// IsLower returns true if the other FieldType has greater precedence than the -// current value. Undefined has the lowest precedence. -func (ft FieldType) IsLower(other FieldType) bool { return other < ft } - -// FieldTypeToDataType returns the equivalent influxql DataType for the field type ft +// FieldTypeToDataType returns the equivalent influxql DataType for the field type ft. +// If ft is an invalid FieldType, the results are undefined. func FieldTypeToDataType(ft FieldType) influxql.DataType { return fieldTypeToDataTypeMapping[ft&7] } +// IsLower returns true if the other FieldType has greater precedence than the +// current value. Undefined has the lowest precedence. +func (ft FieldType) IsLower(other FieldType) bool { return other < ft } + type MeasurementField struct { - Key string - Type FieldType - Timestamp int64 + Key string // Key is the name of the field + Type FieldType // Type is field type + Timestamp int64 // Timestamp refers to the maximum timestamp observed for the given field } // MeasurementFieldSlice implements sort.Interface and sorts From 6633641d481680d64af5ed1b777d755bf1ce5a6d Mon Sep 17 00:00:00 2001 From: Brandon Farmer Date: Fri, 17 Apr 2020 11:09:52 -0700 Subject: [PATCH 06/11] feat: ui measurement completion --- ui/package.json | 2 +- ui/src/external/monaco.flux.lsp.ts | 15 ++++- ui/src/external/monaco.flux.messages.ts | 6 ++ ui/src/external/monaco.flux.server.ts | 56 +++++++++++++++++-- .../shared/components/FluxBucketProvider.tsx | 3 + ui/yarn.lock | 8 +-- 6 files changed, 80 insertions(+), 10 deletions(-) diff --git a/ui/package.json b/ui/package.json index cc13120850..7a6a0cf1e4 100644 --- a/ui/package.json +++ b/ui/package.json @@ -131,7 +131,7 @@ "dependencies": { "@influxdata/clockface": "2.0.3", "@influxdata/flux": "^0.4.0", - "@influxdata/flux-lsp-browser": "^0.4.2", + "@influxdata/flux-lsp-browser": "^0.5.1", "@influxdata/flux-parser": "^0.3.0", "@influxdata/giraffe": "0.18.0", "@influxdata/influx": "0.5.5", diff --git a/ui/src/external/monaco.flux.lsp.ts b/ui/src/external/monaco.flux.lsp.ts index 7f2b3bc3a9..0886aa01cb 100644 --- a/ui/src/external/monaco.flux.lsp.ts +++ b/ui/src/external/monaco.flux.lsp.ts @@ -26,6 +26,19 @@ export function registerCompletion(monaco: MonacoType, server: LSPServer) { }, }) + monaco.languages.registerDocumentFormattingEditProvider(FLUXLANGID, { + provideDocumentFormattingEdits: async (model, _context, _token) => { + try { + const uri = model.uri.toString() + const edits = await server.formatting(uri) + + return p2m.asTextEdits(edits) + } catch (e) { + return [] + } + }, + }) + monaco.languages.registerFoldingRangeProvider(FLUXLANGID, { provideFoldingRanges: async (model, _context, _token) => { try { @@ -116,6 +129,6 @@ export function registerCompletion(monaco: MonacoType, server: LSPServer) { }) return p2m.asCompletionResult(items, defaultRange) }, - triggerCharacters: ['.', ':', '(', ','], + triggerCharacters: ['.', ':', '(', ',', '"'], }) } diff --git a/ui/src/external/monaco.flux.messages.ts b/ui/src/external/monaco.flux.messages.ts index 6329eea92a..9ea80ac5eb 100644 --- a/ui/src/external/monaco.flux.messages.ts +++ b/ui/src/external/monaco.flux.messages.ts @@ -105,6 +105,12 @@ export const references = ( }) } +export const formatting = (id: number, uri: string) => { + return createRequest(id, 'textDocument/formatting', { + textDocument: {uri}, + }) +} + export const definition = (id: number, uri: string, position: Position) => { return createRequest(id, 'textDocument/definition', { textDocument: {uri}, diff --git a/ui/src/external/monaco.flux.server.ts b/ui/src/external/monaco.flux.server.ts index dd8d1871aa..56e18aba28 100644 --- a/ui/src/external/monaco.flux.server.ts +++ b/ui/src/external/monaco.flux.server.ts @@ -14,11 +14,14 @@ import { references, definition, symbols, + formatting, } from 'src/external/monaco.flux.messages' import {registerCompletion} from 'src/external/monaco.flux.lsp' import {AppState, LocalStorage} from 'src/types' import {getAllVariables, asAssignment} from 'src/variables/selectors' import {buildVarsOption} from 'src/variables/utils/buildVarsOption' +import {runQuery} from 'src/shared/apis/query' +import {parseResponse as parse} from 'src/shared/parsing/flux/response' import {store} from 'src/index' @@ -33,27 +36,52 @@ import { WorkspaceEdit, Location, SymbolInformation, + TextEdit, } from 'monaco-languageclient/lib/services' import {Server} from '@influxdata/flux-lsp-browser' type BucketCallback = () => Promise +type MeasurementsCallback = (bucket: string) => Promise export interface WASMServer extends Server { register_buckets_callback: (BucketCallback) => void + register_measurements_callback: (MeasurementsCallback) => void } import {format_from_js_file} from '@influxdata/flux' +// NOTE: parses table then select measurements from the _value column +const parseMeasurementsResponse = response => { + const data = parse(response.csv) || [{data: [{}]}] + return data.slice(1).map(r => r[3]) +} + +const queryMeasurements = async (orgID, bucket) => { + if (!this.orgID || this.orgID === '') { + throw new Error('no org is provided') + } + + const query = `import "influxdata/influxdb/v1" + v1.measurements(bucket:"${bucket}")` + + const raw = await runQuery(orgID, query).promise + if (raw.type !== 'SUCCESS') { + throw new Error('failed to get measurements') + } +} + export class LSPServer { private server: WASMServer private messageID: number = 0 private buckets: string[] = [] + private orgID: string = '' private documentVersions: {[key: string]: number} = {} public store: Store constructor(server: WASMServer, reduxStore = store) { this.server = server this.server.register_buckets_callback(this.getBuckets) + this.server.register_measurements_callback(this.getMeasurements) this.store = reduxStore } @@ -61,10 +89,23 @@ export class LSPServer { return Promise.resolve(this.buckets) } + getMeasurements = async (bucket: string) => { + try { + const response = await queryMeasurements(this.orgID, bucket) + return parseMeasurementsResponse(response) + } catch (e) { + return [] + } + } + updateBuckets(buckets: string[]) { this.buckets = buckets } + setOrg(orgID: string) { + this.orgID = orgID + } + initialize() { return this.send(initialize(this.currentMessageID)) } @@ -119,6 +160,16 @@ export class LSPServer { return response.result } + async formatting(uri): Promise { + await this.sendPrelude(uri) + + const response = (await this.send( + formatting(this.currentMessageID, uri) + )) as {result: TextEdit[]} + + return response.result + } + async completionItems( uri: string, position: Position, @@ -131,10 +182,7 @@ export class LSPServer { completion( this.currentMessageID, uri, - { - ...position, - line: position.line, - }, + {...position, line: position.line}, context ) )) as {result?: {items?: []}} diff --git a/ui/src/shared/components/FluxBucketProvider.tsx b/ui/src/shared/components/FluxBucketProvider.tsx index 4358b1c370..0593ad057c 100644 --- a/ui/src/shared/components/FluxBucketProvider.tsx +++ b/ui/src/shared/components/FluxBucketProvider.tsx @@ -4,6 +4,7 @@ import {connect} from 'react-redux' import {AppState, Bucket, ResourceType} from 'src/types' import {getAll} from 'src/resources/selectors' +import {getOrg} from 'src/organizations/selectors' import loadServer from 'src/external/monaco.flux.server' @@ -13,9 +14,11 @@ const FluxBucketProvider: FC<{}> = () => { const mstp = (state: AppState): {} => { const buckets = getAll(state, ResourceType.Buckets) + const org = getOrg(state) loadServer().then(server => { server.updateBuckets(buckets.map(b => b.name)) + server.setOrg(org.id || '') }) return {} diff --git a/ui/yarn.lock b/ui/yarn.lock index b0d8cb2e59..e557763e9d 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -1023,10 +1023,10 @@ resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-2.0.3.tgz#a524bfe57898506f64cb735d5a457677c3ee2d32" integrity sha512-wXJ30Bm0LC2HBSfwEQOsAznqrBqQYgn4SVb30Ycm6dghe0JOh+S2pWDD0/jWw8deN8M2pShKtz4FjW0NPyXFXg== -"@influxdata/flux-lsp-browser@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@influxdata/flux-lsp-browser/-/flux-lsp-browser-0.4.2.tgz#b1126004e6d80e0426792475c4ec330dce6a3b60" - integrity sha512-ecvcRC7teOldZl+trgCmArnS3nVtUNcG5GQzwfglOj3ubJMxCJtqksqfCYSwQwAcfwWRFCUkCHccyh/qLYXjdA== +"@influxdata/flux-lsp-browser@^0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@influxdata/flux-lsp-browser/-/flux-lsp-browser-0.5.1.tgz#cc8470fb69ff31439db8465731485d4979a84666" + integrity sha512-YUAad5ap0Y9llsEt0Nqe/IPhbO9SjrkDQ+L9EsSDwjVCzi84EYxk5XXtS2ZwuzBIl33Z4qdacMwjwI9aAYQZkg== "@influxdata/flux-parser@^0.3.0": version "0.3.0" From 4fec6a3ae09591a5a3ec521f5d3717e0621105d5 Mon Sep 17 00:00:00 2001 From: alexpaxton Date: Fri, 17 Apr 2020 12:07:25 -0700 Subject: [PATCH 07/11] chore(ui): upgrade to Clockface 2.1.0 (#17767) * chore: upgrade clockface dependency * fix: update all instances of ResourceCard to match the new API * fix: bandaid style for spacing in resource lists * fix: make dashboard grid align with page * fix: update card selectors labels e2e test * fix: update meta item selector in buckets e2e test * fix: ensure popover is dismissed and doesn't obscure other check card items * fix: update selector in dashboard card interaction test * fix: pass in meta items as children instead of an array to avoid map key issues * refactor: ensure meta items are composed instead of passed in as an array * fix: cleanup --- ui/cypress/e2e/buckets.test.ts | 5 +- ui/cypress/e2e/checks.test.ts | 2 + ui/cypress/e2e/dashboardsView.test.ts | 8 +- ui/cypress/e2e/labels.test.ts | 9 +- ui/package.json | 2 +- .../components/builder/MatchingRuleCard.tsx | 18 ++-- ui/src/buckets/components/BucketCard.tsx | 50 +++++----- .../buckets/components/DemoDataBucketCard.tsx | 22 ++--- ui/src/checks/components/CheckCard.tsx | 84 ++++++++++------- .../components/DashboardsCardGrid.scss | 18 ++-- .../dashboard_index/DashboardCard.tsx | 55 +++++------ ui/src/labels/components/LabelCard.scss | 13 +-- ui/src/labels/components/LabelCard.tsx | 23 ++--- ui/src/members/components/MemberCard.tsx | 19 ++-- .../endpoints/components/EndpointCard.tsx | 94 ++++++++++--------- .../rules/components/RuleCard.tsx | 84 ++++++++++------- ui/src/scrapers/components/ScraperRow.tsx | 25 +++-- .../components/LoadDataNavigation.tsx | 9 +- .../lastRunTaskStatus/LastRunTaskStatus.scss | 1 - ui/src/style/chronograf.scss | 6 ++ ui/src/tasks/components/TaskCard.tsx | 38 +++++--- ui/src/telegrafs/components/CollectorCard.tsx | 63 ++++++------- .../components/StaticTemplateCard.tsx | 36 +++---- ui/src/templates/components/TemplateCard.tsx | 58 +++++------- ui/src/variables/components/VariableCard.tsx | 19 ++-- ui/yarn.lock | 8 +- 26 files changed, 390 insertions(+), 379 deletions(-) diff --git a/ui/cypress/e2e/buckets.test.ts b/ui/cypress/e2e/buckets.test.ts index 661c4533ff..c92dd245a6 100644 --- a/ui/cypress/e2e/buckets.test.ts +++ b/ui/cypress/e2e/buckets.test.ts @@ -65,10 +65,7 @@ describe('Buckets', () => { }) cy.get('@bucket').then(() => { - cy.getByTestID(`cf-resource-card--meta-item`).should( - 'contain', - '7 days' - ) + cy.getByTestID(`bucket-retention`).should('contain', '7 days') }) }) diff --git a/ui/cypress/e2e/checks.test.ts b/ui/cypress/e2e/checks.test.ts index 2fdd42f38c..b369be66ed 100644 --- a/ui/cypress/e2e/checks.test.ts +++ b/ui/cypress/e2e/checks.test.ts @@ -120,6 +120,8 @@ describe('Checks', () => { cy.getByTestID('popover--dialog') .should('exist') .contains('Last Run Status:') + // Need to trigger mouseout else the popover obscures the other buttons + .trigger('mouseout') // create a label cy.getByTestID('check-card').within(() => { diff --git a/ui/cypress/e2e/dashboardsView.test.ts b/ui/cypress/e2e/dashboardsView.test.ts index f1ad9be901..07a0483015 100644 --- a/ui/cypress/e2e/dashboardsView.test.ts +++ b/ui/cypress/e2e/dashboardsView.test.ts @@ -301,13 +301,7 @@ describe('Dashboard', () => { cy.createDashWithViewAndVar(orgID).then(() => { cy.fixture('routes').then(({orgs}) => { cy.visit(`${orgs}/${orgID}/dashboards`) - cy.getByTestID('dashboard-card--name').within(() => { - // Ideally we don't need to select the clickable element within the card name. - // The testID here should be on the clickable element - // Issue created in Clockface: https://github.com/influxdata/clockface/issues/478 - cy.get('.cf-resource-name--text').click() - }) - + cy.getByTestID('dashboard-card--name').click() cy.get('.cell--view').should('have.length', 1) }) }) diff --git a/ui/cypress/e2e/labels.test.ts b/ui/cypress/e2e/labels.test.ts index ef3ac5b69b..8466aa1f7c 100644 --- a/ui/cypress/e2e/labels.test.ts +++ b/ui/cypress/e2e/labels.test.ts @@ -153,8 +153,7 @@ describe('labels', () => { .contains(newLabelDescription) .should('be.visible') cy.getByTestID('label-card') - .children('div.cf-resource-card--contents') - .children('div.cf-resource-card--row') + .children('div.cf-flex-box') .children('div.cf-label') .invoke('attr', 'style') .should('contain', hex2BgColor(newLabelColor)) @@ -197,8 +196,7 @@ describe('labels', () => { .should('be.visible') cy.getByTestID('label-card') - .children('div.cf-resource-card--contents') - .children('div.cf-resource-card--row') + .children('div.cf-flex-box') .children('div.cf-label') .invoke('attr', 'style') .should('contain', hex2BgColor(oldLabelColor)) @@ -242,8 +240,7 @@ describe('labels', () => { .contains(newLabelDescription) .should('be.visible') cy.getByTestID('label-card') - .children('div.cf-resource-card--contents') - .children('div.cf-resource-card--row') + .children('div.cf-flex-box') .children('div.cf-label') .invoke('attr', 'style') .should('contain', hex2BgColor(newLabelColor)) diff --git a/ui/package.json b/ui/package.json index 7a6a0cf1e4..be8e4a03a3 100644 --- a/ui/package.json +++ b/ui/package.json @@ -129,7 +129,7 @@ "webpack-merge": "^4.2.1" }, "dependencies": { - "@influxdata/clockface": "2.0.3", + "@influxdata/clockface": "2.1.0", "@influxdata/flux": "^0.4.0", "@influxdata/flux-lsp-browser": "^0.5.1", "@influxdata/flux-parser": "^0.3.0", diff --git a/ui/src/alerting/components/builder/MatchingRuleCard.tsx b/ui/src/alerting/components/builder/MatchingRuleCard.tsx index 634d89836e..e3f81c731f 100644 --- a/ui/src/alerting/components/builder/MatchingRuleCard.tsx +++ b/ui/src/alerting/components/builder/MatchingRuleCard.tsx @@ -30,16 +30,14 @@ const MatchingRuleCard: FC = ({rule, endpoints}) => { const endpoint = endpoints.find(e => e.id === rule.endpointID) return ( - } - description={} - metaData={[ - <>{`Checks every: ${rule.every}`}, - <>{`Sends notifications to: ${endpoint.name}`}, - ]} - /> + + + + + <>{`Checks every: ${rule.every}`} + <>{`Sends notifications to: ${endpoint.name}`} + + ) } diff --git a/ui/src/buckets/components/BucketCard.tsx b/ui/src/buckets/components/BucketCard.tsx index 9a268fdff9..a7daadb622 100644 --- a/ui/src/buckets/components/BucketCard.tsx +++ b/ui/src/buckets/components/BucketCard.tsx @@ -136,20 +136,30 @@ const BucketCard: FC = ({ ) - const retention = <>Retention: {bucket.readableRetention} - const cardMetaItems = - bucket.type === 'user' - ? [retention] - : [ - - System Bucket - , - retention, - ] + let cardMeta = ( + + + Retention: {_.capitalize(bucket.readableRetention)} + + + ) + + if (bucket.type !== 'user') { + cardMeta = ( + + + System Bucket + + + Retention: {_.capitalize(bucket.readableRetention)} + + + ) + } return ( = ({ ) } - name={ - - } - metaData={cardMetaItems} > + + {cardMeta} {bucket.type === 'user' && actionButtons} ) diff --git a/ui/src/buckets/components/DemoDataBucketCard.tsx b/ui/src/buckets/components/DemoDataBucketCard.tsx index 25cca03af3..d2d8431694 100644 --- a/ui/src/buckets/components/DemoDataBucketCard.tsx +++ b/ui/src/buckets/components/DemoDataBucketCard.tsx @@ -69,23 +69,21 @@ const DemoDataBucketCard: FC = ({ } - name={ - - } - metaData={[ + > + + Demo Data Bucket - , - <>Retention: {bucket.readableRetention}, - ]} - > + + <>Retention: {bucket.readableRetention} +