mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge pull request #648 from raskle/input-definition
Broadcast Delete InputDefinition Messages and handle on remote nodes.
This commit is contained in:
commit
01d51ac97c
6 changed files with 248 additions and 55 deletions
|
|
@ -133,6 +133,8 @@ func MarshalMessage(m proto.Message) ([]byte, error) {
|
|||
typ = MessageTypeDeleteFrame
|
||||
case *internal.CreateInputDefinitionMessage:
|
||||
typ = MessageTypeCreateInputDefinition
|
||||
case *internal.DeleteInputDefinitionMessage:
|
||||
typ = MessageTypeDeleteInputDefinition
|
||||
default:
|
||||
return nil, fmt.Errorf("message type not implemented for marshalling: %s", reflect.TypeOf(obj))
|
||||
}
|
||||
|
|
@ -161,6 +163,8 @@ func UnmarshalMessage(buf []byte) (proto.Message, error) {
|
|||
m = &internal.DeleteFrameMessage{}
|
||||
case MessageTypeCreateInputDefinition:
|
||||
m = &internal.CreateInputDefinitionMessage{}
|
||||
case MessageTypeDeleteInputDefinition:
|
||||
m = &internal.DeleteInputDefinitionMessage{}
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid message type: %d", typ)
|
||||
}
|
||||
|
|
|
|||
11
handler.go
11
handler.go
|
|
@ -893,7 +893,7 @@ func (h *Handler) readProtobufQueryRequest(r *http.Request) (*QueryRequest, erro
|
|||
func (h *Handler) readURLQueryRequest(r *http.Request) (*QueryRequest, error) {
|
||||
q := r.URL.Query()
|
||||
validQuery := validOptions(QueryRequest{})
|
||||
for key, _ := range q {
|
||||
for key := range q {
|
||||
if _, ok := validQuery[key]; !ok {
|
||||
return nil, errors.New("invalid query params")
|
||||
}
|
||||
|
|
@ -1588,6 +1588,15 @@ func (h *Handler) handleDeleteInputDefinition(w http.ResponseWriter, r *http.Req
|
|||
return
|
||||
}
|
||||
|
||||
err := h.Broadcaster.SendSync(
|
||||
&internal.DeleteInputDefinitionMessage{
|
||||
Index: indexName,
|
||||
Name: inputDefName,
|
||||
})
|
||||
if err != nil {
|
||||
h.logger().Printf("problem sending CreateInputDefinition message: %s", err)
|
||||
}
|
||||
|
||||
if err := json.NewEncoder(w).Encode(postInputDefinitionResponse{}); err != nil {
|
||||
h.logger().Printf("response encoding error: %s", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/pilosa/pilosa/internal"
|
||||
)
|
||||
|
||||
// InputDefinition represents a container for the data input definition.
|
||||
type InputDefinition struct {
|
||||
name string
|
||||
path string
|
||||
|
|
@ -18,6 +19,7 @@ type InputDefinition struct {
|
|||
fields []Field
|
||||
}
|
||||
|
||||
// NewInputDefinition returns a new instance of InputDefinition.
|
||||
func NewInputDefinition(path, index, name string) (*InputDefinition, error) {
|
||||
err := ValidateName(name)
|
||||
if err != nil {
|
||||
|
|
@ -37,6 +39,7 @@ func (i *InputDefinition) Frames() []InputFrame { return i.frames }
|
|||
// Fields returns fields of the input definition was initialized with.
|
||||
func (i *InputDefinition) Fields() []Field { return i.fields }
|
||||
|
||||
// Open opens and initializes the InputDefinition from file.
|
||||
func (i *InputDefinition) Open() error {
|
||||
if err := func() error {
|
||||
if err := os.MkdirAll(i.path, 0777); err != nil {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
InputDefinitionField
|
||||
Action
|
||||
CreateInputDefinitionMessage
|
||||
DeleteInputDefinitionMessage
|
||||
NodeStatus
|
||||
ClusterStatus
|
||||
*/
|
||||
|
|
@ -328,6 +329,18 @@ func (m *CreateInputDefinitionMessage) GetDefinition() *InputDefinition {
|
|||
return nil
|
||||
}
|
||||
|
||||
type DeleteInputDefinitionMessage struct {
|
||||
Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeleteInputDefinitionMessage) Reset() { *m = DeleteInputDefinitionMessage{} }
|
||||
func (m *DeleteInputDefinitionMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteInputDefinitionMessage) ProtoMessage() {}
|
||||
func (*DeleteInputDefinitionMessage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptorPrivate, []int{18}
|
||||
}
|
||||
|
||||
type NodeStatus struct {
|
||||
Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
|
||||
State string `protobuf:"bytes,2,opt,name=State,proto3" json:"State,omitempty"`
|
||||
|
|
@ -337,7 +350,7 @@ type NodeStatus struct {
|
|||
func (m *NodeStatus) Reset() { *m = NodeStatus{} }
|
||||
func (m *NodeStatus) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeStatus) ProtoMessage() {}
|
||||
func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{18} }
|
||||
func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{19} }
|
||||
|
||||
func (m *NodeStatus) GetIndexes() []*Index {
|
||||
if m != nil {
|
||||
|
|
@ -353,7 +366,7 @@ type ClusterStatus struct {
|
|||
func (m *ClusterStatus) Reset() { *m = ClusterStatus{} }
|
||||
func (m *ClusterStatus) String() string { return proto.CompactTextString(m) }
|
||||
func (*ClusterStatus) ProtoMessage() {}
|
||||
func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{19} }
|
||||
func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{20} }
|
||||
|
||||
func (m *ClusterStatus) GetNodes() []*NodeStatus {
|
||||
if m != nil {
|
||||
|
|
@ -381,6 +394,7 @@ func init() {
|
|||
proto.RegisterType((*InputDefinitionField)(nil), "internal.InputDefinitionField")
|
||||
proto.RegisterType((*Action)(nil), "internal.Action")
|
||||
proto.RegisterType((*CreateInputDefinitionMessage)(nil), "internal.CreateInputDefinitionMessage")
|
||||
proto.RegisterType((*DeleteInputDefinitionMessage)(nil), "internal.DeleteInputDefinitionMessage")
|
||||
proto.RegisterType((*NodeStatus)(nil), "internal.NodeStatus")
|
||||
proto.RegisterType((*ClusterStatus)(nil), "internal.ClusterStatus")
|
||||
}
|
||||
|
|
@ -1122,6 +1136,36 @@ func (m *CreateInputDefinitionMessage) MarshalTo(dAtA []byte) (int, error) {
|
|||
return i, nil
|
||||
}
|
||||
|
||||
func (m *DeleteInputDefinitionMessage) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *DeleteInputDefinitionMessage) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Index) > 0 {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index)))
|
||||
i += copy(dAtA[i:], m.Index)
|
||||
}
|
||||
if len(m.Name) > 0 {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.Name)))
|
||||
i += copy(dAtA[i:], m.Name)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *NodeStatus) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
|
@ -1546,6 +1590,20 @@ func (m *CreateInputDefinitionMessage) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *DeleteInputDefinitionMessage) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Index)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
l = len(m.Name)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *NodeStatus) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
|
|
@ -4141,6 +4199,114 @@ func (m *CreateInputDefinitionMessage) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *DeleteInputDefinitionMessage) 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 ErrIntOverflowPrivate
|
||||
}
|
||||
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: DeleteInputDefinitionMessage: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: DeleteInputDefinitionMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowPrivate
|
||||
}
|
||||
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 ErrInvalidLengthPrivate
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Index = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowPrivate
|
||||
}
|
||||
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 ErrInvalidLengthPrivate
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Name = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipPrivate(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPrivate
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *NodeStatus) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
@ -4469,58 +4635,58 @@ var (
|
|||
func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) }
|
||||
|
||||
var fileDescriptorPrivate = []byte{
|
||||
// 834 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x8e, 0x1b, 0x45,
|
||||
// 842 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x8e, 0x1b, 0x45,
|
||||
0x10, 0x66, 0xec, 0xb1, 0x63, 0xd7, 0x6a, 0x77, 0x9d, 0x66, 0x85, 0x26, 0xab, 0x95, 0xb5, 0xea,
|
||||
0x03, 0x59, 0x7c, 0xf0, 0x21, 0x48, 0x08, 0x12, 0x0e, 0x10, 0xdb, 0x51, 0x2c, 0x70, 0x80, 0x76,
|
||||
0x94, 0x23, 0x52, 0xaf, 0x5d, 0xc0, 0x68, 0xc7, 0x33, 0x66, 0xba, 0xc7, 0x1b, 0x73, 0xe0, 0x82,
|
||||
0xc4, 0x33, 0x20, 0xf1, 0x0c, 0xbc, 0x07, 0x47, 0xae, 0xdc, 0xd0, 0x72, 0xe1, 0x31, 0x50, 0xff,
|
||||
0xcd, 0x8c, 0xc7, 0x6b, 0x47, 0x9b, 0x5b, 0xd7, 0x57, 0x5f, 0x57, 0x7d, 0x5d, 0x53, 0x55, 0x36,
|
||||
0x1c, 0x2e, 0xd3, 0x70, 0xc5, 0x25, 0xf6, 0x97, 0x69, 0x22, 0x13, 0xd2, 0x0a, 0x63, 0x89, 0x69,
|
||||
0xcc, 0x23, 0xfa, 0x15, 0xb4, 0xc7, 0xf1, 0x1c, 0x5f, 0x4f, 0x50, 0x72, 0x72, 0x0e, 0x07, 0x83,
|
||||
0x24, 0xca, 0x16, 0xf1, 0x97, 0xfc, 0x12, 0xa3, 0xc0, 0x3b, 0xf7, 0x2e, 0xda, 0xac, 0x0c, 0x29,
|
||||
0xc6, 0xcb, 0x70, 0x81, 0xdf, 0x64, 0x3c, 0x96, 0xd9, 0x22, 0xa8, 0x19, 0x46, 0x09, 0xa2, 0x7f,
|
||||
0x78, 0xd0, 0x7e, 0x96, 0xf2, 0x05, 0xea, 0x88, 0xa7, 0xd0, 0x62, 0xc9, 0x75, 0x39, 0x5c, 0x6e,
|
||||
0x93, 0xf7, 0xe1, 0x68, 0x1c, 0xaf, 0x30, 0x15, 0x38, 0x8a, 0xf9, 0x65, 0x84, 0x73, 0x1d, 0xae,
|
||||
0xc5, 0x2a, 0x28, 0x39, 0x83, 0xf6, 0x80, 0xcf, 0x7e, 0xc0, 0x97, 0xeb, 0x25, 0x06, 0x75, 0x1d,
|
||||
0xa4, 0x00, 0x72, 0xef, 0x34, 0xfc, 0x09, 0x03, 0xff, 0xdc, 0xbb, 0x38, 0x64, 0x05, 0x50, 0xd5,
|
||||
0xdb, 0xd8, 0xd6, 0x4b, 0xe1, 0x68, 0xbc, 0x58, 0x26, 0xa9, 0x64, 0x28, 0x96, 0x49, 0x2c, 0x90,
|
||||
0x74, 0xa0, 0x3e, 0x4a, 0x53, 0x2b, 0x57, 0x1d, 0xe9, 0xcf, 0xd0, 0x79, 0x1a, 0x25, 0xb3, 0xab,
|
||||
0x21, 0x97, 0x9c, 0xe1, 0x8f, 0x19, 0x0a, 0x49, 0x4e, 0xa0, 0xa1, 0x0b, 0x67, 0x79, 0xc6, 0x50,
|
||||
0xa8, 0x7e, 0xbc, 0xad, 0x8c, 0x31, 0x14, 0xaa, 0xef, 0x6b, 0xf5, 0x3e, 0x33, 0x86, 0x42, 0xa7,
|
||||
0x51, 0x38, 0x33, 0xaa, 0x7d, 0x66, 0x0c, 0x42, 0xc0, 0x7f, 0x15, 0xe2, 0xb5, 0x95, 0xaa, 0xcf,
|
||||
0x74, 0x0c, 0xf7, 0x4b, 0xf9, 0xad, 0xcc, 0xf7, 0xa0, 0xc9, 0x92, 0xeb, 0xf1, 0x50, 0x04, 0xde,
|
||||
0x79, 0xfd, 0xc2, 0x67, 0xd6, 0xd2, 0x05, 0xd1, 0x5f, 0x4c, 0xb9, 0x6a, 0xda, 0x55, 0x00, 0xf4,
|
||||
0x01, 0x34, 0x74, 0x75, 0xd4, 0x2b, 0x8b, 0xbb, 0xea, 0x48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x39, 0xbe, 0x9a, 0xa0, 0xe4, 0xe4, 0x1c, 0x0e, 0x06,
|
||||
0x49, 0x94, 0x2d, 0xe2, 0xcf, 0xf9, 0x15, 0x46, 0x81, 0x77, 0xee, 0x5d, 0xb4, 0x59, 0x19, 0x52,
|
||||
0x8c, 0x17, 0xe1, 0x02, 0xbf, 0xca, 0x78, 0x2c, 0xb3, 0x45, 0x50, 0x33, 0x8c, 0x12, 0x44, 0x7f,
|
||||
0xf3, 0xa0, 0xfd, 0x2c, 0xe5, 0x0b, 0xd4, 0x11, 0x4f, 0xa1, 0xc5, 0x92, 0x9b, 0x72, 0xb8, 0xdc,
|
||||
0x26, 0xef, 0xc2, 0xd1, 0x38, 0x5e, 0x61, 0x2a, 0x70, 0x14, 0xf3, 0xab, 0x08, 0xe7, 0x3a, 0x5c,
|
||||
0x8b, 0x55, 0x50, 0x72, 0x06, 0xed, 0x01, 0x9f, 0x7d, 0x87, 0x2f, 0xd6, 0x4b, 0x0c, 0xea, 0x3a,
|
||||
0x48, 0x01, 0xe4, 0xde, 0x69, 0xf8, 0x03, 0x06, 0xfe, 0xb9, 0x77, 0x71, 0xc8, 0x0a, 0xa0, 0xaa,
|
||||
0xb7, 0xb1, 0xad, 0x97, 0xc2, 0xd1, 0x78, 0xb1, 0x4c, 0x52, 0xc9, 0x50, 0x2c, 0x93, 0x58, 0x20,
|
||||
0xe9, 0x40, 0x7d, 0x94, 0xa6, 0x56, 0xae, 0x3a, 0xd2, 0x1f, 0xa1, 0xf3, 0x34, 0x4a, 0x66, 0xd7,
|
||||
0x43, 0x2e, 0x39, 0xc3, 0xef, 0x33, 0x14, 0x92, 0x9c, 0x40, 0x43, 0x17, 0xce, 0xf2, 0x8c, 0xa1,
|
||||
0x50, 0xfd, 0x78, 0x5b, 0x19, 0x63, 0x28, 0x54, 0xdf, 0xd7, 0xea, 0x7d, 0x66, 0x0c, 0x85, 0x4e,
|
||||
0xa3, 0x70, 0x66, 0x54, 0xfb, 0xcc, 0x18,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 0xe9, 0x13, 0x38, 0x1c,
|
||||
0x44, 0x99, 0x90, 0x98, 0xda, 0x2c, 0x3d, 0x68, 0xa8, 0x9c, 0xee, 0x37, 0xe6, 0xa4, 0xb8, 0x59,
|
||||
0x48, 0x61, 0x86, 0xf2, 0xb4, 0xf3, 0xfb, 0x6d, 0xd7, 0xfb, 0xe3, 0xb6, 0xeb, 0xfd, 0x75, 0xdb,
|
||||
0xf5, 0x7e, 0xf9, 0xbb, 0xfb, 0xd6, 0x55, 0x53, 0xff, 0xaf, 0x79, 0xff, 0xdf, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x41, 0x4c, 0x6a, 0xbc, 0xe8, 0x08, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,11 @@ message CreateInputDefinitionMessage {
|
|||
InputDefinition Definition = 3;
|
||||
}
|
||||
|
||||
message DeleteInputDefinitionMessage {
|
||||
string Index = 1;
|
||||
string Name = 2;
|
||||
}
|
||||
|
||||
message NodeStatus {
|
||||
string Host = 1;
|
||||
string State = 2;
|
||||
|
|
|
|||
|
|
@ -326,6 +326,12 @@ func (s *Server) ReceiveMessage(pb proto.Message) error {
|
|||
return fmt.Errorf("Local Index not found: %s", obj.Index)
|
||||
}
|
||||
idx.CreateInputDefinition(obj.Definition)
|
||||
case *internal.DeleteInputDefinitionMessage:
|
||||
idx := s.Holder.Index(obj.Index)
|
||||
err := idx.DeleteInputDefinition(obj.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue