diff --git a/client.go b/client.go index 8f4f282f8..bbf118399 100644 --- a/client.go +++ b/client.go @@ -303,6 +303,32 @@ func (c *InternalHTTPClient) Import(ctx context.Context, index, frame string, sl return nil } +// ImportK bulk imports bits to a host. +func (c *InternalHTTPClient) ImportK(ctx context.Context, index, frame string, bits []Bit) error { + if index == "" { + return ErrIndexRequired + } else if frame == "" { + return ErrFrameRequired + } + + buf, err := marshalImportPayloadK(index, frame, bits) + if err != nil { + return fmt.Errorf("Error Creating Payload: %s", err) + } + + node := &Node{ + Scheme: c.defaultURI.Scheme(), + Host: c.defaultURI.HostPort(), + } + + // Import to node. + if err := c.importNode(ctx, node, buf); err != nil { + return fmt.Errorf("import node: host=%s, err=%s", node.Host, err) + } + + return nil +} + func (c *InternalHTTPClient) EnsureIndex(ctx context.Context, name string, options IndexOptions) error { err := c.CreateIndex(ctx, name, options) if err == nil || err == ErrIndexExists { @@ -341,6 +367,27 @@ func marshalImportPayload(index, frame string, slice uint64, bits []Bit) ([]byte return buf, nil } +// marshalImportPayloadK marshalls the import parameters into a protobuf byte slice. +func marshalImportPayloadK(index, frame string, bits []Bit) ([]byte, error) { + // Separate row and column IDs to reduce allocations. + rowKeys := Bits(bits).RowKeys() + columnKeys := Bits(bits).ColumnKeys() + timestamps := Bits(bits).Timestamps() + + // Marshal bits to protobufs. + buf, err := proto.Marshal(&internal.ImportRequest{ + Index: index, + Frame: frame, + RowKeys: rowKeys, + ColumnKeys: columnKeys, + Timestamps: timestamps, + }) + if err != nil { + return nil, fmt.Errorf("marshal import request: %s", err) + } + return buf, nil +} + // importNode sends a pre-marshaled import request to a node. func (c *InternalHTTPClient) importNode(ctx context.Context, node *Node, buf []byte) error { // Create URL & HTTP request. @@ -1115,6 +1162,8 @@ func (c *InternalHTTPClient) NodeID(uri *URI) (string, error) { type Bit struct { RowID uint64 ColumnID uint64 + RowKey string + ColumnKey string Timestamp int64 } @@ -1152,6 +1201,24 @@ func (p Bits) ColumnIDs() []uint64 { return other } +// RowKeys returns a slice of all the row keys. +func (p Bits) RowKeys() []string { + other := make([]string, len(p)) + for i := range p { + other[i] = p[i].RowKey + } + return other +} + +// ColumnKeys returns a slice of all the column keys. +func (p Bits) ColumnKeys() []string { + other := make([]string, len(p)) + for i := range p { + other[i] = p[i].ColumnKey + } + return other +} + // Timestamps returns a slice of all the timestamps. func (p Bits) Timestamps() []int64 { other := make([]int64, len(p)) @@ -1271,6 +1338,7 @@ type InternalClient interface { FragmentNodes(ctx context.Context, index string, slice uint64) ([]*Node, error) ExecuteQuery(ctx context.Context, index string, queryRequest *internal.QueryRequest) (*internal.QueryResponse, error) Import(ctx context.Context, index, frame string, slice uint64, bits []Bit) error + ImportK(ctx context.Context, index, frame string, bits []Bit) error EnsureIndex(ctx context.Context, name string, options IndexOptions) error EnsureFrame(ctx context.Context, indexName string, frameName string, options FrameOptions) error ImportValue(ctx context.Context, index, frame, field string, slice uint64, vals []FieldValue) error diff --git a/cmd/import.go b/cmd/import.go index 250dccfd3..8692fa318 100644 --- a/cmd/import.go +++ b/cmd/import.go @@ -56,6 +56,7 @@ omitted. If it is present then its format should be YYYY-MM-DDTHH:MM. flags.StringVarP(&Importer.Index, "index", "i", "", "Pilosa index to import into.") flags.StringVarP(&Importer.Frame, "frame", "f", "", "Frame to import into.") flags.StringVarP(&Importer.Field, "field", "", "", "Field to import into.") + flags.BoolVar(&Importer.StringKeys, "string-keys", false, "Treat payload as string keys.") flags.IntVarP(&Importer.BufferSize, "buffer-size", "s", 10000000, "Number of bits to buffer/sort before importing.") flags.BoolVarP(&Importer.Sort, "sort", "", false, "Enables sorting before import.") flags.BoolVarP(&Importer.CreateSchema, "create", "e", false, "Create the schema if it does not exist before import.") diff --git a/ctl/import.go b/ctl/import.go index 179385db5..8103bf673 100644 --- a/ctl/import.go +++ b/ctl/import.go @@ -48,6 +48,9 @@ type ImportCommand struct { // For Range-Encoded fields, name of the Field to import into. Field string `json:"field"` + // Indicates that the payload should be treated as string keys. + StringKeys bool `json:"StringKeys"` + // Filenames to import from. Paths []string `json:"paths"` @@ -131,7 +134,11 @@ func (cmd *ImportCommand) importPath(ctx context.Context, path string) error { if cmd.Field != "" { return cmd.bufferFieldValues(ctx, path) } else { - return cmd.bufferBits(ctx, path) + if cmd.StringKeys { + return cmd.bufferBitsK(ctx, path) + } else { + return cmd.bufferBits(ctx, path) + } } } @@ -240,7 +247,102 @@ func (cmd *ImportCommand) importBits(ctx context.Context, bits []pilosa.Bit) err } return nil +} +// bufferBitsK buffers slices of keys to be imported as a batch. +func (cmd *ImportCommand) bufferBitsK(ctx context.Context, path string) error { + a := make([]pilosa.Bit, 0, cmd.BufferSize) + + var r *csv.Reader + + if path != "-" { + // Open file for reading. + f, err := os.Open(path) + if err != nil { + return err + } + defer f.Close() + + // Read rows as bits. + r = csv.NewReader(f) + } else { + r = csv.NewReader(cmd.Stdin) + } + + r.FieldsPerRecord = -1 + rnum := 0 + for { + rnum++ + + // Read CSV row. + record, err := r.Read() + if err == io.EOF { + break + } else if err != nil { + return err + } + + // Ignore blank rows. + if record[0] == "" { + continue + } else if len(record) < 2 { + return fmt.Errorf("bad column count on row %d: col=%d", rnum, len(record)) + } + + var bit pilosa.Bit + + // Parse row key. + if record[0] == "" { + return fmt.Errorf("invalid row key on row %d: %q", rnum, record[0]) + } + bit.RowKey = record[0] + + // Parse column key. + if record[1] == "" { + return fmt.Errorf("invalid column id on row %d: %q", rnum, record[1]) + } + bit.ColumnKey = record[1] + + // Parse time, if exists. + if len(record) > 2 && record[2] != "" { + t, err := time.Parse(pilosa.TimeFormat, record[2]) + if err != nil { + return fmt.Errorf("invalid timestamp on row %d: %q", rnum, record[2]) + } + bit.Timestamp = t.UnixNano() + } + + a = append(a, bit) + + // If we've reached the buffer size then import bits. + if len(a) == cmd.BufferSize { + if err := cmd.importBitsK(ctx, a); err != nil { + return err + } + a = a[:0] + } + } + + // If there are still bitKs in the buffer then flush them. + if err := cmd.importBitsK(ctx, a); err != nil { + return err + } + + return nil +} + +// importBitsK sends batches of bitKs to the server. +func (cmd *ImportCommand) importBitsK(ctx context.Context, bits []pilosa.Bit) error { + logger := log.New(cmd.Stderr, "", log.LstdFlags) + + // TODO: does it help to sort the rowKeys? + + logger.Printf("importing keys: n=%d", len(bits)) + if err := cmd.Client.ImportK(ctx, cmd.Index, cmd.Frame, bits); err != nil { + return err + } + + return nil } // bufferFieldValues buffers slices of fieldValues to be imported as a batch. diff --git a/handler.go b/handler.go index b81b8e124..e5cce4648 100644 --- a/handler.go +++ b/handler.go @@ -1627,7 +1627,8 @@ func (h *Handler) logger() *log.Logger { // QueryResult types. const ( - QueryResultTypeBitmap uint32 = iota + QueryResultTypeNil uint32 = iota + QueryResultTypeBitmap QueryResultTypePairs QueryResultTypeSumCount QueryResultTypeUint64 @@ -1727,6 +1728,8 @@ func encodeQueryResponse(resp *QueryResponse) *internal.QueryResponse { case bool: pb.Results[i].Type = QueryResultTypeBool pb.Results[i].Changed = result + case nil: + pb.Results[i].Type = QueryResultTypeNil } } diff --git a/internal/public.pb.go b/internal/public.pb.go index 1676d4ae5..dfb9a819e 100644 --- a/internal/public.pb.go +++ b/internal/public.pb.go @@ -415,6 +415,8 @@ type ImportRequest struct { Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` RowIDs []uint64 `protobuf:"varint,4,rep,packed,name=RowIDs" json:"RowIDs,omitempty"` ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` + RowKeys []string `protobuf:"bytes,7,rep,name=RowKeys" json:"RowKeys,omitempty"` + ColumnKeys []string `protobuf:"bytes,8,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` Timestamps []int64 `protobuf:"varint,6,rep,packed,name=Timestamps" json:"Timestamps,omitempty"` } @@ -458,6 +460,20 @@ func (m *ImportRequest) GetColumnIDs() []uint64 { return nil } +func (m *ImportRequest) GetRowKeys() []string { + if m != nil { + return m.RowKeys + } + return nil +} + +func (m *ImportRequest) GetColumnKeys() []string { + if m != nil { + return m.ColumnKeys + } + return nil +} + func (m *ImportRequest) GetTimestamps() []int64 { if m != nil { return m.Timestamps @@ -466,12 +482,13 @@ func (m *ImportRequest) GetTimestamps() []int64 { } type ImportValueRequest 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"` - Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` - Field string `protobuf:"bytes,4,opt,name=Field,proto3" json:"Field,omitempty"` - ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` - Values []int64 `protobuf:"varint,6,rep,packed,name=Values" json:"Values,omitempty"` + Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` + Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"` + Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"` + Field string `protobuf:"bytes,4,opt,name=Field,proto3" json:"Field,omitempty"` + ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"` + ColumnKeys []string `protobuf:"bytes,7,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"` + Values []int64 `protobuf:"varint,6,rep,packed,name=Values" json:"Values,omitempty"` } func (m *ImportValueRequest) Reset() { *m = ImportValueRequest{} } @@ -514,6 +531,13 @@ func (m *ImportValueRequest) GetColumnIDs() []uint64 { return nil } +func (m *ImportValueRequest) GetColumnKeys() []string { + if m != nil { + return m.ColumnKeys + } + return nil +} + func (m *ImportValueRequest) GetValues() []int64 { if m != nil { return m.Values @@ -1101,6 +1125,36 @@ func (m *ImportRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(j11)) i += copy(dAtA[i:], dAtA12[:j11]) } + if len(m.RowKeys) > 0 { + for _, s := range m.RowKeys { + dAtA[i] = 0x3a + 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 len(m.ColumnKeys) > 0 { + for _, s := range m.ColumnKeys { + dAtA[i] = 0x42 + 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 } @@ -1177,6 +1231,21 @@ func (m *ImportValueRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintPublic(dAtA, i, uint64(j15)) i += copy(dAtA[i:], dAtA16[:j15]) } + if len(m.ColumnKeys) > 0 { + for _, s := range m.ColumnKeys { + dAtA[i] = 0x3a + 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 } @@ -1447,6 +1516,18 @@ func (m *ImportRequest) Size() (n int) { } n += 1 + sovPublic(uint64(l)) + l } + if len(m.RowKeys) > 0 { + for _, s := range m.RowKeys { + l = len(s) + n += 1 + l + sovPublic(uint64(l)) + } + } + if len(m.ColumnKeys) > 0 { + for _, s := range m.ColumnKeys { + l = len(s) + n += 1 + l + sovPublic(uint64(l)) + } + } return n } @@ -1482,6 +1563,12 @@ func (m *ImportValueRequest) Size() (n int) { } n += 1 + sovPublic(uint64(l)) + l } + if len(m.ColumnKeys) > 0 { + for _, s := range m.ColumnKeys { + l = len(s) + n += 1 + l + sovPublic(uint64(l)) + } + } return n } @@ -3235,6 +3322,64 @@ func (m *ImportRequest) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RowKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + 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 ErrInvalidLengthPublic + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RowKeys = append(m.RowKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ColumnKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + 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 ErrInvalidLengthPublic + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ColumnKeys = append(m.ColumnKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPublic(dAtA[iNdEx:]) @@ -3515,6 +3660,35 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ColumnKeys", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPublic + } + 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 ErrInvalidLengthPublic + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ColumnKeys = append(m.ColumnKeys, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPublic(dAtA[iNdEx:]) @@ -3644,48 +3818,50 @@ var ( func init() { proto.RegisterFile("public.proto", fileDescriptorPublic) } var fileDescriptorPublic = []byte{ - // 678 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0x65, 0x62, 0xe7, 0x75, 0x93, 0x54, 0xd5, 0x08, 0x8a, 0x85, 0x50, 0x64, 0x59, 0x2c, 0xbc, - 0x4a, 0xa5, 0xb0, 0x07, 0x91, 0x3e, 0xa4, 0xa8, 0xa2, 0x82, 0x9b, 0x52, 0xd6, 0x6e, 0x3b, 0x2a, - 0x96, 0xfc, 0xc2, 0x1e, 0x8b, 0xe6, 0x3b, 0xd8, 0xb0, 0x66, 0x03, 0x1f, 0xc1, 0x07, 0xc0, 0x8e, - 0x4f, 0x40, 0xe1, 0x47, 0xd0, 0x9d, 0xf1, 0xd8, 0x0e, 0x95, 0x80, 0x05, 0xbb, 0x39, 0xe7, 0xcc, - 0x5c, 0xdf, 0xc7, 0xb9, 0x86, 0x71, 0x56, 0x5e, 0x44, 0xe1, 0xe5, 0x2c, 0xcb, 0x53, 0x99, 0xf2, - 0x41, 0x98, 0x48, 0x91, 0x27, 0x41, 0xe4, 0x9d, 0x43, 0x6f, 0x11, 0xca, 0x38, 0xc8, 0x38, 0x07, - 0x7b, 0x11, 0xca, 0xc2, 0x61, 0xae, 0xe5, 0xdb, 0xa8, 0xce, 0xfc, 0x11, 0x74, 0x9f, 0x49, 0x99, - 0x17, 0x4e, 0xc7, 0xb5, 0xfc, 0xd1, 0x7c, 0x67, 0x66, 0xde, 0xcd, 0x88, 0x46, 0x2d, 0xd2, 0xcb, - 0x13, 0xb1, 0x2e, 0x1c, 0xcb, 0xb5, 0xfc, 0x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 0xdc, 0x81, 0xfe, 0xc1, 0x9b, 0x20, 0xb9, 0x16, 0x57, 0xca, 0x4c, 0x03, 0x34, 0x90, - 0xcf, 0x9a, 0xe5, 0x54, 0xdd, 0x1f, 0xcd, 0x79, 0x13, 0xc2, 0x28, 0xd8, 0x2c, 0xb0, 0x71, 0x33, - 0xcd, 0x62, 0xa2, 0xdd, 0xec, 0x7d, 0x62, 0x30, 0x59, 0xc6, 0x59, 0x9a, 0xcb, 0x96, 0x43, 0x96, - 0xc9, 0x95, 0xb8, 0x31, 0x0e, 0x51, 0x80, 0xd8, 0xe3, 0x3c, 0x88, 0xf5, 0x2a, 0x0c, 0x51, 0x03, - 0x62, 0x95, 0x53, 0x94, 0x33, 0x6c, 0xd4, 0x40, 0x79, 0x82, 0x96, 0xbd, 0x70, 0x6c, 0xed, 0x26, - 0x8d, 0xc8, 0xfb, 0x66, 0xd7, 0x0b, 0xa7, 0xab, 0xa4, 0x86, 0x20, 0xef, 0xd7, 0xcb, 0x4e, 0x7e, - 0xb1, 0x7c, 0x0b, 0x5b, 0x8c, 0xf7, 0x91, 0x01, 0xd7, 0x99, 0xaa, 0x5d, 0xf8, 0x7f, 0xe9, 0xd2, - 0xdd, 0x50, 0x44, 0xba, 0xbd, 0x74, 0x97, 0xc0, 0x5f, 0x92, 0xdd, 0x83, 0x9e, 0xca, 0xc2, 0x24, - 0x5a, 0xa1, 0xc5, 0xee, 0xd7, 0xcd, 0x94, 0x7d, 0xdf, 0x4c, 0xd9, 0x8f, 0xcd, 0x94, 0x7d, 0xf8, - 0x39, 0xbd, 0x73, 0xd1, 0x53, 0xbf, 0xfa, 0xc7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x6f, - 0xfd, 0x3f, 0xfa, 0x05, 0x00, 0x00, + // 705 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0xd3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0x42, 0x5e, 0x9b, 0x84, 0x10, 0x40, 0xf6, 0xb0, 0x08, 0x13, 0x3d, 0x0a, 0x03, + 0xa1, 0x01, 0xb2, 0x94, 0x14, 0x4a, 0x86, 0x2d, 0x34, 0xa0, 0x4c, 0xe0, 0xb0, 0x97, 0xae, 0xad, + 0xd3, 0xa4, 0x11, 0x66, 0xdf, 0xcc, 0x7a, 0xe9, 0x76, 0x49, 0x6a, 0x08, 0xcc, 0xfe, 0x7a, 0xd8, + 0x31, 0x2f, 0x56, 0x60, 0x89, 0x16, 0x83, 0xef, 0x20, 0xb2, 0x2b, 0xfa, 0x85, 0xeb, 0xd3, 0x2f, + 0x9c, 0x81, 0x78, 0x52, 0x97, 0x21, 0xd1, 0x21, 0xb1, 0xc5, 0xf8, 0x5f, 0x18, 0x70, 0xed, 0x91, + 0xa6, 0xe8, 0xff, 0x19, 0xc5, 0xbd, 0x91, 0x8c, 0x75, 0x63, 0x70, 0x2f, 0x82, 0xbf, 0xd8, 0xdc, + 0x81, 0x1e, 0xdd, 0xc2, 0x58, 0xac, 0xd1, 0x2d, 0x13, 0xfd, 0xdb, 0x26, 0xe6, 0xdb, 0x5f, 0x6f, + 0x26, 0xec, 0xfb, 0xcd, 0x84, 0xfd, 0xb8, 0x99, 0xb0, 0x8f, 0xbf, 0x26, 0xf7, 0xce, 0x7a, 0xf4, + 0x27, 0xf2, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xa0, 0xd2, 0x51, 0x54, 0x06, 0x00, + 0x00, } diff --git a/internal/public.proto b/internal/public.proto index e5fc833fd..5fa40cfab 100644 --- a/internal/public.proto +++ b/internal/public.proto @@ -41,7 +41,7 @@ message Attr { } message AttrMap { - repeated Attr Attrs = 1; + repeated Attr Attrs = 1; } message QueryRequest { @@ -74,6 +74,8 @@ message ImportRequest { uint64 Slice = 3; repeated uint64 RowIDs = 4; repeated uint64 ColumnIDs = 5; + repeated string RowKeys = 7; + repeated string ColumnKeys = 8; repeated int64 Timestamps = 6; } @@ -83,5 +85,6 @@ message ImportValueRequest { uint64 Slice = 3; string Field = 4; repeated uint64 ColumnIDs = 5; + repeated string ColumnKeys = 7; repeated int64 Values = 6; }