From a6ae39d0b08d5a6c1ffbc5c359fc8c9e644f6d34 Mon Sep 17 00:00:00 2001 From: Travis Turner Date: Mon, 4 Jun 2018 17:18:34 -0500 Subject: [PATCH] remove cases of Field from frame.go --- api.go | 19 +-- broadcast.go | 20 +-- client_test.go | 10 +- executor.go | 4 +- executor_test.go | 4 +- frame.go | 62 ++++----- frame_internal_test.go | 4 +- frame_test.go | 4 +- internal/private.pb.go | 276 ++++++++++++++++++++--------------------- internal/private.proto | 11 +- server.go | 8 +- 11 files changed, 211 insertions(+), 211 deletions(-) diff --git a/api.go b/api.go index 0dc153380..e34a9142b 100644 --- a/api.go +++ b/api.go @@ -507,10 +507,10 @@ func (api *API) CreateField(ctx context.Context, indexName string, frameName str // Send the create bsigroup message to all nodes. err := api.Broadcaster.SendSync( - &internal.CreateFieldMessage{ - Index: indexName, - Frame: frameName, - Field: encodeField(bsig), + &internal.CreateBSIGroupMessage{ + Index: indexName, + Frame: frameName, + BSIGroup: encodeBSIGroup(bsig), }) if err != nil { api.Logger.Printf("problem sending CreateField message: %s", err) @@ -518,6 +518,7 @@ func (api *API) CreateField(ctx context.Context, indexName string, frameName str return errors.Wrap(err, "sending CreateField message") } +// TODO: remove this from the API // DeleteField deletes the given field. func (api *API) DeleteField(ctx context.Context, indexName string, frameName string, fieldName string) error { if err := api.validate(apiDeleteField); err != nil { @@ -531,16 +532,16 @@ func (api *API) DeleteField(ctx context.Context, indexName string, frameName str } // Delete field. - if err := f.DeleteField(fieldName); err != nil { + if err := f.deleteBSIGroupAndView(fieldName); err != nil { return errors.Wrap(err, "deleting field") } // Send the delete field message to all nodes. err := api.Broadcaster.SendSync( - &internal.DeleteFieldMessage{ - Index: indexName, - Frame: frameName, - Field: fieldName, + &internal.DeleteBSIGroupMessage{ + Index: indexName, + Frame: frameName, + BSIGroup: fieldName, }) if err != nil { api.Logger.Printf("problem sending DeleteField message: %s", err) diff --git a/broadcast.go b/broadcast.go index 77b76126d..0840e8c92 100644 --- a/broadcast.go +++ b/broadcast.go @@ -127,8 +127,8 @@ const ( MessageTypeDeleteFrame MessageTypeCreateView MessageTypeDeleteView - MessageTypeCreateField - MessageTypeDeleteField + MessageTypeCreateBSIGroup + MessageTypeDeleteBSIGroup MessageTypeClusterStatus MessageTypeResizeInstruction MessageTypeResizeInstructionComplete @@ -157,10 +157,10 @@ func MarshalMessage(m proto.Message) ([]byte, error) { typ = MessageTypeCreateView case *internal.DeleteViewMessage: typ = MessageTypeDeleteView - case *internal.CreateFieldMessage: - typ = MessageTypeCreateField - case *internal.DeleteFieldMessage: - typ = MessageTypeDeleteField + case *internal.CreateBSIGroupMessage: + typ = MessageTypeCreateBSIGroup + case *internal.DeleteBSIGroupMessage: + typ = MessageTypeDeleteBSIGroup case *internal.ClusterStatus: typ = MessageTypeClusterStatus case *internal.ResizeInstruction: @@ -207,10 +207,10 @@ func UnmarshalMessage(buf []byte) (proto.Message, error) { m = &internal.CreateViewMessage{} case MessageTypeDeleteView: m = &internal.DeleteViewMessage{} - case MessageTypeCreateField: - m = &internal.CreateFieldMessage{} - case MessageTypeDeleteField: - m = &internal.DeleteFieldMessage{} + case MessageTypeCreateBSIGroup: + m = &internal.CreateBSIGroupMessage{} + case MessageTypeDeleteBSIGroup: + m = &internal.DeleteBSIGroupMessage{} case MessageTypeClusterStatus: m = &internal.ClusterStatus{} case MessageTypeResizeInstruction: diff --git a/client_test.go b/client_test.go index 898869f2b..2bb255382 100644 --- a/client_test.go +++ b/client_test.go @@ -276,7 +276,7 @@ func TestClient_ImportValue(t *testing.T) { } // Verify Sum. - sum, cnt, err := frame.FieldSum(nil, fldName) + sum, cnt, err := frame.Sum(nil, fldName) if err != nil { t.Fatal(err) } @@ -285,7 +285,7 @@ func TestClient_ImportValue(t *testing.T) { } // Verify Min. - min, cnt, err := frame.FieldMin(nil, fldName) + min, cnt, err := frame.Min(nil, fldName) if err != nil { t.Fatal(err) } @@ -294,11 +294,11 @@ func TestClient_ImportValue(t *testing.T) { } // Verify Min with Filter. - filter, err := frame.FieldRange(fldName, pql.GT, 40) + filter, err := frame.Range(fldName, pql.GT, 40) if err != nil { t.Fatal(err) } - min, cnt, err = frame.FieldMin(filter, fldName) + min, cnt, err = frame.Min(filter, fldName) if err != nil { t.Fatal(err) } @@ -307,7 +307,7 @@ func TestClient_ImportValue(t *testing.T) { } // Verify Max. - max, cnt, err := frame.FieldMax(nil, fldName) + max, cnt, err := frame.Max(nil, fldName) if err != nil { t.Fatal(err) } diff --git a/executor.go b/executor.go index 43b44c315..b5e19e5b7 100644 --- a/executor.go +++ b/executor.go @@ -835,7 +835,7 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c * return nil, ErrBSIGroupNotFound } - baseValueMin, baseValueMax, outOfRange := field.BaseValueBetween(predicates[0], predicates[1]) + baseValueMin, baseValueMax, outOfRange := field.baseValueBetween(predicates[0], predicates[1]) if outOfRange { return NewRow(), nil } @@ -868,7 +868,7 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c * return nil, ErrBSIGroupNotFound } - baseValue, outOfRange := field.BaseValue(cond.Op, value) + baseValue, outOfRange := field.baseValue(cond.Op, value) if outOfRange && cond.Op != pql.NEQ { return NewRow(), nil } diff --git a/executor_test.go b/executor_test.go index 3429529ee..578ddc11b 100644 --- a/executor_test.go +++ b/executor_test.go @@ -290,7 +290,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) { } f := hldr.Frame("i", "f") - if value, exists, err := f.FieldValue(10, "f"); err != nil { + if value, exists, err := f.Value(10, "f"); err != nil { t.Fatal(err) } else if !exists { t.Fatal("expected value to exist") @@ -298,7 +298,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) { t.Fatalf("unexpected value: %v", value) } - if value, exists, err := f.FieldValue(100, "f"); err != nil { + if value, exists, err := f.Value(100, "f"); err != nil { t.Fatal(err) } else if !exists { t.Fatal("expected value to exist") diff --git a/frame.go b/frame.go index 6e2ef0bf7..65d98937c 100644 --- a/frame.go +++ b/frame.go @@ -433,8 +433,8 @@ func (f *Frame) addBSIGroup(bsig *bsiGroup) error { } // TODO: merge this into the un-exported deleteBSIGroup. -// DeleteField deletes an existing field on the schema. -func (f *Frame) DeleteField(name string) error { +// deleteBSIGroupAndView deletes an existing field on the schema. +func (f *Frame) deleteBSIGroupAndView(name string) error { f.mu.Lock() defer f.mu.Unlock() @@ -705,8 +705,8 @@ func (f *Frame) ClearBit(name string, rowID, colID uint64, t *time.Time) (change return changed, nil } -// FieldValue reads a field value for a column. -func (f *Frame) FieldValue(columnID uint64, name string) (value int64, exists bool, err error) { +// Value reads a bsiGroup value for a column. +func (f *Frame) Value(columnID uint64, name string) (value int64, exists bool, err error) { field := f.bsiGroup(name) if field == nil { return 0, false, ErrBSIGroupNotFound @@ -751,9 +751,9 @@ func (f *Frame) SetValue(columnID uint64, value int64) (changed bool, err error) return view.setValue(columnID, field.BitDepth(), baseValue) } -// FieldSum returns the sum and count for a field. +// Sum returns the sum and count for a field. // An optional filtering row can be provided. -func (f *Frame) FieldSum(filter *Row, name string) (sum, count int64, err error) { +func (f *Frame) Sum(filter *Row, name string) (sum, count int64, err error) { field := f.bsiGroup(name) if field == nil { return 0, 0, ErrBSIGroupNotFound @@ -771,9 +771,9 @@ func (f *Frame) FieldSum(filter *Row, name string) (sum, count int64, err error) return int64(vsum) + (int64(vcount) * field.Min), int64(vcount), nil } -// FieldMin returns the min for a bsiGroup. +// Min returns the min for a field. // An optional filtering row can be provided. -func (f *Frame) FieldMin(filter *Row, name string) (min, count int64, err error) { +func (f *Frame) Min(filter *Row, name string) (min, count int64, err error) { bsig := f.bsiGroup(name) if bsig == nil { return 0, 0, ErrBSIGroupNotFound @@ -791,9 +791,9 @@ func (f *Frame) FieldMin(filter *Row, name string) (min, count int64, err error) return int64(vmin) + bsig.Min, int64(vcount), nil } -// FieldMax returns the max for a field. +// Max returns the max for a field. // An optional filtering row can be provided. -func (f *Frame) FieldMax(filter *Row, name string) (max, count int64, err error) { +func (f *Frame) Max(filter *Row, name string) (max, count int64, err error) { field := f.bsiGroup(name) if field == nil { return 0, 0, ErrBSIGroupNotFound @@ -811,7 +811,7 @@ func (f *Frame) FieldMax(filter *Row, name string) (max, count int64, err error) return int64(vmax) + field.Min, int64(vcount), nil } -func (f *Frame) FieldRange(name string, op pql.Token, predicate int64) (*Row, error) { +func (f *Frame) Range(name string, op pql.Token, predicate int64) (*Row, error) { // Retrieve and validate field. field := f.bsiGroup(name) if field == nil { @@ -826,7 +826,7 @@ func (f *Frame) FieldRange(name string, op pql.Token, predicate int64) (*Row, er return nil, nil } - baseValue, outOfRange := field.BaseValue(op, predicate) + baseValue, outOfRange := field.baseValue(op, predicate) if outOfRange { return NewRow(), nil } @@ -834,7 +834,7 @@ func (f *Frame) FieldRange(name string, op pql.Token, predicate int64) (*Row, er return view.FieldRange(op, field.BitDepth(), baseValue) } -func (f *Frame) FieldRangeBetween(name string, predicateMin, predicateMax int64) (*Row, error) { +func (f *Frame) RangeBetween(name string, predicateMin, predicateMax int64) (*Row, error) { // Retrieve and validate field. field := f.bsiGroup(name) if field == nil { @@ -849,7 +849,7 @@ func (f *Frame) FieldRangeBetween(name string, predicateMin, predicateMax int64) return nil, nil } - baseValueMin, baseValueMax, outOfRange := field.BaseValueBetween(predicateMin, predicateMax) + baseValueMin, baseValueMax, outOfRange := field.baseValueBetween(predicateMin, predicateMax) if outOfRange { return NewRow(), nil } @@ -917,23 +917,23 @@ func (f *Frame) Import(rowIDs, columnIDs []uint64, timestamps []*time.Time) erro // ImportValue bulk imports range-encoded value data. func (f *Frame) ImportValue(fieldName string, columnIDs []uint64, values []int64) error { viewName := viewBSIGroupPrefix + fieldName - // Get the field so we know bitDepth. - field := f.bsiGroup(fieldName) - if field == nil { - return fmt.Errorf("Field does not exist: %s", fieldName) + // Get the bsiGroup so we know bitDepth. + bsig := f.bsiGroup(fieldName) + if bsig == nil { + return errors.Wrap(ErrBSIGroupNotFound, fieldName) } // Split import data by fragment. dataByFragment := make(map[importKey]importValueData) for i := range columnIDs { columnID, value := columnIDs[i], values[i] - if int64(value) > field.Max { + if int64(value) > bsig.Max { return fmt.Errorf("%v, columnID=%v, value=%v", ErrBSIGroupValueTooHigh, columnID, value) - } else if int64(value) < field.Min { + } else if int64(value) < bsig.Min { return fmt.Errorf("%v, columnID=%v, value=%v", ErrBSIGroupValueTooLow, columnID, value) } - // Attach value to each field view. + // Attach value to each bsiGroup view. for _, name := range []string{viewName} { key := importKey{View: name, Slice: columnID / SliceWidth} data := dataByFragment[key] @@ -960,10 +960,10 @@ func (f *Frame) ImportValue(fieldName string, columnIDs []uint64, values []int64 baseValues := make([]uint64, len(data.Values)) for i, value := range data.Values { - baseValues[i] = uint64(value - field.Min) + baseValues[i] = uint64(value - bsig.Min) } - if err := frag.ImportValue(data.ColumnIDs, baseValues, field.BitDepth()); err != nil { + if err := frag.ImportValue(data.ColumnIDs, baseValues, bsig.BitDepth()); err != nil { return err } } @@ -1103,19 +1103,19 @@ func (b *bsiGroup) BitDepth() uint { return 63 } -// BaseValue adjusts the value to align with the range for Field for a certain +// baseValue adjusts the value to align with the range for Field for a certain // operation type. // Note: There is an edge case for GT and LT where this returns a baseValue // that does not fully encompass the range. // ex: Field.Min = 0, Field.Max = 1023 -// BaseValue(LT, 2000) returns 1023, which will perform "LT 1023" and effectively +// baseValue(LT, 2000) returns 1023, which will perform "LT 1023" and effectively // exclude any columns with value = 1023. // Note that in this case (because the range uses the full BitDepth 0 to 1023), // we can't simply return 1024. // In order to make this work, we effectively need to change the operator to LTE. // Executor.executeFieldRangeSlice() takes this into account and returns // `frag.FieldNotNull(field.BitDepth())` in such instances. -func (b *bsiGroup) BaseValue(op pql.Token, value int64) (baseValue uint64, outOfRange bool) { +func (b *bsiGroup) baseValue(op pql.Token, value int64) (baseValue uint64, outOfRange bool) { if op == pql.GT || op == pql.GTE { if value > b.Max { return baseValue, true @@ -1139,8 +1139,8 @@ func (b *bsiGroup) BaseValue(op pql.Token, value int64) (baseValue uint64, outOf return baseValue, false } -// BaseValueBetween adjusts the min/max value to align with the range for Field. -func (b *bsiGroup) BaseValueBetween(min, max int64) (baseValueMin, baseValueMax uint64, outOfRange bool) { +// baseValueBetween adjusts the min/max value to align with the range for Field. +func (b *bsiGroup) baseValueBetween(min, max int64) (baseValueMin, baseValueMax uint64, outOfRange bool) { if max < b.Min || min > b.Max { return baseValueMin, baseValueMax, true } @@ -1168,11 +1168,11 @@ func (b *bsiGroup) validate() error { return nil } -func encodeField(b *bsiGroup) *internal.Field { +func encodeBSIGroup(b *bsiGroup) *internal.BSIGroup { if b == nil { return nil } - return &internal.Field{ + return &internal.BSIGroup{ Name: b.Name, Type: b.Type, Min: int64(b.Min), @@ -1180,7 +1180,7 @@ func encodeField(b *bsiGroup) *internal.Field { } } -func decodeField(b *internal.Field) *bsiGroup { +func decodeBSIGroup(b *internal.BSIGroup) *bsiGroup { if b == nil { return nil } diff --git a/frame_internal_test.go b/frame_internal_test.go index 749e4e720..5cba2e84b 100644 --- a/frame_internal_test.go +++ b/frame_internal_test.go @@ -101,7 +101,7 @@ func TestField_BaseValue(t *testing.T) { {b2, pql.EQ, 105, 5, false}, {b2, pql.EQ, 1105, 0, true}, } { - bv, oor := tt.f.BaseValue(tt.op, tt.val) + bv, oor := tt.f.baseValue(tt.op, tt.val) if oor != tt.expOutOfRange { t.Fatalf("baseValue calculation on %s op %s, expected outOfRange %v, got %v", tt.f.Name, tt.op, tt.expOutOfRange, oor) } else if !reflect.DeepEqual(bv, tt.expBaseValue) { @@ -138,7 +138,7 @@ func TestField_BaseValue(t *testing.T) { {b2, 120, 1105, 20, 1000, false}, {b2, 1105, 2000, 0, 0, true}, } { - min, max, oor := tt.f.BaseValueBetween(tt.predMin, tt.predMax) + min, max, oor := tt.f.baseValueBetween(tt.predMin, tt.predMax) if oor != tt.expOutOfRange { t.Fatalf("baseValueBetween calculation on %s, expected outOfRange %v, got %v", tt.f.Name, tt.expOutOfRange, oor) } else if !reflect.DeepEqual(min, tt.expBaseValueMin) || !reflect.DeepEqual(max, tt.expBaseValueMax) { diff --git a/frame_test.go b/frame_test.go index 6cc75f6be..aeae2b7ba 100644 --- a/frame_test.go +++ b/frame_test.go @@ -94,7 +94,7 @@ func TestFrame_SetValue(t *testing.T) { } // Read value. - if value, exists, err := f.FieldValue(100, "f"); err != nil { + if value, exists, err := f.Value(100, "f"); err != nil { t.Fatal(err) } else if value != 21 { t.Fatalf("unexpected value: %d", value) @@ -138,7 +138,7 @@ func TestFrame_SetValue(t *testing.T) { } // Read value. - if value, exists, err := f.FieldValue(100, "f"); err != nil { + if value, exists, err := f.Value(100, "f"); err != nil { t.Fatal(err) } else if value != 23 { t.Fatalf("unexpected value: %d", value) diff --git a/internal/private.pb.go b/internal/private.pb.go index 20909445c..4e1aa8589 100644 --- a/internal/private.pb.go +++ b/internal/private.pb.go @@ -21,8 +21,8 @@ CreateIndexMessage CreateFrameMessage DeleteFrameMessage - CreateFieldMessage - DeleteFieldMessage + CreateBSIGroupMessage + DeleteBSIGroupMessage Frame Schema Index @@ -32,7 +32,7 @@ NodeEventMessage NodeStatus ClusterStatus - Field + BSIGroup CreateViewMessage DeleteViewMessage ResizeInstruction @@ -366,66 +366,66 @@ func (m *DeleteFrameMessage) GetFrame() string { return "" } -type CreateFieldMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` - Field *Field `protobuf:"bytes,3,opt,name=Field" json:"Field,omitempty"` +type CreateBSIGroupMessage struct { + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + BSIGroup *BSIGroup `protobuf:"bytes,3,opt,name=BSIGroup" json:"BSIGroup,omitempty"` } -func (m *CreateFieldMessage) Reset() { *m = CreateFieldMessage{} } -func (m *CreateFieldMessage) String() string { return proto.CompactTextString(m) } -func (*CreateFieldMessage) ProtoMessage() {} -func (*CreateFieldMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} } +func (m *CreateBSIGroupMessage) Reset() { *m = CreateBSIGroupMessage{} } +func (m *CreateBSIGroupMessage) String() string { return proto.CompactTextString(m) } +func (*CreateBSIGroupMessage) ProtoMessage() {} +func (*CreateBSIGroupMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} } -func (m *CreateFieldMessage) GetIndex() string { +func (m *CreateBSIGroupMessage) GetIndex() string { if m != nil { return m.Index } return "" } -func (m *CreateFieldMessage) GetFrame() string { +func (m *CreateBSIGroupMessage) GetFrame() string { if m != nil { return m.Frame } return "" } -func (m *CreateFieldMessage) GetField() *Field { +func (m *CreateBSIGroupMessage) GetBSIGroup() *BSIGroup { if m != nil { - return m.Field + return m.BSIGroup } return nil } -type DeleteFieldMessage struct { - Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` - Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` - Field string `protobuf:"bytes,3,opt,name=Field,proto3" json:"Field,omitempty"` +type DeleteBSIGroupMessage struct { + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + BSIGroup string `protobuf:"bytes,3,opt,name=BSIGroup,proto3" json:"BSIGroup,omitempty"` } -func (m *DeleteFieldMessage) Reset() { *m = DeleteFieldMessage{} } -func (m *DeleteFieldMessage) String() string { return proto.CompactTextString(m) } -func (*DeleteFieldMessage) ProtoMessage() {} -func (*DeleteFieldMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} } +func (m *DeleteBSIGroupMessage) Reset() { *m = DeleteBSIGroupMessage{} } +func (m *DeleteBSIGroupMessage) String() string { return proto.CompactTextString(m) } +func (*DeleteBSIGroupMessage) ProtoMessage() {} +func (*DeleteBSIGroupMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} } -func (m *DeleteFieldMessage) GetIndex() string { +func (m *DeleteBSIGroupMessage) GetIndex() string { if m != nil { return m.Index } return "" } -func (m *DeleteFieldMessage) GetFrame() string { +func (m *DeleteBSIGroupMessage) GetFrame() string { if m != nil { return m.Frame } return "" } -func (m *DeleteFieldMessage) GetField() string { +func (m *DeleteBSIGroupMessage) GetBSIGroup() string { if m != nil { - return m.Field + return m.BSIGroup } return "" } @@ -678,40 +678,40 @@ func (m *ClusterStatus) GetNodes() []*Node { return nil } -type Field struct { +type BSIGroup struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` Min int64 `protobuf:"varint,3,opt,name=Min,proto3" json:"Min,omitempty"` Max int64 `protobuf:"varint,4,opt,name=Max,proto3" json:"Max,omitempty"` } -func (m *Field) Reset() { *m = Field{} } -func (m *Field) String() string { return proto.CompactTextString(m) } -func (*Field) ProtoMessage() {} -func (*Field) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} } +func (m *BSIGroup) Reset() { *m = BSIGroup{} } +func (m *BSIGroup) String() string { return proto.CompactTextString(m) } +func (*BSIGroup) ProtoMessage() {} +func (*BSIGroup) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} } -func (m *Field) GetName() string { +func (m *BSIGroup) GetName() string { if m != nil { return m.Name } return "" } -func (m *Field) GetType() string { +func (m *BSIGroup) GetType() string { if m != nil { return m.Type } return "" } -func (m *Field) GetMin() int64 { +func (m *BSIGroup) GetMin() int64 { if m != nil { return m.Min } return 0 } -func (m *Field) GetMax() int64 { +func (m *BSIGroup) GetMax() int64 { if m != nil { return m.Max } @@ -997,8 +997,8 @@ func init() { proto.RegisterType((*CreateIndexMessage)(nil), "internal.CreateIndexMessage") proto.RegisterType((*CreateFrameMessage)(nil), "internal.CreateFrameMessage") proto.RegisterType((*DeleteFrameMessage)(nil), "internal.DeleteFrameMessage") - proto.RegisterType((*CreateFieldMessage)(nil), "internal.CreateFieldMessage") - proto.RegisterType((*DeleteFieldMessage)(nil), "internal.DeleteFieldMessage") + proto.RegisterType((*CreateBSIGroupMessage)(nil), "internal.CreateBSIGroupMessage") + proto.RegisterType((*DeleteBSIGroupMessage)(nil), "internal.DeleteBSIGroupMessage") proto.RegisterType((*Frame)(nil), "internal.Frame") proto.RegisterType((*Schema)(nil), "internal.Schema") proto.RegisterType((*Index)(nil), "internal.Index") @@ -1008,7 +1008,7 @@ func init() { proto.RegisterType((*NodeEventMessage)(nil), "internal.NodeEventMessage") proto.RegisterType((*NodeStatus)(nil), "internal.NodeStatus") proto.RegisterType((*ClusterStatus)(nil), "internal.ClusterStatus") - proto.RegisterType((*Field)(nil), "internal.Field") + proto.RegisterType((*BSIGroup)(nil), "internal.BSIGroup") proto.RegisterType((*CreateViewMessage)(nil), "internal.CreateViewMessage") proto.RegisterType((*DeleteViewMessage)(nil), "internal.DeleteViewMessage") proto.RegisterType((*ResizeInstruction)(nil), "internal.ResizeInstruction") @@ -1436,7 +1436,7 @@ func (m *DeleteFrameMessage) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { +func (m *CreateBSIGroupMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1446,7 +1446,7 @@ func (m *CreateFieldMessage) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { +func (m *CreateBSIGroupMessage) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1463,11 +1463,11 @@ func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Frame))) i += copy(dAtA[i:], m.Frame) } - if m.Field != nil { + if m.BSIGroup != nil { dAtA[i] = 0x1a i++ - i = encodeVarintPrivate(dAtA, i, uint64(m.Field.Size())) - n9, err := m.Field.MarshalTo(dAtA[i:]) + i = encodeVarintPrivate(dAtA, i, uint64(m.BSIGroup.Size())) + n9, err := m.BSIGroup.MarshalTo(dAtA[i:]) if err != nil { return 0, err } @@ -1476,7 +1476,7 @@ func (m *CreateFieldMessage) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { +func (m *DeleteBSIGroupMessage) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1486,7 +1486,7 @@ func (m *DeleteFieldMessage) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteFieldMessage) MarshalTo(dAtA []byte) (int, error) { +func (m *DeleteBSIGroupMessage) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1503,11 +1503,11 @@ func (m *DeleteFieldMessage) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPrivate(dAtA, i, uint64(len(m.Frame))) i += copy(dAtA[i:], m.Frame) } - if len(m.Field) > 0 { + if len(m.BSIGroup) > 0 { dAtA[i] = 0x1a i++ - i = encodeVarintPrivate(dAtA, i, uint64(len(m.Field))) - i += copy(dAtA[i:], m.Field) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.BSIGroup))) + i += copy(dAtA[i:], m.BSIGroup) } return i, nil } @@ -1859,7 +1859,7 @@ func (m *ClusterStatus) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *Field) Marshal() (dAtA []byte, err error) { +func (m *BSIGroup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1869,7 +1869,7 @@ func (m *Field) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Field) MarshalTo(dAtA []byte) (int, error) { +func (m *BSIGroup) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -2459,7 +2459,7 @@ func (m *DeleteFrameMessage) Size() (n int) { return n } -func (m *CreateFieldMessage) Size() (n int) { +func (m *CreateBSIGroupMessage) Size() (n int) { var l int _ = l l = len(m.Index) @@ -2470,14 +2470,14 @@ func (m *CreateFieldMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - if m.Field != nil { - l = m.Field.Size() + if m.BSIGroup != nil { + l = m.BSIGroup.Size() n += 1 + l + sovPrivate(uint64(l)) } return n } -func (m *DeleteFieldMessage) Size() (n int) { +func (m *DeleteBSIGroupMessage) Size() (n int) { var l int _ = l l = len(m.Index) @@ -2488,7 +2488,7 @@ func (m *DeleteFieldMessage) Size() (n int) { if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } - l = len(m.Field) + l = len(m.BSIGroup) if l > 0 { n += 1 + l + sovPrivate(uint64(l)) } @@ -2642,7 +2642,7 @@ func (m *ClusterStatus) Size() (n int) { return n } -func (m *Field) Size() (n int) { +func (m *BSIGroup) Size() (n int) { var l int _ = l l = len(m.Name) @@ -4304,7 +4304,7 @@ func (m *DeleteFrameMessage) Unmarshal(dAtA []byte) error { } return nil } -func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { +func (m *CreateBSIGroupMessage) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4327,10 +4327,10 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateFieldMessage: wiretype end group for non-group") + return fmt.Errorf("proto: CreateBSIGroupMessage: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateFieldMessage: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateBSIGroupMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4393,7 +4393,7 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BSIGroup", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4417,10 +4417,10 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Field == nil { - m.Field = &Field{} + if m.BSIGroup == nil { + m.BSIGroup = &BSIGroup{} } - if err := m.Field.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.BSIGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4445,7 +4445,7 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { +func (m *DeleteBSIGroupMessage) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4468,10 +4468,10 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteFieldMessage: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteBSIGroupMessage: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteFieldMessage: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteBSIGroupMessage: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4534,7 +4534,7 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BSIGroup", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4559,7 +4559,7 @@ func (m *DeleteFieldMessage) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Field = string(dAtA[iNdEx:postIndex]) + m.BSIGroup = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5671,7 +5671,7 @@ func (m *ClusterStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *Field) Unmarshal(dAtA []byte) error { +func (m *BSIGroup) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5694,10 +5694,10 @@ func (m *Field) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Field: wiretype end group for non-group") + return fmt.Errorf("proto: BSIGroup: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BSIGroup: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7075,70 +7075,70 @@ var ( func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) } var fileDescriptorPrivate = []byte{ - // 1029 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0x67, 0xbd, 0x6b, 0x27, 0xfe, 0x82, 0xd3, 0x64, 0x5a, 0xc2, 0x16, 0xa1, 0x60, 0x46, 0x45, - 0x18, 0x0e, 0x51, 0x69, 0x2f, 0xbc, 0x2a, 0x45, 0xb1, 0x83, 0x58, 0x44, 0x22, 0x98, 0x4d, 0x7a, - 0x40, 0xe2, 0x30, 0xb5, 0x47, 0xe9, 0x2a, 0xeb, 0x1d, 0xb3, 0x3b, 0x9b, 0xc4, 0x3d, 0x70, 0x85, - 0x0b, 0x77, 0xc4, 0x8d, 0xff, 0x86, 0x23, 0x7f, 0x02, 0x0a, 0xff, 0x08, 0x9a, 0x6f, 0x66, 0x1f, - 0xf1, 0xa3, 0xa9, 0x4c, 0x6f, 0xf3, 0xbd, 0x5f, 0xbf, 0x6f, 0x66, 0xa0, 0x33, 0x49, 0xa3, 0x0b, - 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 0xf3, 0xfb, 0xbf, 0xbb, - 0x6f, 0x3c, 0x6b, 0xe1, 0x37, 0xfc, 0xf1, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x71, 0x97, 0x84, - 0xb1, 0x97, 0x0b, 0x00, 0x00, + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xff, 0xaf, 0x77, 0xed, 0xd8, 0x4f, 0xfe, 0x0e, 0xc9, 0x94, 0x84, 0x6d, 0x85, 0x82, 0x19, + 0x55, 0x22, 0x70, 0xb0, 0x4a, 0x7b, 0xe1, 0xad, 0x52, 0x14, 0x3b, 0xc0, 0x22, 0x12, 0xc1, 0x6c, + 0xd2, 0x03, 0x12, 0x42, 0x53, 0x7b, 0xd4, 0xae, 0xb2, 0xde, 0x31, 0xbb, 0xb3, 0x49, 0xdc, 0x03, + 0x57, 0xb8, 0x70, 0x47, 0xdc, 0xf8, 0x36, 0x1c, 0xf9, 0x08, 0x28, 0x7c, 0x11, 0x34, 0xcf, 0xcc, + 0xbe, 0xc4, 0x2f, 0x4d, 0x95, 0x72, 0x9b, 0xe7, 0xfd, 0xed, 0xf7, 0xcc, 0x0c, 0x74, 0xa7, 0x69, + 0x74, 0xce, 0x95, 0xe8, 0x4f, 0x53, 0xa9, 0x24, 0x69, 0x47, 0x89, 0x12, 0x69, 0xc2, 0x63, 0xba, + 0x0e, 0x9d, 0x20, 0x19, 0x8b, 0xcb, 0x23, 0xa1, 0x38, 0xfd, 0xc3, 0x81, 0xce, 0xe7, 0x29, 0x9f, + 0x08, 0x4d, 0x91, 0xb7, 0xa1, 0x33, 0xe0, 0xa3, 0xe7, 0xe2, 0x64, 0x36, 0x15, 0xbe, 0xdb, 0x73, + 0xf6, 0x3a, 0xac, 0x62, 0x94, 0xd2, 0x30, 0x7a, 0x21, 0x7c, 0xaf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0x36, 0xfd, 0xc5, 0x81, 0xff, 0xd7, 0x53, 0x78, 0xa5, 0xdd, + 0x28, 0x27, 0xd2, 0x58, 0x3a, 0x11, 0x77, 0xd9, 0x44, 0xbc, 0x6a, 0x22, 0xd5, 0xab, 0xdd, 0xac, + 0xbf, 0xda, 0x67, 0x70, 0x77, 0x61, 0x4c, 0x03, 0x39, 0x99, 0x6a, 0x3c, 0xbc, 0xc6, 0xb8, 0xf4, + 0xad, 0x91, 0xa6, 0x76, 0x50, 0x1d, 0x66, 0x08, 0xfa, 0x31, 0x6c, 0x87, 0x42, 0xd5, 0x86, 0x54, + 0xa0, 0xad, 0x07, 0xee, 0xb1, 0xb8, 0x58, 0x51, 0xbe, 0x16, 0xd1, 0xcf, 0xc0, 0x3f, 0x9d, 0x8e, + 0xb9, 0x12, 0xb7, 0xb2, 0x3e, 0x80, 0xf6, 0x89, 0x9c, 0xca, 0x58, 0x3e, 0x9b, 0xdd, 0xb0, 0xf5, + 0x3e, 0xac, 0x99, 0x2b, 0xd2, 0x7c, 0xe4, 0x3a, 0xac, 0x20, 0xe9, 0x1d, 0x0d, 0xe8, 0x11, 0x8f, + 0x47, 0x79, 0xac, 0xd3, 0xd0, 0x3f, 0xba, 0xec, 0x60, 0xf3, 0xcf, 0xab, 0x5d, 0xe7, 0xaf, 0xab, + 0x5d, 0xe7, 0xef, 0xab, 0x5d, 0xe7, 0xb7, 0x7f, 0x76, 0xff, 0xf7, 0xb4, 0x85, 0xdf, 0xf3, 0x47, + 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xc6, 0x83, 0xfe, 0xaf, 0x0b, 0x00, 0x00, } diff --git a/internal/private.proto b/internal/private.proto index b530257ae..df004456f 100644 --- a/internal/private.proto +++ b/internal/private.proto @@ -12,7 +12,6 @@ message FrameMeta { int64 Min = 9; int64 Max = 10; string TimeQuantum = 5; - //repeated Field Fields = 7; } message ImportResponse { @@ -65,16 +64,16 @@ message DeleteFrameMessage { string Frame = 2; } -message CreateFieldMessage { +message CreateBSIGroupMessage { string Index = 1; string Frame = 2; - Field Field = 3; + BSIGroup BSIGroup = 3; } -message DeleteFieldMessage { +message DeleteBSIGroupMessage { string Index = 1; string Frame = 2; - string Field = 3; + string BSIGroup = 3; } message Frame { @@ -126,7 +125,7 @@ message ClusterStatus { repeated Node Nodes = 3; } -message Field { +message BSIGroup { string Name = 1; string Type = 2; int64 Min = 3; diff --git a/server.go b/server.go index e7c566cbf..1e4f5a421 100644 --- a/server.go +++ b/server.go @@ -470,15 +470,15 @@ func (s *Server) ReceiveMessage(pb proto.Message) error { if err := idx.DeleteFrame(obj.Frame); err != nil { return err } - case *internal.CreateFieldMessage: + case *internal.CreateBSIGroupMessage: f := s.Holder.Frame(obj.Index, obj.Frame) - field := decodeField(obj.Field) + field := decodeBSIGroup(obj.BSIGroup) if err := f.createBSIGroup(field); err != nil { return err } - case *internal.DeleteFieldMessage: + case *internal.DeleteBSIGroupMessage: f := s.Holder.Frame(obj.Index, obj.Frame) - if err := f.DeleteField(obj.Field); err != nil { + if err := f.deleteBSIGroupAndView(obj.BSIGroup); err != nil { return err } case *internal.CreateViewMessage: