diff --git a/charts/feast/templates/serving-deploy.yaml b/charts/feast/templates/serving-deploy.yaml index cee9f2d81e..3a6176ea2d 100644 --- a/charts/feast/templates/serving-deploy.yaml +++ b/charts/feast/templates/serving-deploy.yaml @@ -69,6 +69,10 @@ spec: value: "{{ printf "%s.%s.svc.cluster.local" (include "feast.core.name" .) .Release.Namespace }}" - name: FEAST_CORE_GRPC_PORT value: "{{ .Values.core.service.grpc.port }}" + - name: STORE_SERVING_TYPE + value: {{ .Values.store.serving.type }} + - name: STORE_SERVING_OPTIONS + value: {{ .Values.store.serving.options | toJson}} - name: FEAST_MAX_NB_THREAD value: "{{ .Values.serving.config.maxNumberOfThread }}" - name: FEAST_MAX_ENTITY_PER_BATCH diff --git a/cli/feast/cmd/apply.go b/cli/feast/cmd/apply.go index 1f50ffb5a3..1fa61c2d5e 100644 --- a/cli/feast/cmd/apply.go +++ b/cli/feast/cmd/apply.go @@ -37,11 +37,9 @@ Valid resources include: - entity - feature - featureGroup -- storage Examples: - feast apply entity entity.yml -- feast apply storage storage1.yml storage2.yml - feast apply feature *-feature.yml`, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { @@ -90,8 +88,6 @@ func apply(ctx context.Context, coreCli core.CoreServiceClient, resource string, return applyFeatureGroup(ctx, coreCli, yml) case "entity": return applyEntity(ctx, coreCli, yml) - case "storage": - return applyStorage(ctx, coreCli, yml) default: return "", fmt.Errorf("invalid resource %s: please choose one of [feature, featureGroup, entity, storage]", resource) } @@ -124,15 +120,6 @@ func applyEntity(ctx context.Context, coreCli core.CoreServiceClient, yml []byte return es.GetName(), err } -func applyStorage(ctx context.Context, coreCli core.CoreServiceClient, yml []byte) (string, error) { - ss, err := parse.YamlToStorageSpec(yml) - if err != nil { - return "", err - } - _, err = coreCli.ApplyStorage(ctx, ss) - return ss.GetId(), err -} - func isYaml(path string) bool { ext := filepath.Ext(path) if ext == ".yaml" || ext == ".yml" { diff --git a/cli/feast/cmd/apply_test.go b/cli/feast/cmd/apply_test.go index 7a8de3aaab..df919065e2 100644 --- a/cli/feast/cmd/apply_test.go +++ b/cli/feast/cmd/apply_test.go @@ -16,9 +16,10 @@ package cmd import ( "context" + "testing" + "github.com/gojek/feast/cli/feast/cmd/mock" "github.com/golang/mock/gomock" - "testing" "github.com/gojek/feast/protos/generated/go/feast/core" ) @@ -28,7 +29,6 @@ func Test_apply(t *testing.T) { mockCore.EXPECT().ApplyEntity(gomock.Any(), gomock.Any()).Return(nil, nil).AnyTimes() mockCore.EXPECT().ApplyFeature(gomock.Any(), gomock.Any()).Return(nil, nil).AnyTimes() mockCore.EXPECT().ApplyFeatureGroup(gomock.Any(), gomock.Any()).Return(nil, nil).AnyTimes() - mockCore.EXPECT().ApplyStorage(gomock.Any(), gomock.Any()).Return(nil, nil).AnyTimes() type args struct { ctx context.Context @@ -45,89 +45,78 @@ func Test_apply(t *testing.T) { { name: "test apply invalid resource", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "invalidResource", + ctx: context.Background(), + coreCli: mockCore, + resource: "invalidResource", fileLocation: "testdata/valid_entity.yaml", }, - want: "", + want: "", wantErr: true, }, { name: "test apply entity", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "entity", + ctx: context.Background(), + coreCli: mockCore, + resource: "entity", fileLocation: "testdata/valid_entity.yaml", }, - want: "myentity", + want: "myentity", wantErr: false, }, { name: "test apply entity with non-existent file", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "entity", + ctx: context.Background(), + coreCli: mockCore, + resource: "entity", fileLocation: "testdata/file_not_exists.yaml", }, - want: "", + want: "", wantErr: true, }, { name: "test apply entity with no tag", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "entity", + ctx: context.Background(), + coreCli: mockCore, + resource: "entity", fileLocation: "testdata/valid_entity_no_tag.yaml", }, - want: "myentity", + want: "myentity", wantErr: false, }, { name: "test apply invalid syntax in entity yaml", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "entity", + ctx: context.Background(), + coreCli: mockCore, + resource: "entity", fileLocation: "testdata/invalid_entity.yaml", }, - want: "", + want: "", wantErr: true, }, { name: "test apply feature", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "feature", + ctx: context.Background(), + coreCli: mockCore, + resource: "feature", fileLocation: "testdata/valid_feature.yaml", }, - want: "myentity.feature_bool_redis1", + want: "myentity.feature_bool_redis1", wantErr: false, }, { name: "test apply feature group", args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "featureGroup", + ctx: context.Background(), + coreCli: mockCore, + resource: "featureGroup", fileLocation: "testdata/valid_feature_group.yaml", }, - want: "my_fg", - wantErr: false, - }, - { - name: "test apply storage", - args: args{ - ctx: context.Background(), - coreCli: mockCore, - resource: "storage", - fileLocation: "testdata/valid_storage.yaml", - }, - want: "BIGQUERY1", + want: "my_fg", wantErr: false, }, } diff --git a/cli/feast/cmd/get.go b/cli/feast/cmd/get.go index 4efd705d6d..81dd2cb54d 100644 --- a/cli/feast/cmd/get.go +++ b/cli/feast/cmd/get.go @@ -19,7 +19,6 @@ var getCmd = &cobra.Command{ Valid resources include: - entity - feature -- storage - job Examples: @@ -81,6 +80,7 @@ func getEntity(ctx context.Context, cli core.UIServiceClient, id string) error { return nil } +// This function is deprecated, and may be removed in subsequent versions. func getStorage(ctx context.Context, cli core.UIServiceClient, id string) error { response, err := cli.GetStorage(ctx, &core.UIServiceTypes_GetStorageRequest{Id: id}) if err != nil { diff --git a/cli/feast/cmd/list.go b/cli/feast/cmd/list.go index ac4a067e4a..9995305d9c 100644 --- a/cli/feast/cmd/list.go +++ b/cli/feast/cmd/list.go @@ -38,7 +38,6 @@ var listCmd = &cobra.Command{ Valid resources include: - entities - features -- storage - jobs Examples: @@ -73,12 +72,12 @@ func list(resource string) error { return listFeatures(ctx, core.NewCoreServiceClient(coreConn)) case "entities": return listEntities(ctx, core.NewCoreServiceClient(coreConn)) - case "storage": - return listStorage(ctx, core.NewCoreServiceClient(coreConn)) case "jobs": return listJobs(ctx, core.NewJobServiceClient(coreConn)) + case "storage": + return listStorage(ctx, core.NewCoreServiceClient(coreConn)) default: - return fmt.Errorf("invalid resource %s: please choose one of [features, entities, storage, jobs]", resource) + return fmt.Errorf("invalid resource %s: please choose one of [features, storage, entities, jobs]", resource) } } @@ -116,35 +115,36 @@ func listEntities(ctx context.Context, cli core.CoreServiceClient) error { return nil } -func listStorage(ctx context.Context, cli core.CoreServiceClient) error { - response, err := cli.ListStorage(ctx, &empty.Empty{}) +func listJobs(ctx context.Context, cli core.JobServiceClient) error { + response, err := cli.ListJobs(ctx, &empty.Empty{}) if err != nil { return err } w := new(tabwriter.Writer) w.Init(os.Stdout, 0, 8, 2, ' ', 0) - fmt.Fprintf(w, "ID\tTYPE\n") - fmt.Fprintf(w, "--\t----\t\n") - for _, feat := range response.GetStorageSpecs() { + fmt.Fprintf(w, "JOB_ID\tTYPE\tRUNNER\tSTATUS\tAGE\n") + fmt.Fprintf(w, "------\t----\t------\t------\t---\n") + for _, job := range response.GetJobs() { fmt.Fprintf(w, strings.Join( - []string{feat.Id, feat.Type}, "\t")+"\n") + []string{job.Id, job.Type, job.Runner, job.Status, timeutil.DurationUntilNowInHumanFormat(*job.Created)}, "\t")+"\n") } w.Flush() return nil } -func listJobs(ctx context.Context, cli core.JobServiceClient) error { - response, err := cli.ListJobs(ctx, &empty.Empty{}) +// This function is deprecated, and may be removed in subsequent versions. +func listStorage(ctx context.Context, cli core.CoreServiceClient) error { + response, err := cli.ListStorage(ctx, &empty.Empty{}) if err != nil { return err } w := new(tabwriter.Writer) w.Init(os.Stdout, 0, 8, 2, ' ', 0) - fmt.Fprintf(w, "JOB_ID\tTYPE\tRUNNER\tSTATUS\tAGE\n") - fmt.Fprintf(w, "------\t----\t------\t------\t---\n") - for _, job := range response.GetJobs() { + fmt.Fprintf(w, "ID\tTYPE\n") + fmt.Fprintf(w, "--\t----\t\n") + for _, feat := range response.GetStorageSpecs() { fmt.Fprintf(w, strings.Join( - []string{job.Id, job.Type, job.Runner, job.Status, timeutil.DurationUntilNowInHumanFormat(*job.Created)}, "\t")+"\n") + []string{feat.Id, feat.Type}, "\t")+"\n") } w.Flush() return nil diff --git a/cli/feast/cmd/mock/core_service.go b/cli/feast/cmd/mock/core_service.go index 702712c847..5a3389300a 100644 --- a/cli/feast/cmd/mock/core_service.go +++ b/cli/feast/cmd/mock/core_service.go @@ -39,7 +39,6 @@ func (m *MockCoreServiceClient) EXPECT() *MockCoreServiceClientMockRecorder { // ApplyEntity mocks base method func (m *MockCoreServiceClient) ApplyEntity(arg0 context.Context, arg1 *specs.EntitySpec, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ApplyEntityResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -52,14 +51,12 @@ func (m *MockCoreServiceClient) ApplyEntity(arg0 context.Context, arg1 *specs.En // ApplyEntity indicates an expected call of ApplyEntity func (mr *MockCoreServiceClientMockRecorder) ApplyEntity(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyEntity", reflect.TypeOf((*MockCoreServiceClient)(nil).ApplyEntity), varargs...) } // ApplyFeature mocks base method func (m *MockCoreServiceClient) ApplyFeature(arg0 context.Context, arg1 *specs.FeatureSpec, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ApplyFeatureResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -72,14 +69,12 @@ func (m *MockCoreServiceClient) ApplyFeature(arg0 context.Context, arg1 *specs.F // ApplyFeature indicates an expected call of ApplyFeature func (mr *MockCoreServiceClientMockRecorder) ApplyFeature(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyFeature", reflect.TypeOf((*MockCoreServiceClient)(nil).ApplyFeature), varargs...) } // ApplyFeatureGroup mocks base method func (m *MockCoreServiceClient) ApplyFeatureGroup(arg0 context.Context, arg1 *specs.FeatureGroupSpec, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ApplyFeatureGroupResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -92,34 +87,12 @@ func (m *MockCoreServiceClient) ApplyFeatureGroup(arg0 context.Context, arg1 *sp // ApplyFeatureGroup indicates an expected call of ApplyFeatureGroup func (mr *MockCoreServiceClientMockRecorder) ApplyFeatureGroup(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyFeatureGroup", reflect.TypeOf((*MockCoreServiceClient)(nil).ApplyFeatureGroup), varargs...) } -// ApplyStorage mocks base method -func (m *MockCoreServiceClient) ApplyStorage(arg0 context.Context, arg1 *specs.StorageSpec, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ApplyStorageResponse, error) { - m.ctrl.T.Helper() - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ApplyStorage", varargs...) - ret0, _ := ret[0].(*core.CoreServiceTypes_ApplyStorageResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ApplyStorage indicates an expected call of ApplyStorage -func (mr *MockCoreServiceClientMockRecorder) ApplyStorage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyStorage", reflect.TypeOf((*MockCoreServiceClient)(nil).ApplyStorage), varargs...) -} - // GetEntities mocks base method func (m *MockCoreServiceClient) GetEntities(arg0 context.Context, arg1 *core.CoreServiceTypes_GetEntitiesRequest, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_GetEntitiesResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -132,14 +105,12 @@ func (m *MockCoreServiceClient) GetEntities(arg0 context.Context, arg1 *core.Cor // GetEntities indicates an expected call of GetEntities func (mr *MockCoreServiceClientMockRecorder) GetEntities(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEntities", reflect.TypeOf((*MockCoreServiceClient)(nil).GetEntities), varargs...) } // GetFeatures mocks base method func (m *MockCoreServiceClient) GetFeatures(arg0 context.Context, arg1 *core.CoreServiceTypes_GetFeaturesRequest, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_GetFeaturesResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -152,14 +123,12 @@ func (m *MockCoreServiceClient) GetFeatures(arg0 context.Context, arg1 *core.Cor // GetFeatures indicates an expected call of GetFeatures func (mr *MockCoreServiceClientMockRecorder) GetFeatures(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeatures", reflect.TypeOf((*MockCoreServiceClient)(nil).GetFeatures), varargs...) } // GetStorage mocks base method func (m *MockCoreServiceClient) GetStorage(arg0 context.Context, arg1 *core.CoreServiceTypes_GetStorageRequest, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_GetStorageResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -172,14 +141,12 @@ func (m *MockCoreServiceClient) GetStorage(arg0 context.Context, arg1 *core.Core // GetStorage indicates an expected call of GetStorage func (mr *MockCoreServiceClientMockRecorder) GetStorage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorage", reflect.TypeOf((*MockCoreServiceClient)(nil).GetStorage), varargs...) } // ListEntities mocks base method func (m *MockCoreServiceClient) ListEntities(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ListEntitiesResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -192,14 +159,12 @@ func (m *MockCoreServiceClient) ListEntities(arg0 context.Context, arg1 *empty.E // ListEntities indicates an expected call of ListEntities func (mr *MockCoreServiceClientMockRecorder) ListEntities(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListEntities", reflect.TypeOf((*MockCoreServiceClient)(nil).ListEntities), varargs...) } // ListFeatures mocks base method func (m *MockCoreServiceClient) ListFeatures(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ListFeaturesResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -212,14 +177,12 @@ func (m *MockCoreServiceClient) ListFeatures(arg0 context.Context, arg1 *empty.E // ListFeatures indicates an expected call of ListFeatures func (mr *MockCoreServiceClientMockRecorder) ListFeatures(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFeatures", reflect.TypeOf((*MockCoreServiceClient)(nil).ListFeatures), varargs...) } // ListStorage mocks base method func (m *MockCoreServiceClient) ListStorage(arg0 context.Context, arg1 *empty.Empty, arg2 ...grpc.CallOption) (*core.CoreServiceTypes_ListStorageResponse, error) { - m.ctrl.T.Helper() varargs := []interface{}{arg0, arg1} for _, a := range arg2 { varargs = append(varargs, a) @@ -232,7 +195,6 @@ func (m *MockCoreServiceClient) ListStorage(arg0 context.Context, arg1 *empty.Em // ListStorage indicates an expected call of ListStorage func (mr *MockCoreServiceClientMockRecorder) ListStorage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() varargs := append([]interface{}{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListStorage", reflect.TypeOf((*MockCoreServiceClient)(nil).ListStorage), varargs...) } diff --git a/cli/feast/cmd/testdata/valid_feature.yaml b/cli/feast/cmd/testdata/valid_feature.yaml index a54915641b..824b1a1ce3 100644 --- a/cli/feast/cmd/testdata/valid_feature.yaml +++ b/cli/feast/cmd/testdata/valid_feature.yaml @@ -4,9 +4,4 @@ entity: myentity owner: bob@example.com description: test entity. valueType: BOOL -uri: https://github.com/bob/example -dataStores: - serving: - id: REDIS1 - warehouse: - id: BIGQUERY1 \ No newline at end of file +uri: https://github.com/bob/example \ No newline at end of file diff --git a/cli/feast/cmd/testdata/valid_storage.yaml b/cli/feast/cmd/testdata/valid_storage.yaml deleted file mode 100644 index 96ae9e40f7..0000000000 --- a/cli/feast/cmd/testdata/valid_storage.yaml +++ /dev/null @@ -1,6 +0,0 @@ -id: BIGQUERY1 -type: bigquery -options: - dataset: "feast" - project: "gcp-project" - tempLocation: "gs://feast-storage" \ No newline at end of file diff --git a/cli/feast/pkg/parse/yaml.go b/cli/feast/pkg/parse/yaml.go index b8d9ac252c..a86054c930 100644 --- a/cli/feast/pkg/parse/yaml.go +++ b/cli/feast/pkg/parse/yaml.go @@ -75,18 +75,6 @@ func YamlToFeatureGroupSpec(in []byte) (*specs.FeatureGroupSpec, error) { return &fgs, err } -// YamlToStorageSpec parses the given yaml and returns the corresponding -// storage spec, if possible. -func YamlToStorageSpec(in []byte) (*specs.StorageSpec, error) { - j, err := yaml.YAMLToJSON(in) - if err != nil { - return nil, err - } - var ss specs.StorageSpec - err = json.Unmarshal(j, &ss) - return &ss, err -} - // YamlToImportSpec parses the given yaml and returns the corresponding import // spec, if possible. func YamlToImportSpec(in []byte) (*specs.ImportSpec, error) { diff --git a/cli/feast/pkg/parse/yaml_test.go b/cli/feast/pkg/parse/yaml_test.go index 0c7eaf7c01..8b19879791 100644 --- a/cli/feast/pkg/parse/yaml_test.go +++ b/cli/feast/pkg/parse/yaml_test.go @@ -40,12 +40,7 @@ entity: test owner: bob@example.com description: testing feature valueType: INT64 -uri: https://github.com/bob/example -dataStores: - serving: - id: REDIS - warehouse: - id: BIGQUERY`), +uri: https://github.com/bob/example`), expected: &specs.FeatureSpec{ Id: "test.test_feature_two", Owner: "bob@example.com", @@ -54,14 +49,6 @@ dataStores: Uri: "https://github.com/bob/example", ValueType: types.ValueType_INT64, Entity: "test", - DataStores: &specs.DataStores{ - Serving: &specs.DataStore{ - Id: "REDIS", - }, - Warehouse: &specs.DataStore{ - Id: "BIGQUERY", - }, - }, }, err: nil, }, @@ -144,23 +131,10 @@ func TestYamlToFeatureGroupSpec(t *testing.T) { input: []byte(`id: test tags: - tag1 -- tag2 -dataStores: - serving: - id: REDIS - warehouse: - id: BIGQUERY`), +- tag2`), expected: &specs.FeatureGroupSpec{ Id: "test", Tags: []string{"tag1", "tag2"}, - DataStores: &specs.DataStores{ - Serving: &specs.DataStore{ - Id: "REDIS", - }, - Warehouse: &specs.DataStore{ - Id: "BIGQUERY", - }, - }, }, err: nil, }, @@ -187,50 +161,6 @@ dataStores: } } -func TestYamlToStorageSpec(t *testing.T) { - tt := []struct { - name string - input []byte - expected *specs.StorageSpec - err error - }{ - { - name: "valid yaml", - input: []byte(`id: REDIS1 -type: REDIS -options: - redis.host: localhost`), - expected: &specs.StorageSpec{ - Id: "REDIS1", - Type: "REDIS", - Options: map[string]string{ - "redis.host": "localhost", - }, - }, - err: nil, - }, - } - - for _, tc := range tt { - t.Run(tc.name, func(t *testing.T) { - spec, err := YamlToStorageSpec(tc.input) - if tc.err == nil { - if err != nil { - t.Error(err) - } else if !cmp.Equal(spec, tc.expected) { - t.Errorf("Expected %s, got %s", tc.expected, spec) - } - } else { - // we expect an error - if err == nil { - t.Error(err) - } else if err.Error() != tc.err.Error() { - t.Errorf("Expected error %v, got %v", err.Error(), tc.err.Error()) - } - } - }) - } -} func TestYamlToImportSpec(t *testing.T) { tt := []struct { name string diff --git a/cli/feast/pkg/printer/specs.go b/cli/feast/pkg/printer/specs.go index 6730938ba6..7cce0648ee 100644 --- a/cli/feast/pkg/printer/specs.go +++ b/cli/feast/pkg/printer/specs.go @@ -20,15 +20,6 @@ func PrintFeatureDetail(featureDetail *core.UIServiceTypes_FeatureDetail) string fmt.Sprintf("%s:\t%s", "ValueType", spec.GetValueType()), fmt.Sprintf("%s:\t%s", "Uri", spec.GetUri()), } - if dstores := spec.GetDataStores(); dstores != nil { - lines = append(lines, fmt.Sprintf("DataStores: ")) - if srv := dstores.GetServing(); srv != nil { - lines = append(lines, fmt.Sprintf(" %s:\t%s", "Serving", srv.GetId())) - } - if wh := dstores.GetWarehouse(); wh != nil { - lines = append(lines, fmt.Sprintf(" %s:\t%s", "Warehouse", wh.GetId())) - } - } lines = append(lines, fmt.Sprintf("%s:\t%s", "Created", timeutil.FormatToRFC3339(*featureDetail.GetCreated()))) lines = append(lines, fmt.Sprintf("%s:\t%s", "LastUpdated", timeutil.FormatToRFC3339(*featureDetail.GetLastUpdated()))) if jobs := featureDetail.GetJobs(); len(jobs) > 0 { @@ -68,6 +59,7 @@ func PrintEntityDetail(entityDetail *core.UIServiceTypes_EntityDetail) string { // PrintStorageDetail prints the details about the feature. // Prints and returns the resultant formatted string. +// This function is deprecated, and may be removed in subsequent versions. func PrintStorageDetail(storageDetail *core.UIServiceTypes_StorageDetail) string { spec := storageDetail.GetSpec() lines := []string{ diff --git a/cli/feast/pkg/printer/specs_test.go b/cli/feast/pkg/printer/specs_test.go index 5867aeca06..d605bb7f95 100644 --- a/cli/feast/pkg/printer/specs_test.go +++ b/cli/feast/pkg/printer/specs_test.go @@ -21,48 +21,7 @@ func TestPrintFeature(t *testing.T) { expected string }{ { - name: "with storage", - input: &core.UIServiceTypes_FeatureDetail{ - Spec: &specs.FeatureSpec{ - Id: "test.test_feature_two", - Owner: "bob@example.com", - Name: "test_feature_two", - Description: "testing feature", - Uri: "https://github.com/bob/example", - ValueType: types.ValueType_INT64, - Entity: "test", - DataStores: &specs.DataStores{ - Serving: &specs.DataStore{ - Id: "REDIS", - }, - Warehouse: &specs.DataStore{ - Id: "BIGQUERY", - }, - }, - }, - BigqueryView: "bqurl", - Jobs: []string{"job1", "job2"}, - LastUpdated: ×tamp.Timestamp{Seconds: 1}, - Created: ×tamp.Timestamp{Seconds: 1}, - }, - expected: fmt.Sprintf(`Id: test.test_feature_two -Entity: test -Owner: bob@example.com -Description: testing feature -ValueType: INT64 -Uri: https://github.com/bob/example -DataStores: - Serving: REDIS - Warehouse: BIGQUERY -Created: %s -LastUpdated: %s -Related Jobs: -- job1 -- job2`, - timeutil.FormatToRFC3339(timestamp.Timestamp{Seconds: 1}), - timeutil.FormatToRFC3339(timestamp.Timestamp{Seconds: 1})), - }, { - name: "no storage", + name: "feature", input: &core.UIServiceTypes_FeatureDetail{ Spec: &specs.FeatureSpec{ Id: "test.test_feature_two", diff --git a/core/src/main/java/feast/core/OnContextRefresh.java b/core/src/main/java/feast/core/OnContextRefresh.java index 66e9139c73..39d7635f0c 100644 --- a/core/src/main/java/feast/core/OnContextRefresh.java +++ b/core/src/main/java/feast/core/OnContextRefresh.java @@ -1,7 +1,7 @@ package feast.core; import feast.core.config.StorageConfig.StorageSpecs; -import feast.core.service.SpecService; +import feast.core.storage.SchemaManager; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.event.ContextRefreshedEvent; @@ -13,17 +13,17 @@ public class OnContextRefresh { @Autowired - private SpecService specService; + private SchemaManager schemaManager; @Autowired private StorageSpecs storageSpecs; @EventListener public void onApplicationEvent(ContextRefreshedEvent event) { if (storageSpecs.getServingStorageSpec() != null) { - specService.registerStorage(storageSpecs.getServingStorageSpec()); + schemaManager.registerStorage(storageSpecs.getServingStorageSpec()); } if (storageSpecs.getWarehouseStorageSpec() != null) { - specService.registerStorage(storageSpecs.getWarehouseStorageSpec()); + schemaManager.registerStorage(storageSpecs.getWarehouseStorageSpec()); } } } \ No newline at end of file diff --git a/core/src/main/java/feast/core/config/ServerUtilConfig.java b/core/src/main/java/feast/core/config/ServerUtilConfig.java index b0881095d9..b5eb7c1eff 100644 --- a/core/src/main/java/feast/core/config/ServerUtilConfig.java +++ b/core/src/main/java/feast/core/config/ServerUtilConfig.java @@ -18,35 +18,37 @@ package feast.core.config; import com.google.common.base.Charsets; +import com.google.common.collect.Lists; import com.google.common.io.CharStreams; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.dao.EntityInfoRepository; import feast.core.dao.FeatureGroupInfoRepository; import feast.core.dao.FeatureInfoRepository; -import feast.core.dao.StorageInfoRepository; -import feast.core.model.StorageInfo; import feast.core.storage.BigQueryViewTemplater; import feast.core.storage.SchemaManager; import feast.core.validators.SpecValidator; -import feast.specs.StorageSpecProto.StorageSpec; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.List; -import java.util.stream.Collectors; - /** * Configuration providing utility objects for the core application. */ @Configuration public class ServerUtilConfig { + + @Autowired + private StorageSpecs storageSpecs; + /** * Get a BigQuery view templater. + * * @return BigQueryViewTemplater */ @Bean @@ -60,38 +62,30 @@ public BigQueryViewTemplater bigQueryViewTemplater() throws IOException { /** * Get the storage schema manager. + * * @return SchemaManager */ @Bean - public SchemaManager schemaManager(StorageInfoRepository storageInfoRepository, - BigQueryViewTemplater bigQueryViewTemplater) { - List storageSpecList = - storageInfoRepository - .findAll() - .stream() - .map(StorageInfo::getStorageSpec) - .collect(Collectors.toList()); - SchemaManager schemaManager = new SchemaManager(bigQueryViewTemplater); - schemaManager.registerStorages(storageSpecList); - return schemaManager; + public SchemaManager schemaManager(BigQueryViewTemplater bigQueryViewTemplater) { + return new SchemaManager(bigQueryViewTemplater, storageSpecs); + } /** * Get a spec validator. + * * @return SpecValidator */ @Bean public SpecValidator specValidator( - StorageInfoRepository storageInfoRepository, - EntityInfoRepository entityInfoRepository, - FeatureGroupInfoRepository featureGroupInfoRepository, - FeatureInfoRepository featureInfoRepository) { + EntityInfoRepository entityInfoRepository, + FeatureGroupInfoRepository featureGroupInfoRepository, + FeatureInfoRepository featureInfoRepository) { SpecValidator specValidator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); + new SpecValidator( + entityInfoRepository, + featureGroupInfoRepository, + featureInfoRepository); return specValidator; } } diff --git a/core/src/main/java/feast/core/config/TrainingConfig.java b/core/src/main/java/feast/core/config/TrainingConfig.java index 02525b88e5..0e5ff3e3dd 100644 --- a/core/src/main/java/feast/core/config/TrainingConfig.java +++ b/core/src/main/java/feast/core/config/TrainingConfig.java @@ -5,8 +5,9 @@ import com.google.common.base.Charsets; import com.google.common.io.CharStreams; import com.hubspot.jinjava.Jinjava; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.dao.FeatureInfoRepository; -import feast.core.training.BigQueryDatasetCreator; +import feast.core.training.BigQueryTraningDatasetCreator; import feast.core.training.BigQueryDatasetTemplater; import java.io.IOException; import java.io.InputStream; @@ -18,26 +19,30 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -/** Configuration related to training API */ +/** + * Configuration related to training API + */ @Configuration public class TrainingConfig { @Bean public BigQueryDatasetTemplater getBigQueryTrainingDatasetTemplater( - FeatureInfoRepository featureInfoRepository) throws IOException { + StorageSpecs storageSpecs, FeatureInfoRepository featureInfoRepository) throws IOException { Resource resource = new ClassPathResource("templates/bq_training.tmpl"); InputStream resourceInputStream = resource.getInputStream(); String tmpl = CharStreams.toString(new InputStreamReader(resourceInputStream, Charsets.UTF_8)); - return new BigQueryDatasetTemplater(new Jinjava(), tmpl, featureInfoRepository); + return new BigQueryDatasetTemplater(new Jinjava(), tmpl, storageSpecs.getWarehouseStorageSpec(), + featureInfoRepository); } @Bean - public BigQueryDatasetCreator getBigQueryTrainingDatasetCreator( - BigQueryDatasetTemplater templater, + public BigQueryTraningDatasetCreator getBigQueryTrainingDatasetCreator( + BigQueryDatasetTemplater templater, StorageSpecs storageSpecs, @Value("${feast.core.projectId}") String projectId, @Value("${feast.core.datasetPrefix}") String datasetPrefix) { BigQuery bigquery = BigQueryOptions.newBuilder().setProjectId(projectId).build().getService(); Clock clock = Clock.systemUTC(); - return new BigQueryDatasetCreator(templater, bigquery, clock, projectId, datasetPrefix); + return new BigQueryTraningDatasetCreator(templater, clock, + projectId, datasetPrefix); } } diff --git a/core/src/main/java/feast/core/dao/StorageInfoRepository.java b/core/src/main/java/feast/core/dao/StorageInfoRepository.java deleted file mode 100644 index b8d9795b1f..0000000000 --- a/core/src/main/java/feast/core/dao/StorageInfoRepository.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2018 The Feast Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package feast.core.dao; - -import feast.core.model.StorageInfo; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -/** JPA repository supplying StorageInfo objects keyed by ID. */ -@Repository -public interface StorageInfoRepository extends JpaRepository {} diff --git a/core/src/main/java/feast/core/grpc/CoreServiceImpl.java b/core/src/main/java/feast/core/grpc/CoreServiceImpl.java index 16732412a6..62a66801cd 100644 --- a/core/src/main/java/feast/core/grpc/CoreServiceImpl.java +++ b/core/src/main/java/feast/core/grpc/CoreServiceImpl.java @@ -17,38 +17,29 @@ package feast.core.grpc; -import com.google.common.base.Strings; import com.google.protobuf.Empty; import com.timgroup.statsd.StatsDClient; import feast.core.CoreServiceGrpc.CoreServiceImplBase; import feast.core.CoreServiceProto.CoreServiceTypes.ApplyEntityResponse; import feast.core.CoreServiceProto.CoreServiceTypes.ApplyFeatureGroupResponse; import feast.core.CoreServiceProto.CoreServiceTypes.ApplyFeatureResponse; -import feast.core.CoreServiceProto.CoreServiceTypes.ApplyStorageResponse; import feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest; import feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesResponse; import feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesRequest; import feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesResponse; -import feast.core.CoreServiceProto.CoreServiceTypes.GetStorageRequest; -import feast.core.CoreServiceProto.CoreServiceTypes.GetStorageResponse; import feast.core.CoreServiceProto.CoreServiceTypes.ListEntitiesResponse; import feast.core.CoreServiceProto.CoreServiceTypes.ListFeaturesResponse; -import feast.core.CoreServiceProto.CoreServiceTypes.ListStorageResponse; import feast.core.config.StorageConfig.StorageSpecs; import feast.core.exception.RegistrationException; import feast.core.exception.RetrievalException; import feast.core.model.EntityInfo; import feast.core.model.FeatureGroupInfo; import feast.core.model.FeatureInfo; -import feast.core.model.StorageInfo; import feast.core.service.SpecService; import feast.core.validators.SpecValidator; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureGroupSpecProto; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; -import feast.specs.StorageSpecProto.StorageSpec; import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; @@ -197,66 +188,6 @@ public void listFeatures(Empty request, StreamObserver res } } - /** - * Gets specs for all storage requested in the request. If the retrieval of any one of them fails, - * the whole request will fail, giving an internal error. - */ - @Override - public void getStorage( - GetStorageRequest request, StreamObserver responseObserver) { - long now = System.currentTimeMillis(); - statsDClient.increment("get_storage_request_count"); - try { - List storageSpecs = - specService - .getStorage(request.getIdsList()) - .stream() - .map(StorageInfo::getStorageSpec) - .collect(Collectors.toList()); - GetStorageResponse response = - GetStorageResponse.newBuilder().addAllStorageSpecs(storageSpecs).build(); - responseObserver.onNext(response); - responseObserver.onCompleted(); - statsDClient.increment("get_storage_request_success"); - } catch (RetrievalException | IllegalArgumentException e) { - statsDClient.increment("get_storage_request_failed"); - log.error("Error in getStorage: {}", e); - responseObserver.onError(getRuntimeException(e)); - } finally { - long duration = System.currentTimeMillis() - now; - statsDClient.gauge("get_storage_latency_ms", duration); - } - } - - /** - * Gets specs for all storage registered in the registry. - */ - @Override - public void listStorage(Empty request, StreamObserver responseObserver) { - long now = System.currentTimeMillis(); - statsDClient.increment("list_storage_request_count"); - try { - List storageSpecs = - specService - .listStorage() - .stream() - .map(StorageInfo::getStorageSpec) - .collect(Collectors.toList()); - ListStorageResponse response = - ListStorageResponse.newBuilder().addAllStorageSpecs(storageSpecs).build(); - responseObserver.onNext(response); - responseObserver.onCompleted(); - statsDClient.increment("list_storage_request_success"); - } catch (RetrievalException e) { - statsDClient.increment("list_storage_request_failed"); - log.error("Error in listStorage: {}", e); - responseObserver.onError(getRuntimeException(e)); - } finally { - long duration = System.currentTimeMillis() - now; - statsDClient.gauge("list_storage_latency_ms", duration); - } - } - /** * Registers a single feature spec to the registry. If validation fails, will returns a bad * request error. If registration fails (e.g. connection to the db is interrupted), an internal @@ -266,7 +197,6 @@ public void listStorage(Empty request, StreamObserver respo public void applyFeature( FeatureSpec request, StreamObserver responseObserver) { try { - request = applyDefaultStores(request); validator.validateFeatureSpec(request); FeatureInfo feature = specService.applyFeature(request); ApplyFeatureResponse response = @@ -282,25 +212,6 @@ public void applyFeature( } } - public FeatureSpec applyDefaultStores(FeatureSpec featureSpec) { - DataStores.Builder dataStoreBuilder = featureSpec.getDataStores().toBuilder(); - if (Strings.isNullOrEmpty(featureSpec.getDataStores().getServing().getId())) { - log.info("Feature has no serving store specified using default"); - if (storageSpecs.getServingStorageSpec() != null) { - dataStoreBuilder.setServing(DataStore.newBuilder() - .setId(storageSpecs.getServingStorageSpec().getId())); - } - } - if (Strings.isNullOrEmpty(featureSpec.getDataStores().getServing().getId())) { - if (storageSpecs.getWarehouseStorageSpec() != null) { - log.info("Feature has no warehouse store specified using default"); - dataStoreBuilder.setWarehouse(DataStore.newBuilder() - .setId(storageSpecs.getWarehouseStorageSpec().getId())); - } - } - return featureSpec.toBuilder().setDataStores(dataStoreBuilder).build(); - } - /** * Registers a single feature group spec to the registry. If validation fails, will returns a bad * request error. If registration fails (e.g. connection to the db is interrupted), an internal @@ -350,30 +261,6 @@ public void applyEntity( } } - /** - * Registers a single storage to the registry. If validation fails, will returns a bad request - * error. If registration fails (e.g. connection to the db is interrupted), an internal error will - * be returned. - */ - @Override - public void applyStorage( - StorageSpec request, StreamObserver responseObserver) { - try { - validator.validateStorageSpec(request); - StorageInfo storage = specService.registerStorage(request); - ApplyStorageResponse response = - ApplyStorageResponse.newBuilder().setStorageId(storage.getId()).build(); - responseObserver.onNext(response); - responseObserver.onCompleted(); - } catch (RegistrationException e) { - log.error("Error in registerStorage: {}", e); - responseObserver.onError(getRuntimeException(e)); - } catch (IllegalArgumentException e) { - log.error("Error in registerStorage: {}", e); - responseObserver.onError(getBadRequestException(e)); - } - } - private StatusRuntimeException getRuntimeException(Exception e) { return new StatusRuntimeException( Status.fromCode(Status.Code.INTERNAL).withDescription(e.getMessage()).withCause(e)); diff --git a/core/src/main/java/feast/core/grpc/DatasetServiceImpl.java b/core/src/main/java/feast/core/grpc/DatasetServiceImpl.java index 508f99d328..20081cc809 100644 --- a/core/src/main/java/feast/core/grpc/DatasetServiceImpl.java +++ b/core/src/main/java/feast/core/grpc/DatasetServiceImpl.java @@ -23,7 +23,7 @@ import feast.core.DatasetServiceProto.FeatureSet; import feast.core.DatasetServiceProto.DatasetServiceTypes.CreateDatasetRequest; import feast.core.DatasetServiceProto.DatasetServiceTypes.CreateDatasetResponse; -import feast.core.training.BigQueryDatasetCreator; +import feast.core.training.BigQueryTraningDatasetCreator; import io.grpc.Status; import io.grpc.Status.Code; import io.grpc.stub.StreamObserver; @@ -37,10 +37,10 @@ @GRpcService public class DatasetServiceImpl extends DatasetServiceImplBase { - private final BigQueryDatasetCreator datasetCreator; + private final BigQueryTraningDatasetCreator datasetCreator; @Autowired - public DatasetServiceImpl(BigQueryDatasetCreator DatasetCreator) { + public DatasetServiceImpl(BigQueryTraningDatasetCreator DatasetCreator) { this.datasetCreator = DatasetCreator; } diff --git a/core/src/main/java/feast/core/grpc/UIServiceImpl.java b/core/src/main/java/feast/core/grpc/UIServiceImpl.java index 9690f83fda..8bacfbd8a7 100644 --- a/core/src/main/java/feast/core/grpc/UIServiceImpl.java +++ b/core/src/main/java/feast/core/grpc/UIServiceImpl.java @@ -104,7 +104,8 @@ public void getFeature(GetFeatureRequest request, try { List featureInfos = specService .getFeatures(Collections.singletonList(featureId)); - FeatureDetail featureDetail = featureInfos.get(0).getFeatureDetail(); + FeatureDetail featureDetail = featureInfos.get(0) + .getFeatureDetail(specService.getStorageSpecs()); GetFeatureResponse resp = GetFeatureResponse.newBuilder() .setFeature(featureDetail) @@ -127,7 +128,7 @@ public void listFeatures(Empty request, StreamObserver res try { List featureDetails = specService.listFeatures() .stream() - .map(FeatureInfo::getFeatureDetail) + .map((fi) -> fi.getFeatureDetail(specService.getStorageSpecs())) .collect(Collectors.toList()); ListFeaturesResponse resp = ListFeaturesResponse.newBuilder() diff --git a/core/src/main/java/feast/core/http/UiServiceController.java b/core/src/main/java/feast/core/http/UiServiceController.java index 38d4e258fd..54047a5e19 100644 --- a/core/src/main/java/feast/core/http/UiServiceController.java +++ b/core/src/main/java/feast/core/http/UiServiceController.java @@ -19,26 +19,44 @@ import feast.core.JobServiceProto.JobServiceTypes.GetJobResponse; import feast.core.JobServiceProto.JobServiceTypes.ListJobsResponse; -import feast.core.UIServiceProto.UIServiceTypes.*; +import feast.core.UIServiceProto.UIServiceTypes.EntityDetail; +import feast.core.UIServiceProto.UIServiceTypes.FeatureDetail; +import feast.core.UIServiceProto.UIServiceTypes.FeatureGroupDetail; +import feast.core.UIServiceProto.UIServiceTypes.GetEntityResponse; +import feast.core.UIServiceProto.UIServiceTypes.GetFeatureGroupResponse; +import feast.core.UIServiceProto.UIServiceTypes.GetFeatureResponse; +import feast.core.UIServiceProto.UIServiceTypes.GetStorageResponse; +import feast.core.UIServiceProto.UIServiceTypes.ListEntitiesResponse; +import feast.core.UIServiceProto.UIServiceTypes.ListFeatureGroupsResponse; +import feast.core.UIServiceProto.UIServiceTypes.ListFeaturesResponse; +import feast.core.UIServiceProto.UIServiceTypes.ListStorageResponse; +import feast.core.UIServiceProto.UIServiceTypes.StorageDetail; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.model.EntityInfo; import feast.core.model.FeatureGroupInfo; import feast.core.model.FeatureInfo; import feast.core.model.StorageInfo; import feast.core.service.JobManagementService; import feast.core.service.SpecService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; -/** Web service serving the feast UI. */ +/** + * Web service serving the feast UI. + */ @CrossOrigin(maxAge = 3600) @RestController @Slf4j public class UiServiceController { + private final SpecService specService; private final JobManagementService jobManagementService; @@ -48,7 +66,9 @@ public UiServiceController(SpecService specService, JobManagementService jobMana this.jobManagementService = jobManagementService; } - /** List all feature specs registered in the registry. */ + /** + * List all feature specs registered in the registry. + */ @RequestMapping( value = "/api/ui/features", produces = "application/json", @@ -59,7 +79,8 @@ public ListFeaturesResponse listFeatures() { specService .listFeatures() .stream() - .map(FeatureInfo::getFeatureDetail) + .map((fi) -> fi + .getFeatureDetail(specService.getStorageSpecs())) .collect(Collectors.toList()); return ListFeaturesResponse.newBuilder().addAllFeatures(features).build(); } catch (Exception e) { @@ -68,7 +89,9 @@ public ListFeaturesResponse listFeatures() { } } - /** Get a single feature spec by ID. */ + /** + * Get a single feature spec by ID. + */ @RequestMapping( value = "/api/ui/features/{id}", produces = "application/json", @@ -77,8 +100,10 @@ public GetFeatureResponse getFeature(@PathVariable("id") String id) { try { FeatureInfo featureInfo = specService.getFeatures(Arrays.asList(id)).get(0); FeatureInfo resolved = featureInfo.resolve(); + StorageSpecs storageSpecs = specService.getStorageSpecs(); + FeatureDetail featureDetail = resolved.getFeatureDetail(storageSpecs); return GetFeatureResponse.newBuilder() - .setFeature(resolved.getFeatureDetail()) + .setFeature(featureDetail) .setRawSpec(featureInfo.getFeatureSpec()) .build(); } catch (Exception e) { @@ -87,7 +112,9 @@ public GetFeatureResponse getFeature(@PathVariable("id") String id) { } } - /** List all feature group specs registered in the registry. */ + /** + * List all feature group specs registered in the registry. + */ @RequestMapping( value = "/api/ui/feature_groups", produces = "application/json", @@ -107,7 +134,9 @@ public ListFeatureGroupsResponse listFeatureGroups() { } } - /** Get a single feature group spec by ID. */ + /** + * Get a single feature group spec by ID. + */ @RequestMapping( value = "/api/ui/feature_groups/{id}", produces = "application/json", @@ -124,7 +153,9 @@ public GetFeatureGroupResponse getFeatureGroup(@PathVariable("id") String id) { } } - /** List all entity specs registered in the registry. */ + /** + * List all entity specs registered in the registry. + */ @RequestMapping( value = "/api/ui/entities", produces = "application/json", @@ -144,7 +175,9 @@ public ListEntitiesResponse listEntities() { } } - /** Get a single entity spec by name. */ + /** + * Get a single entity spec by name. + */ @RequestMapping( value = "/api/ui/entities/{id}", produces = "application/json", @@ -159,7 +192,9 @@ public GetEntityResponse getEntity(@PathVariable("id") String id) { } } - /** List all storage specs registered in the registry. */ + /** + * List all storage specs registered in the registry. + */ @RequestMapping( value = "/api/ui/storage", produces = "application/json", @@ -179,7 +214,9 @@ public ListStorageResponse listStorage() { } } - /** Get a single storage spec by name. */ + /** + * Get a single storage spec by name. + */ @RequestMapping( value = "/api/ui/storage/{id}", produces = "application/json", @@ -204,7 +241,9 @@ public ListJobsResponse listJobs() { } } - /** Get a single job by id. */ + /** + * Get a single job by id. + */ @RequestMapping( value = "/api/ui/jobs/{id}", produces = "application/json", diff --git a/core/src/main/java/feast/core/model/FeatureGroupInfo.java b/core/src/main/java/feast/core/model/FeatureGroupInfo.java index 4fef15512d..50f96976a8 100644 --- a/core/src/main/java/feast/core/model/FeatureGroupInfo.java +++ b/core/src/main/java/feast/core/model/FeatureGroupInfo.java @@ -17,17 +17,18 @@ package feast.core.model; +import com.google.common.collect.Maps; import feast.core.UIServiceProto.UIServiceTypes.FeatureGroupDetail; import feast.core.util.TypeConversion; import feast.specs.FeatureGroupSpecProto.FeatureGroupSpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; -import javax.persistence.*; - /** * A row in the registry storing information about a single feature group, including its relevant * metadata. @@ -39,62 +40,34 @@ @Table(name = "feature_groups") public class FeatureGroupInfo extends AbstractTimestampEntity { - @Id private String id; + @Id + private String id; @Column(name = "tags") private String tags; - @ManyToOne - @JoinColumn(name = "serving_store_id") - private StorageInfo servingStore; - - @Column(name = "serving_store_opts") - private String servingStoreOpts; - - @ManyToOne - @JoinColumn(name = "warehouse_store_id") - private StorageInfo warehouseStore; - - @Column(name = "warehouse_store_opts") - private String warehouseStoreOpts; + @Column(name = "options") + private String options; public FeatureGroupInfo() { super(); } public FeatureGroupInfo( - FeatureGroupSpec spec, StorageInfo servingStore, StorageInfo warehouseStore) { + FeatureGroupSpec spec) { this.id = spec.getId(); this.tags = String.join(",", spec.getTagsList()); - this.servingStore = servingStore; - this.warehouseStore = warehouseStore; - this.servingStoreOpts = - TypeConversion.convertMapToJsonString(spec.getDataStores().getServing().getOptionsMap()); - this.warehouseStoreOpts = - TypeConversion.convertMapToJsonString(spec.getDataStores().getWarehouse().getOptionsMap()); + this.options = TypeConversion.convertMapToJsonString(spec.getOptionsMap()); } - /** Get the feature group spec associated with this record. */ + /** + * Get the feature group spec associated with this record. + */ public FeatureGroupSpec getFeatureGroupSpec() { - DataStore servingDataStore = - DataStore.newBuilder() - .setId(servingStore.getId()) - .putAllOptions(TypeConversion.convertJsonStringToMap(servingStoreOpts)) - .build(); - DataStore warehouseDataStore = - DataStore.newBuilder() - .setId(warehouseStore.getId()) - .putAllOptions(TypeConversion.convertJsonStringToMap(warehouseStoreOpts)) - .build(); - DataStores dataStores = - DataStores.newBuilder() - .setWarehouse(warehouseDataStore) - .setServing(servingDataStore) - .build(); return FeatureGroupSpec.newBuilder() .setId(id) .addAllTags(TypeConversion.convertTagStringToList(tags)) - .setDataStores(dataStores) + .putAllOptions(TypeConversion.convertJsonStringToMap(options)) .build(); } @@ -118,6 +91,6 @@ public void update(FeatureGroupSpec update) throws IllegalArgumentException { private boolean isLegalUpdate(FeatureGroupSpec update) { FeatureGroupSpec spec = this.getFeatureGroupSpec(); - return spec.getDataStores().equals(update.getDataStores()); + return Maps.difference(spec.getOptionsMap(), update.getOptionsMap()).areEqual(); } } diff --git a/core/src/main/java/feast/core/model/FeatureInfo.java b/core/src/main/java/feast/core/model/FeatureInfo.java index e10944df1d..ec52d8822f 100644 --- a/core/src/main/java/feast/core/model/FeatureInfo.java +++ b/core/src/main/java/feast/core/model/FeatureInfo.java @@ -17,26 +17,35 @@ package feast.core.model; +import static feast.core.util.TypeConversion.convertJsonStringToMap; +import static feast.core.util.TypeConversion.convertTagStringToList; + +import com.google.common.base.Strings; +import com.google.common.collect.Maps; import feast.core.UIServiceProto.UIServiceTypes.FeatureDetail; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.storage.BigQueryStorageManager; import feast.core.util.TypeConversion; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; +import feast.specs.StorageSpecProto.StorageSpec; import feast.types.ValueProto.ValueType; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.Table; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.Setter; -import javax.persistence.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static feast.core.util.TypeConversion.convertJsonStringToMap; -import static feast.core.util.TypeConversion.convertTagStringToList; - /** * A row in the registry storing information about a single feature, including its relevant * metadata. @@ -48,7 +57,8 @@ @Table(name = "features") public class FeatureInfo extends AbstractTimestampEntity { - @Id private String id; + @Id + private String id; @Column(name = "name", nullable = false) private String name; @@ -79,20 +89,6 @@ public class FeatureInfo extends AbstractTimestampEntity { @Column(name = "options") private String options; - @ManyToOne - @JoinColumn(name = "serving_store_id") - private StorageInfo servingStore; - - @Column(name = "serving_store_opts") - private String servingStoreOpts; - - @ManyToOne - @JoinColumn(name = "warehouse_store_id") - private StorageInfo warehouseStore; - - @Column(name = "warehouse_store_opts") - private String warehouseStoreOpts; - @Column(name = "big_query_view") private String bigQueryView; @@ -109,8 +105,6 @@ public FeatureInfo() { public FeatureInfo( FeatureSpec spec, EntityInfo entityInfo, - StorageInfo servingStore, - StorageInfo warehouseStore, FeatureGroupInfo featureGroupInfo) { this.id = spec.getId(); this.name = spec.getName(); @@ -120,18 +114,9 @@ public FeatureInfo( this.valueType = spec.getValueType(); this.entity = entityInfo; this.featureGroup = featureGroupInfo; + this.bigQueryView = ""; this.tags = String.join(",", spec.getTagsList()); this.options = TypeConversion.convertMapToJsonString(spec.getOptionsMap()); - if (spec.getDataStores() != null) { - this.servingStore = servingStore; - this.servingStoreOpts = - TypeConversion.convertMapToJsonString(spec.getDataStores().getServing().getOptionsMap()); - this.warehouseStore = warehouseStore; - this.warehouseStoreOpts = - TypeConversion.convertMapToJsonString( - spec.getDataStores().getWarehouse().getOptionsMap()); - } - this.bigQueryView = createBigqueryViewLink(warehouseStore); } public FeatureInfo(FeatureInfo other) { @@ -145,10 +130,6 @@ public FeatureInfo(FeatureInfo other) { this.featureGroup = other.featureGroup; this.tags = other.tags; this.options = other.options; - this.warehouseStore = other.warehouseStore; - this.warehouseStoreOpts = other.warehouseStoreOpts; - this.servingStore = other.servingStore; - this.servingStoreOpts = other.servingStoreOpts; this.bigQueryView = other.bigQueryView; this.enabled = other.enabled; this.setLastUpdated(other.getLastUpdated()); @@ -160,17 +141,6 @@ public FeatureInfo(FeatureInfo other) { * resolve inheritance from associated feature groups. */ public FeatureSpec getFeatureSpec() { - DataStores.Builder dataStoreBuilder = DataStores.newBuilder(); - if (servingStore != null) { - DataStore servingDataStore = buildDataStore(servingStore.getId(), servingStoreOpts); - dataStoreBuilder.setServing(servingDataStore); - } - if (warehouseStore != null) { - DataStore warehouseDataStore = buildDataStore(warehouseStore.getId(), warehouseStoreOpts); - dataStoreBuilder.setWarehouse(warehouseDataStore); - } - DataStores dataStores = dataStoreBuilder.build(); - FeatureSpec.Builder builder = FeatureSpec.newBuilder() .setId(id) @@ -181,8 +151,7 @@ public FeatureSpec getFeatureSpec() { .setValueType(valueType) .setEntity(entity.getName()) .addAllTags(convertTagStringToList(tags)) - .putAllOptions(convertJsonStringToMap(options)) - .setDataStores(dataStores); + .putAllOptions(convertJsonStringToMap(options)); if (featureGroup != null) { builder.setGroup(featureGroup.getId()); } @@ -197,51 +166,37 @@ public FeatureInfo resolve() { return this; } FeatureInfo featureInfoCopy = new FeatureInfo(this); - if (featureInfoCopy.servingStore == null) { - featureInfoCopy.servingStore = featureGroup.getServingStore(); - } - if (featureInfoCopy.warehouseStore == null) { - featureInfoCopy.warehouseStore = featureGroup.getWarehouseStore(); - } - List resolvedTags = new ArrayList<>(); resolvedTags.addAll(convertTagStringToList(featureInfoCopy.tags)); resolvedTags.addAll(convertTagStringToList(featureGroup.getTags())); + featureGroup.getOptions(); featureInfoCopy.tags = String.join(",", resolvedTags); - featureInfoCopy.bigQueryView = createBigqueryViewLink(featureInfoCopy.warehouseStore); return featureInfoCopy; } - /** Get the feature detail containing both spec and metadata, associated with this record. */ - public FeatureDetail getFeatureDetail() { + /** + * Get the feature detail containing both spec and metadata, associated with this record. + */ + public FeatureDetail getFeatureDetail(StorageSpecs storageSpecs) { return FeatureDetail.newBuilder() .setSpec(this.getFeatureSpec()) - .setBigqueryView(this.bigQueryView) + .setBigqueryView(!Strings.isNullOrEmpty(bigQueryView) ? bigQueryView + : createBigqueryViewLink(storageSpecs.getWarehouseStorageSpec())) .setEnabled(this.enabled) .setLastUpdated(TypeConversion.convertTimestamp(this.getLastUpdated())) .setCreated(TypeConversion.convertTimestamp(this.getCreated())) .build(); } - private DataStore buildDataStore(String id, String opts) { - DataStore.Builder builder = DataStore.newBuilder(); - if (id != null) { - builder.setId(id); - } - if (opts != null) { - builder.putAllOptions(convertJsonStringToMap(opts)); - } - return builder.build(); - } - - private String createBigqueryViewLink(StorageInfo warehouseStore) { - if (warehouseStore == null || !warehouseStore.getType().equals(BigQueryStorageManager.TYPE)) { + protected String createBigqueryViewLink(StorageSpec storageSpec) { + if (storageSpec == null || !storageSpec.getType().equals(BigQueryStorageManager.TYPE)) { return "N.A."; } - Map opts = convertJsonStringToMap(warehouseStore.getOptions()); - String projectId = opts.get(BigQueryStorageManager.OPT_BIGQUERY_PROJECT); - String dataset = opts.get(BigQueryStorageManager.OPT_BIGQUERY_DATASET); + String projectId = storageSpec + .getOptionsOrDefault(BigQueryStorageManager.OPT_BIGQUERY_PROJECT, null); + String dataset = storageSpec + .getOptionsOrDefault(BigQueryStorageManager.OPT_BIGQUERY_DATASET, null); return String.format( "https://bigquery.cloud.google.com/table/%s:%s.%s_view", @@ -272,7 +227,6 @@ private boolean isLegalUpdate(FeatureSpec update) { && spec.getEntity().equals(update.getEntity()) && spec.getValueType().equals(update.getValueType()) && spec.getGroup().equals(update.getGroup()) - && spec.getOptionsMap().equals(update.getOptionsMap()) - && spec.getDataStores().equals(update.getDataStores()); + && Maps.difference(spec.getOptionsMap(), update.getOptionsMap()).areEqual(); } } diff --git a/core/src/main/java/feast/core/service/JobManagementService.java b/core/src/main/java/feast/core/service/JobManagementService.java index 960ee7e91a..5b2ee9217b 100644 --- a/core/src/main/java/feast/core/service/JobManagementService.java +++ b/core/src/main/java/feast/core/service/JobManagementService.java @@ -30,7 +30,6 @@ import com.google.protobuf.util.JsonFormat; import feast.core.JobServiceProto.JobServiceTypes.JobDetail; import feast.core.config.ImportJobDefaults; -import feast.core.config.StorageConfig; import feast.core.config.StorageConfig.StorageSpecs; import feast.core.dao.JobInfoRepository; import feast.core.dao.MetricsRepository; @@ -46,14 +45,12 @@ import feast.core.model.JobInfo; import feast.core.model.JobStatus; import feast.core.model.Metrics; -import feast.core.model.StorageInfo; import feast.core.util.PathUtil; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.ImportJobSpecsProto.ImportJobSpecs; import feast.specs.ImportSpecProto.Field; import feast.specs.ImportSpecProto.ImportSpec; -import feast.specs.StorageSpecProto.StorageSpec; import java.io.IOException; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; @@ -131,42 +128,17 @@ private ImportJobSpecs buildImportJobSpecs(ImportSpec importSpec, String jobId) .map(FeatureInfo::getFeatureSpec) .collect(Collectors.toList()); - Set servingStoreIds = featureSpecs.stream() - .map(featureSpec -> featureSpec.getDataStores().getServing().getId()) - .filter(not(Strings::isNullOrEmpty)) - .collect(Collectors.toSet()); - if (!servingStoreIds.contains(StorageConfig.DEFAULT_SERVING_ID) - && storageSpecs.getServingStorageSpec() != null) { - servingStoreIds.add(StorageConfig.DEFAULT_SERVING_ID); - } - List servingStorageSpecs = specService - .getStorage(Lists.newArrayList(servingStoreIds)).stream() - .map(StorageInfo::getStorageSpec) - .collect(Collectors.toList()); - - Set warehouseStoreIds = featureSpecs.stream() - .map(featureSpec -> featureSpec.getDataStores().getWarehouse().getId()) - .filter(not(Strings::isNullOrEmpty)) - .collect(Collectors.toSet()); - if (!warehouseStoreIds.contains(StorageConfig.DEFAULT_WAREHOUSE_ID) - && storageSpecs.getWarehouseStorageSpec() != null) { - warehouseStoreIds.add(StorageConfig.DEFAULT_WAREHOUSE_ID); - } - List warehouseStorageSpecs = Lists.newArrayList(); - if (warehouseStoreIds.size() > 0) { - warehouseStorageSpecs = specService - .getStorage(Lists.newArrayList(warehouseStoreIds)).stream() - .map(StorageInfo::getStorageSpec) - .collect(Collectors.toList()); - } - ImportJobSpecs.Builder importJobSpecsBuilder = ImportJobSpecs.newBuilder() .setJobId(jobId) .setImportSpec(importSpec) .addAllEntitySpecs(entitySpecs) - .addAllFeatureSpecs(featureSpecs) - .addAllServingStorageSpecs(servingStorageSpecs) - .addAllWarehouseStorageSpecs(warehouseStorageSpecs); + .addAllFeatureSpecs(featureSpecs); + if (storageSpecs.getServingStorageSpec() != null) { + importJobSpecsBuilder.setServingStorageSpec(storageSpecs.getServingStorageSpec()); + } + if (storageSpecs.getWarehouseStorageSpec() != null) { + importJobSpecsBuilder.setWarehouseStorageSpec(storageSpecs.getWarehouseStorageSpec()); + } if (storageSpecs.getErrorsStorageSpec() != null) { importJobSpecsBuilder.setErrorsStorageSpec(storageSpecs.getErrorsStorageSpec()); } diff --git a/core/src/main/java/feast/core/service/SpecService.java b/core/src/main/java/feast/core/service/SpecService.java index bded3399ef..168bc056d9 100644 --- a/core/src/main/java/feast/core/service/SpecService.java +++ b/core/src/main/java/feast/core/service/SpecService.java @@ -18,12 +18,13 @@ package feast.core.service; import com.google.common.base.Strings; +import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.protobuf.util.JsonFormat; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.dao.EntityInfoRepository; import feast.core.dao.FeatureGroupInfoRepository; import feast.core.dao.FeatureInfoRepository; -import feast.core.dao.StorageInfoRepository; import feast.core.exception.RegistrationException; import feast.core.exception.RetrievalException; import feast.core.log.Action; @@ -34,18 +35,19 @@ import feast.core.model.FeatureInfo; import feast.core.model.StorageInfo; import feast.core.storage.SchemaManager; -import feast.core.util.TypeConversion; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureGroupSpecProto.FeatureGroupSpec; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.StorageSpecProto.StorageSpec; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.Set; +import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.List; - /** * Facilitates management of specs within the Feast registry. This includes getting existing specs * and registering new specs. @@ -53,24 +55,26 @@ @Slf4j @Service public class SpecService { + private final EntityInfoRepository entityInfoRepository; private final FeatureInfoRepository featureInfoRepository; - private final StorageInfoRepository storageInfoRepository; private final FeatureGroupInfoRepository featureGroupInfoRepository; private final SchemaManager schemaManager; + @Getter + private final StorageSpecs storageSpecs; @Autowired public SpecService( EntityInfoRepository entityInfoRegistry, FeatureInfoRepository featureInfoRegistry, - StorageInfoRepository storageInfoRegistry, FeatureGroupInfoRepository featureGroupInfoRepository, - SchemaManager schemaManager) { + SchemaManager schemaManager, + StorageSpecs storageSpecs) { this.entityInfoRepository = entityInfoRegistry; this.featureInfoRepository = featureInfoRegistry; - this.storageInfoRepository = storageInfoRegistry; this.featureGroupInfoRepository = featureGroupInfoRepository; this.schemaManager = schemaManager; + this.storageSpecs = storageSpecs; } /** @@ -151,7 +155,8 @@ public List getFeatureGroups(List ids) { } Set dedupIds = Sets.newHashSet(ids); - List featureGroupInfos = this.featureGroupInfoRepository.findAllById(dedupIds); + List featureGroupInfos = this.featureGroupInfoRepository + .findAllById(dedupIds); if (featureGroupInfos.size() < dedupIds.size()) { throw new RetrievalException( "unable to retrieve all feature groups requested " + dedupIds); @@ -182,11 +187,24 @@ public List getStorage(List ids) { throw new IllegalArgumentException("ids cannot be empty"); } Set dedupIds = Sets.newHashSet(ids); - - List storageInfos = this.storageInfoRepository.findAllById(dedupIds); - if (storageInfos.size() < dedupIds.size()) { + List storageInfos = Lists.newArrayList(); + StorageSpecs storageSpecs = getStorageSpecs(); + Map map = new HashMap<>(); + if (storageSpecs.getServingStorageSpec() != null) { + map.put(storageSpecs.getServingStorageSpec().getId(), storageSpecs.getServingStorageSpec()); + } + if (storageSpecs.getWarehouseStorageSpec() != null) { + map.put(storageSpecs.getWarehouseStorageSpec().getId(), storageSpecs.getWarehouseStorageSpec()); + } + for (String id : dedupIds) { + if (map.containsKey(id)) { + storageInfos.add(new StorageInfo(map.get(id))); + } + } + if (dedupIds.size() != storageInfos.size()) { throw new RetrievalException( "unable to retrieve all storage requested: " + ids); + } return storageInfos; } @@ -198,7 +216,9 @@ public List getStorage(List ids) { * @throws RetrievalException if retrieval fails */ public List listStorage() { - return this.storageInfoRepository.findAll(); + return Lists.newArrayList( + new StorageInfo(getStorageSpecs().getServingStorageSpec()), + new StorageInfo(getStorageSpecs().getWarehouseStorageSpec())); } /** @@ -224,13 +244,7 @@ public FeatureInfo applyFeature(FeatureSpec spec) { EntityInfo entity = entityInfoRepository.findById(spec.getEntity()).orElse(null); FeatureGroupInfo featureGroupInfo = featureGroupInfoRepository.findById(spec.getGroup()).orElse(null); - StorageInfo servingStore = - storageInfoRepository.findById(spec.getDataStores().getServing().getId()).orElse(null); - StorageInfo warehouseStore = - storageInfoRepository - .findById(spec.getDataStores().getWarehouse().getId()) - .orElse(null); - featureInfo = new FeatureInfo(spec, entity, servingStore, warehouseStore, featureGroupInfo); + featureInfo = new FeatureInfo(spec, entity, featureGroupInfo); FeatureInfo resolvedFeatureInfo = featureInfo.resolve(); FeatureSpec resolvedFeatureSpec = resolvedFeatureInfo.getFeatureSpec(); schemaManager.registerFeature(resolvedFeatureSpec); @@ -272,21 +286,7 @@ public FeatureGroupInfo applyFeatureGroup(FeatureGroupSpec spec) { featureGroupInfo.update(spec); action = Action.UPDATE; } else { - StorageInfo servingStore = - storageInfoRepository - .findById( - spec.getDataStores().hasServing() - ? spec.getDataStores().getServing().getId() - : "") - .orElse(null); - StorageInfo warehouseStore = - storageInfoRepository - .findById( - spec.getDataStores().hasServing() - ? spec.getDataStores().getWarehouse().getId() - : "") - .orElse(null); - featureGroupInfo = new FeatureGroupInfo(spec, servingStore, warehouseStore); + featureGroupInfo = new FeatureGroupInfo(spec); action = Action.REGISTER; } FeatureGroupInfo out = featureGroupInfoRepository.saveAndFlush(featureGroupInfo); @@ -332,50 +332,12 @@ public EntityInfo applyEntity(EntitySpec spec) { throw new RegistrationException("failed to register or update entity"); } AuditLogger.log( - Resource.FEATURE_GROUP, spec.getName(), action, "Entity: %s", JsonFormat.printer().print(spec)); + Resource.FEATURE_GROUP, spec.getName(), action, "Entity: %s", + JsonFormat.printer().print(spec)); return out; } catch (Exception e) { throw new RegistrationException( Strings.lenientFormat("Failed to apply entity %s: %s", spec, e.getMessage()), e); } } - - /** - * Registers given storage spec to the registry - * - * @param spec StorageSpec - * @return registered StorageInfo - * @throws RegistrationException if registration fails - */ - public StorageInfo registerStorage(StorageSpec spec) { - try { - StorageInfo storageInfo = storageInfoRepository.findById(spec.getId()).orElse(null); - if (storageInfo != null) { - if (!storageInfo.getType().equals(spec.getType()) - && !storageInfo - .getOptions() - .equals(TypeConversion.convertMapToJsonString(spec.getOptionsMap()))) { - throw new IllegalArgumentException("updating storage specs is not allowed"); - } - return storageInfo; - } else { - storageInfo = new StorageInfo(spec); - StorageInfo out = storageInfoRepository.saveAndFlush(storageInfo); - if (!out.getId().equals(spec.getId())) { - throw new RegistrationException("failed to register or update storage"); - } - schemaManager.registerStorage(spec); - AuditLogger.log( - Resource.STORAGE, - spec.getId(), - Action.REGISTER, - "New storage registered: %s", - JsonFormat.printer().print(spec)); - return out; - } - } catch (Exception e) { - throw new RegistrationException( - Strings.lenientFormat("Failed to register new storage %s: %s", spec, e.getMessage()), e); - } - } } diff --git a/core/src/main/java/feast/core/storage/BigTableStorageManager.java b/core/src/main/java/feast/core/storage/BigTableStorageManager.java index cfd0ddd770..f21b3b483d 100644 --- a/core/src/main/java/feast/core/storage/BigTableStorageManager.java +++ b/core/src/main/java/feast/core/storage/BigTableStorageManager.java @@ -17,33 +17,51 @@ package feast.core.storage; +import com.google.cloud.bigtable.hbase.BigtableConfiguration; +import com.google.common.base.Preconditions; import com.google.common.base.Strings; import feast.core.log.Action; import feast.core.log.AuditLogger; import feast.core.log.Resource; import feast.specs.FeatureSpecProto.FeatureSpec; +import feast.specs.StorageSpecProto.StorageSpec; +import java.io.IOException; import lombok.extern.slf4j.Slf4j; import org.apache.hadoop.hbase.TableName; -import org.apache.hadoop.hbase.client.*; - -import java.io.IOException; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; +import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.hadoop.hbase.client.TableDescriptor; +import org.apache.hadoop.hbase.client.TableDescriptorBuilder; @Slf4j public class BigTableStorageManager implements StorageManager { + public static final String TYPE = "bigtable"; - public static final String OPT_BIGTABLE_PROJECT = "project"; - public static final String OPT_BIGTABLE_INSTANCE = "instance"; - public static final String OPT_BIGTABLE_TABLE_PREFIX = "tablePrefix"; + public static final String STORE_OPT_BIGTABLE_PROJECT = "project"; + public static final String STORE_OPT_BIGTABLE_INSTANCE = "instance"; + public static final String STORE_OPT_BIGTABLE_TABLE_PREFIX = "tablePrefix"; - public static final String SERVING_OPT_BIGTABLE_TABLE_COLUMN_FAMILY = "family"; + public static final String STORE_OPT_BIGTABLE_TABLE_COLUMN_FAMILY = "family"; + public static final String FEATURE_OPT_BIGTABLE_TABLE_COLUMN_FAMILY = "bigtable.family"; private static final String DEFAULT_COLUMN_FAMILY = "default"; - private final Connection btConnection; - private final String id; + private final StorageSpec storageSpec; + private transient Connection connection; - public BigTableStorageManager(String id, Connection connection) { - this.id = id; - this.btConnection = connection; + public BigTableStorageManager(StorageSpec storageSpec) { + Preconditions.checkArgument(storageSpec.getType().equals(TYPE)); + this.storageSpec = storageSpec; + } + + Connection getConnection() { + if (connection == null) { + String projectId = storageSpec.getOptionsOrThrow(STORE_OPT_BIGTABLE_PROJECT); + String instanceId = storageSpec.getOptionsOrThrow(STORE_OPT_BIGTABLE_INSTANCE); + connection = BigtableConfiguration.connect(projectId, instanceId); + } + return connection; } /** @@ -54,19 +72,17 @@ public BigTableStorageManager(String id, Connection connection) { @Override public void registerNewFeature(FeatureSpec featureSpec) { String entityName = featureSpec.getEntity(); - String columnFamily = - featureSpec - .getDataStores() - .getServing() - .getOptionsMap() - .get(SERVING_OPT_BIGTABLE_TABLE_COLUMN_FAMILY); - + String columnFamily = featureSpec + .getOptionsOrDefault(FEATURE_OPT_BIGTABLE_TABLE_COLUMN_FAMILY, null); if (Strings.isNullOrEmpty(columnFamily)) { - columnFamily = DEFAULT_COLUMN_FAMILY; + columnFamily = storageSpec + .getOptionsOrDefault(STORE_OPT_BIGTABLE_TABLE_COLUMN_FAMILY, DEFAULT_COLUMN_FAMILY); } + String tablePrefix = storageSpec.getOptionsOrDefault(STORE_OPT_BIGTABLE_TABLE_PREFIX, ""); + String tableNameString = tablePrefix + entityName; - try (Admin admin = btConnection.getAdmin()) { - TableName tableName = TableName.valueOf(entityName.getBytes()); + try (Admin admin = getConnection().getAdmin()) { + TableName tableName = TableName.valueOf(tableNameString.getBytes()); if (!admin.tableExists(tableName)) { TableDescriptor tableDescriptor = TableDescriptorBuilder.newBuilder(tableName).build(); @@ -76,15 +92,16 @@ public void registerNewFeature(FeatureSpec featureSpec) { TableDescriptor tableDescriptor = admin.getDescriptor(tableName); if (!isColumnFamilyExist(tableDescriptor, columnFamily)) { - ColumnFamilyDescriptor cfDesc = ColumnFamilyDescriptorBuilder.newBuilder(columnFamily.getBytes()) - .build(); + ColumnFamilyDescriptor cfDesc = ColumnFamilyDescriptorBuilder + .newBuilder(columnFamily.getBytes()) + .build(); - admin.addColumnFamily(tableName, cfDesc); + admin.addColumnFamily(tableName, cfDesc); log.info("Created new column family: {} for entity: {}", columnFamily, entityName); } AuditLogger.log( Resource.STORAGE, - this.id, + storageSpec.getId(), Action.SCHEMA_UPDATE, "Bigtable schema updated for feature %s", featureSpec.getId()); diff --git a/core/src/main/java/feast/core/storage/JsonFileStorageManager.java b/core/src/main/java/feast/core/storage/JsonFileStorageManager.java new file mode 100644 index 0000000000..0db5326026 --- /dev/null +++ b/core/src/main/java/feast/core/storage/JsonFileStorageManager.java @@ -0,0 +1,49 @@ +/* + * Copyright 2018 The Feast Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package feast.core.storage; + +import com.google.common.base.Preconditions; +import com.google.common.base.Strings; +import feast.specs.FeatureSpecProto.FeatureSpec; +import feast.specs.StorageSpecProto.StorageSpec; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public class JsonFileStorageManager implements StorageManager { + + public static final String TYPE = "file.json"; + public static final String OPT_FILE_PATH = "path"; + + public JsonFileStorageManager( + StorageSpec storageSpec) { + Preconditions.checkArgument(storageSpec.getType().equals(TYPE)); + Preconditions + .checkArgument( + !Strings.isNullOrEmpty(storageSpec.getOptionsOrDefault(OPT_FILE_PATH, null))); + } + + /** + * Update the BigQuery schema of this table given the addition of this feature. + * + * @param featureSpec specification of the new feature. + */ + @Override + public void registerNewFeature(FeatureSpec featureSpec) { + + } +} diff --git a/core/src/main/java/feast/core/storage/SchemaManager.java b/core/src/main/java/feast/core/storage/SchemaManager.java index 3d2368009d..c70fb5122b 100644 --- a/core/src/main/java/feast/core/storage/SchemaManager.java +++ b/core/src/main/java/feast/core/storage/SchemaManager.java @@ -19,24 +19,30 @@ import com.google.cloud.bigquery.BigQuery; import com.google.cloud.bigquery.BigQueryOptions; -import com.google.cloud.bigtable.hbase.BigtableConfiguration; -import lombok.extern.slf4j.Slf4j; -import org.apache.hadoop.hbase.client.Connection; -import feast.specs.FeatureSpecProto.DataStore; +import com.google.common.base.Preconditions; +import feast.core.config.StorageConfig.StorageSpecs; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.StorageSpecProto.StorageSpec; - -import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import lombok.extern.slf4j.Slf4j; @Slf4j public class SchemaManager { + private final Map storageRegistry = new ConcurrentHashMap<>(); private final BigQueryViewTemplater viewTemplater; + private final StorageSpecs storageSpecs; - public SchemaManager(BigQueryViewTemplater viewTemplater) { + public SchemaManager(BigQueryViewTemplater viewTemplater, StorageSpecs storageSpecs) { this.viewTemplater = viewTemplater; + this.storageSpecs = storageSpecs; + if (storageSpecs.getServingStorageSpec() != null) { + registerStorage(storageSpecs.getServingStorageSpec()); + } + if (storageSpecs.getWarehouseStorageSpec() != null) { + registerStorage(storageSpecs.getWarehouseStorageSpec()); + } } /** @@ -45,15 +51,19 @@ public SchemaManager(BigQueryViewTemplater viewTemplater) { * @param featureSpec spec of the new feature. */ public void registerFeature(FeatureSpec featureSpec) { - DataStore servingDataStore = featureSpec.getDataStores().getServing(); - StorageManager servingStorageManager = storageRegistry.get(servingDataStore.getId()); - if (servingStorageManager != null) { - servingStorageManager.registerNewFeature(featureSpec); - } + Preconditions.checkNotNull(storageSpecs.getServingStorageSpec(), + "Attempted to register feature but no serving storage is configured"); + StorageManager servingStorageManager = storageRegistry + .get(storageSpecs.getServingStorageSpec().getId()); + Preconditions.checkNotNull(servingStorageManager, + "Serving storage spec has no associated storage manager"); + servingStorageManager.registerNewFeature(featureSpec); - DataStore warehouseDataStore = featureSpec.getDataStores().getWarehouse(); - StorageManager warehouseStorageManager = storageRegistry.get(warehouseDataStore.getId()); - if (warehouseStorageManager != null) { + if (storageSpecs.getWarehouseStorageSpec() != null) { + StorageManager warehouseStorageManager = storageRegistry + .get(storageSpecs.getWarehouseStorageSpec().getId()); + Preconditions.checkNotNull(warehouseStorageManager, + "Warehouse storage spec has no associated storage manager"); warehouseStorageManager.registerNewFeature(featureSpec); } } @@ -64,17 +74,13 @@ public void registerFeature(FeatureSpec featureSpec) { * @param storageSpec new storage spec. */ public void registerStorage(StorageSpec storageSpec) { - String storageType = storageSpec.getType(); Map options = storageSpec.getOptionsMap(); String id = storageSpec.getId(); StorageManager storageManager = null; switch (storageSpec.getType()) { case BigTableStorageManager.TYPE: - String btProjectId = options.get(BigTableStorageManager.OPT_BIGTABLE_PROJECT); - String instanceId = options.get(BigTableStorageManager.OPT_BIGTABLE_INSTANCE); - Connection connection = BigtableConfiguration.connect(btProjectId, instanceId); - storageManager = new BigTableStorageManager(id, connection); + storageManager = new BigTableStorageManager(storageSpec); break; case BigQueryStorageManager.TYPE: String datasetName = options.get(BigQueryStorageManager.OPT_BIGQUERY_DATASET); @@ -84,6 +90,9 @@ public void registerStorage(StorageSpec storageSpec) { storageManager = new BigQueryStorageManager(id, bigQuery, bqProjectId, datasetName, viewTemplater); break; + case JsonFileStorageManager.TYPE: + storageManager = new JsonFileStorageManager(storageSpec); + break; case PostgresStorageManager.TYPE: String connectionUri = options.get(PostgresStorageManager.OPT_POSTGRES_URI); storageManager = new PostgresStorageManager(id, connectionUri); @@ -95,18 +104,6 @@ public void registerStorage(StorageSpec storageSpec) { log.warn("Unknown storage type: {} \n {}", storageSpec.getType(), storageSpec); return; } - storageRegistry.put(id, storageManager); } - - /** - * Register several storage specs. - * - * @param storageSpecs - */ - public void registerStorages(List storageSpecs) { - for (StorageSpec storageSpec : storageSpecs) { - registerStorage(storageSpec); - } - } } diff --git a/core/src/main/java/feast/core/training/BigQueryDatasetTemplater.java b/core/src/main/java/feast/core/training/BigQueryDatasetTemplater.java index 569bba1150..d5f0019f26 100644 --- a/core/src/main/java/feast/core/training/BigQueryDatasetTemplater.java +++ b/core/src/main/java/feast/core/training/BigQueryDatasetTemplater.java @@ -21,31 +21,43 @@ import feast.core.DatasetServiceProto.FeatureSet; import feast.core.dao.FeatureInfoRepository; import feast.core.model.FeatureInfo; -import feast.core.model.StorageInfo; +import feast.core.storage.BigQueryStorageManager; import feast.specs.StorageSpecProto.StorageSpec; -import lombok.Getter; - import java.time.Instant; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; import java.util.stream.Collectors; +import lombok.Getter; + public class BigQueryDatasetTemplater { + private final FeatureInfoRepository featureInfoRepository; private final Jinjava jinjava; private final String template; + private final StorageSpec storageSpec; private final DateTimeFormatter formatter; public BigQueryDatasetTemplater( - Jinjava jinjava, String templateString, FeatureInfoRepository featureInfoRepository) { + Jinjava jinjava, String templateString, StorageSpec storageSpec, + FeatureInfoRepository featureInfoRepository) { + this.storageSpec = storageSpec; this.featureInfoRepository = featureInfoRepository; this.jinjava = jinjava; this.template = templateString; this.formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.of("UTC")); } + protected StorageSpec getStorageSpec() { + return storageSpec; + } + /** * Create query from a template. * @@ -58,7 +70,8 @@ public BigQueryDatasetTemplater( String createQuery(FeatureSet featureSet, Timestamp startDate, Timestamp endDate, long limit) { List featureIds = featureSet.getFeatureIdsList(); List featureInfos = featureInfoRepository.findAllById(featureIds); - Features features = new Features(featureInfos); + String tableId = featureInfos.size() > 0 ? getBqTableId(featureInfos.get(0)) : ""; + Features features = new Features(featureInfos, tableId); if (featureInfos.size() < featureIds.size()) { Set foundFeatureIds = @@ -84,16 +97,15 @@ private String renderTemplate( return jinjava.render(template, context); } - private static String getBqTableId(FeatureInfo featureInfo) { - StorageInfo whStorage = featureInfo.getWarehouseStore(); + private String getBqTableId(FeatureInfo featureInfo) { + String type = storageSpec.getType(); - String type = whStorage.getType(); - if (!"bigquery".equals(type)) { + if (!BigQueryStorageManager.TYPE.equals(type)) { throw new IllegalArgumentException( "One of the feature has warehouse storage other than bigquery"); } - StorageSpec storageSpec = whStorage.getStorageSpec(); + StorageSpec storageSpec = getStorageSpec(); Map options = storageSpec.getOptionsMap(); String projectId = options.get("project"); String dataset = options.get("dataset"); @@ -108,12 +120,13 @@ private String formatDateString(Timestamp timestamp) { @Getter static final class Features { + final List columns; final String tableId; - Features(List featureInfos) { + Features(List featureInfos, String tableId) { columns = featureInfos.stream().map(FeatureInfo::getName).collect(Collectors.toList()); - tableId = featureInfos.size() > 0 ? getBqTableId(featureInfos.get(0)) : ""; + this.tableId = tableId; } } } diff --git a/core/src/main/java/feast/core/training/BigQueryDatasetCreator.java b/core/src/main/java/feast/core/training/BigQueryTraningDatasetCreator.java similarity index 91% rename from core/src/main/java/feast/core/training/BigQueryDatasetCreator.java rename to core/src/main/java/feast/core/training/BigQueryTraningDatasetCreator.java index 53428d96d0..5b86928a78 100644 --- a/core/src/main/java/feast/core/training/BigQueryDatasetCreator.java +++ b/core/src/main/java/feast/core/training/BigQueryTraningDatasetCreator.java @@ -18,6 +18,7 @@ import com.google.cloud.bigquery.BigQuery; import com.google.cloud.bigquery.BigQuery.JobOption; +import com.google.cloud.bigquery.BigQueryOptions; import com.google.cloud.bigquery.JobException; import com.google.cloud.bigquery.QueryJobConfiguration; import com.google.cloud.bigquery.TableId; @@ -33,27 +34,37 @@ import lombok.extern.slf4j.Slf4j; @Slf4j -public class BigQueryDatasetCreator { +public class BigQueryTraningDatasetCreator { - private final String projectId; - private final String datasetPrefix; private final BigQueryDatasetTemplater templater; - private final BigQuery bigQuery; private final DateTimeFormatter formatter; private final Clock clock; + private final String projectId; + private final String datasetPrefix; + private transient BigQuery bigQuery; - public BigQueryDatasetCreator( + + public BigQueryTraningDatasetCreator( BigQueryDatasetTemplater templater, - BigQuery bigQuery, Clock clock, String projectId, String datasetPrefix) { + this(templater, clock, projectId, datasetPrefix, + BigQueryOptions.newBuilder().setProjectId(projectId).build().getService()); + } + + public BigQueryTraningDatasetCreator( + BigQueryDatasetTemplater templater, + Clock clock, + String projectId, + String datasetPrefix, + BigQuery bigQuery) { this.templater = templater; + this.clock = clock; + this.formatter = DateTimeFormatter.ofPattern("yyyyMMdd").withZone(ZoneId.of("UTC")); this.projectId = projectId; this.datasetPrefix = datasetPrefix; this.bigQuery = bigQuery; - this.clock = clock; - this.formatter = DateTimeFormatter.ofPattern("yyyyMMdd").withZone(ZoneId.of("UTC")); } /** diff --git a/core/src/main/java/feast/core/validators/SpecValidator.java b/core/src/main/java/feast/core/validators/SpecValidator.java index 3e70e9922d..5ceafdd585 100644 --- a/core/src/main/java/feast/core/validators/SpecValidator.java +++ b/core/src/main/java/feast/core/validators/SpecValidator.java @@ -28,11 +28,9 @@ import feast.core.dao.EntityInfoRepository; import feast.core.dao.FeatureGroupInfoRepository; import feast.core.dao.FeatureInfoRepository; -import feast.core.dao.StorageInfoRepository; -import feast.core.model.FeatureGroupInfo; -import feast.core.model.StorageInfo; import feast.core.storage.BigQueryStorageManager; import feast.core.storage.BigTableStorageManager; +import feast.core.storage.JsonFileStorageManager; import feast.core.storage.PostgresStorageManager; import feast.core.storage.RedisStorageManager; import feast.specs.EntitySpecProto.EntitySpec; @@ -53,7 +51,7 @@ public class SpecValidator { private static final String NO_STORE = ""; private static final String[] SUPPORTED_WAREHOUSE_STORES = new String[]{ - BigQueryStorageManager.TYPE, "file.json", + BigQueryStorageManager.TYPE, JsonFileStorageManager.TYPE }; private static final String[] SUPPORTED_SERVING_STORES = new String[]{ @@ -62,19 +60,16 @@ public class SpecValidator { private static final String[] SUPPORTED_ERRORS_STORES = new String[]{"file.json", "stderr", "stdout"}; - private StorageInfoRepository storageInfoRepository; private EntityInfoRepository entityInfoRepository; private FeatureGroupInfoRepository featureGroupInfoRepository; private FeatureInfoRepository featureInfoRepository; @Autowired public SpecValidator( - StorageInfoRepository storageInfoRepository, EntityInfoRepository entityInfoRepository, FeatureGroupInfoRepository featureGroupInfoRepository, FeatureInfoRepository featureInfoRepository) { - this.storageInfoRepository = storageInfoRepository; this.entityInfoRepository = entityInfoRepository; this.featureGroupInfoRepository = featureGroupInfoRepository; this.featureInfoRepository = featureInfoRepository; @@ -109,46 +104,12 @@ public void validateFeatureSpec(FeatureSpec spec) throws IllegalArgumentExceptio entityInfoRepository.existsById(spec.getEntity()), Strings.lenientFormat("Entity with name %s does not exist", spec.getEntity())); - // TODO: clean up store validation for features - String servingStoreId = NO_STORE; - String warehouseStoreId = NO_STORE; - if (spec.hasDataStores()) { - servingStoreId = - spec.getDataStores().hasServing() ? spec.getDataStores().getServing().getId() : ""; - warehouseStoreId = - spec.getDataStores().hasWarehouse() ? spec.getDataStores().getWarehouse().getId() : ""; - } if (!spec.getGroup().equals("")) { Optional groupOptional = featureGroupInfoRepository.findById(spec.getGroup()); if (!groupOptional.isPresent()) { throw new IllegalArgumentException( Strings.lenientFormat("Group with id %s does not exist", spec.getGroup())); } - FeatureGroupInfo group = (FeatureGroupInfo) groupOptional.get(); - servingStoreId = - servingStoreId.equals(NO_STORE) ? group.getServingStore().getId() : servingStoreId; - warehouseStoreId = - warehouseStoreId.equals(NO_STORE) ? group.getWarehouseStore().getId() - : warehouseStoreId; - } - Optional servingStore = storageInfoRepository.findById(servingStoreId); - Optional warehouseStore = storageInfoRepository.findById(warehouseStoreId); - checkArgument( - servingStore.isPresent(), - Strings.lenientFormat("Serving store with id %s does not exist", servingStoreId)); - checkArgument( - Arrays.asList(SUPPORTED_SERVING_STORES).contains(servingStore.get().getType()), - Strings.lenientFormat("Unsupported serving store type", servingStore.get().getType())); - - if (!warehouseStoreId.equals(NO_STORE)) { - checkArgument( - warehouseStore.isPresent(), - Strings.lenientFormat("Warehouse store with id %s does not exist", warehouseStoreId)); - - checkArgument( - Arrays.asList(SUPPORTED_WAREHOUSE_STORES).contains(warehouseStore.get().getType()), - Strings.lenientFormat( - "Unsupported warehouse store type", warehouseStore.get().getType())); } } catch (NullPointerException | IllegalArgumentException e) { @@ -162,22 +123,6 @@ public void validateFeatureGroupSpec(FeatureGroupSpec spec) throws IllegalArgume try { checkArgument(!spec.getId().equals(""), "Id field cannot be empty"); checkLowerSnakeCase(spec.getId(), "Id"); - if (spec.hasDataStores()) { - if (spec.getDataStores().hasServing() - && !spec.getDataStores().getServing().getId().equals("")) { - String servingStoreId = spec.getDataStores().getServing().getId(); - checkArgument( - storageInfoRepository.existsById(servingStoreId), - Strings.lenientFormat("Serving store with id %s does not exist", servingStoreId)); - } - if (spec.getDataStores().hasWarehouse() - && !spec.getDataStores().getWarehouse().getId().equals("")) { - String warehouseStoreId = spec.getDataStores().getWarehouse().getId(); - checkArgument( - storageInfoRepository.existsById(warehouseStoreId), - Strings.lenientFormat("Warehouse store with id %s does not exist", warehouseStoreId)); - } - } } catch (NullPointerException | IllegalArgumentException e) { throw new IllegalArgumentException( Strings.lenientFormat( diff --git a/core/src/test/java/feast/core/CoreApplicationTest.java b/core/src/test/java/feast/core/CoreApplicationTest.java index ccd30ddfac..01f92fcd00 100644 --- a/core/src/test/java/feast/core/CoreApplicationTest.java +++ b/core/src/test/java/feast/core/CoreApplicationTest.java @@ -14,8 +14,6 @@ import feast.core.model.StorageInfo; import feast.core.service.SpecService; import feast.specs.EntitySpecProto.EntitySpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.ImportJobSpecsProto.ImportJobSpecs; import feast.specs.ImportSpecProto.Field; @@ -131,15 +129,12 @@ public void test_withProperties_systemServingAndWarehouseStoresRegistered() thro .setId(DEFAULT_ERRORS_ID) .setType("stderr")) .addEntitySpecs(entitySpec) - .addFeatureSpecs(featureSpec.toBuilder() - .setDataStores(DataStores.newBuilder() - .setWarehouse(DataStore.newBuilder().setId(DEFAULT_WAREHOUSE_ID)) - .setServing(DataStore.newBuilder().setId(DEFAULT_SERVING_ID)))) - .addServingStorageSpecs(StorageSpec.newBuilder() + .addFeatureSpecs(featureSpec) + .setServingStorageSpec(StorageSpec.newBuilder() .setId(DEFAULT_SERVING_ID) .setType("redis") .putOptions("host", "localhost").putOptions("port", "1234")) - .addWarehouseStorageSpecs(StorageSpec.newBuilder() + .setWarehouseStorageSpec(StorageSpec.newBuilder() .setId(DEFAULT_WAREHOUSE_ID) .setType("file.json") .putOptions("path", "/tmp/foobar")) diff --git a/core/src/test/java/feast/core/CoreApplicationWithNoServingTest.java b/core/src/test/java/feast/core/CoreApplicationWithNoServingTest.java index 6dcef362a2..4b6cbb7838 100644 --- a/core/src/test/java/feast/core/CoreApplicationWithNoServingTest.java +++ b/core/src/test/java/feast/core/CoreApplicationWithNoServingTest.java @@ -1,24 +1,16 @@ package feast.core; -import static feast.core.config.StorageConfig.DEFAULT_ERRORS_ID; -import static feast.core.config.StorageConfig.DEFAULT_SERVING_ID; import static feast.core.config.StorageConfig.DEFAULT_WAREHOUSE_ID; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; -import static org.mockito.ArgumentMatchers.any; import com.google.protobuf.Timestamp; -import feast.core.JobServiceProto.JobServiceTypes.SubmitImportJobRequest; -import feast.core.JobServiceProto.JobServiceTypes.SubmitImportJobResponse; import feast.core.config.ImportJobDefaults; import feast.core.job.JobManager; import feast.core.model.StorageInfo; import feast.core.service.SpecService; import feast.specs.EntitySpecProto.EntitySpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; -import feast.specs.ImportJobSpecsProto.ImportJobSpecs; import feast.specs.ImportSpecProto.Field; import feast.specs.ImportSpecProto.ImportSpec; import feast.specs.ImportSpecProto.Schema; @@ -30,13 +22,10 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; -import org.mockito.stubbing.Answer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.TestConfiguration; diff --git a/core/src/test/java/feast/core/CoreApplicationWithNoWarehouseTest.java b/core/src/test/java/feast/core/CoreApplicationWithNoWarehouseTest.java index 46b2e151a0..1acd238b8b 100644 --- a/core/src/test/java/feast/core/CoreApplicationWithNoWarehouseTest.java +++ b/core/src/test/java/feast/core/CoreApplicationWithNoWarehouseTest.java @@ -15,8 +15,6 @@ import feast.core.model.StorageInfo; import feast.core.service.SpecService; import feast.specs.EntitySpecProto.EntitySpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.ImportJobSpecsProto.ImportJobSpecs; import feast.specs.ImportSpecProto.Field; @@ -129,10 +127,8 @@ public void test_withProperties_systemServingAndWarehouseStoresRegistered() thro .setId(DEFAULT_ERRORS_ID) .setType("stderr")) .addEntitySpecs(entitySpec) - .addFeatureSpecs(featureSpec.toBuilder() - .setDataStores(DataStores.newBuilder() - .setServing(DataStore.newBuilder().setId(DEFAULT_SERVING_ID)))) - .addServingStorageSpecs(StorageSpec.newBuilder() + .addFeatureSpecs(featureSpec) + .setServingStorageSpec(StorageSpec.newBuilder() .setId(DEFAULT_SERVING_ID) .setType("redis") .putOptions("host", "localhost").putOptions("port", "1234")) diff --git a/core/src/test/java/feast/core/grpc/DatasetServiceImplTest.java b/core/src/test/java/feast/core/grpc/DatasetServiceImplTest.java index 5bbe7f0d48..91baf76f21 100644 --- a/core/src/test/java/feast/core/grpc/DatasetServiceImplTest.java +++ b/core/src/test/java/feast/core/grpc/DatasetServiceImplTest.java @@ -15,7 +15,7 @@ import feast.core.DatasetServiceProto.FeatureSet; import feast.core.DatasetServiceProto.DatasetServiceTypes.CreateDatasetRequest; import feast.core.DatasetServiceProto.DatasetServiceTypes.CreateDatasetResponse; -import feast.core.training.BigQueryDatasetCreator; +import feast.core.training.BigQueryTraningDatasetCreator; import io.grpc.StatusRuntimeException; import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; @@ -33,7 +33,7 @@ public class DatasetServiceImplTest { @Rule public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule(); @Rule public final ExpectedException expectedException = ExpectedException.none(); - @Mock private BigQueryDatasetCreator trainingDatasetCreator; + @Mock private BigQueryTraningDatasetCreator trainingDatasetCreator; private DatasetServiceGrpc.DatasetServiceBlockingStub client; private Timestamp validStartDate; diff --git a/core/src/test/java/feast/core/grpc/UIServiceImplTest.java b/core/src/test/java/feast/core/grpc/UIServiceImplTest.java index 00f02f9af6..48f4623c26 100644 --- a/core/src/test/java/feast/core/grpc/UIServiceImplTest.java +++ b/core/src/test/java/feast/core/grpc/UIServiceImplTest.java @@ -24,6 +24,7 @@ import feast.core.UIServiceProto.UIServiceTypes.ListFeaturesResponse; import feast.core.UIServiceProto.UIServiceTypes.ListStorageResponse; import feast.core.UIServiceProto.UIServiceTypes.StorageDetail; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.model.EntityInfo; import feast.core.model.FeatureGroupInfo; import feast.core.model.FeatureInfo; @@ -49,17 +50,20 @@ public class UIServiceImplTest { - @Mock public SpecService specService; - - @Rule public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule(); - - @Rule public final ExpectedException expectedException = ExpectedException.none(); - + @Rule + public final GrpcCleanupRule grpcCleanup = new GrpcCleanupRule(); + @Rule + public final ExpectedException expectedException = ExpectedException.none(); + @Mock + public SpecService specService; private UIServiceGrpc.UIServiceBlockingStub client; + private StorageSpecs storageSpecs; + @Before public void setUp() throws Exception { specService = mock(SpecService.class); + storageSpecs = StorageSpecs.builder().build(); UIServiceImpl service = new UIServiceImpl(specService); @@ -71,6 +75,8 @@ public void setUp() throws Exception { .build() .start()); + when(specService.getStorageSpecs()).thenReturn(storageSpecs); + client = UIServiceGrpc.newBlockingStub( grpcCleanup.register( @@ -183,7 +189,7 @@ public void getFeature_shouldReturnCorrectFeatureDetail() { GetFeatureRequest req = GetFeatureRequest.newBuilder().setId(featureId).build(); GetFeatureResponse resp = client.getFeature(req); - FeatureDetail expected = featureInfo.getFeatureDetail(); + FeatureDetail expected = featureInfo.getFeatureDetail(storageSpecs); FeatureDetail actual = resp.getFeature(); assertThat(actual, equalTo(expected)); @@ -236,7 +242,8 @@ public void listFeature_shouldReturnAllFeatures() { assertThat( actual, - containsInAnyOrder(featureInfos.stream().map(FeatureInfo::getFeatureDetail).toArray())); + containsInAnyOrder( + featureInfos.stream().map((fi) -> fi.getFeatureDetail(storageSpecs)).toArray())); } @Test @@ -410,32 +417,21 @@ public void listStorage_shouldReturnErrorForAnyFailure() { } private FeatureInfo createFeatureInfo(String featureId) { - StorageSpec warehouseSpec = StorageSpec.newBuilder().setId("warehouse").build(); - StorageSpec servingSpec = StorageSpec.newBuilder().setId("serving").build(); EntitySpec entitySpec = EntitySpec.newBuilder().setName("entity").build(); - StorageInfo warehouseStoreInfo = new StorageInfo(warehouseSpec); - StorageInfo servingStoreInfo = new StorageInfo(servingSpec); - EntityInfo entityInfo = new EntityInfo(entitySpec); FeatureSpec featureSpec = FeatureSpec.newBuilder().setId(featureId).build(); FeatureInfo featureInfo = - new FeatureInfo(featureSpec, entityInfo, servingStoreInfo, warehouseStoreInfo, null); + new FeatureInfo(featureSpec, entityInfo, null); featureInfo.setCreated(new Date()); featureInfo.setLastUpdated(new Date()); return featureInfo; } private FeatureGroupInfo createFeatureGroupInfo(String featureGroupId) { - StorageSpec warehouseSpec = StorageSpec.newBuilder().setId("warehouse").build(); - StorageSpec servingSpec = StorageSpec.newBuilder().setId("serving").build(); - - StorageInfo warehouseStoreInfo = new StorageInfo(warehouseSpec); - StorageInfo servingStoreInfo = new StorageInfo(servingSpec); - FeatureGroupSpec featureGroupSpec = FeatureGroupSpec.newBuilder().setId(featureGroupId).build(); FeatureGroupInfo featureGroupInfo = - new FeatureGroupInfo(featureGroupSpec, servingStoreInfo, warehouseStoreInfo); + new FeatureGroupInfo(featureGroupSpec); featureGroupInfo.setCreated(new Date()); featureGroupInfo.setLastUpdated(new Date()); return featureGroupInfo; diff --git a/core/src/test/java/feast/core/http/UiServiceControllerTest.java b/core/src/test/java/feast/core/http/UiServiceControllerTest.java index 6a858940df..8e312ae264 100644 --- a/core/src/test/java/feast/core/http/UiServiceControllerTest.java +++ b/core/src/test/java/feast/core/http/UiServiceControllerTest.java @@ -1,35 +1,37 @@ package feast.core.http; -import feast.core.UIServiceProto; +import static feast.specs.FeatureSpecProto.FeatureSpec; +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + import feast.core.UIServiceProto.UIServiceTypes.EntityDetail; import feast.core.UIServiceProto.UIServiceTypes.FeatureDetail; import feast.core.UIServiceProto.UIServiceTypes.FeatureGroupDetail; import feast.core.UIServiceProto.UIServiceTypes.StorageDetail; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.model.EntityInfo; import feast.core.model.FeatureGroupInfo; import feast.core.model.FeatureInfo; import feast.core.model.StorageInfo; import feast.core.service.JobManagementService; import feast.core.service.SpecService; -import feast.specs.FeatureSpecProto; +import java.util.Collections; import org.junit.Before; import org.junit.Test; -import java.util.Collections; - -import static feast.specs.FeatureSpecProto.*; -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - public class UiServiceControllerTest { + private UiServiceController goodUiServiceController; private UiServiceController badUiServiceController; @Before public void setUp() throws Exception { + StorageSpecs storageSpecs = StorageSpecs.builder().build(); + FeatureInfo mockFeatureInfo = mock(FeatureInfo.class); - when(mockFeatureInfo.getFeatureDetail()).thenReturn(FeatureDetail.getDefaultInstance()); + when(mockFeatureInfo.getFeatureDetail(storageSpecs)) + .thenReturn(FeatureDetail.getDefaultInstance()); when(mockFeatureInfo.getFeatureSpec()).thenReturn(FeatureSpec.getDefaultInstance()); when(mockFeatureInfo.resolve()).thenReturn(mockFeatureInfo); @@ -44,6 +46,7 @@ public void setUp() throws Exception { when(mockStorageInfo.getStorageDetail()).thenReturn(StorageDetail.getDefaultInstance()); SpecService goodMockSpecService = mock(SpecService.class); + when(goodMockSpecService.getStorageSpecs()).thenReturn(storageSpecs); when(goodMockSpecService.listFeatures()).thenReturn(Collections.singletonList(mockFeatureInfo)); when(goodMockSpecService.getFeatures(Collections.singletonList("1"))) .thenReturn(Collections.singletonList(mockFeatureInfo)); @@ -87,7 +90,7 @@ public void listFeatures() { } @Test(expected = Exception.class) - public void listFeaturesWithExecption() { + public void listFeaturesWithException() { badUiServiceController.listFeatures(); } diff --git a/core/src/test/java/feast/core/model/FeatureGroupInfoTest.java b/core/src/test/java/feast/core/model/FeatureGroupInfoTest.java index 6943fbf76c..b9f8d007c5 100644 --- a/core/src/test/java/feast/core/model/FeatureGroupInfoTest.java +++ b/core/src/test/java/feast/core/model/FeatureGroupInfoTest.java @@ -17,30 +17,27 @@ package feast.core.model; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.Assert.assertThat; + import com.google.protobuf.Timestamp; import feast.core.UIServiceProto.UIServiceTypes.FeatureGroupDetail; -import feast.core.exception.RetrievalException; import feast.specs.FeatureGroupSpecProto.FeatureGroupSpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; +import java.util.Date; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import java.util.Date; - -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertThat; - public class FeatureGroupInfoTest { + + @Rule + public final ExpectedException exception = ExpectedException.none(); private FeatureGroupInfo featureGroupInfo; private FeatureGroupSpec featureGroupSpec; private StorageInfo servingStorage; private StorageInfo warehouseStorage; - @Rule public final ExpectedException exception = ExpectedException.none(); - @Before public void setUp() { servingStorage = new StorageInfo(); @@ -52,22 +49,14 @@ public void setUp() { featureGroupInfo = new FeatureGroupInfo(); featureGroupInfo.setId("test"); featureGroupInfo.setTags("tag1,tag2"); - featureGroupInfo.setServingStore(servingStorage); - featureGroupInfo.setServingStoreOpts("{}"); - featureGroupInfo.setWarehouseStore(warehouseStorage); - featureGroupInfo.setWarehouseStoreOpts("{}"); - - DataStore servingStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseStore = DataStore.newBuilder().setId("REDIS2").build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).setWarehouse(warehouseStore).build(); + featureGroupInfo.setOptions("{\"foo\":\"bar\"}"); featureGroupSpec = FeatureGroupSpec.newBuilder() .setId("test") .addTags("tag1") .addTags("tag2") - .setDataStores(dataStores) + .putOptions("foo", "bar") .build(); } @@ -79,7 +68,7 @@ public void shouldBuildAndReturnCorrespondingSpec() { @Test public void shouldCorrectlyInitialiseFromGivenSpec() { assertThat( - new FeatureGroupInfo(featureGroupSpec, servingStorage, warehouseStorage), + new FeatureGroupInfo(featureGroupSpec), equalTo(featureGroupInfo)); } @@ -94,36 +83,26 @@ public void shouldBuildAndReturnCorrespondingDetail() { @Test public void shouldUpdateTags() { - DataStore servingStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseStore = DataStore.newBuilder().setId("REDIS2").build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).setWarehouse(warehouseStore).build(); - FeatureGroupSpec update = FeatureGroupSpec.newBuilder() .setId("test") .addTags("newtag") - .setDataStores(dataStores) + .putOptions("foo", "bar") .build(); featureGroupInfo.update(update); - FeatureGroupInfo expected = new FeatureGroupInfo(update, servingStorage, warehouseStorage); + FeatureGroupInfo expected = new FeatureGroupInfo(update); assertThat(featureGroupInfo, equalTo(expected)); } @Test - public void shouldThrowErrorIfDatastoresChanged() { - DataStore servingStore = DataStore.newBuilder().setId("REDIS3").build(); - DataStore warehouseStore = DataStore.newBuilder().setId("REDIS2").build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).setWarehouse(warehouseStore).build(); - + public void shouldThrowErrorIfOptionsChanged() { FeatureGroupSpec update = - FeatureGroupSpec.newBuilder() - .setId("test") - .addTags("newtag") - .setDataStores(dataStores) - .build(); + FeatureGroupSpec.newBuilder() + .setId("test") + .addTags("newtag") + .putOptions("new", "option") + .build(); exception.expect(IllegalArgumentException.class); exception.expectMessage("Feature group already exists. Update only allowed for fields: [tags]"); featureGroupInfo.update(update); diff --git a/core/src/test/java/feast/core/model/FeatureInfoTest.java b/core/src/test/java/feast/core/model/FeatureInfoTest.java index 6e619a5791..5b173bd6f2 100644 --- a/core/src/test/java/feast/core/model/FeatureInfoTest.java +++ b/core/src/test/java/feast/core/model/FeatureInfoTest.java @@ -17,31 +17,32 @@ package feast.core.model; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + import com.google.protobuf.Timestamp; import feast.core.UIServiceProto.UIServiceTypes.FeatureDetail; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; +import feast.core.config.StorageConfig.StorageSpecs; import feast.specs.FeatureSpecProto.FeatureSpec; +import feast.specs.StorageSpecProto.StorageSpec; import feast.types.ValueProto.ValueType; +import java.util.Date; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import java.util.Date; - -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertThat; - public class FeatureInfoTest { + + @Rule + public final ExpectedException exception = ExpectedException.none(); private FeatureInfo featureInfo; private FeatureSpec featureSpec; private EntityInfo entityInfo; private StorageInfo servingStorage; private StorageInfo warehouseStorage; - @Rule public final ExpectedException exception = ExpectedException.none(); - @Before public void setUp() { entityInfo = new EntityInfo(); @@ -65,19 +66,6 @@ public void setUp() { warehouseStorage.setId("BIGQUERY"); warehouseStorage.setType("bigquery"); - featureInfo.setServingStore(servingStorage); - featureInfo.setServingStoreOpts("{}"); - featureInfo.setWarehouseStore(warehouseStorage); - featureInfo.setWarehouseStoreOpts("{}"); - - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); - featureSpec = FeatureSpec.newBuilder() .setId("entity.name") @@ -89,7 +77,6 @@ public void setUp() { .setValueType(ValueType.Enum.BYTES) .addTags("tag1") .addTags("tag2") - .setDataStores(dataStores) .build(); } @@ -101,7 +88,7 @@ public void shouldBuildAndReturnCorrespondingSpec() { @Test public void shouldCorrectlyInitialiseFromGivenSpec() { assertThat( - new FeatureInfo(featureSpec, entityInfo, servingStorage, warehouseStorage, null), + new FeatureInfo(featureSpec, entityInfo, null), equalTo(featureInfo)); } @@ -119,15 +106,13 @@ public void shouldBuildAndReturnCorrespondingDetail() { .setLastUpdated(ts) .setCreated(ts) .build(); - assertThat(featureInfo.getFeatureDetail(), equalTo(expected)); + assertThat(featureInfo.getFeatureDetail(StorageSpecs.builder().build()), equalTo(expected)); } @Test public void shouldBuildCorrespondingResolvedSpec() { FeatureGroupInfo featureGroupInfo = new FeatureGroupInfo(); featureGroupInfo.setId("testGroup"); - featureGroupInfo.setServingStore(servingStorage); - featureGroupInfo.setWarehouseStore(warehouseStorage); featureGroupInfo.setTags("inherited"); FeatureInfo featureInfo = new FeatureInfo(); featureInfo.setId("entity.name"); @@ -140,16 +125,6 @@ public void shouldBuildCorrespondingResolvedSpec() { featureInfo.setOptions("{}"); featureInfo.setTags("tag1,tag2"); featureInfo.setFeatureGroup(featureGroupInfo); - featureInfo.setServingStore(servingStorage); - featureInfo.setWarehouseStore(warehouseStorage); - - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); FeatureSpec expected = FeatureSpec.newBuilder() @@ -164,7 +139,6 @@ public void shouldBuildCorrespondingResolvedSpec() { .addTags("tag1") .addTags("tag2") .addTags("inherited") - .setDataStores(dataStores) .build(); FeatureInfo resolved = featureInfo.resolve(); assertThat(resolved.getFeatureSpec(), equalTo(expected)); @@ -172,14 +146,6 @@ public void shouldBuildCorrespondingResolvedSpec() { @Test public void shouldUpdateMutableFields() { - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); - FeatureSpec update = FeatureSpec.newBuilder() .setId("entity.name") @@ -190,39 +156,30 @@ public void shouldUpdateMutableFields() { .setUri("new_uri") .setValueType(ValueType.Enum.BYTES) .addTags("new_tag") - .setDataStores(dataStores) .build(); featureInfo.update(featureSpec); FeatureInfo expected = - new FeatureInfo(update, entityInfo, servingStorage, warehouseStorage, null); + new FeatureInfo(update, entityInfo, null); assertThat(featureInfo, equalTo(expected)); } @Test public void shouldThrowExceptionIfImmutableFieldsChanged() { - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS2").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); - FeatureSpec update = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner2") - .setDescription("overwrite") - .setEntity("entity") - .setUri("new_uri") - .setValueType(ValueType.Enum.INT32) - .addTags("new_tag") - .setDataStores(dataStores) - .build(); + FeatureSpec.newBuilder() + .setId("entity.name") + .setName("name") + .setOwner("owner2") + .setDescription("overwrite") + .setEntity("entity") + .setUri("new_uri") + .setValueType(ValueType.Enum.INT32) + .addTags("new_tag") + .build(); exception.expect(IllegalArgumentException.class); - exception.expectMessage( "Feature already exists. Update only allowed for fields: [owner, description, uri, tags]"); + exception.expectMessage( + "Feature already exists. Update only allowed for fields: [owner, description, uri, tags]"); featureInfo.update(update); } @@ -230,19 +187,42 @@ public void shouldThrowExceptionIfImmutableFieldsChanged() { @Test public void shouldThrowExceptionIfImmutableFieldsChangedToNull() { FeatureSpec update = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner2") - .setDescription("overwrite") - .setEntity("entity") - .setUri("new_uri") - .setValueType(ValueType.Enum.BYTES) - .addTags("new_tag") - .build(); + FeatureSpec.newBuilder() + .setId("entity.name") + .setName("name") + .setOwner("owner2") + .setDescription("overwrite") + .setEntity("entity") + .setUri("new_uri") + //.setValueType() + .addTags("new_tag") + .build(); exception.expect(IllegalArgumentException.class); - exception.expectMessage( "Feature already exists. Update only allowed for fields: [owner, description, uri, tags]"); + exception.expectMessage( + "Feature already exists. Update only allowed for fields: [owner, description, uri, tags]"); featureInfo.update(update); } + + @Test + public void createBigQueryLink_withBigQueryType_shouldGenerateLink() { + String link = featureInfo.createBigqueryViewLink(StorageSpec.newBuilder() + .setType("bigquery").setId("BQ").putOptions("project", "project1") + .putOptions("dataset", "dataset1").build()); + assertEquals(link, + "https://bigquery.cloud.google.com/table/project1:dataset1.entity_view"); + } + + @Test + public void createBigQueryLink_withOtherType_shouldNotGenerateLink() { + String link = featureInfo.createBigqueryViewLink(StorageSpec.newBuilder() + .setType("another_type").build()); + assertEquals(link, "N.A."); + } + + @Test + public void createBigQueryLink_withNullSpec_shouldNotGenerateLink() { + String link = featureInfo.createBigqueryViewLink(null); + assertEquals(link, "N.A."); + } } diff --git a/core/src/test/java/feast/core/service/SpecServiceTest.java b/core/src/test/java/feast/core/service/SpecServiceTest.java index bf7d7e7a7a..f18e391deb 100644 --- a/core/src/test/java/feast/core/service/SpecServiceTest.java +++ b/core/src/test/java/feast/core/service/SpecServiceTest.java @@ -17,13 +17,19 @@ package feast.core.service; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.Assert.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.mockito.MockitoAnnotations.initMocks; + import com.google.common.base.Strings; import com.google.common.collect.Lists; +import feast.core.config.StorageConfig.StorageSpecs; import feast.core.dao.EntityInfoRepository; import feast.core.dao.FeatureGroupInfoRepository; import feast.core.dao.FeatureInfoRepository; -import feast.core.dao.StorageInfoRepository; -import feast.core.exception.RegistrationException; import feast.core.exception.RetrievalException; import feast.core.model.EntityInfo; import feast.core.model.FeatureGroupInfo; @@ -32,11 +38,11 @@ import feast.core.storage.SchemaManager; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureGroupSpecProto.FeatureGroupSpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; -import feast.specs.StorageSpecProto.StorageSpec; import feast.types.ValueProto.ValueType; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -44,25 +50,20 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - public class SpecServiceTest { - @Mock EntityInfoRepository entityInfoRepository; - @Mock FeatureInfoRepository featureInfoRepository; - @Mock FeatureGroupInfoRepository featureGroupInfoRepository; - @Mock StorageInfoRepository storageInfoRepository; - @Mock SchemaManager schemaManager; - @Rule public final ExpectedException exception = ExpectedException.none(); + @Rule + public final ExpectedException exception = ExpectedException.none(); + @Mock + EntityInfoRepository entityInfoRepository; + @Mock + FeatureInfoRepository featureInfoRepository; + @Mock + FeatureGroupInfoRepository featureGroupInfoRepository; + @Mock + SchemaManager schemaManager; + @Mock + StorageSpecs storageSpecs; @Before public void setUp() { @@ -92,8 +93,6 @@ private FeatureInfo newTestFeatureInfo(String name) { feature.setOwner("@test"); feature.setValueType(ValueType.Enum.BOOL); feature.setUri(""); - feature.setWarehouseStore(newTestStorageInfo("BIGQUERY1", "BIGQUERY")); - feature.setServingStore(newTestStorageInfo("REDIS1", "REDIS")); return feature; } @@ -103,14 +102,15 @@ public void shouldGetEntitiesMatchingIds() { EntityInfo entity2 = newTestEntityInfo("entity2"); ArrayList ids = Lists.newArrayList("entity1", "entity2"); - when(entityInfoRepository.findAllById(any(Iterable.class))).thenReturn(Lists.newArrayList(entity1, entity2)); + when(entityInfoRepository.findAllById(any(Iterable.class))) + .thenReturn(Lists.newArrayList(entity1, entity2)); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.getEntities(ids); List expected = Lists.newArrayList(entity1, entity2); assertThat(actual, equalTo(expected)); @@ -122,14 +122,15 @@ public void shouldDeduplicateGetEntities() { EntityInfo entity2 = newTestEntityInfo("entity2"); ArrayList ids = Lists.newArrayList("entity1", "entity2", "entity2"); - when(entityInfoRepository.findAllById(any(Iterable.class))).thenReturn(Lists.newArrayList(entity1, entity2)); + when(entityInfoRepository.findAllById(any(Iterable.class))) + .thenReturn(Lists.newArrayList(entity1, entity2)); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.getEntities(ids); List expected = Lists.newArrayList(entity1, entity2); assertThat(actual, equalTo(expected)); @@ -145,9 +146,9 @@ public void shouldThrowRetrievalExceptionIfAnyEntityNotFound() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); exception.expect(RetrievalException.class); exception.expectMessage("unable to retrieve all entities requested"); @@ -164,9 +165,9 @@ public void shouldListAllEntitiesRegistered() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.listEntities(); List expected = Lists.newArrayList(entity1, entity2); @@ -184,9 +185,9 @@ public void shouldGetFeaturesMatchingIds() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.getFeatures(ids); List expected = Lists.newArrayList(feature1, feature2); assertThat(actual, equalTo(expected)); @@ -203,9 +204,9 @@ public void shouldDeduplicateGetFeature() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.getFeatures(ids); List expected = Lists.newArrayList(feature1, feature2); assertThat(actual, equalTo(expected)); @@ -221,9 +222,9 @@ public void shouldThrowRetrievalExceptionIfAnyFeatureNotFound() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); exception.expect(RetrievalException.class); exception.expectMessage("unable to retrieve all features requested: " + ids); specService.getFeatures(ids); @@ -239,9 +240,9 @@ public void shouldListAllFeaturesRegistered() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.listFeatures(); List expected = Lists.newArrayList(feature1, feature2); assertThat(actual, equalTo(expected)); @@ -251,17 +252,17 @@ public void shouldListAllFeaturesRegistered() { public void shouldGetStorageMatchingIds() { StorageInfo redisStorage = newTestStorageInfo("REDIS1", "REDIS"); StorageInfo bqStorage = newTestStorageInfo("BIGQUERY1", "BIGQUERY"); + when(storageSpecs.getServingStorageSpec()).thenReturn(redisStorage.getStorageSpec()); + when(storageSpecs.getWarehouseStorageSpec()).thenReturn(bqStorage.getStorageSpec()); ArrayList ids = Lists.newArrayList("REDIS1", "BIGQUERY1"); - when(storageInfoRepository.findAllById(any(Iterable.class))) - .thenReturn(Lists.newArrayList(redisStorage, bqStorage)); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.getStorage(ids); List expected = Lists.newArrayList(redisStorage, bqStorage); assertThat(actual, equalTo(expected)); @@ -271,17 +272,17 @@ public void shouldGetStorageMatchingIds() { public void shouldDeduplicateGetStorage() { StorageInfo redisStorage = newTestStorageInfo("REDIS1", "REDIS"); StorageInfo bqStorage = newTestStorageInfo("BIGQUERY1", "BIGQUERY"); - + when(storageSpecs.getServingStorageSpec()).thenReturn(redisStorage.getStorageSpec()); + when(storageSpecs.getWarehouseStorageSpec()).thenReturn(bqStorage.getStorageSpec()); ArrayList ids = Lists.newArrayList("REDIS1", "BIGQUERY1", "BIGQUERY1"); - when(storageInfoRepository.findAllById(any(Iterable.class))) - .thenReturn(Lists.newArrayList(redisStorage, bqStorage)); + SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.getStorage(ids); List expected = Lists.newArrayList(redisStorage, bqStorage); assertThat(actual, equalTo(expected)); @@ -290,16 +291,16 @@ public void shouldDeduplicateGetStorage() { @Test public void shouldThrowRetrievalExceptionIfAnyStorageNotFound() { StorageInfo redisStorage = newTestStorageInfo("REDIS1", "REDIS"); + when(storageSpecs.getServingStorageSpec()).thenReturn(redisStorage.getStorageSpec()); ArrayList ids = Lists.newArrayList("REDIS1", "BIGQUERY1"); - when(storageInfoRepository.findAllById(ids)).thenReturn(Lists.newArrayList(redisStorage)); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); exception.expect(RetrievalException.class); exception.expectMessage("unable to retrieve all storage requested: " + ids); @@ -310,15 +311,16 @@ public void shouldThrowRetrievalExceptionIfAnyStorageNotFound() { public void shouldListAllStorageRegistered() { StorageInfo redisStorage = newTestStorageInfo("REDIS1", "REDIS"); StorageInfo bqStorage = newTestStorageInfo("BIGQUERY1", "BIGQUERY"); + when(storageSpecs.getServingStorageSpec()).thenReturn(redisStorage.getStorageSpec()); + when(storageSpecs.getWarehouseStorageSpec()).thenReturn(bqStorage.getStorageSpec()); - when(storageInfoRepository.findAll()).thenReturn(Lists.newArrayList(redisStorage, bqStorage)); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); List actual = specService.listStorage(); List expected = Lists.newArrayList(redisStorage, bqStorage); assertThat(actual, equalTo(expected)); @@ -328,8 +330,6 @@ public void shouldListAllStorageRegistered() { public void shouldRegisterFeatureWithGroupInheritance() { FeatureGroupInfo group = new FeatureGroupInfo(); group.setId("testGroup"); - group.setServingStore(newTestStorageInfo("REDIS1", "REDIS")); - group.setWarehouseStore(newTestStorageInfo("BIGQUERY1", "BIGQUERY")); when(featureGroupInfoRepository.findById("testGroup")).thenReturn(Optional.of(group)); EntityInfo entity = new EntityInfo(); @@ -348,14 +348,6 @@ public void shouldRegisterFeatureWithGroupInheritance() { .setValueType(ValueType.Enum.BYTES) .build(); - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY1").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); - FeatureSpec resolvedSpec = FeatureSpec.newBuilder() .setId("entity.name") @@ -366,21 +358,20 @@ public void shouldRegisterFeatureWithGroupInheritance() { .setUri("uri") .setGroup("testGroup") .setValueType(ValueType.Enum.BYTES) - .setDataStores(dataStores) .build(); ArgumentCaptor resolvedSpecCaptor = ArgumentCaptor.forClass(FeatureSpec.class); - FeatureInfo featureInfo = new FeatureInfo(spec, entity, null, null, group); + FeatureInfo featureInfo = new FeatureInfo(spec, entity, group); when(featureInfoRepository.saveAndFlush(featureInfo)).thenReturn(featureInfo); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); FeatureInfo actual = specService.applyFeature(spec); verify(schemaManager).registerFeature(resolvedSpecCaptor.capture()); @@ -389,70 +380,27 @@ public void shouldRegisterFeatureWithGroupInheritance() { } @Test - public void shouldRegisterFeatureGroupIfStoresArePresent() { - StorageInfo bqStore = newTestStorageInfo("BIGQUERY1", "bigquery"); - StorageInfo redisStore = newTestStorageInfo("REDIS1", "redis"); - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY1").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); + public void shouldRegisterFeatureGroup() { FeatureGroupSpec spec = FeatureGroupSpec.newBuilder() .setId("group") .addTags("tag") - .setDataStores(dataStores) .build(); - FeatureGroupInfo expectedFeatureGroupInfo = new FeatureGroupInfo(spec, redisStore, bqStore); + FeatureGroupInfo expectedFeatureGroupInfo = new FeatureGroupInfo(spec); - when(storageInfoRepository.findById("BIGQUERY1")).thenReturn(Optional.of(bqStore)); - when(storageInfoRepository.findById("REDIS1")).thenReturn(Optional.of(redisStore)); when(featureGroupInfoRepository.saveAndFlush(expectedFeatureGroupInfo)) .thenReturn(expectedFeatureGroupInfo); SpecService specService = new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); FeatureGroupInfo actual = specService.applyFeatureGroup(spec); assertThat(actual, equalTo(expectedFeatureGroupInfo)); } - @Test - public void shouldThrowRegistrationExceptionWhenRegisteringFeatureGroupIfStoresMissing() { - StorageInfo bqStore = newTestStorageInfo("BIGQUERY1", "bigquery"); - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("BIGQUERY1").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); - FeatureGroupSpec spec = - FeatureGroupSpec.newBuilder() - .setId("group") - .addTags("tag") - .setDataStores(dataStores) - .build(); - when(storageInfoRepository.findById("BIGQUERY1")).thenReturn(Optional.of(bqStore)); - when(storageInfoRepository.findById("REDIS1")).thenReturn(Optional.empty()); - - SpecService specService = - new SpecService( - entityInfoRepository, - featureInfoRepository, - storageInfoRepository, - featureGroupInfoRepository, - schemaManager); - - exception.expect(RegistrationException.class); - specService.applyFeatureGroup(spec); - } - @Test public void shouldRegisterEntity() { EntitySpec spec = @@ -467,27 +415,10 @@ public void shouldRegisterEntity() { new SpecService( entityInfoRepository, featureInfoRepository, - storageInfoRepository, featureGroupInfoRepository, - schemaManager); + schemaManager, + storageSpecs); EntityInfo actual = specService.applyEntity(spec); assertThat(actual, equalTo(entityInfo)); } - - @Test - public void shouldRegisterStorage() { - StorageSpec spec = StorageSpec.newBuilder().setId("REDIS1").setType("redis").build(); - StorageInfo storageInfo = new StorageInfo(spec); - when(storageInfoRepository.saveAndFlush(storageInfo)).thenReturn(storageInfo); - SpecService specService = - new SpecService( - entityInfoRepository, - featureInfoRepository, - storageInfoRepository, - featureGroupInfoRepository, - schemaManager); - StorageInfo actual = specService.registerStorage(spec); - assertThat(actual, equalTo(storageInfo)); - } - } diff --git a/core/src/test/java/feast/core/training/BigQueryDatasetTemplaterTest.java b/core/src/test/java/feast/core/training/BigQueryDatasetTemplaterTest.java index 114dcec539..5a072eaf90 100644 --- a/core/src/test/java/feast/core/training/BigQueryDatasetTemplaterTest.java +++ b/core/src/test/java/feast/core/training/BigQueryDatasetTemplaterTest.java @@ -32,11 +32,9 @@ import feast.core.dao.FeatureInfoRepository; import feast.core.model.EntityInfo; import feast.core.model.FeatureInfo; -import feast.core.model.StorageInfo; +import feast.core.storage.BigQueryStorageManager; import feast.core.training.BigQueryDatasetTemplater.Features; import feast.specs.EntitySpecProto.EntitySpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.StorageSpecProto.StorageSpec; import java.io.InputStream; @@ -58,21 +56,30 @@ import org.springframework.core.io.Resource; public class BigQueryDatasetTemplaterTest { + private BigQueryDatasetTemplater templater; private BasicFormatterImpl formatter = new BasicFormatterImpl(); - @Mock private FeatureInfoRepository featureInfoRespository; + @Mock + private FeatureInfoRepository featureInfoRespository; private String sqlTemplate; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); + StorageSpec storageSpec = StorageSpec.newBuilder() + .setId("BIGQUERY1") + .setType(BigQueryStorageManager.TYPE) + .putOptions("project", "project") + .putOptions("dataset", "dataset") + .build(); Jinjava jinjava = new Jinjava(); Resource resource = new ClassPathResource("templates/bq_training.tmpl"); InputStream resourceInputStream = resource.getInputStream(); sqlTemplate = CharStreams.toString(new InputStreamReader(resourceInputStream, Charsets.UTF_8)); - templater = new BigQueryDatasetTemplater(jinjava, sqlTemplate, featureInfoRespository); + templater = new BigQueryDatasetTemplater(jinjava, sqlTemplate, storageSpec, + featureInfoRespository); } @Test(expected = NoSuchElementException.class) @@ -87,8 +94,16 @@ public void shouldThrowNoSuchElementExceptionIfFeatureNotFound() { @Test public void shouldPassCorrectArgumentToTemplateEngine() { + StorageSpec storageSpec = StorageSpec.newBuilder() + .setId("BIGQUERY1") + .setType(BigQueryStorageManager.TYPE) + .putOptions("project", "project") + .putOptions("dataset", "dataset") + .build(); + Jinjava jinjava = mock(Jinjava.class); - templater = new BigQueryDatasetTemplater(jinjava, sqlTemplate, featureInfoRespository); + templater = new BigQueryDatasetTemplater(jinjava, sqlTemplate, storageSpec, + featureInfoRespository); Timestamp startDate = Timestamps.fromSeconds(Instant.parse("2018-01-01T00:00:00.00Z").getEpochSecond()); @@ -97,10 +112,9 @@ public void shouldPassCorrectArgumentToTemplateEngine() { int limit = 100; String featureId = "myentity.feature1"; String featureName = "feature1"; - String tableId = "project.dataset.myentity"; when(featureInfoRespository.findAllById(any(List.class))) - .thenReturn(Collections.singletonList(createFeatureInfo(featureId, featureName, tableId))); + .thenReturn(Collections.singletonList(createFeatureInfo(featureId, featureName))); FeatureSet fs = FeatureSet.newBuilder() @@ -125,24 +139,21 @@ public void shouldPassCorrectArgumentToTemplateEngine() { Features features = (Features) actualContext.get("feature_set"); assertThat(features.getColumns().size(), equalTo(1)); assertThat(features.getColumns().get(0), equalTo(featureName)); - assertThat(features.getTableId(), equalTo(tableId)); } @Test public void shouldRenderCorrectQuery1() throws Exception { - String tableId1 = "project.dataset.myentity"; String featureId1 = "myentity.feature1"; String featureName1 = "feature1"; String featureId2 = "myentity.feature2"; String featureName2 = "feature2"; - FeatureInfo featureInfo1 = createFeatureInfo(featureId1, featureName1, tableId1); - FeatureInfo featureInfo2 = createFeatureInfo(featureId2, featureName2, tableId1); + FeatureInfo featureInfo1 = createFeatureInfo(featureId1, featureName1); + FeatureInfo featureInfo2 = createFeatureInfo(featureId2, featureName2); - String tableId2 = "project.dataset.myentity"; String featureId3 = "myentity.feature3"; String featureName3 = "feature3"; - FeatureInfo featureInfo3 = createFeatureInfo(featureId3, featureName3, tableId2); + FeatureInfo featureInfo3 = createFeatureInfo(featureId3, featureName3); when(featureInfoRespository.findAllById(any(List.class))) .thenReturn(Arrays.asList(featureInfo1, featureInfo2, featureInfo3)); @@ -168,11 +179,10 @@ public void shouldRenderCorrectQuery2() throws Exception { List featureInfos = new ArrayList<>(); List featureIds = new ArrayList<>(); - String tableId = "project.dataset.myentity"; String featureId = "myentity.feature1"; String featureName = "feature1"; - featureInfos.add(createFeatureInfo(featureId, featureName, tableId)); + featureInfos.add(createFeatureInfo(featureId, featureName)); featureIds.add(featureId); when(featureInfoRespository.findAllById(any(List.class))).thenReturn(featureInfos); @@ -202,25 +212,15 @@ private void checkExpectedQuery(String query, String pathToExpQuery) throws Exce assertThat(query, equalTo(expQuery)); } - private FeatureInfo createFeatureInfo(String featureId, String featureName, String tableId) { - StorageSpec storageSpec = - StorageSpec.newBuilder() - .setId("BQ") - .setType("bigquery") - .putOptions("project", tableId.split("\\.")[0]) - .putOptions("dataset", tableId.split("\\.")[1]) - .build(); - StorageInfo storageInfo = new StorageInfo(storageSpec); - + private FeatureInfo createFeatureInfo(String featureId, String featureName) { FeatureSpec fs = FeatureSpec.newBuilder() .setId(featureId) .setName(featureName) - .setDataStores(DataStores.newBuilder().setWarehouse(DataStore.newBuilder().setId("BQ"))) .build(); EntitySpec entitySpec = EntitySpec.newBuilder().setName(featureId.split("\\.")[0]).build(); EntityInfo entityInfo = new EntityInfo(entitySpec); - return new FeatureInfo(fs, entityInfo, null, storageInfo, null); + return new FeatureInfo(fs, entityInfo, null); } } diff --git a/core/src/test/java/feast/core/training/BigQueryDatasetCreatorTest.java b/core/src/test/java/feast/core/training/BigQueryTraningDatasetCreatorTest.java similarity index 83% rename from core/src/test/java/feast/core/training/BigQueryDatasetCreatorTest.java rename to core/src/test/java/feast/core/training/BigQueryTraningDatasetCreatorTest.java index 9642399534..b28835c39e 100644 --- a/core/src/test/java/feast/core/training/BigQueryDatasetCreatorTest.java +++ b/core/src/test/java/feast/core/training/BigQueryTraningDatasetCreatorTest.java @@ -28,6 +28,8 @@ import com.google.protobuf.util.Timestamps; import feast.core.DatasetServiceProto.DatasetInfo; import feast.core.DatasetServiceProto.FeatureSet; +import feast.core.storage.BigQueryStorageManager; +import feast.specs.StorageSpecProto.StorageSpec; import java.time.Clock; import java.time.Instant; import java.util.Arrays; @@ -36,26 +38,36 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -public class BigQueryDatasetCreatorTest { +public class BigQueryTraningDatasetCreatorTest { + public static final String projectId = "the-project"; public static final String datasetPrefix = "feast"; // class under test - private BigQueryDatasetCreator creator; - @Mock private BigQueryDatasetTemplater templater; - @Mock private BigQuery bq; - @Mock private Clock clock; + private BigQueryTraningDatasetCreator creator; + @Mock + private BigQueryDatasetTemplater templater; + @Mock + private BigQuery bq; + @Mock + private Clock clock; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - - creator = new BigQueryDatasetCreator(templater, bq, clock, projectId, datasetPrefix); + when(templater.getStorageSpec()).thenReturn(StorageSpec.newBuilder() + .setId("BIGQUERY1") + .setType(BigQueryStorageManager.TYPE) + .putOptions("project", "project") + .putOptions("dataset", "dataset") + .build()); + creator = new BigQueryTraningDatasetCreator(templater, clock, projectId, datasetPrefix, bq); when(templater.createQuery( - any(FeatureSet.class), any(Timestamp.class), any(Timestamp.class), anyLong())) + any(FeatureSet.class), any(Timestamp.class), any(Timestamp.class), anyLong())) .thenReturn("SELECT * FROM `project.dataset.table`"); } + @Test public void shouldCreateCorrectDatasetIfPrefixNotSpecified() { String entityName = "myentity"; @@ -106,7 +118,8 @@ public void shouldCreateCorrectDatasetIfPrefixIsSpecified() { dsInfo.getTableUrl(), equalTo( String.format( - "%s.%s_%s.%s", projectId, datasetPrefix, entityName, "mydataset_0_20180101_20190101"))); + "%s.%s_%s.%s", projectId, datasetPrefix, entityName, + "mydataset_0_20180101_20190101"))); assertThat(dsInfo.getName(), equalTo("mydataset_0_20180101_20190101")); } diff --git a/core/src/test/java/feast/core/validators/SpecValidatorTest.java b/core/src/test/java/feast/core/validators/SpecValidatorTest.java index 1170a036b4..2de054486e 100644 --- a/core/src/test/java/feast/core/validators/SpecValidatorTest.java +++ b/core/src/test/java/feast/core/validators/SpecValidatorTest.java @@ -22,23 +22,16 @@ import static feast.core.config.StorageConfig.DEFAULT_WAREHOUSE_ID; import static org.mockito.Mockito.when; -import com.google.common.base.Strings; import feast.core.dao.EntityInfoRepository; import feast.core.dao.FeatureGroupInfoRepository; import feast.core.dao.FeatureInfoRepository; -import feast.core.dao.StorageInfoRepository; -import feast.core.model.FeatureGroupInfo; -import feast.core.model.StorageInfo; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureGroupSpecProto.FeatureGroupSpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.ImportSpecProto.Field; import feast.specs.ImportSpecProto.ImportSpec; import feast.specs.ImportSpecProto.Schema; import feast.specs.StorageSpecProto.StorageSpec; -import java.util.Optional; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -52,21 +45,18 @@ public class SpecValidatorTest { private FeatureInfoRepository featureInfoRepository; private FeatureGroupInfoRepository featureGroupInfoRepository; private EntityInfoRepository entityInfoRepository; - private StorageInfoRepository storageInfoRepository; @Before public void setUp() { featureInfoRepository = Mockito.mock(FeatureInfoRepository.class); featureGroupInfoRepository = Mockito.mock(FeatureGroupInfoRepository.class); entityInfoRepository = Mockito.mock(EntityInfoRepository.class); - storageInfoRepository = Mockito.mock(StorageInfoRepository.class); } @Test public void featureSpecWithoutIdShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -80,7 +70,6 @@ public void featureSpecWithoutIdShouldThrowIllegalArgumentException() { public void featureSpecWithoutNameShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -94,7 +83,6 @@ public void featureSpecWithoutNameShouldThrowIllegalArgumentException() { public void featureSpecWithInvalidNameShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -110,7 +98,6 @@ public void featureSpecWithInvalidNameShouldThrowIllegalArgumentException() { public void featureSpecWithoutOwnerShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -124,7 +111,7 @@ public void featureSpecWithoutOwnerShouldThrowIllegalArgumentException() { public void featureSpecWithoutDescriptionShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, + entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -139,7 +126,6 @@ public void featureSpecWithoutDescriptionShouldThrowIllegalArgumentException() { public void featureSpecWithoutEntityShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -159,7 +145,6 @@ public void featureSpecWithoutEntityShouldThrowIllegalArgumentException() { public void featureSpecWithIdWithoutThreeWordsShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -180,7 +165,6 @@ public void featureSpecWithIdWithoutThreeWordsShouldThrowIllegalArgumentExceptio public void featureSpecWithIdWithoutMatchingEntityShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -203,7 +187,6 @@ public void featureSpecWithIdWithoutMatchingEntityShouldThrowIllegalArgumentExce public void featureSpecWithIdWithoutMatchingNameShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -227,7 +210,6 @@ public void featureSpecWithoutExistingEntityShouldThrowIllegalArgumentException( when(entityInfoRepository.existsById("entity")).thenReturn(false); SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -250,7 +232,6 @@ public void featureSpecWithInvalidFeatureGroupShouldThrowIllegalArgumentExceptio when(featureGroupInfoRepository.existsById("group")).thenReturn(false); SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -268,231 +249,11 @@ public void featureSpecWithInvalidFeatureGroupShouldThrowIllegalArgumentExceptio validator.validateFeatureSpec(input); } - @Test - public void featureSpecWithoutExistingServingStoreShouldThrowIllegalArgumentException() { - when(entityInfoRepository.existsById("entity")).thenReturn(true); - when(storageInfoRepository.existsById("REDIS1")).thenReturn(false); - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStores dataStores = DataStores.newBuilder().setServing(servingStore).build(); - FeatureSpec input = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner") - .setDescription("dasdad") - .setEntity("entity") - .setDataStores(dataStores) - .build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage("Serving store with id REDIS1 does not exist"); - validator.validateFeatureSpec(input); - } - - @Test - public void featureSpecWithoutServingStoreShouldInheritServingStoreIdFromGroup() { - when(entityInfoRepository.existsById("entity")).thenReturn(true); - when(storageInfoRepository.existsById("REDIS1")).thenReturn(true); - when(storageInfoRepository.existsById("REDIS2")).thenReturn(false); - FeatureGroupInfo fgi = new FeatureGroupInfo(); - StorageInfo redis1 = new StorageInfo(); - redis1.setId("REDIS1"); - redis1.setType("redis"); - fgi.setServingStore(redis1); - when(storageInfoRepository.findById("REDIS1")).thenReturn(Optional.of(redis1)); - when(featureGroupInfoRepository.existsById("group")).thenReturn(true); - when(featureGroupInfoRepository.findById("group")).thenReturn(Optional.of(fgi)); - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore warehouseStore = DataStore.newBuilder().setId("REDIS2").build(); - DataStores dataStores = DataStores.newBuilder().setWarehouse(warehouseStore).build(); - FeatureSpec input = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner") - .setDescription("dasdad") - .setEntity("entity") - .setGroup("group") - .setDataStores(dataStores) - .build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage("Warehouse store with id REDIS2 does not exist"); - validator.validateFeatureSpec(input); - } - - @Test - public void featureSpecWithoutExistingWarehouseStoreShouldThrowIllegalArgumentException() { - String servingStoreId = "REDIS1"; - String warehouseStoreId = "BIGQUERY"; - when(entityInfoRepository.existsById("entity")).thenReturn(true); - when(storageInfoRepository.existsById(servingStoreId)).thenReturn(true); - when(storageInfoRepository.existsById(warehouseStoreId)).thenReturn(false); - - StorageInfo redis1 = new StorageInfo(); - redis1.setId(servingStoreId); - redis1.setType("redis"); - when(storageInfoRepository.findById(servingStoreId)).thenReturn(Optional.of(redis1)); - - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingStore = DataStore.newBuilder().setId(servingStoreId).build(); - DataStore warehouseStore = DataStore.newBuilder().setId(warehouseStoreId).build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).setWarehouse(warehouseStore).build(); - FeatureSpec input = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner") - .setDescription("dasdad") - .setEntity("entity") - .setDataStores(dataStores) - .build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage( - String.format("Warehouse store with id %s does not exist", warehouseStoreId)); - validator.validateFeatureSpec(input); - } - - @Test - public void featureSpecWithoutWarehouseStoreShouldBeAllowed() { - String servingStoreId = "REDIS1"; - when(entityInfoRepository.existsById("entity")).thenReturn(true); - when(storageInfoRepository.existsById(servingStoreId)).thenReturn(true); - - StorageInfo redis1 = new StorageInfo(); - redis1.setId(servingStoreId); - redis1.setType("redis"); - when(storageInfoRepository.findById(servingStoreId)).thenReturn(Optional.of(redis1)); - - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingStore = DataStore.newBuilder().setId(servingStoreId).build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).build(); - FeatureSpec input = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner") - .setDescription("dasdad") - .setEntity("entity") - .setDataStores(dataStores) - .build(); - validator.validateFeatureSpec(input); - } - - @Test - public void featureSpecWithUnsupportedWarehouseStoreShouldThrowIllegalArgumentException() { - String servingStoreId = "REDIS1"; - StorageSpec servingStoreSpec = StorageSpec.newBuilder().setId(servingStoreId).setType("redis") - .build(); - StorageInfo servingStoreInfo = new StorageInfo(servingStoreSpec); - - String warehouseStoreId = "REDIS2"; - StorageSpec warehouseStoreSpec = StorageSpec.newBuilder().setId(warehouseStoreId) - .setType("redis").build(); - StorageInfo warehouseStoreInfo = new StorageInfo(warehouseStoreSpec); - - when(entityInfoRepository.existsById("entity")).thenReturn(true); - when(storageInfoRepository.existsById(servingStoreId)).thenReturn(true); - when(storageInfoRepository.existsById(warehouseStoreId)).thenReturn(true); - when(storageInfoRepository.findById(servingStoreId)).thenReturn(Optional.of(servingStoreInfo)); - when(storageInfoRepository.findById(warehouseStoreId)) - .thenReturn(Optional.of(warehouseStoreInfo)); - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingStore = DataStore.newBuilder().setId(servingStoreId).build(); - DataStore warehouseStore = DataStore.newBuilder().setId(warehouseStoreId).build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).setWarehouse(warehouseStore).build(); - FeatureSpec input = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner") - .setDescription("dasdad") - .setEntity("entity") - .setDataStores(dataStores) - .build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage(Strings.lenientFormat("Unsupported warehouse store type", "redis")); - validator.validateFeatureSpec(input); - } - - @Test - public void featureSpecWithUnsupportedServingStoreShouldThrowIllegalArgumentException() { - String servingStoreName = "CASSANDRA"; - StorageSpec redis1Spec = StorageSpec.newBuilder() - .setId(servingStoreName) - .setType("cassandra") - .build(); - StorageInfo redis1StorageInfo = new StorageInfo(redis1Spec); - - String warehouseStorageName = "BIGQUERY"; - StorageSpec bqSpec = StorageSpec.newBuilder() - .setId(warehouseStorageName) - .setType("bigquery") - .build(); - StorageInfo bqInfo = new StorageInfo(bqSpec); - - when(entityInfoRepository.existsById("entity")).thenReturn(true); - when(storageInfoRepository.existsById(servingStoreName)).thenReturn(true); - when(storageInfoRepository.existsById(warehouseStorageName)).thenReturn(true); - when(storageInfoRepository.findById(servingStoreName)) - .thenReturn(Optional.of(redis1StorageInfo)); - when(storageInfoRepository.findById(warehouseStorageName)).thenReturn(Optional.of(bqInfo)); - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingStore = DataStore.newBuilder().setId(servingStoreName).build(); - DataStore warehouseStore = DataStore.newBuilder().setId(warehouseStorageName).build(); - DataStores dataStores = - DataStores.newBuilder().setServing(servingStore).setWarehouse(warehouseStore).build(); - FeatureSpec input = - FeatureSpec.newBuilder() - .setId("entity.name") - .setName("name") - .setOwner("owner") - .setDescription("dasdad") - .setEntity("entity") - .setDataStores(dataStores) - .build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage(Strings.lenientFormat("Unsupported serving store type", "cassandra")); - validator.validateFeatureSpec(input); - } @Test public void featureGroupSpecWithoutIdShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -506,7 +267,6 @@ public void featureGroupSpecWithoutIdShouldThrowIllegalArgumentException() { public void featureGroupSpecWithoutValidIdShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -518,53 +278,10 @@ public void featureGroupSpecWithoutValidIdShouldThrowIllegalArgumentException() validator.validateFeatureGroupSpec(input); } - @Test - public void featureGroupSpecWithNonexistentServingStoreShouldThrowIllegalArgumentException() { - when(storageInfoRepository.existsById("REDIS1")).thenReturn(false); - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStores dataStores = DataStores.newBuilder().setServing(servingDataStore).build(); - FeatureGroupSpec input = - FeatureGroupSpec.newBuilder().setId("valid").setDataStores(dataStores).build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage("Serving store with id REDIS1 does not exist"); - validator.validateFeatureGroupSpec(input); - } - - @Test - public void featureGroupSpecWithNonexistentWarehouseStoreShouldThrowIllegalArgumentException() { - when(storageInfoRepository.existsById("REDIS1")).thenReturn(true); - when(storageInfoRepository.existsById("REDIS2")).thenReturn(false); - SpecValidator validator = - new SpecValidator( - storageInfoRepository, - entityInfoRepository, - featureGroupInfoRepository, - featureInfoRepository); - DataStore servingDataStore = DataStore.newBuilder().setId("REDIS1").build(); - DataStore warehouseDataStore = DataStore.newBuilder().setId("REDIS2").build(); - DataStores dataStores = - DataStores.newBuilder() - .setServing(servingDataStore) - .setWarehouse(warehouseDataStore) - .build(); - FeatureGroupSpec input = - FeatureGroupSpec.newBuilder().setId("valid").setDataStores(dataStores).build(); - exception.expect(IllegalArgumentException.class); - exception.expectMessage("Warehouse store with id REDIS2 does not exist"); - validator.validateFeatureGroupSpec(input); - } - @Test public void entitySpecWithoutNameShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -578,7 +295,6 @@ public void entitySpecWithoutNameShouldThrowIllegalArgumentException() { public void entitySpecWithInvalidNameShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -595,7 +311,6 @@ public void entitySpecWithInvalidNameShouldThrowIllegalArgumentException() { public void testServingStorageSpec_withValidTypes() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -609,7 +324,6 @@ public void testServingStorageSpec_withValidTypes() { public void testServingStorageSpec_withInvalidType() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -621,7 +335,6 @@ public void testServingStorageSpec_withInvalidType() { public void testWarehouseStorageSpec_withValidTypes() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -635,7 +348,6 @@ public void testWarehouseStorageSpec_withValidTypes() { public void testWarehouseStorageSpec_withInvalidType() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -647,7 +359,6 @@ public void testWarehouseStorageSpec_withInvalidType() { public void testErrorsStorageSpec_withValidTypes() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -663,7 +374,6 @@ public void testErrorsStorageSpec_withValidTypes() { public void testErrorsStorageSpec_withInvalidType() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -676,7 +386,6 @@ public void testErrorsStorageSpec_withInvalidType() { public void storageSpecWithoutIdShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -690,7 +399,6 @@ public void storageSpecWithoutIdShouldThrowIllegalArgumentException() { public void importSpecWithInvalidTypeShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -704,7 +412,6 @@ public void importSpecWithInvalidTypeShouldThrowIllegalArgumentException() { public void pubsubImportSpecWithoutTopicOrSubscriptionShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -719,7 +426,6 @@ public void pubsubImportSpecWithoutTopicOrSubscriptionShouldThrowIllegalArgument public void fileImportSpecWithoutSupportedFileFormatShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -735,7 +441,6 @@ public void fileImportSpecWithoutSupportedFileFormatShouldThrowIllegalArgumentEx public void fileImportSpecWithoutValidPathShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -750,7 +455,6 @@ public void fileImportSpecWithoutValidPathShouldThrowIllegalArgumentException() public void fileImportSpecWithoutEntityIdColumnInSchemaShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -769,7 +473,6 @@ public void fileImportSpecWithoutEntityIdColumnInSchemaShouldThrowIllegalArgumen public void bigQueryImportSpecWithoutEntityIdColumnInSchemaShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -790,7 +493,6 @@ public void bigQueryImportSpecWithoutEntityIdColumnInSchemaShouldThrowIllegalArg public void importSpecWithoutValidEntityShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -810,7 +512,6 @@ public void importSpecWithoutValidEntityShouldThrowIllegalArgumentException() { public void importSpecWithUnregisteredFeaturesShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -837,7 +538,6 @@ public void importSpecWithUnregisteredFeaturesShouldThrowIllegalArgumentExceptio public void importSpecWithKafkaSourceAndCorrectOptionsShouldPassValidation() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -862,7 +562,6 @@ public void importSpecWithKafkaSourceAndCorrectOptionsShouldPassValidation() { public void importSpecWithCoalesceJobOptionsShouldPassValidation() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -891,7 +590,6 @@ public void importSpecWithCoalesceJobOptionsShouldPassValidation() { public void importSpecWithLimitJobOptionsShouldPassValidation() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); @@ -917,7 +615,6 @@ public void importSpecWithLimitJobOptionsShouldPassValidation() { public void importSpecWithKafkaSourceWithoutOptionsShouldThrowIllegalArgumentException() { SpecValidator validator = new SpecValidator( - storageInfoRepository, entityInfoRepository, featureGroupInfoRepository, featureInfoRepository); diff --git a/ingestion/src/main/java/feast/ingestion/ImportJob.java b/ingestion/src/main/java/feast/ingestion/ImportJob.java index a77d07b4cf..5a8dec382b 100644 --- a/ingestion/src/main/java/feast/ingestion/ImportJob.java +++ b/ingestion/src/main/java/feast/ingestion/ImportJob.java @@ -18,6 +18,7 @@ package feast.ingestion; import com.google.api.services.bigquery.model.TableRow; +import com.google.common.base.Strings; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; @@ -26,10 +27,11 @@ import feast.ingestion.boot.ImportJobModule; import feast.ingestion.boot.PipelineModule; import feast.ingestion.config.ImportJobSpecsSupplier; +import feast.ingestion.metrics.FeastMetrics; import feast.ingestion.model.Specs; import feast.ingestion.options.ImportJobPipelineOptions; import feast.ingestion.options.JobOptions; -import feast.ingestion.transform.CoalescePFeatureRows; +import feast.ingestion.transform.CoalesceFeatureRowExtended; import feast.ingestion.transform.ErrorsStoreTransform; import feast.ingestion.transform.ReadFeaturesTransform; import feast.ingestion.transform.ServingStoreTransform; @@ -167,19 +169,22 @@ public void expand() { "A sample of size 1 of incoming rows from MAIN and ERRORS will logged every 30 seconds for visibility"); logNRows(pFeatureRows, "Output sample", 1, Duration.standardSeconds(30)); - PFeatureRows warehouseRows = pFeatureRows; - PFeatureRows servingRows = pFeatureRows; + PCollection warehouseRows = pFeatureRows.getMain(); + PCollection servingRows = pFeatureRows.getMain(); + PCollection errorRows = pFeatureRows.getErrors(); if (jobOptions.isCoalesceRowsEnabled()) { // Should we merge and dedupe rows before writing to the serving store? - servingRows = servingRows.apply("Coalesce Rows", new CoalescePFeatureRows( + servingRows = servingRows.apply("Coalesce Rows", new CoalesceFeatureRowExtended( jobOptions.getCoalesceRowsDelaySeconds(), jobOptions.getCoalesceRowsTimeoutSeconds())); } if (!dryRun) { servingRows.apply("Write to Serving Stores", servingStoreTransform); - warehouseRows.apply("Write to Warehouse Stores", warehouseStoreTransform); - pFeatureRows.getErrors().apply(errorsStoreTransform); + if (!Strings.isNullOrEmpty(importJobSpecs.getWarehouseStorageSpec().getId())) { + warehouseRows.apply("Write to Warehouse Stores", warehouseStoreTransform); + } + errorRows.apply(errorsStoreTransform); } } @@ -203,6 +208,8 @@ public void logNRows(PFeatureRows pFeatureRows, String name, long limit, Duratio errors = errors.apply(minuteWindow); } + main.apply("metrics.store.lag", ParDo.of(FeastMetrics.lagUpdateDoFn())); + main.apply("Sample success", Sample.any(limit)) .apply("Log success sample", ParDo.of(new LoggerDoFn(Level.INFO, name + " MAIN "))); errors diff --git a/ingestion/src/main/java/feast/ingestion/model/Specs.java b/ingestion/src/main/java/feast/ingestion/model/Specs.java index be87b85227..c818bb6180 100644 --- a/ingestion/src/main/java/feast/ingestion/model/Specs.java +++ b/ingestion/src/main/java/feast/ingestion/model/Specs.java @@ -46,9 +46,9 @@ public class Specs implements Serializable { @Getter Map featureSpecs; @Getter - Map servingStorageSpecs; + StorageSpec servingStorageSpec; @Getter - Map warehouseStorageSpecs; + StorageSpec warehouseStorageSpec; @Getter StorageSpec errorsStoreSpec; @@ -69,16 +69,8 @@ public Specs(String jobName, ImportJobSpecs importJobSpecs) { featureSpec -> featureSpec )); - this.servingStorageSpecs = importJobSpecs.getServingStorageSpecsList().stream() - .collect(Collectors.toMap( - StorageSpec::getId, - storageSpec -> storageSpec - )); - this.warehouseStorageSpecs = importJobSpecs.getWarehouseStorageSpecsList().stream() - .collect(Collectors.toMap( - StorageSpec::getId, - storageSpec -> storageSpec - )); + this.servingStorageSpec = importJobSpecs.getServingStorageSpec(); + this.warehouseStorageSpec = importJobSpecs.getWarehouseStorageSpec(); this.errorsStoreSpec = importJobSpecs.getErrorsStorageSpec(); } } diff --git a/ingestion/src/main/java/feast/ingestion/transform/BaseStoreTransform.java b/ingestion/src/main/java/feast/ingestion/transform/BaseStoreTransform.java new file mode 100644 index 0000000000..66e4593732 --- /dev/null +++ b/ingestion/src/main/java/feast/ingestion/transform/BaseStoreTransform.java @@ -0,0 +1,71 @@ +/* + * Copyright 2018 The Feast Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package feast.ingestion.transform; + +import com.google.common.base.Preconditions; +import com.google.inject.Inject; +import feast.ingestion.metrics.FeastMetrics; +import feast.ingestion.model.Specs; +import feast.specs.StorageSpecProto.StorageSpec; +import feast.store.FeatureStoreFactory; +import feast.store.FeatureStoreWrite; +import feast.types.FeatureRowExtendedProto.FeatureRowExtended; +import java.util.List; +import lombok.extern.slf4j.Slf4j; +import org.apache.beam.sdk.transforms.PTransform; +import org.apache.beam.sdk.transforms.ParDo; +import org.apache.beam.sdk.values.PCollection; +import org.apache.beam.sdk.values.PDone; + +@Slf4j +public class BaseStoreTransform extends PTransform, PDone> { + + private List stores; + private StorageSpec storageSpec; + private Specs specs; + + @Inject + public BaseStoreTransform(List stores, StorageSpec storageSpec, + Specs specs) { + this.stores = stores; + this.storageSpec = storageSpec; + this.specs = specs; + } + + @Override + public PDone expand(PCollection input) { + FeatureStoreWrite write = null; + for (FeatureStoreFactory factory : stores) { + log.info("Checking factory {} vs storageSpec {}", factory.getType(), storageSpec); + if (factory.getType().equals(storageSpec.getType())) { + write = factory.create(storageSpec, specs); + } + } + Preconditions.checkNotNull(write, + "Store %s with type %s not supported", + storageSpec.getId(), + storageSpec.getType()); + + input.apply("metrics.store." + storageSpec.getId(), + ParDo.of(FeastMetrics.incrDoFn("stored"))); + + return input.apply( + String.format("Write %s %s", storageSpec.getId(), storageSpec.getType()), + write); + } +} diff --git a/ingestion/src/main/java/feast/ingestion/transform/CoalescePFeatureRows.java b/ingestion/src/main/java/feast/ingestion/transform/CoalesceFeatureRowExtended.java similarity index 76% rename from ingestion/src/main/java/feast/ingestion/transform/CoalescePFeatureRows.java rename to ingestion/src/main/java/feast/ingestion/transform/CoalesceFeatureRowExtended.java index cf7932f015..1ed84857b1 100644 --- a/ingestion/src/main/java/feast/ingestion/transform/CoalescePFeatureRows.java +++ b/ingestion/src/main/java/feast/ingestion/transform/CoalesceFeatureRowExtended.java @@ -16,7 +16,6 @@ package feast.ingestion.transform; -import feast.ingestion.values.PFeatureRows; import feast.types.FeatureRowExtendedProto.FeatureRowExtended; import feast.types.FeatureRowProto.FeatureRow; import lombok.AllArgsConstructor; @@ -25,23 +24,19 @@ import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.TypeDescriptor; -/** - * This class is a work around to make some refactoring easier. PFeatureRows should be deprecated. - */ @AllArgsConstructor -public class CoalescePFeatureRows extends - PTransform { +public class CoalesceFeatureRowExtended extends + PTransform, PCollection> { private long delaySeconds; private long timeoutSeconds; @Override - public PFeatureRows expand(PFeatureRows input) { - PCollection output = input.getMain() + public PCollection expand(PCollection input) { + return input .apply(MapElements.into(TypeDescriptor.of(FeatureRow.class)) .via(FeatureRowExtended::getRow)) .apply(new CoalesceFeatureRows(delaySeconds, timeoutSeconds)) .apply(new ToFeatureRowExtended()); - return PFeatureRows.of(output, input.getErrors()); } } diff --git a/ingestion/src/main/java/feast/ingestion/transform/ErrorsStoreTransform.java b/ingestion/src/main/java/feast/ingestion/transform/ErrorsStoreTransform.java index 70f7f2d3c7..c33316fc3f 100644 --- a/ingestion/src/main/java/feast/ingestion/transform/ErrorsStoreTransform.java +++ b/ingestion/src/main/java/feast/ingestion/transform/ErrorsStoreTransform.java @@ -17,8 +17,6 @@ package feast.ingestion.transform; -import static com.google.common.base.Preconditions.checkArgument; - import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.inject.Inject; @@ -26,55 +24,42 @@ import feast.ingestion.options.ImportJobPipelineOptions; import feast.ingestion.util.PathUtil; import feast.specs.StorageSpecProto.StorageSpec; -import feast.store.FeatureStoreWrite; import feast.store.errors.FeatureErrorsFactory; import feast.store.errors.json.JsonFileErrorsFactory; -import feast.types.FeatureRowExtendedProto.FeatureRowExtended; +import java.io.IOException; +import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import lombok.extern.slf4j.Slf4j; -import org.apache.beam.sdk.values.PCollection; -import org.apache.beam.sdk.values.PDone; -@Slf4j -public class ErrorsStoreTransform extends FeatureStoreWrite { - private String workspace; - private Specs specs; - private List errorsStoreFactories; +@Slf4j +public class ErrorsStoreTransform extends BaseStoreTransform { @Inject public ErrorsStoreTransform( - ImportJobPipelineOptions options, Specs specs, - List errorsStoreFactories) { - this.workspace = options.getWorkspace(); - this.specs = specs; - this.errorsStoreFactories = errorsStoreFactories; + List errorsStoreFactories, Specs specs, + ImportJobPipelineOptions options) { + super(errorsStoreFactories, getErrorStoreSpec(specs, options), specs); } - @Override - public PDone expand(PCollection input) { + public static StorageSpec getErrorStoreSpec(Specs specs, ImportJobPipelineOptions options) { + String workspace = options.getWorkspace(); StorageSpec errorsStoreSpec = specs.getErrorsStoreSpec(); if (Strings.isNullOrEmpty(errorsStoreSpec.getType())) { - Preconditions.checkArgument(!Strings.isNullOrEmpty(workspace), "workspace must be provided"); + Preconditions.checkArgument(!Strings.isNullOrEmpty(workspace), "Workspace must be provided"); Path workspaceErrorsPath = PathUtil.getPath(workspace).resolve("errors"); + try { + Files.createDirectory(workspaceErrorsPath); + } catch (IOException e) { + log.error("Could not intialise workspace errors directory {}", workspaceErrorsPath); + throw new RuntimeException(e); + } errorsStoreSpec = StorageSpec.newBuilder() - .setId("workspace/errors") + .setId("ERRORS") .setType(JsonFileErrorsFactory.JSON_FILES_TYPE) .putOptions("path", workspaceErrorsPath.toString()).build(); } - input.apply("Write errors" + errorsStoreSpec.getType(), - getErrorStore(errorsStoreSpec.getType()).create(errorsStoreSpec, specs)); - return PDone.in(input.getPipeline()); - } - - FeatureErrorsFactory getErrorStore(String type) { - checkArgument(!type.isEmpty(), "Errors store type not provided"); - for (FeatureErrorsFactory errorsStoreFactory : errorsStoreFactories) { - if (errorsStoreFactory.getType().equals(type)) { - return errorsStoreFactory; - } - } - throw new IllegalArgumentException("Errors store type not found"); + return errorsStoreSpec; } } diff --git a/ingestion/src/main/java/feast/ingestion/transform/ServingStoreTransform.java b/ingestion/src/main/java/feast/ingestion/transform/ServingStoreTransform.java index e08444989a..5299fe12df 100644 --- a/ingestion/src/main/java/feast/ingestion/transform/ServingStoreTransform.java +++ b/ingestion/src/main/java/feast/ingestion/transform/ServingStoreTransform.java @@ -18,40 +18,16 @@ package feast.ingestion.transform; import com.google.inject.Inject; -import feast.ingestion.metrics.FeastMetrics; import feast.ingestion.model.Specs; -import feast.ingestion.values.PFeatureRows; import feast.store.serving.FeatureServingFactory; import java.util.List; import lombok.extern.slf4j.Slf4j; -import org.apache.beam.sdk.transforms.PTransform; -import org.apache.beam.sdk.transforms.ParDo; @Slf4j -public class ServingStoreTransform extends PTransform { - - private List stores; - private Specs specs; +public class ServingStoreTransform extends BaseStoreTransform { @Inject public ServingStoreTransform(List stores, Specs specs) { - this.stores = stores; - this.specs = specs; - } - - @Override - public PFeatureRows expand(PFeatureRows input) { - PFeatureRows output = - input.apply( - "Split to serving stores", - new SplitOutputByStore( - stores, (featureSpec) -> featureSpec.getDataStores().getServing().getId(), specs, - specs.getServingStorageSpecs())); - - output.getMain().apply("metrics.store.lag", ParDo.of(FeastMetrics.lagUpdateDoFn())); - output.getMain().apply("metrics.store.main", ParDo.of(FeastMetrics.incrDoFn("serving_stored"))); - output.getErrors() - .apply("metrics.store.errors", ParDo.of(FeastMetrics.incrDoFn("serving_errors"))); - return output; + super(stores, specs.getServingStorageSpec(), specs); } } diff --git a/ingestion/src/main/java/feast/ingestion/transform/WarehouseStoreTransform.java b/ingestion/src/main/java/feast/ingestion/transform/WarehouseStoreTransform.java index 90e8211f2a..e06c954c49 100644 --- a/ingestion/src/main/java/feast/ingestion/transform/WarehouseStoreTransform.java +++ b/ingestion/src/main/java/feast/ingestion/transform/WarehouseStoreTransform.java @@ -19,41 +19,17 @@ package feast.ingestion.transform; import com.google.inject.Inject; -import feast.ingestion.metrics.FeastMetrics; import feast.ingestion.model.Specs; -import feast.ingestion.values.PFeatureRows; +import feast.store.serving.FeatureServingFactory; import feast.store.warehouse.FeatureWarehouseFactory; import java.util.List; import lombok.extern.slf4j.Slf4j; -import org.apache.beam.sdk.transforms.PTransform; -import org.apache.beam.sdk.transforms.ParDo; @Slf4j -public class WarehouseStoreTransform extends PTransform { - - private List stores; - private Specs specs; +public class WarehouseStoreTransform extends BaseStoreTransform { @Inject public WarehouseStoreTransform(List stores, Specs specs) { - this.stores = stores; - this.specs = specs; - } - - @Override - public PFeatureRows expand(PFeatureRows input) { - PFeatureRows output = - input.apply( - "Split to warehouse stores", - new SplitOutputByStore( - stores, - (featureSpec) -> featureSpec.getDataStores().getWarehouse().getId(), - specs, - specs.getWarehouseStorageSpecs())); - output.getMain() - .apply("metrics.store.main", ParDo.of(FeastMetrics.incrDoFn("warehouse_stored"))); - output.getErrors() - .apply("metrics.store.errors", ParDo.of(FeastMetrics.incrDoFn("warehouse_errors"))); - return output; + super(stores, specs.getWarehouseStorageSpec(), specs); } } diff --git a/ingestion/src/main/java/feast/ingestion/transform/fn/ValidateFeatureRowsDoFn.java b/ingestion/src/main/java/feast/ingestion/transform/fn/ValidateFeatureRowsDoFn.java index 67aec7d255..a8ad1d9469 100644 --- a/ingestion/src/main/java/feast/ingestion/transform/fn/ValidateFeatureRowsDoFn.java +++ b/ingestion/src/main/java/feast/ingestion/transform/fn/ValidateFeatureRowsDoFn.java @@ -31,7 +31,6 @@ import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.ImportSpecProto.Field; import feast.specs.ImportSpecProto.ImportSpec; -import feast.specs.StorageSpecProto.StorageSpec; import feast.store.serving.FeatureServingFactory; import feast.store.serving.FeatureServingFactoryService; import feast.store.warehouse.FeatureWarehouseFactory; @@ -46,7 +45,6 @@ public class ValidateFeatureRowsDoFn extends BaseFeatureDoFn { - private static final String EMPTY_STORE = ""; private final List featureIds = new ArrayList<>(); private Set supportedServingTypes = new HashSet<>(); @@ -99,22 +97,6 @@ public void processElementImpl(ProcessContext context) { checkNotNull( featureSpec, String.format("Feature spec not found featureId=%s", feature.getId())); - String servingStoreId = featureSpec.getDataStores().getServing().getId(); - if (!servingStoreId.equals(EMPTY_STORE)) { - StorageSpec servingStorageSpec = specs.getServingStorageSpecs() - .getOrDefault(servingStoreId, null); - checkNotNull(servingStorageSpec, - "Serving storage specs not found for store id " + servingStoreId); - } - - String warehouseStoreId = featureSpec.getDataStores().getWarehouse().getId(); - if (!warehouseStoreId.equals(EMPTY_STORE)) { - StorageSpec warehouseStorageSpec = specs.getWarehouseStorageSpecs() - .getOrDefault(warehouseStoreId, null); - checkNotNull(warehouseStorageSpec, - "Warehouse storage specs not found for store id " + servingStoreId); - } - checkArgument( featureSpec.getEntity().equals(row.getEntityName()), String.format( diff --git a/ingestion/src/main/java/feast/options/OptionsParser.java b/ingestion/src/main/java/feast/options/OptionsParser.java index aca61d7f14..8400f5d423 100644 --- a/ingestion/src/main/java/feast/options/OptionsParser.java +++ b/ingestion/src/main/java/feast/options/OptionsParser.java @@ -18,6 +18,7 @@ package feast.options; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.module.jsonSchema.JsonSchema; import com.fasterxml.jackson.module.jsonSchema.JsonSchemaGenerator; @@ -33,7 +34,9 @@ public class OptionsParser { - private static final ObjectMapper mapper = new ObjectMapper(); + private static final ObjectMapper strictMapper = new ObjectMapper(); + private static final ObjectMapper lenientMapper = new ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); private static final Validator validator; static { @@ -46,21 +49,21 @@ public class OptionsParser { * Return a json schema string representing an options class for error messages */ static String getJsonSchema(Class optionsClass) { - JsonSchemaGenerator schemaGen = new JsonSchemaGenerator(mapper); + JsonSchemaGenerator schemaGen = new JsonSchemaGenerator(strictMapper); JsonSchema schema = null; try { schema = schemaGen.generateSchema(optionsClass); schema.setId(null); // clear the ID as it's visual noise - return mapper.writer().forType(JsonSchema.class).writeValueAsString(schema); + return strictMapper.writer().forType(JsonSchema.class).writeValueAsString(schema); } catch (IOException e) { return ""; } } - /** - * Construct a class from string options and validate with any javax validation annotations - */ - public static T parse(Map optionsMap, Class clazz) { + + private static T parse(Map optionsMap, Class clazz, + boolean lenient) { + ObjectMapper mapper = lenient ? lenientMapper : strictMapper; List messages = Lists.newArrayList(); T options; try { @@ -86,4 +89,20 @@ public static T parse(Map optionsMap, Class< } return options; } + + /** + * Construct a class from string options and validate with any javax validation annotations, + * unknown options are ignored + */ + public static T lenientParse(Map optionsMap, Class clazz) { + return parse(optionsMap, clazz, true); + } + + + /** + * Construct a class from string options and validate with any javax validation annotations + */ + public static T parse(Map optionsMap, Class clazz) { + return parse(optionsMap, clazz, false); + } } diff --git a/ingestion/src/main/java/feast/store/serving/bigtable/BigTableFeatureOptions.java b/ingestion/src/main/java/feast/store/serving/bigtable/BigTableFeatureOptions.java index 68bb7e6ec5..d68f11cc89 100644 --- a/ingestion/src/main/java/feast/store/serving/bigtable/BigTableFeatureOptions.java +++ b/ingestion/src/main/java/feast/store/serving/bigtable/BigTableFeatureOptions.java @@ -17,10 +17,11 @@ package feast.store.serving.bigtable; +import com.fasterxml.jackson.annotation.JsonProperty; import feast.options.Options; public class BigTableFeatureOptions implements Options { - public static final String DEFAULT_FAMILY = "default"; - public String family = DEFAULT_FAMILY; + @JsonProperty(value = "bigtable.family") + public String family; } diff --git a/ingestion/src/main/java/feast/store/serving/bigtable/BigTableStoreOptions.java b/ingestion/src/main/java/feast/store/serving/bigtable/BigTableStoreOptions.java index 9e1bbfb8b4..92a32de31f 100644 --- a/ingestion/src/main/java/feast/store/serving/bigtable/BigTableStoreOptions.java +++ b/ingestion/src/main/java/feast/store/serving/bigtable/BigTableStoreOptions.java @@ -17,12 +17,17 @@ package feast.store.serving.bigtable; +import feast.options.Options; import java.io.Serializable; import javax.validation.constraints.NotEmpty; -import feast.options.Options; public class BigTableStoreOptions implements Options, Serializable { - @NotEmpty public String project; - @NotEmpty public String instance; + + public static final String DEFAULT_FAMILY = "default"; + @NotEmpty + public String project; + @NotEmpty + public String instance; + public String family = DEFAULT_FAMILY; public String prefix; } diff --git a/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowBigTableIO.java b/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowBigTableIO.java index 4dc289aeb2..ce94c0979a 100644 --- a/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowBigTableIO.java +++ b/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowBigTableIO.java @@ -52,7 +52,7 @@ public PDone expand(PCollection input) { PCollection> mutations = input.apply( "Map to BigTable mutations", - ParDo.of(new FeatureRowToBigTableMutationDoFn(bigTableOptions.prefix, specs))); + ParDo.of(new FeatureRowToBigTableMutationDoFn(bigTableOptions.prefix, bigTableOptions.family, specs))); PCollection>> iterableMutations = mutations.apply( diff --git a/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowToBigTableMutationDoFn.java b/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowToBigTableMutationDoFn.java index 6a9330c7c2..1e203ebe0e 100644 --- a/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowToBigTableMutationDoFn.java +++ b/ingestion/src/main/java/feast/store/serving/bigtable/FeatureRowToBigTableMutationDoFn.java @@ -18,6 +18,8 @@ package feast.store.serving.bigtable; import com.google.common.base.Charsets; +import com.google.common.base.Preconditions; +import com.google.common.base.Strings; import feast.SerializableCache; import feast.ingestion.model.Specs; import feast.ingestion.util.DateUtil; @@ -48,15 +50,18 @@ public class FeatureRowToBigTableMutationDoFn SerializableCache.builder() .loadingFunction( (featureSpec) -> - OptionsParser.parse( - featureSpec.getDataStores().getServing().getOptionsMap(), + OptionsParser.lenientParse( + featureSpec.getOptionsMap(), BigTableFeatureOptions.class)) .build(); private final String tablePrefix; + private final String family; private final Specs specs; - FeatureRowToBigTableMutationDoFn(String tablePrefix, Specs specs) { + + FeatureRowToBigTableMutationDoFn(String tablePrefix, String family, Specs specs) { this.tablePrefix = tablePrefix; + this.family = family; this.specs = specs; } @@ -78,7 +83,7 @@ public void processElement(ProcessContext context) { } private String getTableName(FeatureRow row) { - if (tablePrefix != null) { + if (!Strings.isNullOrEmpty(tablePrefix)) { return tablePrefix + row.getEntityName(); } else { return row.getEntityName(); @@ -100,7 +105,10 @@ public Put makePut(FeatureRowExtended rowExtended) { FeatureSpec featureSpec = specs.getFeatureSpec(feature.getId()); BigTableFeatureOptions options = servingOptionsCache.get(featureSpec); - byte[] family = options.family.getBytes(Charsets.UTF_8); + Preconditions.checkArgument(!Strings.isNullOrEmpty(this.family) + || !Strings.isNullOrEmpty(options.family)); + byte[] family = (!Strings.isNullOrEmpty(options.family) ? options.family : this.family) + .getBytes(Charsets.UTF_8); byte[] qualifier = feature.getId().getBytes(Charsets.UTF_8); byte[] value = feature.getValue().toByteArray(); long version = DateUtil.toMillis(row.getEventTimestamp()); diff --git a/ingestion/src/main/java/feast/store/serving/redis/FeatureRowToRedisMutationDoFn.java b/ingestion/src/main/java/feast/store/serving/redis/FeatureRowToRedisMutationDoFn.java index 01f779bff4..1d2ebfa5cb 100644 --- a/ingestion/src/main/java/feast/store/serving/redis/FeatureRowToRedisMutationDoFn.java +++ b/ingestion/src/main/java/feast/store/serving/redis/FeatureRowToRedisMutationDoFn.java @@ -17,8 +17,6 @@ package feast.store.serving.redis; -import static com.google.common.base.Preconditions.checkArgument; - import feast.SerializableCache; import feast.ingestion.model.Specs; import feast.ingestion.util.DateUtil; @@ -42,8 +40,8 @@ public class FeatureRowToRedisMutationDoFn extends DoFnbuilder() .loadingFunction( (featureSpec) -> - OptionsParser.parse( - featureSpec.getDataStores().getServing().getOptionsMap(), + OptionsParser.lenientParse( + featureSpec.getOptionsMap(), RedisFeatureOptions.class)) .build(); private Specs specs; diff --git a/ingestion/src/main/java/feast/store/serving/redis/RedisFeatureOptions.java b/ingestion/src/main/java/feast/store/serving/redis/RedisFeatureOptions.java index cf868cc47b..d68cbb2989 100644 --- a/ingestion/src/main/java/feast/store/serving/redis/RedisFeatureOptions.java +++ b/ingestion/src/main/java/feast/store/serving/redis/RedisFeatureOptions.java @@ -18,26 +18,22 @@ package feast.store.serving.redis; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.joda.time.Duration; -import org.joda.time.format.ISOPeriodFormat; +import com.fasterxml.jackson.annotation.JsonProperty; import feast.options.Options; import feast.options.Validation.ISO8601Duration; +import org.joda.time.Duration; +import org.joda.time.format.ISOPeriodFormat; public class RedisFeatureOptions implements Options { - static final String DEFAULT_BUCKET_SIZE = "PT1H"; - static final String DEFAULT_EXPIRY = "PT0H"; - @ISO8601Duration public String expiry = DEFAULT_EXPIRY; // ISO8601 Period + static final String DEFAULT_EXPIRY = "PT0H"; - @ISO8601Duration public String bucketSize = DEFAULT_BUCKET_SIZE; // ISO8601 Period + @ISO8601Duration + @JsonProperty(value = "redis.expiry") + public String expiry = DEFAULT_EXPIRY; // ISO8601 Period @JsonIgnore Duration getExpiryDuration() { return ISOPeriodFormat.standard().parsePeriod(expiry).toStandardDuration(); } - - @JsonIgnore - Duration getBucketSizeDuration() { - return ISOPeriodFormat.standard().parsePeriod(bucketSize).toStandardDuration(); - } } diff --git a/ingestion/src/test/java/feast/ingestion/ImportJobCSVTest.java b/ingestion/src/test/java/feast/ingestion/ImportJobCSVTest.java index 356e023347..183499b0bd 100644 --- a/ingestion/src/test/java/feast/ingestion/ImportJobCSVTest.java +++ b/ingestion/src/test/java/feast/ingestion/ImportJobCSVTest.java @@ -38,6 +38,7 @@ import feast.ingestion.util.ProtoUtil; import feast.specs.ImportJobSpecsProto.ImportJobSpecs; import feast.specs.ImportSpecProto.ImportSpec; +import feast.specs.StorageSpecProto.StorageSpec; import feast.store.MockFeatureErrorsFactory; import feast.store.MockServingFactory; import feast.store.MockWarehouseFactory; @@ -534,8 +535,8 @@ public void testImportWithErrors() throws IOException { } - @Test - public void testImportWithoutWarehouseStore() throws IOException { + @Test(expected = IllegalArgumentException.class) + public void testImportWithUnsupportedWarehouse() throws IOException { ImportSpec importSpec = ProtoUtil.decodeProtoYaml( "---\n" @@ -562,7 +563,8 @@ public void testImportWithoutWarehouseStore() throws IOException { ImportJobPipelineOptions options = initOptions(); ImportJobSpecs importJobSpecs = getImportJobSpecs(importSpec, csvFile.toString()).toBuilder() - .clearWarehouseStorageSpecs().build(); + .setWarehouseStorageSpec(StorageSpec.newBuilder().setId("WAREHOUSE").setType("unknown")) + .build(); Injector injector = Guice.createInjector( @@ -573,29 +575,6 @@ public void testImportWithoutWarehouseStore() throws IOException { injector.getInstance(ImportJob.class); job.expand(); - - PCollection writtenToServing = - PCollectionList - .of(FeatureServingFactoryService.get(MockServingFactory.class).getWrite() - .getInputs()) - .apply("flatten serving input", Flatten.pCollections()); - - PCollection writtenToWarehouse = - PCollectionList - .of(FeatureWarehouseFactoryService.get(MockWarehouseFactory.class).getWrite() - .getInputs()) - .apply("flatten warehouse input", Flatten.pCollections()); - - PCollection writtenToErrors = - PCollectionList - .of(FeatureErrorsFactoryService.get(MockFeatureErrorsFactory.class).getWrite() - .getInputs()) - .apply("flatten errors input", Flatten.pCollections()); - - PAssert.that(writtenToErrors).satisfies(hasCount(0)); - PAssert.that(writtenToWarehouse).satisfies(hasCount(0)); - PAssert.that(writtenToServing).satisfies(hasCount(3)); - testPipeline.run(); } @@ -614,21 +593,22 @@ public void testImportWithoutWarehouseStoreSetByFeature() throws IOException { + " timestampValue: 2018-09-25T00:00:00.000Z\n" + " fields:\n" + " - name: id\n" - + " - featureId: testEntity.testInt64NoWarehouse\n" - + " - featureId: testEntity.testStringNoWarehouse\n" + + " - featureId: testEntity.testInt64\n" + + " - featureId: testEntity.testString\n" + "\n", ImportSpec.getDefaultInstance()); File csvFile = folder.newFile("data.csv"); - // Note the string and integer features are in the wrong positions for the import spec. Files.asCharSink(csvFile, Charsets.UTF_8).write("1,101,a\n2,202,b\n3,303,c\n"); ImportJobPipelineOptions options = initOptions(); + ImportJobSpecs importJobSpecs = getImportJobSpecs(importSpec, csvFile.toString()).toBuilder() + .clearWarehouseStorageSpec().build(); Injector injector = Guice.createInjector( - new ImportJobModule(options, getImportJobSpecs(importSpec, csvFile.toString())), + new ImportJobModule(options, importJobSpecs), new TestPipelineModule(testPipeline)); ImportJob job = injector.getInstance(ImportJob.class); diff --git a/ingestion/src/test/java/feast/ingestion/config/ImportJobSpecsSupplierTest.java b/ingestion/src/test/java/feast/ingestion/config/ImportJobSpecsSupplierTest.java index 357df7d6a7..7314c60b72 100644 --- a/ingestion/src/test/java/feast/ingestion/config/ImportJobSpecsSupplierTest.java +++ b/ingestion/src/test/java/feast/ingestion/config/ImportJobSpecsSupplierTest.java @@ -40,17 +40,22 @@ public class ImportJobSpecsSupplierTest { - @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); String importSpecYaml = "---\n" - + "servingStorageSpecs:\n" - + " - id: TEST_SERVING\n" - + " type: serving.mock\n" - + " options: {}\n" - + "warehouseStorageSpecs:\n" - + " - id: TEST_WAREHOUSE\n" - + " type: warehouse.mock\n" - + " options: {}\n" + + "servingStorageSpec:\n" + + " id: TEST_SERVING\n" + + " type: serving.mock\n" + + " options: {}\n" + + "warehouseStorageSpec:\n" + + " id: TEST_WAREHOUSE\n" + + " type: warehouse.mock\n" + + " options: {}\n" + + "errorsStorageSpec:\n" + + " id: ERRORS\n" + + " type: stdout\n" + + " options: {}\n" + "entitySpecs:\n" + " - name: testEntity\n" + " description: This is a test entity\n" @@ -110,13 +115,20 @@ public void testSupplierImportSpecYamlFile() throws IOException { .build(), importJobSpecs.getImportSpec()); - assertEquals( - StorageSpec.newBuilder().setId("TEST_SERVING").setType("serving.mock").build(), - importJobSpecs.getServingStorageSpecs(0)); + assertEquals(StorageSpec.newBuilder() + .setId("TEST_SERVING") + .setType("serving.mock") + .build(), importJobSpecs.getServingStorageSpec()); - assertEquals( - StorageSpec.newBuilder().setId("TEST_WAREHOUSE").setType("warehouse.mock").build(), - importJobSpecs.getWarehouseStorageSpecs(0)); + assertEquals(StorageSpec.newBuilder() + .setId("TEST_WAREHOUSE") + .setType("warehouse.mock") + .build(), importJobSpecs.getWarehouseStorageSpec()); + + assertEquals(StorageSpec.newBuilder() + .setId("ERRORS") + .setType("stdout") + .build(), importJobSpecs.getErrorsStorageSpec()); assertEquals( EntitySpec.newBuilder() diff --git a/ingestion/src/test/java/feast/ingestion/model/SpecsTest.java b/ingestion/src/test/java/feast/ingestion/model/SpecsTest.java index 7bea79405b..fe402877ab 100644 --- a/ingestion/src/test/java/feast/ingestion/model/SpecsTest.java +++ b/ingestion/src/test/java/feast/ingestion/model/SpecsTest.java @@ -18,9 +18,7 @@ package feast.ingestion.model; import static junit.framework.TestCase.assertTrue; -import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; import com.google.common.io.Resources; import feast.ingestion.config.ImportJobSpecsSupplier; @@ -67,7 +65,7 @@ public void testSingleFeatureAndEntity() { assertEquals(1, specs.getFeatureSpecs().size()); assertTrue(specs.getFeatureSpecs().containsKey("testEntity.testInt32")); - assertTrue(specs.getServingStorageSpecs().containsKey("TEST_SERVING")); + assertTrue(specs.getServingStorageSpec().getId().equals("TEST_SERVING")); } @Test(expected = IllegalArgumentException.class) @@ -138,8 +136,8 @@ public void testGetStorageSpec() { Specs specs = Specs.of("testjob", importJobSpecs); specs.validate(); - assertThat(specs.getWarehouseStorageSpecs().keySet(), containsInAnyOrder("TEST_WAREHOUSE")); - assertThat(specs.getWarehouseStorageSpecs().keySet(), containsInAnyOrder("TEST_WAREHOUSE")); + assertEquals(specs.getWarehouseStorageSpec().getId(), "TEST_WAREHOUSE"); + assertEquals(specs.getServingStorageSpec().getId(), "TEST_SERVING"); } @Test(expected = IllegalArgumentException.class) diff --git a/ingestion/src/test/java/feast/ingestion/transform/ErrorsStoreTransformTest.java b/ingestion/src/test/java/feast/ingestion/transform/ErrorsStoreTransformTest.java index 192002bfe9..9458e3ce48 100644 --- a/ingestion/src/test/java/feast/ingestion/transform/ErrorsStoreTransformTest.java +++ b/ingestion/src/test/java/feast/ingestion/transform/ErrorsStoreTransformTest.java @@ -47,7 +47,6 @@ import org.apache.beam.sdk.transforms.Flatten; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.PCollectionList; -import org.assertj.core.util.Lists; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -66,16 +65,11 @@ public class ErrorsStoreTransformTest { private PCollection inputs; private List errors; - public Specs getSpecs(StorageSpec errorsStorageSpec) { - return new Specs("test", ImportJobSpecs.newBuilder() - .setErrorsStorageSpec(errorsStorageSpec).build() - ); - } - public Specs getSpecs(String errorsStorageType) { return new Specs("test", ImportJobSpecs.newBuilder() - .setErrorsStorageSpec(StorageSpec.newBuilder().setType(errorsStorageType)).build() - ); + .setErrorsStorageSpec(StorageSpec.newBuilder() + .setId("ERRORS") + .setType(errorsStorageType)).build()); } @Before @@ -98,14 +92,16 @@ private FeatureRowExtended errorOf(String transform, Throwable cause) { @Test public void shouldWriteToGivenErrorsStore() { - MockFeatureErrorsFactory mockStore = new MockFeatureErrorsFactory(); - ErrorsStoreTransform transform = - new ErrorsStoreTransform(options, getSpecs(MOCK_ERRORS_STORE_TYPE), - Lists.newArrayList(mockStore)); + ErrorsStoreTransform transform = new ErrorsStoreTransform( + FeatureErrorsFactoryService.getAll(), + getSpecs(MOCK_ERRORS_STORE_TYPE), options); transform.expand(inputs); + MockFeatureErrorsFactory factory = FeatureErrorsFactoryService + .get(MockFeatureErrorsFactory.class); + PCollection writtenToErrors = - PCollectionList.of(mockStore.getWrite().getInputs()) + PCollectionList.of(factory.getWrite().getInputs()) .apply("flatten errors input", Flatten.pCollections()); PAssert.that(writtenToErrors).containsInAnyOrder(errors); @@ -114,9 +110,9 @@ public void shouldWriteToGivenErrorsStore() { @Test public void logErrorsToStdErr() { - ErrorsStoreTransform transform = - new ErrorsStoreTransform(options, getSpecs(TYPE_STDERR), - FeatureErrorsFactoryService.getAll()); + ErrorsStoreTransform transform = new ErrorsStoreTransform( + FeatureErrorsFactoryService.getAll(), + getSpecs(TYPE_STDERR), options); inputs.apply(transform); pipeline.run(); } @@ -124,9 +120,9 @@ public void logErrorsToStdErr() { @Test public void logErrorsToStdOut() { - ErrorsStoreTransform transform = - new ErrorsStoreTransform(options, getSpecs(TYPE_STDOUT), - FeatureErrorsFactoryService.getAll()); + ErrorsStoreTransform transform = new ErrorsStoreTransform( + FeatureErrorsFactoryService.getAll(), + getSpecs(TYPE_STDOUT), options); inputs.apply(transform); pipeline.run(); } @@ -135,8 +131,9 @@ public void logErrorsToStdOut() { public void logErrorsToWorkspace() throws IOException, InterruptedException { String tempWorkspace = tempFolder.newFolder().toString(); options.setWorkspace(tempWorkspace); - ErrorsStoreTransform transform = - new ErrorsStoreTransform(options, getSpecs(""), FeatureErrorsFactoryService.getAll()); + ErrorsStoreTransform transform = new ErrorsStoreTransform( + FeatureErrorsFactoryService.getAll(), + getSpecs(""), options); inputs.apply(transform); pipeline.run().waitUntilFinish(); diff --git a/ingestion/src/test/java/feast/options/FeastOptionsParserTest.java b/ingestion/src/test/java/feast/options/OptionsParserTest.java similarity index 87% rename from ingestion/src/test/java/feast/options/FeastOptionsParserTest.java rename to ingestion/src/test/java/feast/options/OptionsParserTest.java index 1d836831d0..76ef68c331 100644 --- a/ingestion/src/test/java/feast/options/FeastOptionsParserTest.java +++ b/ingestion/src/test/java/feast/options/OptionsParserTest.java @@ -26,7 +26,7 @@ import org.junit.Test; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; -public class FeastOptionsParserTest { +public class OptionsParserTest { @Test public void getJsonSchema() { @@ -45,6 +45,17 @@ public void parseOptions() { assertEquals(1, options.bar); } + @Test + public void lenientParseOptions() { + TestType1 options = + OptionsParser.lenientParse( + ImmutableMap.builder().put("foo", "x").put("bar", "1") + .put("ignoreme", "123").build(), + TestType1.class); + assertEquals("x", options.foo); + assertEquals(1, options.bar); + } + @Test public void parseOptionsMissingOption() { TestType1 options = @@ -92,11 +103,13 @@ public void parseOptionsWithValidationInvalid() { } public static class TestType1 implements Options { + public String foo; public int bar; } public static class TestType2 implements Options { + @JsonProperty(value = "test.foo") public String foo; @@ -105,7 +118,10 @@ public static class TestType2 implements Options { } public static class TestType3 implements Options { - @NotNull public String foo; - @Positive public int bar; + + @NotNull + public String foo; + @Positive + public int bar; } } diff --git a/ingestion/src/test/java/feast/store/serving/bigtable/BigTableFeatureOptionsTest.java b/ingestion/src/test/java/feast/store/serving/bigtable/BigTableFeatureOptionsTest.java index dfd3b85339..c399174d1e 100644 --- a/ingestion/src/test/java/feast/store/serving/bigtable/BigTableFeatureOptionsTest.java +++ b/ingestion/src/test/java/feast/store/serving/bigtable/BigTableFeatureOptionsTest.java @@ -17,9 +17,9 @@ package feast.store.serving.bigtable; +import feast.options.OptionsParser; import org.junit.Assert; import org.junit.Test; -import feast.options.OptionsParser; import org.testcontainers.shaded.com.google.common.collect.ImmutableMap; public class BigTableFeatureOptionsTest { @@ -28,7 +28,7 @@ public class BigTableFeatureOptionsTest { public void testParse() { BigTableFeatureOptions options = OptionsParser.parse( - ImmutableMap.builder().put("family", "family1").build(), + ImmutableMap.builder().put("bigtable.family", "family1").build(), BigTableFeatureOptions.class); Assert.assertEquals("family1", options.family); } @@ -39,6 +39,6 @@ public void testParseNoFamily() { OptionsParser.parse( ImmutableMap.builder().build(), BigTableFeatureOptions.class); - Assert.assertEquals(BigTableFeatureOptions.DEFAULT_FAMILY, options.family); + Assert.assertEquals(null, options.family); } } diff --git a/ingestion/src/test/java/feast/store/serving/redis/FeatureRowRedisIOWriteTest.java b/ingestion/src/test/java/feast/store/serving/redis/FeatureRowRedisIOWriteTest.java index 39d452ce46..e7e893fbf3 100644 --- a/ingestion/src/test/java/feast/store/serving/redis/FeatureRowRedisIOWriteTest.java +++ b/ingestion/src/test/java/feast/store/serving/redis/FeatureRowRedisIOWriteTest.java @@ -55,10 +55,8 @@ public class FeatureRowRedisIOWriteTest { - private static final String featureNoneInt32 = "testEntity.redisInt32"; - private static final String featureNoneString = "testEntity.redisString"; - private static final String featureHourInt32 = "testEntity.redisInt32"; - private static final String featureHourString = "testEntity.redisString"; + private static final String featureInt32 = "testEntity.testInt32"; + private static final String featureString = "testEntity.testString"; private static int REDIS_PORT = 51234; private static Redis redis; @@ -89,11 +87,9 @@ Specs getSpecs() { .addEntities("testEntity") .setSchema( Schema.newBuilder() - .addFields(Field.newBuilder().setFeatureId(featureHourInt32)) - .addFields(Field.newBuilder().setFeatureId(featureHourString)) - .addFields(Field.newBuilder().setFeatureId(featureNoneInt32)) - .addFields(Field.newBuilder().setFeatureId(featureNoneString))) - ).addServingStorageSpecs(StorageSpec.newBuilder() + .addFields(Field.newBuilder().setFeatureId(featureInt32)) + .addFields(Field.newBuilder().setFeatureId(featureString))) + ).setServingStorageSpec(StorageSpec.newBuilder() .setId("REDIS1").setType("redis") .putOptions("port", String.valueOf(REDIS_PORT)) .putOptions("host", "localhost") @@ -109,7 +105,7 @@ public void testWrite() throws IOException { Specs specs = getSpecs(); specs.validate(); - new RedisServingFactory().create(specs.getServingStorageSpecs().get("REDIS1"), specs); + new RedisServingFactory().create(specs.getServingStorageSpec(), specs); FeatureRowRedisIO.Write write = new FeatureRowRedisIO.Write( RedisStoreOptions.builder().host("localhost").port(REDIS_PORT).build(), specs); @@ -123,8 +119,8 @@ public void testWrite() throws IOException { .setEntityName("testEntity") .setEntityKey("1") .setEventTimestamp(now) - .addFeatures(Features.of(featureNoneInt32, Values.ofInt32(1))) - .addFeatures(Features.of(featureNoneString, Values.ofString("a")))) + .addFeatures(Features.of(featureInt32, Values.ofInt32(1))) + .addFeatures(Features.of(featureString, Values.ofString("a")))) .build(); PCollection input = testPipeline.apply(Create.of(rowExtended)); @@ -134,9 +130,9 @@ public void testWrite() throws IOException { testPipeline.run(); RedisBucketKey featureInt32Key = - getRedisBucketKey("1", getFeatureIdSha1Prefix(featureNoneInt32), 0L); + getRedisBucketKey("1", getFeatureIdSha1Prefix(featureInt32), 0L); RedisBucketKey featureStringKey = - getRedisBucketKey("1", getFeatureIdSha1Prefix(featureNoneString), 0L); + getRedisBucketKey("1", getFeatureIdSha1Prefix(featureString), 0L); RedisBucketValue featureInt32Value = RedisBucketValue.parseFrom(jedis.get(featureInt32Key.toByteArray())); @@ -153,7 +149,7 @@ public void testWrite() throws IOException { public void testWriteFromOptions() throws IOException { Specs specs = getSpecs(); FeatureStoreWrite write = new RedisServingFactory() - .create(specs.getServingStorageSpecs().get("REDIS1"), specs); + .create(specs.getServingStorageSpec(), specs); Timestamp now = DateUtil.toTimestamp(DateTime.now()); FeatureRowExtended rowExtended = @@ -163,8 +159,8 @@ public void testWriteFromOptions() throws IOException { .setEntityName("testEntity") .setEntityKey("1") .setEventTimestamp(now) - .addFeatures(Features.of(featureNoneInt32, Values.ofInt32(1))) - .addFeatures(Features.of(featureNoneString, Values.ofString("a")))) + .addFeatures(Features.of(featureInt32, Values.ofInt32(1))) + .addFeatures(Features.of(featureString, Values.ofString("a")))) .build(); PCollection input = testPipeline.apply(Create.of(rowExtended)); @@ -174,9 +170,9 @@ public void testWriteFromOptions() throws IOException { testPipeline.run(); RedisBucketKey featureInt32Key = - getRedisBucketKey("1", getFeatureIdSha1Prefix(featureNoneInt32), 0L); + getRedisBucketKey("1", getFeatureIdSha1Prefix(featureInt32), 0L); RedisBucketKey featureStringKey = - getRedisBucketKey("1", getFeatureIdSha1Prefix(featureNoneString), 0L); + getRedisBucketKey("1", getFeatureIdSha1Prefix(featureString), 0L); RedisBucketValue featureInt32Value = RedisBucketValue.parseFrom(jedis.get(featureInt32Key.toByteArray())); diff --git a/ingestion/src/test/java/feast/store/serving/redis/RedisFeatureOptionsTest.java b/ingestion/src/test/java/feast/store/serving/redis/RedisFeatureOptionsTest.java index bf49aca612..4f6246d1c4 100644 --- a/ingestion/src/test/java/feast/store/serving/redis/RedisFeatureOptionsTest.java +++ b/ingestion/src/test/java/feast/store/serving/redis/RedisFeatureOptionsTest.java @@ -30,29 +30,10 @@ public void testParse() { RedisFeatureOptions options = OptionsParser.parse( ImmutableMap.builder() - .put("bucketSize", "PT3H") - .put("expiry", "PT6H") + .put("redis.expiry", "PT6H") .build(), RedisFeatureOptions.class); - Assert.assertEquals("PT3H", options.bucketSize); Assert.assertEquals("PT6H", options.expiry); - - Assert.assertEquals(Duration.standardHours(3), options.getBucketSizeDuration()); - Assert.assertEquals(Duration.standardHours(6), options.getExpiryDuration()); - } - - @Test - public void testParseNoBucketSize() { - RedisFeatureOptions options = - OptionsParser.parse( - ImmutableMap.builder() - .put("expiry", "PT6H") - .build(), - RedisFeatureOptions.class); - Assert.assertEquals(RedisFeatureOptions.DEFAULT_BUCKET_SIZE, options.bucketSize); - Assert.assertEquals("PT6H", options.expiry); - - Assert.assertEquals(Duration.standardHours(1), options.getBucketSizeDuration()); Assert.assertEquals(Duration.standardHours(6), options.getExpiryDuration()); } @@ -62,13 +43,9 @@ public void testParseNoExpiry() { RedisFeatureOptions options = OptionsParser.parse( ImmutableMap.builder() - .put("bucketSize", "PT3H") .build(), RedisFeatureOptions.class); Assert.assertEquals(RedisFeatureOptions.DEFAULT_EXPIRY, options.expiry); - Assert.assertEquals("PT3H", options.bucketSize); - Assert.assertEquals(Duration.ZERO, options.getExpiryDuration()); - Assert.assertEquals(Duration.standardHours(3), options.getBucketSizeDuration()); } } diff --git a/ingestion/src/test/resources/specs/importJobSpecs.yaml b/ingestion/src/test/resources/specs/importJobSpecs.yaml index a6b01b2d7f..74fd574564 100644 --- a/ingestion/src/test/resources/specs/importJobSpecs.yaml +++ b/ingestion/src/test/resources/specs/importJobSpecs.yaml @@ -1,12 +1,12 @@ importSpec: {} -servingStorageSpecs: - - id: TEST_SERVING - type: serving.mock - options: {} -warehouseStorageSpecs: - - id: TEST_WAREHOUSE - type: warehouse.mock - options: {} +servingStorageSpec: + id: TEST_SERVING + type: serving.mock + options: {} +warehouseStorageSpec: + id: TEST_WAREHOUSE + type: warehouse.mock + options: {} errorsStorageSpec: id: errors type: errors.mock @@ -20,42 +20,12 @@ featureSpecs: entity: testEntity name: testInt64 owner: feast@example.com - description: This is test feature of type integer + description: This is test feature of long uri: https://example.com/ valueType: INT64 tags: [] - options: {} - dataStores: - serving: - id: TEST_SERVING - warehouse: - id: TEST_WAREHOUSE - - id: testEntity.redisInt32 - entity: testEntity - name: redisInt32 - owner: feast@example.com - description: This is test feature of type integer the goes to redis - uri: https://example.com/ - valueType: INT32 - tags: [] - options: {} - dataStores: - serving: - id: REDIS1 - options: - expiry: PT1H - - id: testEntity.redisString - entity: testEntity - name: redisString - owner: feast@example.com - description: This is test feature of type integer that goes to redis - uri: https://example.com/ - valueType: STRING - tags: [] - options: {} - dataStores: - serving: - id: REDIS1 + options: + nonsense: "I should be safely ignored" - id: testEntity.testInt32 entity: testEntity name: testInt32 @@ -64,71 +34,15 @@ featureSpecs: uri: https://example.com/ valueType: INT32 tags: [] - options: {} - dataStores: - serving: - id: TEST_SERVING - warehouse: - id: TEST_WAREHOUSE - - id: testEntity.testInt64 - entity: testEntity - name: testInt64 - owner: feast@example.com - description: This is test feature of type integer - uri: https://example.com/ - valueType: INT64 - tags: [] - options: {} - dataStores: - serving: - id: TEST_SERVING - warehouse: - id: TEST_WAREHOUSE - - id: testEntity.testInt64NoWarehouse - entity: testEntity - name: testInt64NoWarehouse - owner: feast@example.com - description: This is test feature of type integer - uri: https://example.com/ - valueType: INT64 - tags: [] - options: {} - dataStores: - serving: - id: TEST_SERVING + options: + nonsense: "I should be safely ignored" - id: testEntity.testString entity: testEntity name: testString owner: feast@example.com - description: This is test feature of type integer - uri: https://example.com/ - valueType: STRING - dataStores: - serving: - id: TEST_SERVING - warehouse: - id: TEST_WAREHOUSE - - id: testEntity.testStringNoWarehouse - entity: testEntity - name: testStringNoWarehouse - owner: feast@example.com - description: This is test feature of type integer + description: This is test feature of type string uri: https://example.com/ valueType: STRING - dataStores: - serving: - id: TEST_SERVING - - id: testEntity.unknownInt32 - entity: testEntity - name: unknownInt32 - owner: feast@example.com - description: This is test feature of type integer that goes to an unknown serving - store - uri: https://example.com/ - valueType: INT32 tags: [] - options: {} - dataStores: - serving: - id: UNKNOWN1 - options: {} + options: + nonsense: "I should be safely ignored" diff --git a/protos/feast/core/CoreService.proto b/protos/feast/core/CoreService.proto index c13237c24e..3f4c16c2c7 100644 --- a/protos/feast/core/CoreService.proto +++ b/protos/feast/core/CoreService.proto @@ -41,6 +41,22 @@ service CoreService { */ rpc ListEntities(google.protobuf.Empty) returns (CoreServiceTypes.ListEntitiesResponse) {}; + /* + Get storage specs specified in request. + This process returns a list of storage specs. + */ + rpc GetStorage(CoreServiceTypes.GetStorageRequest) returns (CoreServiceTypes.GetStorageResponse){ + option deprecated = true; + }; + + /* + Get all storage specs. + This process returns a list of storage specs. + */ + rpc ListStorage(google.protobuf.Empty) returns (CoreServiceTypes.ListStorageResponse) { + option deprecated = true; + }; + /* Get features specified in request. This process returns a list of feature specs. @@ -53,18 +69,6 @@ service CoreService { */ rpc ListFeatures(google.protobuf.Empty) returns (CoreServiceTypes.ListFeaturesResponse) {}; - /* - Get storage specs specified in request. - This process returns a list of storage specs. - */ - rpc GetStorage(CoreServiceTypes.GetStorageRequest) returns (CoreServiceTypes.GetStorageResponse){}; - - /* - Get all storage specs. - This process returns a list of storage specs. - */ - rpc ListStorage(google.protobuf.Empty) returns (CoreServiceTypes.ListStorageResponse) {}; - /* Register a new feature to the metadata store, or update an existing feature. If any validation errors occur, only the first encountered error will be returned. @@ -83,11 +87,6 @@ service CoreService { */ rpc ApplyEntity(feast.specs.EntitySpec) returns (CoreServiceTypes.ApplyEntityResponse) {}; - /* - Register a new storage spec to the metadata store, or update an existing storage. - If any validation errors occur, only the first encountered error will be returned. - */ - rpc ApplyStorage(feast.specs.StorageSpec) returns (CoreServiceTypes.ApplyStorageResponse) {}; } message CoreServiceTypes { @@ -144,8 +143,4 @@ message CoreServiceTypes { string featureGroupId = 1; } - // Storage registration response - message ApplyStorageResponse { - string storageId = 1; - } } diff --git a/protos/feast/specs/FeatureGroupSpec.proto b/protos/feast/specs/FeatureGroupSpec.proto index d4a0a10dd6..048083d3da 100644 --- a/protos/feast/specs/FeatureGroupSpec.proto +++ b/protos/feast/specs/FeatureGroupSpec.proto @@ -27,5 +27,5 @@ option go_package = "github.com/gojek/feast/protos/generated/go/feast/specs"; message FeatureGroupSpec { string id = 1; repeated string tags = 2; - feast.specs.DataStores dataStores = 3; + map options = 3; } diff --git a/protos/feast/specs/FeatureSpec.proto b/protos/feast/specs/FeatureSpec.proto index 97681d463d..e355a9c373 100644 --- a/protos/feast/specs/FeatureSpec.proto +++ b/protos/feast/specs/FeatureSpec.proto @@ -36,16 +36,5 @@ message FeatureSpec { string entity = 8; string group = 9; repeated string tags = 10; - map options = 11; - DataStores dataStores = 12; -} - -message DataStores { - DataStore serving = 1; - DataStore warehouse = 2; -} - -message DataStore { - string id = 1; - map options = 2; + map options = 11; } diff --git a/protos/feast/specs/ImportJobSpecs.proto b/protos/feast/specs/ImportJobSpecs.proto index fea7c7dece..5267e05e88 100644 --- a/protos/feast/specs/ImportJobSpecs.proto +++ b/protos/feast/specs/ImportJobSpecs.proto @@ -32,7 +32,7 @@ message ImportJobSpecs { feast.specs.ImportSpec importSpec = 2; repeated feast.specs.EntitySpec entitySpecs = 3; repeated feast.specs.FeatureSpec featureSpecs = 4; - repeated StorageSpec servingStorageSpecs = 5; - repeated StorageSpec warehouseStorageSpecs = 6; + StorageSpec servingStorageSpec = 5; + StorageSpec warehouseStorageSpec = 6; StorageSpec errorsStorageSpec = 7; } diff --git a/protos/generated/go/feast/core/CoreService.pb.go b/protos/generated/go/feast/core/CoreService.pb.go index f903333006..d4e837b94d 100644 --- a/protos/generated/go/feast/core/CoreService.pb.go +++ b/protos/generated/go/feast/core/CoreService.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/core/CoreService.proto -package core +package core // import "github.com/gojek/feast/protos/generated/go/feast/core" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import specs "github.com/gojek/feast/protos/generated/go/feast/specs" +import empty "github.com/golang/protobuf/ptypes/empty" import ( - context "context" - fmt "fmt" - specs "github.com/gojek/feast/protos/generated/go/feast/specs" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type CoreServiceTypes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -36,17 +35,16 @@ func (m *CoreServiceTypes) Reset() { *m = CoreServiceTypes{} } func (m *CoreServiceTypes) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes) ProtoMessage() {} func (*CoreServiceTypes) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0} + return fileDescriptor_CoreService_334455c996aa931b, []int{0} } - func (m *CoreServiceTypes) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes.Unmarshal(m, b) } func (m *CoreServiceTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes.Merge(m, src) +func (dst *CoreServiceTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes.Merge(dst, src) } func (m *CoreServiceTypes) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes.Size(m) @@ -68,17 +66,16 @@ func (m *CoreServiceTypes_GetEntitiesRequest) Reset() { *m = CoreService func (m *CoreServiceTypes_GetEntitiesRequest) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_GetEntitiesRequest) ProtoMessage() {} func (*CoreServiceTypes_GetEntitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 0} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 0} } - func (m *CoreServiceTypes_GetEntitiesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_GetEntitiesRequest.Unmarshal(m, b) } func (m *CoreServiceTypes_GetEntitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_GetEntitiesRequest.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_GetEntitiesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_GetEntitiesRequest.Merge(m, src) +func (dst *CoreServiceTypes_GetEntitiesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_GetEntitiesRequest.Merge(dst, src) } func (m *CoreServiceTypes_GetEntitiesRequest) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_GetEntitiesRequest.Size(m) @@ -107,17 +104,16 @@ func (m *CoreServiceTypes_GetEntitiesResponse) Reset() { *m = CoreServic func (m *CoreServiceTypes_GetEntitiesResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_GetEntitiesResponse) ProtoMessage() {} func (*CoreServiceTypes_GetEntitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 1} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 1} } - func (m *CoreServiceTypes_GetEntitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_GetEntitiesResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_GetEntitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_GetEntitiesResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_GetEntitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_GetEntitiesResponse.Merge(m, src) +func (dst *CoreServiceTypes_GetEntitiesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_GetEntitiesResponse.Merge(dst, src) } func (m *CoreServiceTypes_GetEntitiesResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_GetEntitiesResponse.Size(m) @@ -146,17 +142,16 @@ func (m *CoreServiceTypes_ListEntitiesResponse) Reset() { *m = CoreServi func (m *CoreServiceTypes_ListEntitiesResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_ListEntitiesResponse) ProtoMessage() {} func (*CoreServiceTypes_ListEntitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 2} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 2} } - func (m *CoreServiceTypes_ListEntitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_ListEntitiesResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_ListEntitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_ListEntitiesResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_ListEntitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ListEntitiesResponse.Merge(m, src) +func (dst *CoreServiceTypes_ListEntitiesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_ListEntitiesResponse.Merge(dst, src) } func (m *CoreServiceTypes_ListEntitiesResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_ListEntitiesResponse.Size(m) @@ -186,17 +181,16 @@ func (m *CoreServiceTypes_GetFeaturesRequest) Reset() { *m = CoreService func (m *CoreServiceTypes_GetFeaturesRequest) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_GetFeaturesRequest) ProtoMessage() {} func (*CoreServiceTypes_GetFeaturesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 3} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 3} } - func (m *CoreServiceTypes_GetFeaturesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_GetFeaturesRequest.Unmarshal(m, b) } func (m *CoreServiceTypes_GetFeaturesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_GetFeaturesRequest.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_GetFeaturesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_GetFeaturesRequest.Merge(m, src) +func (dst *CoreServiceTypes_GetFeaturesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_GetFeaturesRequest.Merge(dst, src) } func (m *CoreServiceTypes_GetFeaturesRequest) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_GetFeaturesRequest.Size(m) @@ -225,17 +219,16 @@ func (m *CoreServiceTypes_GetFeaturesResponse) Reset() { *m = CoreServic func (m *CoreServiceTypes_GetFeaturesResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_GetFeaturesResponse) ProtoMessage() {} func (*CoreServiceTypes_GetFeaturesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 4} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 4} } - func (m *CoreServiceTypes_GetFeaturesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_GetFeaturesResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_GetFeaturesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_GetFeaturesResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_GetFeaturesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_GetFeaturesResponse.Merge(m, src) +func (dst *CoreServiceTypes_GetFeaturesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_GetFeaturesResponse.Merge(dst, src) } func (m *CoreServiceTypes_GetFeaturesResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_GetFeaturesResponse.Size(m) @@ -264,17 +257,16 @@ func (m *CoreServiceTypes_ListFeaturesResponse) Reset() { *m = CoreServi func (m *CoreServiceTypes_ListFeaturesResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_ListFeaturesResponse) ProtoMessage() {} func (*CoreServiceTypes_ListFeaturesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 5} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 5} } - func (m *CoreServiceTypes_ListFeaturesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_ListFeaturesResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_ListFeaturesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_ListFeaturesResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_ListFeaturesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ListFeaturesResponse.Merge(m, src) +func (dst *CoreServiceTypes_ListFeaturesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_ListFeaturesResponse.Merge(dst, src) } func (m *CoreServiceTypes_ListFeaturesResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_ListFeaturesResponse.Size(m) @@ -304,17 +296,16 @@ func (m *CoreServiceTypes_GetStorageRequest) Reset() { *m = CoreServiceT func (m *CoreServiceTypes_GetStorageRequest) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_GetStorageRequest) ProtoMessage() {} func (*CoreServiceTypes_GetStorageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 6} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 6} } - func (m *CoreServiceTypes_GetStorageRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_GetStorageRequest.Unmarshal(m, b) } func (m *CoreServiceTypes_GetStorageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_GetStorageRequest.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_GetStorageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_GetStorageRequest.Merge(m, src) +func (dst *CoreServiceTypes_GetStorageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_GetStorageRequest.Merge(dst, src) } func (m *CoreServiceTypes_GetStorageRequest) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_GetStorageRequest.Size(m) @@ -343,17 +334,16 @@ func (m *CoreServiceTypes_GetStorageResponse) Reset() { *m = CoreService func (m *CoreServiceTypes_GetStorageResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_GetStorageResponse) ProtoMessage() {} func (*CoreServiceTypes_GetStorageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 7} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 7} } - func (m *CoreServiceTypes_GetStorageResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_GetStorageResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_GetStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_GetStorageResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_GetStorageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_GetStorageResponse.Merge(m, src) +func (dst *CoreServiceTypes_GetStorageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_GetStorageResponse.Merge(dst, src) } func (m *CoreServiceTypes_GetStorageResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_GetStorageResponse.Size(m) @@ -382,17 +372,16 @@ func (m *CoreServiceTypes_ListStorageResponse) Reset() { *m = CoreServic func (m *CoreServiceTypes_ListStorageResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_ListStorageResponse) ProtoMessage() {} func (*CoreServiceTypes_ListStorageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 8} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 8} } - func (m *CoreServiceTypes_ListStorageResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_ListStorageResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_ListStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_ListStorageResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_ListStorageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ListStorageResponse.Merge(m, src) +func (dst *CoreServiceTypes_ListStorageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_ListStorageResponse.Merge(dst, src) } func (m *CoreServiceTypes_ListStorageResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_ListStorageResponse.Size(m) @@ -422,17 +411,16 @@ func (m *CoreServiceTypes_ApplyEntityResponse) Reset() { *m = CoreServic func (m *CoreServiceTypes_ApplyEntityResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_ApplyEntityResponse) ProtoMessage() {} func (*CoreServiceTypes_ApplyEntityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 9} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 9} } - func (m *CoreServiceTypes_ApplyEntityResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_ApplyEntityResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_ApplyEntityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_ApplyEntityResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_ApplyEntityResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ApplyEntityResponse.Merge(m, src) +func (dst *CoreServiceTypes_ApplyEntityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_ApplyEntityResponse.Merge(dst, src) } func (m *CoreServiceTypes_ApplyEntityResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_ApplyEntityResponse.Size(m) @@ -462,17 +450,16 @@ func (m *CoreServiceTypes_ApplyFeatureResponse) Reset() { *m = CoreServi func (m *CoreServiceTypes_ApplyFeatureResponse) String() string { return proto.CompactTextString(m) } func (*CoreServiceTypes_ApplyFeatureResponse) ProtoMessage() {} func (*CoreServiceTypes_ApplyFeatureResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 10} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 10} } - func (m *CoreServiceTypes_ApplyFeatureResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_ApplyFeatureResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_ApplyFeatureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_ApplyFeatureResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_ApplyFeatureResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ApplyFeatureResponse.Merge(m, src) +func (dst *CoreServiceTypes_ApplyFeatureResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_ApplyFeatureResponse.Merge(dst, src) } func (m *CoreServiceTypes_ApplyFeatureResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_ApplyFeatureResponse.Size(m) @@ -506,17 +493,16 @@ func (m *CoreServiceTypes_ApplyFeatureGroupResponse) String() string { } func (*CoreServiceTypes_ApplyFeatureGroupResponse) ProtoMessage() {} func (*CoreServiceTypes_ApplyFeatureGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 11} + return fileDescriptor_CoreService_334455c996aa931b, []int{0, 11} } - func (m *CoreServiceTypes_ApplyFeatureGroupResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CoreServiceTypes_ApplyFeatureGroupResponse.Unmarshal(m, b) } func (m *CoreServiceTypes_ApplyFeatureGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CoreServiceTypes_ApplyFeatureGroupResponse.Marshal(b, m, deterministic) } -func (m *CoreServiceTypes_ApplyFeatureGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ApplyFeatureGroupResponse.Merge(m, src) +func (dst *CoreServiceTypes_ApplyFeatureGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CoreServiceTypes_ApplyFeatureGroupResponse.Merge(dst, src) } func (m *CoreServiceTypes_ApplyFeatureGroupResponse) XXX_Size() int { return xxx_messageInfo_CoreServiceTypes_ApplyFeatureGroupResponse.Size(m) @@ -534,46 +520,6 @@ func (m *CoreServiceTypes_ApplyFeatureGroupResponse) GetFeatureGroupId() string return "" } -// Storage registration response -type CoreServiceTypes_ApplyStorageResponse struct { - StorageId string `protobuf:"bytes,1,opt,name=storageId,proto3" json:"storageId,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CoreServiceTypes_ApplyStorageResponse) Reset() { *m = CoreServiceTypes_ApplyStorageResponse{} } -func (m *CoreServiceTypes_ApplyStorageResponse) String() string { return proto.CompactTextString(m) } -func (*CoreServiceTypes_ApplyStorageResponse) ProtoMessage() {} -func (*CoreServiceTypes_ApplyStorageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9be266444105411, []int{0, 12} -} - -func (m *CoreServiceTypes_ApplyStorageResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CoreServiceTypes_ApplyStorageResponse.Unmarshal(m, b) -} -func (m *CoreServiceTypes_ApplyStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CoreServiceTypes_ApplyStorageResponse.Marshal(b, m, deterministic) -} -func (m *CoreServiceTypes_ApplyStorageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoreServiceTypes_ApplyStorageResponse.Merge(m, src) -} -func (m *CoreServiceTypes_ApplyStorageResponse) XXX_Size() int { - return xxx_messageInfo_CoreServiceTypes_ApplyStorageResponse.Size(m) -} -func (m *CoreServiceTypes_ApplyStorageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CoreServiceTypes_ApplyStorageResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CoreServiceTypes_ApplyStorageResponse proto.InternalMessageInfo - -func (m *CoreServiceTypes_ApplyStorageResponse) GetStorageId() string { - if m != nil { - return m.StorageId - } - return "" -} - func init() { proto.RegisterType((*CoreServiceTypes)(nil), "feast.core.CoreServiceTypes") proto.RegisterType((*CoreServiceTypes_GetEntitiesRequest)(nil), "feast.core.CoreServiceTypes.GetEntitiesRequest") @@ -588,51 +534,6 @@ func init() { proto.RegisterType((*CoreServiceTypes_ApplyEntityResponse)(nil), "feast.core.CoreServiceTypes.ApplyEntityResponse") proto.RegisterType((*CoreServiceTypes_ApplyFeatureResponse)(nil), "feast.core.CoreServiceTypes.ApplyFeatureResponse") proto.RegisterType((*CoreServiceTypes_ApplyFeatureGroupResponse)(nil), "feast.core.CoreServiceTypes.ApplyFeatureGroupResponse") - proto.RegisterType((*CoreServiceTypes_ApplyStorageResponse)(nil), "feast.core.CoreServiceTypes.ApplyStorageResponse") -} - -func init() { proto.RegisterFile("feast/core/CoreService.proto", fileDescriptor_d9be266444105411) } - -var fileDescriptor_d9be266444105411 = []byte{ - // 602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5b, 0x6f, 0x12, 0x41, - 0x14, 0x86, 0x34, 0x69, 0xe0, 0x40, 0x4c, 0x3b, 0x34, 0x8a, 0x23, 0x35, 0xcd, 0x26, 0x36, 0x7d, - 0x9a, 0xa9, 0xbd, 0xf8, 0xe4, 0x8b, 0x6d, 0x2a, 0xd1, 0x36, 0xc6, 0x2c, 0xfa, 0x60, 0x8d, 0x0f, - 0x5c, 0x0e, 0xeb, 0x2a, 0x30, 0xeb, 0xce, 0x60, 0xc2, 0xb3, 0xff, 0xcf, 0xdf, 0x64, 0x98, 0x1d, - 0x66, 0x07, 0xd8, 0xed, 0x12, 0xc3, 0x1b, 0x9c, 0xdb, 0x37, 0xdf, 0x39, 0xf3, 0x9d, 0x59, 0x68, - 0x0d, 0xb1, 0x2b, 0x15, 0xef, 0x8b, 0x18, 0xf9, 0xb5, 0x88, 0xb1, 0x83, 0xf1, 0xef, 0xb0, 0x8f, - 0x2c, 0x8a, 0x85, 0x12, 0x04, 0xb4, 0x97, 0xcd, 0xbd, 0xd4, 0x44, 0xca, 0x08, 0xfb, 0x92, 0xdf, - 0x4c, 0x54, 0xa8, 0x66, 0x9d, 0x08, 0xfb, 0x49, 0x24, 0x3d, 0x74, 0xbd, 0x6f, 0xb1, 0xab, 0xa6, - 0x31, 0x3a, 0x6e, 0x2f, 0xc3, 0xdd, 0x8e, 0xc5, 0x34, 0xca, 0x2b, 0xd1, 0x51, 0x22, 0xee, 0x06, - 0x6e, 0x89, 0x67, 0x81, 0x10, 0xc1, 0x08, 0xb9, 0xfe, 0xd7, 0x9b, 0x0e, 0x39, 0x8e, 0x23, 0x35, - 0x4b, 0x9c, 0xde, 0xdf, 0x5d, 0xd8, 0x73, 0x8e, 0xff, 0x69, 0x16, 0xa1, 0xa4, 0xc7, 0x40, 0xda, - 0xa8, 0xf4, 0x51, 0x43, 0x94, 0x3e, 0xfe, 0x9a, 0xa2, 0x54, 0x64, 0x0f, 0x76, 0xc2, 0x81, 0x6c, - 0x96, 0x8f, 0x76, 0x4e, 0xaa, 0xfe, 0xfc, 0x27, 0x7d, 0x0f, 0x8d, 0xa5, 0x38, 0x19, 0x89, 0x89, - 0x44, 0x72, 0x0e, 0x15, 0x34, 0x36, 0x1d, 0x5d, 0x3b, 0x7b, 0xc2, 0x92, 0x7e, 0xe8, 0x23, 0xb2, - 0xb4, 0x07, 0xbe, 0x0d, 0xa4, 0xb7, 0x70, 0x70, 0x17, 0xca, 0x2d, 0x15, 0x4b, 0x08, 0x98, 0x76, - 0x3d, 0x40, 0xe0, 0x56, 0x13, 0x48, 0xe3, 0x0c, 0xe6, 0x05, 0x54, 0x86, 0xc6, 0x66, 0x30, 0x9b, - 0x4b, 0x98, 0xce, 0x98, 0x7c, 0x1b, 0x49, 0xef, 0x12, 0x06, 0x5b, 0xaa, 0xf6, 0x02, 0xf6, 0xdb, - 0xa8, 0xcc, 0x34, 0xf3, 0x19, 0xf8, 0x9a, 0xa9, 0x0d, 0x33, 0x90, 0xaf, 0xa1, 0x2e, 0xd3, 0x7b, - 0x90, 0x0d, 0xeb, 0x5c, 0x14, 0x7f, 0x29, 0x9a, 0x76, 0xa0, 0x31, 0x27, 0xb2, 0xdd, 0xa2, 0x97, - 0xd0, 0x78, 0x13, 0x45, 0xa3, 0x59, 0x32, 0x2f, 0x5b, 0xf4, 0x39, 0x80, 0x9e, 0xda, 0xec, 0x43, - 0x77, 0x8c, 0xcd, 0xf2, 0x51, 0xf9, 0xa4, 0xea, 0x3b, 0x16, 0x7a, 0x01, 0x07, 0x3a, 0xcd, 0x34, - 0xc9, 0xe6, 0xb5, 0xa0, 0x6a, 0x5a, 0xf5, 0x6e, 0x60, 0xd2, 0x52, 0x03, 0xbd, 0x86, 0xa7, 0x6e, - 0x96, 0x16, 0x8c, 0x4d, 0x3d, 0x86, 0x47, 0x43, 0xc7, 0x6e, 0xf3, 0x57, 0xac, 0x16, 0x7a, 0xb5, - 0x0f, 0x2d, 0xa8, 0x1a, 0x66, 0x29, 0xb4, 0x35, 0x9c, 0xfd, 0xa9, 0x40, 0xcd, 0x11, 0x14, 0x89, - 0xa1, 0xe6, 0x68, 0x84, 0x70, 0x96, 0x6e, 0x06, 0xb6, 0x2a, 0x3c, 0xb6, 0xae, 0x3a, 0x7a, 0xba, - 0x79, 0x42, 0x72, 0x3e, 0xaf, 0x44, 0xbe, 0x42, 0xdd, 0xd5, 0x12, 0x79, 0xcc, 0x92, 0x15, 0xc0, - 0x16, 0x2b, 0x80, 0xdd, 0xcc, 0x57, 0x00, 0x7d, 0xf9, 0x60, 0xed, 0x2c, 0x39, 0x7a, 0x25, 0x43, - 0x68, 0x71, 0xcb, 0x8b, 0x09, 0xad, 0xa8, 0xb0, 0x98, 0xd0, 0xaa, 0x80, 0x52, 0x42, 0x16, 0xf4, - 0xff, 0x09, 0x65, 0x14, 0x17, 0x00, 0xa9, 0x84, 0x08, 0x2b, 0x3a, 0xde, 0xb2, 0x24, 0x29, 0xdf, - 0x38, 0xde, 0x02, 0x7e, 0x81, 0x9a, 0xa3, 0xaf, 0x5c, 0x32, 0xa7, 0x85, 0x64, 0xd6, 0x4b, 0x7f, - 0x83, 0xba, 0x7b, 0xf1, 0x49, 0xee, 0xa6, 0x29, 0x68, 0x55, 0x96, 0xe6, 0xbc, 0x12, 0x19, 0xc1, - 0xfe, 0x9a, 0xae, 0xc8, 0x61, 0x16, 0x86, 0x7d, 0xa3, 0xe8, 0xab, 0x8d, 0x81, 0x96, 0x64, 0xea, - 0x95, 0xc8, 0x3d, 0xd4, 0x9c, 0x95, 0x41, 0xf2, 0xf6, 0x7e, 0x41, 0xa3, 0x32, 0xb6, 0x8e, 0xd3, - 0xa8, 0xc5, 0x10, 0x72, 0xd7, 0xd8, 0x26, 0x8d, 0x5a, 0x9b, 0xc3, 0xd5, 0x67, 0x70, 0xbe, 0x00, - 0xae, 0xdc, 0x17, 0xf6, 0xe3, 0x7c, 0xc8, 0xf7, 0x97, 0x41, 0xa8, 0xbe, 0x4f, 0x7b, 0xac, 0x2f, - 0xc6, 0x3c, 0x10, 0x3f, 0xf0, 0x27, 0x4f, 0xde, 0x70, 0x7d, 0x05, 0x24, 0x0f, 0x70, 0x82, 0x71, - 0x57, 0xe1, 0x80, 0x07, 0x82, 0xa7, 0x1f, 0x1a, 0xbd, 0x5d, 0xed, 0x3f, 0xff, 0x17, 0x00, 0x00, - 0xff, 0xff, 0x57, 0x65, 0xdd, 0x73, 0x7d, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -648,45 +549,41 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type CoreServiceClient interface { // - //Get entities specified in request. - //This process returns a list of entity specs. + // Get entities specified in request. + // This process returns a list of entity specs. GetEntities(ctx context.Context, in *CoreServiceTypes_GetEntitiesRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetEntitiesResponse, error) // - //Get all entities - //This process returns a list of entity specs. + // Get all entities + // This process returns a list of entity specs. ListEntities(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListEntitiesResponse, error) // - //Get features specified in request. - //This process returns a list of feature specs. - GetFeatures(ctx context.Context, in *CoreServiceTypes_GetFeaturesRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetFeaturesResponse, error) - // - //Get all features. - //This process returns a list of entity specs. - ListFeatures(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListFeaturesResponse, error) - // - //Get storage specs specified in request. - //This process returns a list of storage specs. + // Get storage specs specified in request. + // This process returns a list of storage specs. GetStorage(ctx context.Context, in *CoreServiceTypes_GetStorageRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetStorageResponse, error) // - //Get all storage specs. - //This process returns a list of storage specs. + // Get all storage specs. + // This process returns a list of storage specs. ListStorage(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListStorageResponse, error) // - //Register a new feature to the metadata store, or update an existing feature. - //If any validation errors occur, only the first encountered error will be returned. + // Get features specified in request. + // This process returns a list of feature specs. + GetFeatures(ctx context.Context, in *CoreServiceTypes_GetFeaturesRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetFeaturesResponse, error) + // + // Get all features. + // This process returns a list of entity specs. + ListFeatures(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListFeaturesResponse, error) + // + // Register a new feature to the metadata store, or update an existing feature. + // If any validation errors occur, only the first encountered error will be returned. ApplyFeature(ctx context.Context, in *specs.FeatureSpec, opts ...grpc.CallOption) (*CoreServiceTypes_ApplyFeatureResponse, error) // - //Register a new feature group to the metadata store, or update an existing feature group. - //If any validation errors occur, only the first encountered error will be returned. + // Register a new feature group to the metadata store, or update an existing feature group. + // If any validation errors occur, only the first encountered error will be returned. ApplyFeatureGroup(ctx context.Context, in *specs.FeatureGroupSpec, opts ...grpc.CallOption) (*CoreServiceTypes_ApplyFeatureGroupResponse, error) // - //Register a new entity to the metadata store, or update an existing entity. - //If any validation errors occur, only the first encountered error will be returned. + // Register a new entity to the metadata store, or update an existing entity. + // If any validation errors occur, only the first encountered error will be returned. ApplyEntity(ctx context.Context, in *specs.EntitySpec, opts ...grpc.CallOption) (*CoreServiceTypes_ApplyEntityResponse, error) - // - //Register a new storage spec to the metadata store, or update an existing storage. - //If any validation errors occur, only the first encountered error will be returned. - ApplyStorage(ctx context.Context, in *specs.StorageSpec, opts ...grpc.CallOption) (*CoreServiceTypes_ApplyStorageResponse, error) } type coreServiceClient struct { @@ -715,36 +612,38 @@ func (c *coreServiceClient) ListEntities(ctx context.Context, in *empty.Empty, o return out, nil } -func (c *coreServiceClient) GetFeatures(ctx context.Context, in *CoreServiceTypes_GetFeaturesRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetFeaturesResponse, error) { - out := new(CoreServiceTypes_GetFeaturesResponse) - err := c.cc.Invoke(ctx, "/feast.core.CoreService/GetFeatures", in, out, opts...) +// Deprecated: Do not use. +func (c *coreServiceClient) GetStorage(ctx context.Context, in *CoreServiceTypes_GetStorageRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetStorageResponse, error) { + out := new(CoreServiceTypes_GetStorageResponse) + err := c.cc.Invoke(ctx, "/feast.core.CoreService/GetStorage", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *coreServiceClient) ListFeatures(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListFeaturesResponse, error) { - out := new(CoreServiceTypes_ListFeaturesResponse) - err := c.cc.Invoke(ctx, "/feast.core.CoreService/ListFeatures", in, out, opts...) +// Deprecated: Do not use. +func (c *coreServiceClient) ListStorage(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListStorageResponse, error) { + out := new(CoreServiceTypes_ListStorageResponse) + err := c.cc.Invoke(ctx, "/feast.core.CoreService/ListStorage", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *coreServiceClient) GetStorage(ctx context.Context, in *CoreServiceTypes_GetStorageRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetStorageResponse, error) { - out := new(CoreServiceTypes_GetStorageResponse) - err := c.cc.Invoke(ctx, "/feast.core.CoreService/GetStorage", in, out, opts...) +func (c *coreServiceClient) GetFeatures(ctx context.Context, in *CoreServiceTypes_GetFeaturesRequest, opts ...grpc.CallOption) (*CoreServiceTypes_GetFeaturesResponse, error) { + out := new(CoreServiceTypes_GetFeaturesResponse) + err := c.cc.Invoke(ctx, "/feast.core.CoreService/GetFeatures", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *coreServiceClient) ListStorage(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListStorageResponse, error) { - out := new(CoreServiceTypes_ListStorageResponse) - err := c.cc.Invoke(ctx, "/feast.core.CoreService/ListStorage", in, out, opts...) +func (c *coreServiceClient) ListFeatures(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreServiceTypes_ListFeaturesResponse, error) { + out := new(CoreServiceTypes_ListFeaturesResponse) + err := c.cc.Invoke(ctx, "/feast.core.CoreService/ListFeatures", in, out, opts...) if err != nil { return nil, err } @@ -778,92 +677,44 @@ func (c *coreServiceClient) ApplyEntity(ctx context.Context, in *specs.EntitySpe return out, nil } -func (c *coreServiceClient) ApplyStorage(ctx context.Context, in *specs.StorageSpec, opts ...grpc.CallOption) (*CoreServiceTypes_ApplyStorageResponse, error) { - out := new(CoreServiceTypes_ApplyStorageResponse) - err := c.cc.Invoke(ctx, "/feast.core.CoreService/ApplyStorage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // CoreServiceServer is the server API for CoreService service. type CoreServiceServer interface { // - //Get entities specified in request. - //This process returns a list of entity specs. + // Get entities specified in request. + // This process returns a list of entity specs. GetEntities(context.Context, *CoreServiceTypes_GetEntitiesRequest) (*CoreServiceTypes_GetEntitiesResponse, error) // - //Get all entities - //This process returns a list of entity specs. + // Get all entities + // This process returns a list of entity specs. ListEntities(context.Context, *empty.Empty) (*CoreServiceTypes_ListEntitiesResponse, error) // - //Get features specified in request. - //This process returns a list of feature specs. - GetFeatures(context.Context, *CoreServiceTypes_GetFeaturesRequest) (*CoreServiceTypes_GetFeaturesResponse, error) - // - //Get all features. - //This process returns a list of entity specs. - ListFeatures(context.Context, *empty.Empty) (*CoreServiceTypes_ListFeaturesResponse, error) - // - //Get storage specs specified in request. - //This process returns a list of storage specs. + // Get storage specs specified in request. + // This process returns a list of storage specs. GetStorage(context.Context, *CoreServiceTypes_GetStorageRequest) (*CoreServiceTypes_GetStorageResponse, error) // - //Get all storage specs. - //This process returns a list of storage specs. + // Get all storage specs. + // This process returns a list of storage specs. ListStorage(context.Context, *empty.Empty) (*CoreServiceTypes_ListStorageResponse, error) // - //Register a new feature to the metadata store, or update an existing feature. - //If any validation errors occur, only the first encountered error will be returned. + // Get features specified in request. + // This process returns a list of feature specs. + GetFeatures(context.Context, *CoreServiceTypes_GetFeaturesRequest) (*CoreServiceTypes_GetFeaturesResponse, error) + // + // Get all features. + // This process returns a list of entity specs. + ListFeatures(context.Context, *empty.Empty) (*CoreServiceTypes_ListFeaturesResponse, error) + // + // Register a new feature to the metadata store, or update an existing feature. + // If any validation errors occur, only the first encountered error will be returned. ApplyFeature(context.Context, *specs.FeatureSpec) (*CoreServiceTypes_ApplyFeatureResponse, error) // - //Register a new feature group to the metadata store, or update an existing feature group. - //If any validation errors occur, only the first encountered error will be returned. + // Register a new feature group to the metadata store, or update an existing feature group. + // If any validation errors occur, only the first encountered error will be returned. ApplyFeatureGroup(context.Context, *specs.FeatureGroupSpec) (*CoreServiceTypes_ApplyFeatureGroupResponse, error) // - //Register a new entity to the metadata store, or update an existing entity. - //If any validation errors occur, only the first encountered error will be returned. + // Register a new entity to the metadata store, or update an existing entity. + // If any validation errors occur, only the first encountered error will be returned. ApplyEntity(context.Context, *specs.EntitySpec) (*CoreServiceTypes_ApplyEntityResponse, error) - // - //Register a new storage spec to the metadata store, or update an existing storage. - //If any validation errors occur, only the first encountered error will be returned. - ApplyStorage(context.Context, *specs.StorageSpec) (*CoreServiceTypes_ApplyStorageResponse, error) -} - -// UnimplementedCoreServiceServer can be embedded to have forward compatible implementations. -type UnimplementedCoreServiceServer struct { -} - -func (*UnimplementedCoreServiceServer) GetEntities(ctx context.Context, req *CoreServiceTypes_GetEntitiesRequest) (*CoreServiceTypes_GetEntitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEntities not implemented") -} -func (*UnimplementedCoreServiceServer) ListEntities(ctx context.Context, req *empty.Empty) (*CoreServiceTypes_ListEntitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEntities not implemented") -} -func (*UnimplementedCoreServiceServer) GetFeatures(ctx context.Context, req *CoreServiceTypes_GetFeaturesRequest) (*CoreServiceTypes_GetFeaturesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeatures not implemented") -} -func (*UnimplementedCoreServiceServer) ListFeatures(ctx context.Context, req *empty.Empty) (*CoreServiceTypes_ListFeaturesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListFeatures not implemented") -} -func (*UnimplementedCoreServiceServer) GetStorage(ctx context.Context, req *CoreServiceTypes_GetStorageRequest) (*CoreServiceTypes_GetStorageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") -} -func (*UnimplementedCoreServiceServer) ListStorage(ctx context.Context, req *empty.Empty) (*CoreServiceTypes_ListStorageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListStorage not implemented") -} -func (*UnimplementedCoreServiceServer) ApplyFeature(ctx context.Context, req *specs.FeatureSpec) (*CoreServiceTypes_ApplyFeatureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyFeature not implemented") -} -func (*UnimplementedCoreServiceServer) ApplyFeatureGroup(ctx context.Context, req *specs.FeatureGroupSpec) (*CoreServiceTypes_ApplyFeatureGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyFeatureGroup not implemented") -} -func (*UnimplementedCoreServiceServer) ApplyEntity(ctx context.Context, req *specs.EntitySpec) (*CoreServiceTypes_ApplyEntityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyEntity not implemented") -} -func (*UnimplementedCoreServiceServer) ApplyStorage(ctx context.Context, req *specs.StorageSpec) (*CoreServiceTypes_ApplyStorageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyStorage not implemented") } func RegisterCoreServiceServer(s *grpc.Server, srv CoreServiceServer) { @@ -906,74 +757,74 @@ func _CoreService_ListEntities_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _CoreService_GetFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CoreServiceTypes_GetFeaturesRequest) +func _CoreService_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CoreServiceTypes_GetStorageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(CoreServiceServer).GetFeatures(ctx, in) + return srv.(CoreServiceServer).GetStorage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/feast.core.CoreService/GetFeatures", + FullMethod: "/feast.core.CoreService/GetStorage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CoreServiceServer).GetFeatures(ctx, req.(*CoreServiceTypes_GetFeaturesRequest)) + return srv.(CoreServiceServer).GetStorage(ctx, req.(*CoreServiceTypes_GetStorageRequest)) } return interceptor(ctx, in, info, handler) } -func _CoreService_ListFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _CoreService_ListStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(CoreServiceServer).ListFeatures(ctx, in) + return srv.(CoreServiceServer).ListStorage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/feast.core.CoreService/ListFeatures", + FullMethod: "/feast.core.CoreService/ListStorage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CoreServiceServer).ListFeatures(ctx, req.(*empty.Empty)) + return srv.(CoreServiceServer).ListStorage(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } -func _CoreService_GetStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CoreServiceTypes_GetStorageRequest) +func _CoreService_GetFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CoreServiceTypes_GetFeaturesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(CoreServiceServer).GetStorage(ctx, in) + return srv.(CoreServiceServer).GetFeatures(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/feast.core.CoreService/GetStorage", + FullMethod: "/feast.core.CoreService/GetFeatures", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CoreServiceServer).GetStorage(ctx, req.(*CoreServiceTypes_GetStorageRequest)) + return srv.(CoreServiceServer).GetFeatures(ctx, req.(*CoreServiceTypes_GetFeaturesRequest)) } return interceptor(ctx, in, info, handler) } -func _CoreService_ListStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _CoreService_ListFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(CoreServiceServer).ListStorage(ctx, in) + return srv.(CoreServiceServer).ListFeatures(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/feast.core.CoreService/ListStorage", + FullMethod: "/feast.core.CoreService/ListFeatures", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CoreServiceServer).ListStorage(ctx, req.(*empty.Empty)) + return srv.(CoreServiceServer).ListFeatures(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } @@ -1032,24 +883,6 @@ func _CoreService_ApplyEntity_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _CoreService_ApplyStorage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(specs.StorageSpec) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CoreServiceServer).ApplyStorage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/feast.core.CoreService/ApplyStorage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CoreServiceServer).ApplyStorage(ctx, req.(*specs.StorageSpec)) - } - return interceptor(ctx, in, info, handler) -} - var _CoreService_serviceDesc = grpc.ServiceDesc{ ServiceName: "feast.core.CoreService", HandlerType: (*CoreServiceServer)(nil), @@ -1062,14 +895,6 @@ var _CoreService_serviceDesc = grpc.ServiceDesc{ MethodName: "ListEntities", Handler: _CoreService_ListEntities_Handler, }, - { - MethodName: "GetFeatures", - Handler: _CoreService_GetFeatures_Handler, - }, - { - MethodName: "ListFeatures", - Handler: _CoreService_ListFeatures_Handler, - }, { MethodName: "GetStorage", Handler: _CoreService_GetStorage_Handler, @@ -1078,6 +903,14 @@ var _CoreService_serviceDesc = grpc.ServiceDesc{ MethodName: "ListStorage", Handler: _CoreService_ListStorage_Handler, }, + { + MethodName: "GetFeatures", + Handler: _CoreService_GetFeatures_Handler, + }, + { + MethodName: "ListFeatures", + Handler: _CoreService_ListFeatures_Handler, + }, { MethodName: "ApplyFeature", Handler: _CoreService_ApplyFeature_Handler, @@ -1090,11 +923,52 @@ var _CoreService_serviceDesc = grpc.ServiceDesc{ MethodName: "ApplyEntity", Handler: _CoreService_ApplyEntity_Handler, }, - { - MethodName: "ApplyStorage", - Handler: _CoreService_ApplyStorage_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "feast/core/CoreService.proto", } + +func init() { + proto.RegisterFile("feast/core/CoreService.proto", fileDescriptor_CoreService_334455c996aa931b) +} + +var fileDescriptor_CoreService_334455c996aa931b = []byte{ + // 589 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xdb, 0x6e, 0x13, 0x3d, + 0x10, 0x4e, 0xfe, 0x48, 0xfd, 0x9b, 0x49, 0x84, 0x5a, 0xa7, 0x82, 0x60, 0x5a, 0x54, 0xad, 0x44, + 0xd5, 0x2b, 0xbb, 0xf4, 0xc0, 0x15, 0x37, 0xb4, 0x2a, 0x11, 0xb4, 0x42, 0x68, 0x03, 0x37, 0x05, + 0x2e, 0x72, 0x98, 0x2c, 0x0b, 0x49, 0xbc, 0xd8, 0x0e, 0x52, 0xde, 0x80, 0x47, 0xe0, 0x19, 0x78, + 0x4a, 0x14, 0xdb, 0xdd, 0x75, 0xd2, 0x4d, 0x37, 0x42, 0xb9, 0xdb, 0x9d, 0xc3, 0x37, 0x1e, 0x7f, + 0xf3, 0x79, 0x60, 0x77, 0x80, 0x1d, 0xa5, 0x79, 0x4f, 0x48, 0xe4, 0x17, 0x42, 0x62, 0x1b, 0xe5, + 0xcf, 0xb8, 0x87, 0x2c, 0x91, 0x42, 0x0b, 0x02, 0xc6, 0xcb, 0x66, 0x5e, 0xea, 0x22, 0x55, 0x82, + 0x3d, 0xc5, 0x2f, 0xc7, 0x3a, 0xd6, 0xd3, 0x76, 0x82, 0x3d, 0x1b, 0x49, 0xf7, 0x7c, 0xef, 0x6b, + 0xec, 0xe8, 0x89, 0x44, 0xcf, 0x1d, 0xe4, 0xb8, 0x5b, 0x52, 0x4c, 0x92, 0x65, 0x10, 0x6d, 0x2d, + 0x64, 0x27, 0xf2, 0x21, 0x9e, 0x44, 0x42, 0x44, 0x43, 0xe4, 0xe6, 0xaf, 0x3b, 0x19, 0x70, 0x1c, + 0x25, 0x7a, 0x6a, 0x9d, 0xc1, 0xef, 0x0d, 0xd8, 0xf2, 0x8e, 0xff, 0x61, 0x9a, 0xa0, 0xa2, 0x07, + 0x40, 0x5a, 0xa8, 0xcd, 0x51, 0x63, 0x54, 0x21, 0xfe, 0x98, 0xa0, 0xd2, 0x64, 0x0b, 0x2a, 0x71, + 0x5f, 0x35, 0xcb, 0xfb, 0x95, 0xc3, 0x6a, 0x38, 0xfb, 0xa4, 0x6f, 0xa1, 0x31, 0x17, 0xa7, 0x12, + 0x31, 0x56, 0x48, 0x4e, 0x60, 0x13, 0x9d, 0xcd, 0x44, 0xd7, 0x8e, 0x1f, 0x31, 0x7b, 0x1f, 0xe6, + 0x88, 0x2c, 0xbb, 0x83, 0x30, 0x0d, 0xa4, 0x57, 0xb0, 0x73, 0x1d, 0xab, 0x35, 0x81, 0xd9, 0x06, + 0xdc, 0x75, 0xdd, 0xd3, 0xc0, 0x95, 0x69, 0x20, 0x8b, 0x73, 0x35, 0x4f, 0x61, 0x73, 0xe0, 0x6c, + 0xae, 0x66, 0x73, 0xae, 0xa6, 0x47, 0x53, 0x98, 0x46, 0xd2, 0x6b, 0xdb, 0xc1, 0x9a, 0xd0, 0x9e, + 0xc1, 0x76, 0x0b, 0xb5, 0x63, 0x73, 0x79, 0x07, 0xa1, 0xe9, 0x34, 0x0d, 0x73, 0x25, 0x5f, 0x42, + 0x5d, 0x65, 0x73, 0x90, 0x5f, 0xd6, 0x1b, 0x94, 0x70, 0x2e, 0x9a, 0xb6, 0xa1, 0x31, 0x6b, 0x64, + 0xbd, 0xa0, 0x67, 0xd0, 0x78, 0x95, 0x24, 0xc3, 0xa9, 0xe5, 0x2b, 0x05, 0x7d, 0x0a, 0x60, 0x58, + 0x9b, 0xbe, 0xeb, 0x8c, 0xb0, 0x59, 0xde, 0x2f, 0x1f, 0x56, 0x43, 0xcf, 0x42, 0x4f, 0x61, 0xc7, + 0xa4, 0xb9, 0x4b, 0x4a, 0xf3, 0x76, 0xa1, 0xea, 0xae, 0xea, 0x4d, 0xdf, 0xa5, 0x65, 0x06, 0x7a, + 0x01, 0x8f, 0xfd, 0x2c, 0x23, 0x98, 0x34, 0xf5, 0x00, 0x1e, 0x0c, 0x3c, 0x7b, 0x9a, 0xbf, 0x60, + 0x3d, 0xfe, 0xf3, 0x3f, 0xd4, 0x3c, 0x69, 0x10, 0x09, 0x35, 0x6f, 0xda, 0x09, 0x67, 0x99, 0xc6, + 0xd9, 0xa2, 0x84, 0xd8, 0x5d, 0xfd, 0xd0, 0xa3, 0xd5, 0x13, 0xec, 0x49, 0x83, 0x12, 0xf9, 0x04, + 0x75, 0x5f, 0x15, 0xe4, 0x21, 0xb3, 0x62, 0x66, 0xb7, 0x62, 0x66, 0x97, 0x33, 0x31, 0xd3, 0xe7, + 0xf7, 0x62, 0xe7, 0x09, 0x2b, 0x28, 0x11, 0x09, 0x90, 0xcd, 0x0e, 0x61, 0x45, 0xc7, 0x9b, 0x9f, + 0x45, 0xca, 0x57, 0x8e, 0x77, 0x05, 0x2b, 0xbf, 0xfe, 0x2b, 0x93, 0xcf, 0x50, 0xf3, 0x66, 0x6b, + 0x69, 0x3f, 0x47, 0x85, 0xfd, 0xe4, 0xa2, 0x5b, 0x8a, 0x6e, 0x15, 0x58, 0x4c, 0xd1, 0xc2, 0x0b, + 0x51, 0x4c, 0xd1, 0xa2, 0xb8, 0x33, 0x8a, 0xd2, 0xa2, 0xff, 0x4e, 0x51, 0x0e, 0xf8, 0x17, 0xa8, + 0xfb, 0x83, 0x4c, 0x96, 0xbe, 0x1c, 0x05, 0xf0, 0x79, 0x1a, 0x0a, 0x4a, 0x64, 0x08, 0xdb, 0x77, + 0x74, 0x42, 0xf6, 0xf2, 0x6a, 0xa4, 0x3b, 0x87, 0xbe, 0x58, 0xb9, 0xd0, 0x9c, 0xec, 0x82, 0x12, + 0xb9, 0x81, 0x9a, 0xf7, 0x04, 0x90, 0x65, 0xef, 0x78, 0x01, 0x0b, 0x39, 0xaf, 0x48, 0x50, 0x3a, + 0xff, 0x08, 0xde, 0xca, 0x3d, 0xf7, 0x57, 0xda, 0xfb, 0x19, 0x0d, 0x37, 0x67, 0x51, 0xac, 0xbf, + 0x4e, 0xba, 0xac, 0x27, 0x46, 0x3c, 0x12, 0xdf, 0xf0, 0x3b, 0xb7, 0x4b, 0xd3, 0x90, 0xa4, 0x78, + 0x84, 0x63, 0x94, 0x1d, 0x8d, 0x7d, 0x1e, 0x09, 0x9e, 0x6d, 0xf6, 0xee, 0x86, 0xf1, 0x9f, 0xfc, + 0x0d, 0x00, 0x00, 0xff, 0xff, 0x58, 0xe3, 0xdf, 0xd7, 0xee, 0x07, 0x00, 0x00, +} diff --git a/protos/generated/go/feast/core/DatasetService.pb.go b/protos/generated/go/feast/core/DatasetService.pb.go index e93f569c8e..d2d3b01c93 100644 --- a/protos/generated/go/feast/core/DatasetService.pb.go +++ b/protos/generated/go/feast/core/DatasetService.pb.go @@ -1,17 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/core/DatasetService.proto -package core +package core // import "github.com/gojek/feast/protos/generated/go/feast/core" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type DatasetServiceTypes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -35,17 +34,16 @@ func (m *DatasetServiceTypes) Reset() { *m = DatasetServiceTypes{} } func (m *DatasetServiceTypes) String() string { return proto.CompactTextString(m) } func (*DatasetServiceTypes) ProtoMessage() {} func (*DatasetServiceTypes) Descriptor() ([]byte, []int) { - return fileDescriptor_3edc37a8b0d37b39, []int{0} + return fileDescriptor_DatasetService_37ae639a8c7b5dd5, []int{0} } - func (m *DatasetServiceTypes) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DatasetServiceTypes.Unmarshal(m, b) } func (m *DatasetServiceTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DatasetServiceTypes.Marshal(b, m, deterministic) } -func (m *DatasetServiceTypes) XXX_Merge(src proto.Message) { - xxx_messageInfo_DatasetServiceTypes.Merge(m, src) +func (dst *DatasetServiceTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatasetServiceTypes.Merge(dst, src) } func (m *DatasetServiceTypes) XXX_Size() int { return xxx_messageInfo_DatasetServiceTypes.Size(m) @@ -79,17 +77,16 @@ func (m *DatasetServiceTypes_CreateDatasetRequest) Reset() { func (m *DatasetServiceTypes_CreateDatasetRequest) String() string { return proto.CompactTextString(m) } func (*DatasetServiceTypes_CreateDatasetRequest) ProtoMessage() {} func (*DatasetServiceTypes_CreateDatasetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3edc37a8b0d37b39, []int{0, 0} + return fileDescriptor_DatasetService_37ae639a8c7b5dd5, []int{0, 0} } - func (m *DatasetServiceTypes_CreateDatasetRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DatasetServiceTypes_CreateDatasetRequest.Unmarshal(m, b) } func (m *DatasetServiceTypes_CreateDatasetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DatasetServiceTypes_CreateDatasetRequest.Marshal(b, m, deterministic) } -func (m *DatasetServiceTypes_CreateDatasetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DatasetServiceTypes_CreateDatasetRequest.Merge(m, src) +func (dst *DatasetServiceTypes_CreateDatasetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatasetServiceTypes_CreateDatasetRequest.Merge(dst, src) } func (m *DatasetServiceTypes_CreateDatasetRequest) XXX_Size() int { return xxx_messageInfo_DatasetServiceTypes_CreateDatasetRequest.Size(m) @@ -149,17 +146,16 @@ func (m *DatasetServiceTypes_CreateDatasetResponse) Reset() { func (m *DatasetServiceTypes_CreateDatasetResponse) String() string { return proto.CompactTextString(m) } func (*DatasetServiceTypes_CreateDatasetResponse) ProtoMessage() {} func (*DatasetServiceTypes_CreateDatasetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3edc37a8b0d37b39, []int{0, 1} + return fileDescriptor_DatasetService_37ae639a8c7b5dd5, []int{0, 1} } - func (m *DatasetServiceTypes_CreateDatasetResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DatasetServiceTypes_CreateDatasetResponse.Unmarshal(m, b) } func (m *DatasetServiceTypes_CreateDatasetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DatasetServiceTypes_CreateDatasetResponse.Marshal(b, m, deterministic) } -func (m *DatasetServiceTypes_CreateDatasetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DatasetServiceTypes_CreateDatasetResponse.Merge(m, src) +func (dst *DatasetServiceTypes_CreateDatasetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatasetServiceTypes_CreateDatasetResponse.Merge(dst, src) } func (m *DatasetServiceTypes_CreateDatasetResponse) XXX_Size() int { return xxx_messageInfo_DatasetServiceTypes_CreateDatasetResponse.Size(m) @@ -192,17 +188,16 @@ func (m *FeatureSet) Reset() { *m = FeatureSet{} } func (m *FeatureSet) String() string { return proto.CompactTextString(m) } func (*FeatureSet) ProtoMessage() {} func (*FeatureSet) Descriptor() ([]byte, []int) { - return fileDescriptor_3edc37a8b0d37b39, []int{1} + return fileDescriptor_DatasetService_37ae639a8c7b5dd5, []int{1} } - func (m *FeatureSet) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FeatureSet.Unmarshal(m, b) } func (m *FeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FeatureSet.Marshal(b, m, deterministic) } -func (m *FeatureSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureSet.Merge(m, src) +func (dst *FeatureSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeatureSet.Merge(dst, src) } func (m *FeatureSet) XXX_Size() int { return xxx_messageInfo_FeatureSet.Size(m) @@ -242,17 +237,16 @@ func (m *DatasetInfo) Reset() { *m = DatasetInfo{} } func (m *DatasetInfo) String() string { return proto.CompactTextString(m) } func (*DatasetInfo) ProtoMessage() {} func (*DatasetInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_3edc37a8b0d37b39, []int{2} + return fileDescriptor_DatasetService_37ae639a8c7b5dd5, []int{2} } - func (m *DatasetInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DatasetInfo.Unmarshal(m, b) } func (m *DatasetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DatasetInfo.Marshal(b, m, deterministic) } -func (m *DatasetInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DatasetInfo.Merge(m, src) +func (dst *DatasetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatasetInfo.Merge(dst, src) } func (m *DatasetInfo) XXX_Size() int { return xxx_messageInfo_DatasetInfo.Size(m) @@ -285,38 +279,6 @@ func init() { proto.RegisterType((*DatasetInfo)(nil), "feast.core.DatasetInfo") } -func init() { proto.RegisterFile("feast/core/DatasetService.proto", fileDescriptor_3edc37a8b0d37b39) } - -var fileDescriptor_3edc37a8b0d37b39 = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x6e, 0xd4, 0x30, - 0x10, 0x25, 0xbb, 0x2d, 0x90, 0x59, 0xc1, 0xc1, 0x14, 0x88, 0x72, 0xa0, 0x51, 0x4e, 0x7b, 0xb2, - 0xa5, 0xd2, 0x22, 0x38, 0x70, 0x29, 0x2b, 0xa4, 0x4a, 0x08, 0x55, 0x6e, 0x91, 0x10, 0x37, 0x67, - 0x33, 0x09, 0x81, 0x24, 0x0e, 0xf6, 0x04, 0xd1, 0x0b, 0xdf, 0xc0, 0x27, 0xf2, 0x11, 0x7c, 0x00, - 0x8a, 0xb3, 0xdb, 0x78, 0xab, 0x4a, 0x88, 0x9b, 0x3d, 0xef, 0xcd, 0x78, 0xde, 0xf8, 0x0d, 0x1c, - 0x16, 0xa8, 0x2c, 0x89, 0xb5, 0x36, 0x28, 0x56, 0x8a, 0x94, 0x45, 0xba, 0x40, 0xf3, 0xbd, 0x5a, - 0x23, 0xef, 0x8c, 0x26, 0xcd, 0xc0, 0x11, 0xf8, 0x40, 0x88, 0x0f, 0x4b, 0xad, 0xcb, 0x1a, 0x85, - 0x43, 0xb2, 0xbe, 0x10, 0x54, 0x35, 0x68, 0x49, 0x35, 0xdd, 0x48, 0x4e, 0x7f, 0xcf, 0xe0, 0xd1, - 0x6e, 0x95, 0xcb, 0xab, 0x0e, 0x6d, 0xfc, 0x27, 0x80, 0x83, 0x37, 0x06, 0x15, 0xe1, 0x06, 0x95, - 0xf8, 0xad, 0x47, 0x4b, 0xec, 0x05, 0x0c, 0xf5, 0xa9, 0x37, 0x78, 0x81, 0x14, 0x05, 0x49, 0xb0, - 0x5c, 0x1c, 0x3d, 0xe1, 0xd3, 0x93, 0xfc, 0xed, 0x35, 0x2a, 0x3d, 0x26, 0x7b, 0x09, 0xa1, 0x25, - 0x65, 0x68, 0xa5, 0x08, 0xa3, 0x99, 0x4b, 0x8b, 0xf9, 0xd8, 0x1d, 0xdf, 0x76, 0xc7, 0x2f, 0xb7, - 0xdd, 0xc9, 0x89, 0xcc, 0x8e, 0xe1, 0x1e, 0xb6, 0xb9, 0xcb, 0x9b, 0xff, 0x33, 0x6f, 0x4b, 0x65, - 0x07, 0xb0, 0x5f, 0x57, 0x4d, 0x45, 0xd1, 0x5e, 0x12, 0x2c, 0xe7, 0x72, 0xbc, 0xb0, 0x67, 0x00, - 0xad, 0x6a, 0xf0, 0xdc, 0x60, 0x51, 0xfd, 0x88, 0xf6, 0x93, 0x60, 0x19, 0x4a, 0x2f, 0x12, 0x4b, - 0x78, 0x7c, 0x43, 0xb5, 0xed, 0x74, 0x6b, 0x91, 0xbd, 0x82, 0x45, 0x3e, 0x86, 0xce, 0xda, 0x42, - 0x6f, 0x74, 0x3f, 0xf5, 0x75, 0xaf, 0x26, 0x58, 0xfa, 0xdc, 0xf4, 0x1d, 0xc0, 0x34, 0x93, 0xa1, - 0x03, 0x6c, 0xa9, 0xa2, 0xab, 0xf7, 0xaa, 0x41, 0x57, 0x27, 0x94, 0x5e, 0x64, 0xc0, 0x37, 0x53, - 0x3b, 0xcb, 0x6d, 0x34, 0x4b, 0xe6, 0x03, 0x3e, 0x45, 0xd2, 0xd7, 0xb0, 0xf0, 0x5e, 0x62, 0x0c, - 0xf6, 0xda, 0xa9, 0x90, 0x3b, 0xb3, 0x18, 0xee, 0x93, 0xca, 0x6a, 0xfc, 0x60, 0x6a, 0x37, 0xe9, - 0x50, 0x5e, 0xdf, 0x8f, 0x7e, 0x05, 0xf0, 0x70, 0xf7, 0xbf, 0xd9, 0x4f, 0x78, 0xb0, 0xa3, 0x99, - 0x1d, 0xdf, 0x22, 0xcb, 0x37, 0x07, 0xbf, 0xcd, 0x18, 0xf1, 0xc9, 0x7f, 0x66, 0x8d, 0x83, 0x4d, - 0xef, 0x9c, 0x7e, 0x04, 0xcf, 0xb1, 0xa7, 0x37, 0xdc, 0x78, 0x3e, 0x7c, 0xf1, 0xa7, 0x93, 0xb2, - 0xa2, 0xcf, 0x7d, 0xc6, 0xd7, 0xba, 0x11, 0xa5, 0xfe, 0x82, 0x5f, 0xc5, 0xb8, 0x04, 0xce, 0x00, - 0x56, 0x94, 0xd8, 0xa2, 0x51, 0x84, 0xb9, 0x28, 0xb5, 0x98, 0xd6, 0x23, 0xbb, 0xeb, 0xf0, 0xe7, - 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x9e, 0x4d, 0xe0, 0x33, 0x03, 0x00, 0x00, -} - // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -356,14 +318,6 @@ type DatasetServiceServer interface { CreateDataset(context.Context, *DatasetServiceTypes_CreateDatasetRequest) (*DatasetServiceTypes_CreateDatasetResponse, error) } -// UnimplementedDatasetServiceServer can be embedded to have forward compatible implementations. -type UnimplementedDatasetServiceServer struct { -} - -func (*UnimplementedDatasetServiceServer) CreateDataset(ctx context.Context, req *DatasetServiceTypes_CreateDatasetRequest) (*DatasetServiceTypes_CreateDatasetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDataset not implemented") -} - func RegisterDatasetServiceServer(s *grpc.Server, srv DatasetServiceServer) { s.RegisterService(&_DatasetService_serviceDesc, srv) } @@ -398,3 +352,37 @@ var _DatasetService_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "feast/core/DatasetService.proto", } + +func init() { + proto.RegisterFile("feast/core/DatasetService.proto", fileDescriptor_DatasetService_37ae639a8c7b5dd5) +} + +var fileDescriptor_DatasetService_37ae639a8c7b5dd5 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x6e, 0xd4, 0x30, + 0x10, 0x25, 0xbb, 0x2d, 0x90, 0x59, 0xc1, 0xc1, 0x14, 0x88, 0x72, 0xa0, 0x51, 0x4e, 0x7b, 0xb2, + 0xa5, 0xd2, 0x22, 0x38, 0x70, 0x29, 0x2b, 0xa4, 0x4a, 0x08, 0x55, 0x6e, 0x91, 0x10, 0x37, 0x67, + 0x33, 0x09, 0x81, 0x24, 0x0e, 0xf6, 0x04, 0xd1, 0x0b, 0xdf, 0xc0, 0x27, 0xf2, 0x11, 0x7c, 0x00, + 0x8a, 0xb3, 0xdb, 0x78, 0xab, 0x4a, 0x88, 0x9b, 0x3d, 0xef, 0xcd, 0x78, 0xde, 0xf8, 0x0d, 0x1c, + 0x16, 0xa8, 0x2c, 0x89, 0xb5, 0x36, 0x28, 0x56, 0x8a, 0x94, 0x45, 0xba, 0x40, 0xf3, 0xbd, 0x5a, + 0x23, 0xef, 0x8c, 0x26, 0xcd, 0xc0, 0x11, 0xf8, 0x40, 0x88, 0x0f, 0x4b, 0xad, 0xcb, 0x1a, 0x85, + 0x43, 0xb2, 0xbe, 0x10, 0x54, 0x35, 0x68, 0x49, 0x35, 0xdd, 0x48, 0x4e, 0x7f, 0xcf, 0xe0, 0xd1, + 0x6e, 0x95, 0xcb, 0xab, 0x0e, 0x6d, 0xfc, 0x27, 0x80, 0x83, 0x37, 0x06, 0x15, 0xe1, 0x06, 0x95, + 0xf8, 0xad, 0x47, 0x4b, 0xec, 0x05, 0x0c, 0xf5, 0xa9, 0x37, 0x78, 0x81, 0x14, 0x05, 0x49, 0xb0, + 0x5c, 0x1c, 0x3d, 0xe1, 0xd3, 0x93, 0xfc, 0xed, 0x35, 0x2a, 0x3d, 0x26, 0x7b, 0x09, 0xa1, 0x25, + 0x65, 0x68, 0xa5, 0x08, 0xa3, 0x99, 0x4b, 0x8b, 0xf9, 0xd8, 0x1d, 0xdf, 0x76, 0xc7, 0x2f, 0xb7, + 0xdd, 0xc9, 0x89, 0xcc, 0x8e, 0xe1, 0x1e, 0xb6, 0xb9, 0xcb, 0x9b, 0xff, 0x33, 0x6f, 0x4b, 0x65, + 0x07, 0xb0, 0x5f, 0x57, 0x4d, 0x45, 0xd1, 0x5e, 0x12, 0x2c, 0xe7, 0x72, 0xbc, 0xb0, 0x67, 0x00, + 0xad, 0x6a, 0xf0, 0xdc, 0x60, 0x51, 0xfd, 0x88, 0xf6, 0x93, 0x60, 0x19, 0x4a, 0x2f, 0x12, 0x4b, + 0x78, 0x7c, 0x43, 0xb5, 0xed, 0x74, 0x6b, 0x91, 0xbd, 0x82, 0x45, 0x3e, 0x86, 0xce, 0xda, 0x42, + 0x6f, 0x74, 0x3f, 0xf5, 0x75, 0xaf, 0x26, 0x58, 0xfa, 0xdc, 0xf4, 0x1d, 0xc0, 0x34, 0x93, 0xa1, + 0x03, 0x6c, 0xa9, 0xa2, 0xab, 0xf7, 0xaa, 0x41, 0x57, 0x27, 0x94, 0x5e, 0x64, 0xc0, 0x37, 0x53, + 0x3b, 0xcb, 0x6d, 0x34, 0x4b, 0xe6, 0x03, 0x3e, 0x45, 0xd2, 0xd7, 0xb0, 0xf0, 0x5e, 0x62, 0x0c, + 0xf6, 0xda, 0xa9, 0x90, 0x3b, 0xb3, 0x18, 0xee, 0x93, 0xca, 0x6a, 0xfc, 0x60, 0x6a, 0x37, 0xe9, + 0x50, 0x5e, 0xdf, 0x8f, 0x7e, 0x05, 0xf0, 0x70, 0xf7, 0xbf, 0xd9, 0x4f, 0x78, 0xb0, 0xa3, 0x99, + 0x1d, 0xdf, 0x22, 0xcb, 0x37, 0x07, 0xbf, 0xcd, 0x18, 0xf1, 0xc9, 0x7f, 0x66, 0x8d, 0x83, 0x4d, + 0xef, 0x9c, 0x7e, 0x04, 0xcf, 0xb1, 0xa7, 0x37, 0xdc, 0x78, 0x3e, 0x7c, 0xf1, 0xa7, 0x93, 0xb2, + 0xa2, 0xcf, 0x7d, 0xc6, 0xd7, 0xba, 0x11, 0xa5, 0xfe, 0x82, 0x5f, 0xc5, 0xb8, 0x04, 0xce, 0x00, + 0x56, 0x94, 0xd8, 0xa2, 0x51, 0x84, 0xb9, 0x28, 0xb5, 0x98, 0xd6, 0x23, 0xbb, 0xeb, 0xf0, 0xe7, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x9e, 0x4d, 0xe0, 0x33, 0x03, 0x00, 0x00, +} diff --git a/protos/generated/go/feast/core/JobService.pb.go b/protos/generated/go/feast/core/JobService.pb.go index 2a6455e5c8..6a3a4e6dc0 100644 --- a/protos/generated/go/feast/core/JobService.pb.go +++ b/protos/generated/go/feast/core/JobService.pb.go @@ -1,19 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/core/JobService.proto -package core +package core // import "github.com/gojek/feast/protos/generated/go/feast/core" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import specs "github.com/gojek/feast/protos/generated/go/feast/specs" +import empty "github.com/golang/protobuf/ptypes/empty" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" import ( - context "context" - fmt "fmt" - specs "github.com/gojek/feast/protos/generated/go/feast/specs" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - timestamp "github.com/golang/protobuf/ptypes/timestamp" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +24,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type JobServiceTypes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -37,17 +36,16 @@ func (m *JobServiceTypes) Reset() { *m = JobServiceTypes{} } func (m *JobServiceTypes) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes) ProtoMessage() {} func (*JobServiceTypes) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0} } - func (m *JobServiceTypes) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes.Unmarshal(m, b) } func (m *JobServiceTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes.Marshal(b, m, deterministic) } -func (m *JobServiceTypes) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes.Merge(m, src) +func (dst *JobServiceTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes.Merge(dst, src) } func (m *JobServiceTypes) XXX_Size() int { return xxx_messageInfo_JobServiceTypes.Size(m) @@ -72,17 +70,16 @@ func (m *JobServiceTypes_SubmitImportJobRequest) Reset() { func (m *JobServiceTypes_SubmitImportJobRequest) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_SubmitImportJobRequest) ProtoMessage() {} func (*JobServiceTypes_SubmitImportJobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 0} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 0} } - func (m *JobServiceTypes_SubmitImportJobRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_SubmitImportJobRequest.Unmarshal(m, b) } func (m *JobServiceTypes_SubmitImportJobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_SubmitImportJobRequest.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_SubmitImportJobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_SubmitImportJobRequest.Merge(m, src) +func (dst *JobServiceTypes_SubmitImportJobRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_SubmitImportJobRequest.Merge(dst, src) } func (m *JobServiceTypes_SubmitImportJobRequest) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_SubmitImportJobRequest.Size(m) @@ -120,17 +117,16 @@ func (m *JobServiceTypes_SubmitImportJobResponse) Reset() { func (m *JobServiceTypes_SubmitImportJobResponse) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_SubmitImportJobResponse) ProtoMessage() {} func (*JobServiceTypes_SubmitImportJobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 1} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 1} } - func (m *JobServiceTypes_SubmitImportJobResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_SubmitImportJobResponse.Unmarshal(m, b) } func (m *JobServiceTypes_SubmitImportJobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_SubmitImportJobResponse.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_SubmitImportJobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_SubmitImportJobResponse.Merge(m, src) +func (dst *JobServiceTypes_SubmitImportJobResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_SubmitImportJobResponse.Merge(dst, src) } func (m *JobServiceTypes_SubmitImportJobResponse) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_SubmitImportJobResponse.Size(m) @@ -159,17 +155,16 @@ func (m *JobServiceTypes_ListJobsResponse) Reset() { *m = JobServiceType func (m *JobServiceTypes_ListJobsResponse) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_ListJobsResponse) ProtoMessage() {} func (*JobServiceTypes_ListJobsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 2} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 2} } - func (m *JobServiceTypes_ListJobsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_ListJobsResponse.Unmarshal(m, b) } func (m *JobServiceTypes_ListJobsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_ListJobsResponse.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_ListJobsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_ListJobsResponse.Merge(m, src) +func (dst *JobServiceTypes_ListJobsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_ListJobsResponse.Merge(dst, src) } func (m *JobServiceTypes_ListJobsResponse) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_ListJobsResponse.Size(m) @@ -198,17 +193,16 @@ func (m *JobServiceTypes_GetJobRequest) Reset() { *m = JobServiceTypes_G func (m *JobServiceTypes_GetJobRequest) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_GetJobRequest) ProtoMessage() {} func (*JobServiceTypes_GetJobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 3} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 3} } - func (m *JobServiceTypes_GetJobRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_GetJobRequest.Unmarshal(m, b) } func (m *JobServiceTypes_GetJobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_GetJobRequest.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_GetJobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_GetJobRequest.Merge(m, src) +func (dst *JobServiceTypes_GetJobRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_GetJobRequest.Merge(dst, src) } func (m *JobServiceTypes_GetJobRequest) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_GetJobRequest.Size(m) @@ -237,17 +231,16 @@ func (m *JobServiceTypes_GetJobResponse) Reset() { *m = JobServiceTypes_ func (m *JobServiceTypes_GetJobResponse) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_GetJobResponse) ProtoMessage() {} func (*JobServiceTypes_GetJobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 4} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 4} } - func (m *JobServiceTypes_GetJobResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_GetJobResponse.Unmarshal(m, b) } func (m *JobServiceTypes_GetJobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_GetJobResponse.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_GetJobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_GetJobResponse.Merge(m, src) +func (dst *JobServiceTypes_GetJobResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_GetJobResponse.Merge(dst, src) } func (m *JobServiceTypes_GetJobResponse) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_GetJobResponse.Size(m) @@ -276,17 +269,16 @@ func (m *JobServiceTypes_AbortJobRequest) Reset() { *m = JobServiceTypes func (m *JobServiceTypes_AbortJobRequest) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_AbortJobRequest) ProtoMessage() {} func (*JobServiceTypes_AbortJobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 5} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 5} } - func (m *JobServiceTypes_AbortJobRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_AbortJobRequest.Unmarshal(m, b) } func (m *JobServiceTypes_AbortJobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_AbortJobRequest.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_AbortJobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_AbortJobRequest.Merge(m, src) +func (dst *JobServiceTypes_AbortJobRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_AbortJobRequest.Merge(dst, src) } func (m *JobServiceTypes_AbortJobRequest) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_AbortJobRequest.Size(m) @@ -315,17 +307,16 @@ func (m *JobServiceTypes_AbortJobResponse) Reset() { *m = JobServiceType func (m *JobServiceTypes_AbortJobResponse) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_AbortJobResponse) ProtoMessage() {} func (*JobServiceTypes_AbortJobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 6} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 6} } - func (m *JobServiceTypes_AbortJobResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_AbortJobResponse.Unmarshal(m, b) } func (m *JobServiceTypes_AbortJobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_AbortJobResponse.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_AbortJobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_AbortJobResponse.Merge(m, src) +func (dst *JobServiceTypes_AbortJobResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_AbortJobResponse.Merge(dst, src) } func (m *JobServiceTypes_AbortJobResponse) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_AbortJobResponse.Size(m) @@ -365,17 +356,16 @@ func (m *JobServiceTypes_JobDetail) Reset() { *m = JobServiceTypes_JobDe func (m *JobServiceTypes_JobDetail) String() string { return proto.CompactTextString(m) } func (*JobServiceTypes_JobDetail) ProtoMessage() {} func (*JobServiceTypes_JobDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_7115affcfc7885c4, []int{0, 7} + return fileDescriptor_JobService_edcd183b773c9f62, []int{0, 7} } - func (m *JobServiceTypes_JobDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JobServiceTypes_JobDetail.Unmarshal(m, b) } func (m *JobServiceTypes_JobDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_JobServiceTypes_JobDetail.Marshal(b, m, deterministic) } -func (m *JobServiceTypes_JobDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_JobServiceTypes_JobDetail.Merge(m, src) +func (dst *JobServiceTypes_JobDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_JobServiceTypes_JobDetail.Merge(dst, src) } func (m *JobServiceTypes_JobDetail) XXX_Size() int { return xxx_messageInfo_JobServiceTypes_JobDetail.Size(m) @@ -469,51 +459,6 @@ func init() { proto.RegisterMapType((map[string]float64)(nil), "feast.core.JobServiceTypes.JobDetail.MetricsEntry") } -func init() { proto.RegisterFile("feast/core/JobService.proto", fileDescriptor_7115affcfc7885c4) } - -var fileDescriptor_7115affcfc7885c4 = []byte{ - // 621 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x4e, 0xdb, 0x4c, - 0x10, 0x55, 0x62, 0x08, 0xf1, 0xf0, 0x7d, 0x80, 0x56, 0x15, 0x58, 0x4b, 0x25, 0x52, 0xa4, 0x4a, - 0xe9, 0x8f, 0x6c, 0x29, 0xb4, 0xa2, 0x45, 0xbd, 0x29, 0x2a, 0xaa, 0x82, 0x40, 0x42, 0x86, 0xde, - 0xf4, 0xa6, 0xb2, 0x9d, 0xc1, 0xdd, 0x10, 0x7b, 0x5d, 0xef, 0x1a, 0x35, 0xef, 0xd2, 0x37, 0xe8, - 0x13, 0xf5, 0x6d, 0xaa, 0xdd, 0xb5, 0x63, 0x63, 0xaa, 0x94, 0xde, 0xf9, 0xec, 0x9c, 0xd9, 0xb3, - 0x73, 0x3c, 0x33, 0xb0, 0x7b, 0x8d, 0x81, 0x90, 0x5e, 0xc4, 0x73, 0xf4, 0x4e, 0x79, 0x78, 0x89, - 0xf9, 0x2d, 0x8b, 0xd0, 0xcd, 0x72, 0x2e, 0x39, 0x01, 0x1d, 0x74, 0x55, 0x90, 0x3e, 0x36, 0x44, - 0x91, 0x61, 0x24, 0xbc, 0x71, 0x92, 0xf1, 0x5c, 0x5e, 0x66, 0x18, 0x19, 0x26, 0xdd, 0x8d, 0x39, - 0x8f, 0x67, 0xe8, 0x69, 0x14, 0x16, 0xd7, 0x1e, 0x26, 0x99, 0x9c, 0x97, 0xc1, 0xbd, 0x76, 0x50, - 0xb2, 0x04, 0x85, 0x0c, 0x92, 0xcc, 0x10, 0xf6, 0x7f, 0xf5, 0x60, 0xb3, 0x16, 0xbf, 0x9a, 0x67, - 0x28, 0x28, 0xc2, 0xf6, 0x65, 0x11, 0x26, 0x4c, 0x1a, 0xad, 0x53, 0x1e, 0xfa, 0xf8, 0xad, 0x40, - 0x21, 0xc9, 0x21, 0x00, 0x5b, 0xe8, 0x3b, 0x9d, 0x41, 0x67, 0xb8, 0x3e, 0xda, 0x71, 0xcd, 0x53, - 0xf5, 0xf3, 0xdc, 0xfa, 0x79, 0x7e, 0x83, 0x4a, 0x08, 0xac, 0xa4, 0x41, 0x82, 0x4e, 0x77, 0xd0, - 0x19, 0xda, 0xbe, 0xfe, 0xa6, 0x1e, 0xec, 0xdc, 0x93, 0x11, 0x19, 0x4f, 0x05, 0x92, 0x47, 0xb0, - 0x3a, 0xe5, 0xe1, 0x78, 0xa2, 0x25, 0x6c, 0xdf, 0x00, 0x7a, 0x0e, 0x5b, 0x67, 0x4c, 0x28, 0xa2, - 0x58, 0x30, 0xdf, 0xc2, 0xca, 0x94, 0x87, 0xc2, 0xe9, 0x0c, 0xac, 0xe1, 0xfa, 0xe8, 0xa9, 0x5b, - 0xdb, 0xe6, 0xb6, 0xca, 0x52, 0xf8, 0x03, 0xca, 0x80, 0xcd, 0x7c, 0x9d, 0x42, 0xf7, 0xe0, 0xff, - 0x8f, 0xd8, 0xac, 0x6e, 0x03, 0xba, 0xac, 0x92, 0xec, 0xb2, 0x09, 0x1d, 0xc3, 0x46, 0x45, 0x28, - 0xd5, 0x0e, 0xc1, 0x9a, 0xf2, 0xb0, 0x2c, 0xfc, 0x81, 0x62, 0x2a, 0x83, 0x3e, 0x81, 0xcd, 0xf7, - 0xe1, 0x5d, 0x2f, 0xdb, 0x6a, 0xfb, 0xb0, 0x55, 0x53, 0x4a, 0xbd, 0x36, 0xe7, 0xa7, 0x05, 0xf6, - 0xe2, 0xe6, 0x76, 0x54, 0xb9, 0x86, 0xdf, 0xe5, 0x78, 0x52, 0xba, 0x6c, 0x80, 0xb2, 0x5e, 0xce, - 0x33, 0x74, 0x2c, 0x63, 0xbd, 0xfa, 0x26, 0xdb, 0xd0, 0xcb, 0x8b, 0x34, 0xc5, 0xdc, 0x59, 0xd1, - 0xa7, 0x25, 0x52, 0xe7, 0x42, 0x06, 0xb2, 0x10, 0xce, 0xaa, 0x39, 0x37, 0x88, 0x50, 0xe8, 0x63, - 0x2a, 0x99, 0x64, 0x28, 0x9c, 0xde, 0xc0, 0x1a, 0xda, 0xfe, 0x02, 0xab, 0xd8, 0x35, 0x06, 0xb2, - 0xc8, 0x51, 0x38, 0x6b, 0x26, 0x56, 0x61, 0x72, 0x06, 0x6b, 0x09, 0xca, 0x9c, 0x45, 0xc2, 0xe9, - 0xeb, 0x1f, 0x34, 0x7a, 0x90, 0x67, 0xee, 0xb9, 0x49, 0x3a, 0x49, 0x65, 0x3e, 0xf7, 0xab, 0x2b, - 0xc8, 0x3b, 0x58, 0x9f, 0x05, 0x42, 0x7e, 0xca, 0x26, 0x81, 0xc4, 0x89, 0x63, 0xeb, 0xbf, 0x40, - 0x5d, 0xd3, 0xe2, 0x6e, 0xd5, 0xe2, 0xee, 0x55, 0xd5, 0xe2, 0x7e, 0x93, 0x4e, 0x5e, 0xc1, 0x5a, - 0x94, 0xa3, 0xce, 0x84, 0xbf, 0x66, 0x56, 0x54, 0x7a, 0x04, 0xff, 0x35, 0x1f, 0x43, 0xb6, 0xc0, - 0xba, 0xc1, 0x79, 0x69, 0xba, 0xfa, 0x54, 0xae, 0xdf, 0x06, 0xb3, 0xc2, 0xf4, 0x76, 0xc7, 0x37, - 0xe0, 0xa8, 0xfb, 0xa6, 0x33, 0xfa, 0x61, 0x01, 0xd4, 0x35, 0x12, 0x09, 0xb6, 0xe9, 0xf7, 0x53, - 0x1e, 0x92, 0xa5, 0x46, 0xfc, 0x79, 0xfa, 0xe8, 0xc1, 0x3f, 0xe5, 0x94, 0x2d, 0x74, 0x01, 0xfd, - 0x6a, 0x68, 0xc8, 0xf6, 0xbd, 0x8a, 0x4f, 0xd4, 0xae, 0xa0, 0x2f, 0x97, 0x5d, 0x7c, 0x6f, 0xe4, - 0xbe, 0x40, 0xcf, 0x8c, 0x05, 0x79, 0xb6, 0x2c, 0xef, 0xce, 0x6c, 0xd1, 0xe7, 0x0f, 0xa1, 0x96, - 0x02, 0x08, 0xfd, 0x6a, 0x12, 0xc8, 0x8b, 0x65, 0x79, 0xad, 0x91, 0x5a, 0x5e, 0x47, 0x7b, 0xb8, - 0x8e, 0xaf, 0xa0, 0xb1, 0x64, 0x8f, 0x1b, 0x5b, 0xf0, 0x42, 0xb9, 0xf3, 0xf9, 0x75, 0xcc, 0xe4, - 0xd7, 0x22, 0x74, 0x23, 0x9e, 0x78, 0x31, 0x9f, 0xe2, 0x8d, 0x67, 0xd6, 0xb0, 0xf6, 0x4e, 0x78, - 0x31, 0xa6, 0x98, 0xab, 0x16, 0xf1, 0x62, 0xee, 0xd5, 0x9b, 0x3c, 0xec, 0xe9, 0xf8, 0xc1, 0xef, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xc7, 0xf4, 0xb6, 0x7c, 0xde, 0x05, 0x00, 0x00, -} - // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -592,23 +537,6 @@ type JobServiceServer interface { AbortJob(context.Context, *JobServiceTypes_AbortJobRequest) (*JobServiceTypes_AbortJobResponse, error) } -// UnimplementedJobServiceServer can be embedded to have forward compatible implementations. -type UnimplementedJobServiceServer struct { -} - -func (*UnimplementedJobServiceServer) SubmitJob(ctx context.Context, req *JobServiceTypes_SubmitImportJobRequest) (*JobServiceTypes_SubmitImportJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitJob not implemented") -} -func (*UnimplementedJobServiceServer) ListJobs(ctx context.Context, req *empty.Empty) (*JobServiceTypes_ListJobsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") -} -func (*UnimplementedJobServiceServer) GetJob(ctx context.Context, req *JobServiceTypes_GetJobRequest) (*JobServiceTypes_GetJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") -} -func (*UnimplementedJobServiceServer) AbortJob(ctx context.Context, req *JobServiceTypes_AbortJobRequest) (*JobServiceTypes_AbortJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AbortJob not implemented") -} - func RegisterJobServiceServer(s *grpc.Server, srv JobServiceServer) { s.RegisterService(&_JobService_serviceDesc, srv) } @@ -709,3 +637,50 @@ var _JobService_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "feast/core/JobService.proto", } + +func init() { + proto.RegisterFile("feast/core/JobService.proto", fileDescriptor_JobService_edcd183b773c9f62) +} + +var fileDescriptor_JobService_edcd183b773c9f62 = []byte{ + // 621 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x4e, 0xdb, 0x4c, + 0x10, 0x55, 0x62, 0x08, 0xf1, 0xf0, 0x7d, 0x80, 0x56, 0x15, 0x58, 0x4b, 0x25, 0x52, 0xa4, 0x4a, + 0xe9, 0x8f, 0x6c, 0x29, 0xb4, 0xa2, 0x45, 0xbd, 0x29, 0x2a, 0xaa, 0x82, 0x40, 0x42, 0x86, 0xde, + 0xf4, 0xa6, 0xb2, 0x9d, 0xc1, 0xdd, 0x10, 0x7b, 0x5d, 0xef, 0x1a, 0x35, 0xef, 0xd2, 0x37, 0xe8, + 0x13, 0xf5, 0x6d, 0xaa, 0xdd, 0xb5, 0x63, 0x63, 0xaa, 0x94, 0xde, 0xf9, 0xec, 0x9c, 0xd9, 0xb3, + 0x73, 0x3c, 0x33, 0xb0, 0x7b, 0x8d, 0x81, 0x90, 0x5e, 0xc4, 0x73, 0xf4, 0x4e, 0x79, 0x78, 0x89, + 0xf9, 0x2d, 0x8b, 0xd0, 0xcd, 0x72, 0x2e, 0x39, 0x01, 0x1d, 0x74, 0x55, 0x90, 0x3e, 0x36, 0x44, + 0x91, 0x61, 0x24, 0xbc, 0x71, 0x92, 0xf1, 0x5c, 0x5e, 0x66, 0x18, 0x19, 0x26, 0xdd, 0x8d, 0x39, + 0x8f, 0x67, 0xe8, 0x69, 0x14, 0x16, 0xd7, 0x1e, 0x26, 0x99, 0x9c, 0x97, 0xc1, 0xbd, 0x76, 0x50, + 0xb2, 0x04, 0x85, 0x0c, 0x92, 0xcc, 0x10, 0xf6, 0x7f, 0xf5, 0x60, 0xb3, 0x16, 0xbf, 0x9a, 0x67, + 0x28, 0x28, 0xc2, 0xf6, 0x65, 0x11, 0x26, 0x4c, 0x1a, 0xad, 0x53, 0x1e, 0xfa, 0xf8, 0xad, 0x40, + 0x21, 0xc9, 0x21, 0x00, 0x5b, 0xe8, 0x3b, 0x9d, 0x41, 0x67, 0xb8, 0x3e, 0xda, 0x71, 0xcd, 0x53, + 0xf5, 0xf3, 0xdc, 0xfa, 0x79, 0x7e, 0x83, 0x4a, 0x08, 0xac, 0xa4, 0x41, 0x82, 0x4e, 0x77, 0xd0, + 0x19, 0xda, 0xbe, 0xfe, 0xa6, 0x1e, 0xec, 0xdc, 0x93, 0x11, 0x19, 0x4f, 0x05, 0x92, 0x47, 0xb0, + 0x3a, 0xe5, 0xe1, 0x78, 0xa2, 0x25, 0x6c, 0xdf, 0x00, 0x7a, 0x0e, 0x5b, 0x67, 0x4c, 0x28, 0xa2, + 0x58, 0x30, 0xdf, 0xc2, 0xca, 0x94, 0x87, 0xc2, 0xe9, 0x0c, 0xac, 0xe1, 0xfa, 0xe8, 0xa9, 0x5b, + 0xdb, 0xe6, 0xb6, 0xca, 0x52, 0xf8, 0x03, 0xca, 0x80, 0xcd, 0x7c, 0x9d, 0x42, 0xf7, 0xe0, 0xff, + 0x8f, 0xd8, 0xac, 0x6e, 0x03, 0xba, 0xac, 0x92, 0xec, 0xb2, 0x09, 0x1d, 0xc3, 0x46, 0x45, 0x28, + 0xd5, 0x0e, 0xc1, 0x9a, 0xf2, 0xb0, 0x2c, 0xfc, 0x81, 0x62, 0x2a, 0x83, 0x3e, 0x81, 0xcd, 0xf7, + 0xe1, 0x5d, 0x2f, 0xdb, 0x6a, 0xfb, 0xb0, 0x55, 0x53, 0x4a, 0xbd, 0x36, 0xe7, 0xa7, 0x05, 0xf6, + 0xe2, 0xe6, 0x76, 0x54, 0xb9, 0x86, 0xdf, 0xe5, 0x78, 0x52, 0xba, 0x6c, 0x80, 0xb2, 0x5e, 0xce, + 0x33, 0x74, 0x2c, 0x63, 0xbd, 0xfa, 0x26, 0xdb, 0xd0, 0xcb, 0x8b, 0x34, 0xc5, 0xdc, 0x59, 0xd1, + 0xa7, 0x25, 0x52, 0xe7, 0x42, 0x06, 0xb2, 0x10, 0xce, 0xaa, 0x39, 0x37, 0x88, 0x50, 0xe8, 0x63, + 0x2a, 0x99, 0x64, 0x28, 0x9c, 0xde, 0xc0, 0x1a, 0xda, 0xfe, 0x02, 0xab, 0xd8, 0x35, 0x06, 0xb2, + 0xc8, 0x51, 0x38, 0x6b, 0x26, 0x56, 0x61, 0x72, 0x06, 0x6b, 0x09, 0xca, 0x9c, 0x45, 0xc2, 0xe9, + 0xeb, 0x1f, 0x34, 0x7a, 0x90, 0x67, 0xee, 0xb9, 0x49, 0x3a, 0x49, 0x65, 0x3e, 0xf7, 0xab, 0x2b, + 0xc8, 0x3b, 0x58, 0x9f, 0x05, 0x42, 0x7e, 0xca, 0x26, 0x81, 0xc4, 0x89, 0x63, 0xeb, 0xbf, 0x40, + 0x5d, 0xd3, 0xe2, 0x6e, 0xd5, 0xe2, 0xee, 0x55, 0xd5, 0xe2, 0x7e, 0x93, 0x4e, 0x5e, 0xc1, 0x5a, + 0x94, 0xa3, 0xce, 0x84, 0xbf, 0x66, 0x56, 0x54, 0x7a, 0x04, 0xff, 0x35, 0x1f, 0x43, 0xb6, 0xc0, + 0xba, 0xc1, 0x79, 0x69, 0xba, 0xfa, 0x54, 0xae, 0xdf, 0x06, 0xb3, 0xc2, 0xf4, 0x76, 0xc7, 0x37, + 0xe0, 0xa8, 0xfb, 0xa6, 0x33, 0xfa, 0x61, 0x01, 0xd4, 0x35, 0x12, 0x09, 0xb6, 0xe9, 0xf7, 0x53, + 0x1e, 0x92, 0xa5, 0x46, 0xfc, 0x79, 0xfa, 0xe8, 0xc1, 0x3f, 0xe5, 0x94, 0x2d, 0x74, 0x01, 0xfd, + 0x6a, 0x68, 0xc8, 0xf6, 0xbd, 0x8a, 0x4f, 0xd4, 0xae, 0xa0, 0x2f, 0x97, 0x5d, 0x7c, 0x6f, 0xe4, + 0xbe, 0x40, 0xcf, 0x8c, 0x05, 0x79, 0xb6, 0x2c, 0xef, 0xce, 0x6c, 0xd1, 0xe7, 0x0f, 0xa1, 0x96, + 0x02, 0x08, 0xfd, 0x6a, 0x12, 0xc8, 0x8b, 0x65, 0x79, 0xad, 0x91, 0x5a, 0x5e, 0x47, 0x7b, 0xb8, + 0x8e, 0xaf, 0xa0, 0xb1, 0x64, 0x8f, 0x1b, 0x5b, 0xf0, 0x42, 0xb9, 0xf3, 0xf9, 0x75, 0xcc, 0xe4, + 0xd7, 0x22, 0x74, 0x23, 0x9e, 0x78, 0x31, 0x9f, 0xe2, 0x8d, 0x67, 0xd6, 0xb0, 0xf6, 0x4e, 0x78, + 0x31, 0xa6, 0x98, 0xab, 0x16, 0xf1, 0x62, 0xee, 0xd5, 0x9b, 0x3c, 0xec, 0xe9, 0xf8, 0xc1, 0xef, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xc7, 0xf4, 0xb6, 0x7c, 0xde, 0x05, 0x00, 0x00, +} diff --git a/protos/generated/go/feast/core/UIService.pb.go b/protos/generated/go/feast/core/UIService.pb.go index 1d06d0c5ef..772c548c87 100644 --- a/protos/generated/go/feast/core/UIService.pb.go +++ b/protos/generated/go/feast/core/UIService.pb.go @@ -1,19 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/core/UIService.proto -package core +package core // import "github.com/gojek/feast/protos/generated/go/feast/core" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import specs "github.com/gojek/feast/protos/generated/go/feast/specs" +import empty "github.com/golang/protobuf/ptypes/empty" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" import ( - context "context" - fmt "fmt" - specs "github.com/gojek/feast/protos/generated/go/feast/specs" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - timestamp "github.com/golang/protobuf/ptypes/timestamp" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -25,7 +24,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type UIServiceTypes struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -37,17 +36,16 @@ func (m *UIServiceTypes) Reset() { *m = UIServiceTypes{} } func (m *UIServiceTypes) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes) ProtoMessage() {} func (*UIServiceTypes) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0} + return fileDescriptor_UIService_04866529701c634c, []int{0} } - func (m *UIServiceTypes) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes.Unmarshal(m, b) } func (m *UIServiceTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes.Marshal(b, m, deterministic) } -func (m *UIServiceTypes) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes.Merge(m, src) +func (dst *UIServiceTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes.Merge(dst, src) } func (m *UIServiceTypes) XXX_Size() int { return xxx_messageInfo_UIServiceTypes.Size(m) @@ -72,17 +70,16 @@ func (m *UIServiceTypes_EntityDetail) Reset() { *m = UIServiceTypes_Enti func (m *UIServiceTypes_EntityDetail) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_EntityDetail) ProtoMessage() {} func (*UIServiceTypes_EntityDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 0} + return fileDescriptor_UIService_04866529701c634c, []int{0, 0} } - func (m *UIServiceTypes_EntityDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_EntityDetail.Unmarshal(m, b) } func (m *UIServiceTypes_EntityDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_EntityDetail.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_EntityDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_EntityDetail.Merge(m, src) +func (dst *UIServiceTypes_EntityDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_EntityDetail.Merge(dst, src) } func (m *UIServiceTypes_EntityDetail) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_EntityDetail.Size(m) @@ -125,17 +122,16 @@ func (m *UIServiceTypes_GetEntityRequest) Reset() { *m = UIServiceTypes_ func (m *UIServiceTypes_GetEntityRequest) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetEntityRequest) ProtoMessage() {} func (*UIServiceTypes_GetEntityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 1} + return fileDescriptor_UIService_04866529701c634c, []int{0, 1} } - func (m *UIServiceTypes_GetEntityRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetEntityRequest.Unmarshal(m, b) } func (m *UIServiceTypes_GetEntityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetEntityRequest.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetEntityRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetEntityRequest.Merge(m, src) +func (dst *UIServiceTypes_GetEntityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetEntityRequest.Merge(dst, src) } func (m *UIServiceTypes_GetEntityRequest) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetEntityRequest.Size(m) @@ -164,17 +160,16 @@ func (m *UIServiceTypes_GetEntityResponse) Reset() { *m = UIServiceTypes func (m *UIServiceTypes_GetEntityResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetEntityResponse) ProtoMessage() {} func (*UIServiceTypes_GetEntityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 2} + return fileDescriptor_UIService_04866529701c634c, []int{0, 2} } - func (m *UIServiceTypes_GetEntityResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetEntityResponse.Unmarshal(m, b) } func (m *UIServiceTypes_GetEntityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetEntityResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetEntityResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetEntityResponse.Merge(m, src) +func (dst *UIServiceTypes_GetEntityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetEntityResponse.Merge(dst, src) } func (m *UIServiceTypes_GetEntityResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetEntityResponse.Size(m) @@ -203,17 +198,16 @@ func (m *UIServiceTypes_ListEntitiesResponse) Reset() { *m = UIServiceTy func (m *UIServiceTypes_ListEntitiesResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_ListEntitiesResponse) ProtoMessage() {} func (*UIServiceTypes_ListEntitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 3} + return fileDescriptor_UIService_04866529701c634c, []int{0, 3} } - func (m *UIServiceTypes_ListEntitiesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_ListEntitiesResponse.Unmarshal(m, b) } func (m *UIServiceTypes_ListEntitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_ListEntitiesResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_ListEntitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_ListEntitiesResponse.Merge(m, src) +func (dst *UIServiceTypes_ListEntitiesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_ListEntitiesResponse.Merge(dst, src) } func (m *UIServiceTypes_ListEntitiesResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_ListEntitiesResponse.Size(m) @@ -248,17 +242,16 @@ func (m *UIServiceTypes_FeatureDetail) Reset() { *m = UIServiceTypes_Fea func (m *UIServiceTypes_FeatureDetail) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_FeatureDetail) ProtoMessage() {} func (*UIServiceTypes_FeatureDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 4} + return fileDescriptor_UIService_04866529701c634c, []int{0, 4} } - func (m *UIServiceTypes_FeatureDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_FeatureDetail.Unmarshal(m, b) } func (m *UIServiceTypes_FeatureDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_FeatureDetail.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_FeatureDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_FeatureDetail.Merge(m, src) +func (dst *UIServiceTypes_FeatureDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_FeatureDetail.Merge(dst, src) } func (m *UIServiceTypes_FeatureDetail) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_FeatureDetail.Size(m) @@ -322,17 +315,16 @@ func (m *UIServiceTypes_GetFeatureRequest) Reset() { *m = UIServiceTypes func (m *UIServiceTypes_GetFeatureRequest) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetFeatureRequest) ProtoMessage() {} func (*UIServiceTypes_GetFeatureRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 5} + return fileDescriptor_UIService_04866529701c634c, []int{0, 5} } - func (m *UIServiceTypes_GetFeatureRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetFeatureRequest.Unmarshal(m, b) } func (m *UIServiceTypes_GetFeatureRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetFeatureRequest.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetFeatureRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetFeatureRequest.Merge(m, src) +func (dst *UIServiceTypes_GetFeatureRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetFeatureRequest.Merge(dst, src) } func (m *UIServiceTypes_GetFeatureRequest) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetFeatureRequest.Size(m) @@ -362,17 +354,16 @@ func (m *UIServiceTypes_GetFeatureResponse) Reset() { *m = UIServiceType func (m *UIServiceTypes_GetFeatureResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetFeatureResponse) ProtoMessage() {} func (*UIServiceTypes_GetFeatureResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 6} + return fileDescriptor_UIService_04866529701c634c, []int{0, 6} } - func (m *UIServiceTypes_GetFeatureResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetFeatureResponse.Unmarshal(m, b) } func (m *UIServiceTypes_GetFeatureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetFeatureResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetFeatureResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetFeatureResponse.Merge(m, src) +func (dst *UIServiceTypes_GetFeatureResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetFeatureResponse.Merge(dst, src) } func (m *UIServiceTypes_GetFeatureResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetFeatureResponse.Size(m) @@ -408,17 +399,16 @@ func (m *UIServiceTypes_ListFeaturesResponse) Reset() { *m = UIServiceTy func (m *UIServiceTypes_ListFeaturesResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_ListFeaturesResponse) ProtoMessage() {} func (*UIServiceTypes_ListFeaturesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 7} + return fileDescriptor_UIService_04866529701c634c, []int{0, 7} } - func (m *UIServiceTypes_ListFeaturesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_ListFeaturesResponse.Unmarshal(m, b) } func (m *UIServiceTypes_ListFeaturesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_ListFeaturesResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_ListFeaturesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_ListFeaturesResponse.Merge(m, src) +func (dst *UIServiceTypes_ListFeaturesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_ListFeaturesResponse.Merge(dst, src) } func (m *UIServiceTypes_ListFeaturesResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_ListFeaturesResponse.Size(m) @@ -449,17 +439,16 @@ func (m *UIServiceTypes_FeatureGroupDetail) Reset() { *m = UIServiceType func (m *UIServiceTypes_FeatureGroupDetail) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_FeatureGroupDetail) ProtoMessage() {} func (*UIServiceTypes_FeatureGroupDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 8} + return fileDescriptor_UIService_04866529701c634c, []int{0, 8} } - func (m *UIServiceTypes_FeatureGroupDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_FeatureGroupDetail.Unmarshal(m, b) } func (m *UIServiceTypes_FeatureGroupDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_FeatureGroupDetail.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_FeatureGroupDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_FeatureGroupDetail.Merge(m, src) +func (dst *UIServiceTypes_FeatureGroupDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_FeatureGroupDetail.Merge(dst, src) } func (m *UIServiceTypes_FeatureGroupDetail) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_FeatureGroupDetail.Size(m) @@ -495,17 +484,16 @@ func (m *UIServiceTypes_GetFeatureGroupRequest) Reset() { *m = UIService func (m *UIServiceTypes_GetFeatureGroupRequest) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetFeatureGroupRequest) ProtoMessage() {} func (*UIServiceTypes_GetFeatureGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 9} + return fileDescriptor_UIService_04866529701c634c, []int{0, 9} } - func (m *UIServiceTypes_GetFeatureGroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetFeatureGroupRequest.Unmarshal(m, b) } func (m *UIServiceTypes_GetFeatureGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetFeatureGroupRequest.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetFeatureGroupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetFeatureGroupRequest.Merge(m, src) +func (dst *UIServiceTypes_GetFeatureGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetFeatureGroupRequest.Merge(dst, src) } func (m *UIServiceTypes_GetFeatureGroupRequest) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetFeatureGroupRequest.Size(m) @@ -536,17 +524,16 @@ func (m *UIServiceTypes_GetFeatureGroupResponse) Reset() { func (m *UIServiceTypes_GetFeatureGroupResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetFeatureGroupResponse) ProtoMessage() {} func (*UIServiceTypes_GetFeatureGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 10} + return fileDescriptor_UIService_04866529701c634c, []int{0, 10} } - func (m *UIServiceTypes_GetFeatureGroupResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetFeatureGroupResponse.Unmarshal(m, b) } func (m *UIServiceTypes_GetFeatureGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetFeatureGroupResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetFeatureGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetFeatureGroupResponse.Merge(m, src) +func (dst *UIServiceTypes_GetFeatureGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetFeatureGroupResponse.Merge(dst, src) } func (m *UIServiceTypes_GetFeatureGroupResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetFeatureGroupResponse.Size(m) @@ -577,17 +564,16 @@ func (m *UIServiceTypes_ListFeatureGroupsResponse) Reset() { func (m *UIServiceTypes_ListFeatureGroupsResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_ListFeatureGroupsResponse) ProtoMessage() {} func (*UIServiceTypes_ListFeatureGroupsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 11} + return fileDescriptor_UIService_04866529701c634c, []int{0, 11} } - func (m *UIServiceTypes_ListFeatureGroupsResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_ListFeatureGroupsResponse.Unmarshal(m, b) } func (m *UIServiceTypes_ListFeatureGroupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_ListFeatureGroupsResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_ListFeatureGroupsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_ListFeatureGroupsResponse.Merge(m, src) +func (dst *UIServiceTypes_ListFeatureGroupsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_ListFeatureGroupsResponse.Merge(dst, src) } func (m *UIServiceTypes_ListFeatureGroupsResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_ListFeatureGroupsResponse.Size(m) @@ -618,17 +604,16 @@ func (m *UIServiceTypes_StorageDetail) Reset() { *m = UIServiceTypes_Sto func (m *UIServiceTypes_StorageDetail) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_StorageDetail) ProtoMessage() {} func (*UIServiceTypes_StorageDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 12} + return fileDescriptor_UIService_04866529701c634c, []int{0, 12} } - func (m *UIServiceTypes_StorageDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_StorageDetail.Unmarshal(m, b) } func (m *UIServiceTypes_StorageDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_StorageDetail.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_StorageDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_StorageDetail.Merge(m, src) +func (dst *UIServiceTypes_StorageDetail) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_StorageDetail.Merge(dst, src) } func (m *UIServiceTypes_StorageDetail) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_StorageDetail.Size(m) @@ -664,17 +649,16 @@ func (m *UIServiceTypes_GetStorageRequest) Reset() { *m = UIServiceTypes func (m *UIServiceTypes_GetStorageRequest) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetStorageRequest) ProtoMessage() {} func (*UIServiceTypes_GetStorageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 13} + return fileDescriptor_UIService_04866529701c634c, []int{0, 13} } - func (m *UIServiceTypes_GetStorageRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetStorageRequest.Unmarshal(m, b) } func (m *UIServiceTypes_GetStorageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetStorageRequest.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetStorageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetStorageRequest.Merge(m, src) +func (dst *UIServiceTypes_GetStorageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetStorageRequest.Merge(dst, src) } func (m *UIServiceTypes_GetStorageRequest) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetStorageRequest.Size(m) @@ -703,17 +687,16 @@ func (m *UIServiceTypes_GetStorageResponse) Reset() { *m = UIServiceType func (m *UIServiceTypes_GetStorageResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_GetStorageResponse) ProtoMessage() {} func (*UIServiceTypes_GetStorageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 14} + return fileDescriptor_UIService_04866529701c634c, []int{0, 14} } - func (m *UIServiceTypes_GetStorageResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_GetStorageResponse.Unmarshal(m, b) } func (m *UIServiceTypes_GetStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_GetStorageResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_GetStorageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_GetStorageResponse.Merge(m, src) +func (dst *UIServiceTypes_GetStorageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_GetStorageResponse.Merge(dst, src) } func (m *UIServiceTypes_GetStorageResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_GetStorageResponse.Size(m) @@ -742,17 +725,16 @@ func (m *UIServiceTypes_ListStorageResponse) Reset() { *m = UIServiceTyp func (m *UIServiceTypes_ListStorageResponse) String() string { return proto.CompactTextString(m) } func (*UIServiceTypes_ListStorageResponse) ProtoMessage() {} func (*UIServiceTypes_ListStorageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c13b3edb35d457e8, []int{0, 15} + return fileDescriptor_UIService_04866529701c634c, []int{0, 15} } - func (m *UIServiceTypes_ListStorageResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UIServiceTypes_ListStorageResponse.Unmarshal(m, b) } func (m *UIServiceTypes_ListStorageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_UIServiceTypes_ListStorageResponse.Marshal(b, m, deterministic) } -func (m *UIServiceTypes_ListStorageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UIServiceTypes_ListStorageResponse.Merge(m, src) +func (dst *UIServiceTypes_ListStorageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UIServiceTypes_ListStorageResponse.Merge(dst, src) } func (m *UIServiceTypes_ListStorageResponse) XXX_Size() int { return xxx_messageInfo_UIServiceTypes_ListStorageResponse.Size(m) @@ -790,61 +772,6 @@ func init() { proto.RegisterType((*UIServiceTypes_ListStorageResponse)(nil), "feast.core.UIServiceTypes.ListStorageResponse") } -func init() { proto.RegisterFile("feast/core/UIService.proto", fileDescriptor_c13b3edb35d457e8) } - -var fileDescriptor_c13b3edb35d457e8 = []byte{ - // 784 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xcd, 0x47, 0x49, 0x9a, 0x69, 0x5a, 0xe8, 0x82, 0xda, 0xb0, 0x50, 0x51, 0x99, 0x03, 0x91, - 0xda, 0xda, 0x6a, 0x28, 0x37, 0x24, 0xa4, 0xd2, 0x52, 0x21, 0x71, 0x00, 0xa7, 0x05, 0x0a, 0x5c, - 0x9c, 0x64, 0xe2, 0xba, 0x4d, 0x62, 0xd7, 0xde, 0x50, 0x05, 0x8e, 0x88, 0x1b, 0xfc, 0x26, 0xfe, - 0x16, 0x47, 0x94, 0xdd, 0xb5, 0xbd, 0x4e, 0x9a, 0xc4, 0xa9, 0xb8, 0x25, 0x3b, 0x33, 0x6f, 0x67, - 0xde, 0x9b, 0x19, 0x2f, 0xd0, 0x36, 0x5a, 0x01, 0x33, 0x9a, 0xae, 0x8f, 0xc6, 0xc9, 0xeb, 0x3a, - 0xfa, 0x5f, 0x9d, 0x26, 0xea, 0x9e, 0xef, 0x32, 0x97, 0x00, 0xb7, 0xe9, 0x43, 0x1b, 0x7d, 0x28, - 0xfc, 0x02, 0x0f, 0x9b, 0x81, 0x71, 0xd8, 0x63, 0x0e, 0x1b, 0xd4, 0x3d, 0x6c, 0x0a, 0x4f, 0xba, - 0xa1, 0x5a, 0x5f, 0xa1, 0xc5, 0xfa, 0x3e, 0x2a, 0x66, 0xed, 0x1a, 0xf3, 0x91, 0xef, 0xf6, 0xbd, - 0x49, 0x10, 0x75, 0xe6, 0xfa, 0x96, 0xad, 0x42, 0x3c, 0xb0, 0x5d, 0xd7, 0xee, 0xa0, 0xc1, 0xff, - 0x35, 0xfa, 0x6d, 0x03, 0xbb, 0x1e, 0x1b, 0x48, 0xe3, 0xa3, 0x51, 0x23, 0x73, 0xba, 0x18, 0x30, - 0xab, 0xeb, 0x09, 0x07, 0xed, 0x6f, 0x19, 0x56, 0xa2, 0xea, 0x8e, 0x07, 0x1e, 0x06, 0xf4, 0x77, - 0x16, 0xca, 0xa2, 0x8e, 0x03, 0x64, 0x96, 0xd3, 0x21, 0x5b, 0xb0, 0x30, 0xbc, 0xbc, 0x92, 0xdd, - 0xcc, 0x56, 0x97, 0x6a, 0xeb, 0xba, 0x28, 0x9e, 0xe7, 0xa3, 0xc7, 0x05, 0x9b, 0xdc, 0x89, 0x10, - 0x58, 0x38, 0x77, 0x1b, 0x41, 0x25, 0xb7, 0x99, 0xaf, 0x96, 0x4c, 0xfe, 0x9b, 0x3c, 0x87, 0xa5, - 0x8e, 0x15, 0xb0, 0x13, 0xaf, 0x65, 0x31, 0x6c, 0x55, 0xf2, 0x1c, 0x87, 0xea, 0x22, 0x37, 0x3d, - 0xcc, 0x4d, 0x3f, 0x0e, 0x73, 0x33, 0x55, 0x77, 0xaa, 0xc1, 0x9d, 0x23, 0x64, 0xe2, 0x22, 0x13, - 0x2f, 0xfb, 0x18, 0x30, 0xb2, 0x02, 0x39, 0xa7, 0xc5, 0x13, 0x2a, 0x99, 0x39, 0xa7, 0x45, 0x8f, - 0x61, 0x55, 0xf1, 0x09, 0x3c, 0xb7, 0x17, 0x20, 0x79, 0x01, 0x05, 0xe4, 0x27, 0x32, 0xf3, 0x27, - 0x7a, 0x2c, 0x9b, 0x9e, 0x2c, 0x5a, 0x57, 0x0b, 0x36, 0x65, 0x18, 0xfd, 0x0c, 0xf7, 0xde, 0x38, - 0x81, 0x80, 0x75, 0x30, 0x88, 0x80, 0x5f, 0xc2, 0x22, 0xca, 0xb3, 0x4a, 0x76, 0x33, 0x3f, 0x0f, - 0x74, 0x14, 0x48, 0x7f, 0xe4, 0x60, 0x59, 0x2a, 0x2e, 0x79, 0xde, 0x4e, 0xf0, 0x5c, 0x49, 0xf0, - 0xac, 0xb4, 0x8e, 0x24, 0x5a, 0x83, 0x72, 0xc3, 0xb1, 0x2f, 0xfb, 0xe8, 0x0f, 0xde, 0x3b, 0x78, - 0x55, 0xc9, 0x71, 0x32, 0x12, 0x67, 0xa4, 0x02, 0x45, 0xec, 0x59, 0x8d, 0x8e, 0x24, 0x7d, 0xd1, - 0x0c, 0xff, 0x46, 0x32, 0x2d, 0x4c, 0x96, 0xe9, 0xd6, 0x5c, 0x32, 0x91, 0x3d, 0x28, 0x36, 0x7d, - 0xe4, 0x91, 0x85, 0x99, 0x91, 0xa1, 0x2b, 0x7d, 0xcc, 0x85, 0x93, 0xd5, 0x4d, 0x52, 0xf7, 0x57, - 0x16, 0x88, 0xea, 0x25, 0x65, 0xd8, 0x87, 0x62, 0x5b, 0x1c, 0x49, 0xca, 0xaa, 0x53, 0x54, 0x48, - 0x50, 0x6d, 0x86, 0x81, 0xa4, 0x06, 0x45, 0xdf, 0xba, 0x1a, 0xd2, 0xca, 0x09, 0x9c, 0x46, 0x7b, - 0xe8, 0x48, 0xbf, 0x88, 0xb6, 0x90, 0xb6, 0xb8, 0x2d, 0x0e, 0x60, 0x51, 0xc2, 0x86, 0x6d, 0x91, - 0x3e, 0xa1, 0x28, 0x92, 0xfe, 0xcc, 0x02, 0x51, 0x37, 0x81, 0x6c, 0x8e, 0xdd, 0x44, 0x73, 0x6c, - 0x5c, 0x97, 0x65, 0xb4, 0x38, 0x64, 0x87, 0x8c, 0xe8, 0x99, 0x9b, 0x6f, 0xec, 0xaa, 0xb0, 0x16, - 0x73, 0xce, 0xa1, 0x27, 0xc9, 0xd3, 0x81, 0xf5, 0x31, 0x4f, 0x49, 0xc9, 0x3b, 0x28, 0xb7, 0x95, - 0x73, 0x99, 0xfd, 0xce, 0x6c, 0x5a, 0x94, 0xd2, 0xcd, 0x04, 0x04, 0xf5, 0xe0, 0xbe, 0xc2, 0x3e, - 0x3f, 0x8b, 0x25, 0xa8, 0xc3, 0xb2, 0xea, 0x1c, 0xea, 0x30, 0xe7, 0x85, 0x49, 0x0c, 0xfa, 0x1d, - 0x96, 0xe5, 0xda, 0x4d, 0x31, 0xa8, 0xca, 0x82, 0xfe, 0x2f, 0x32, 0x88, 0x01, 0x91, 0xa8, 0x93, - 0x14, 0xf8, 0xc8, 0xe7, 0x23, 0x72, 0x8a, 0xe7, 0x23, 0x10, 0x47, 0x29, 0xe6, 0x23, 0x51, 0xa1, - 0x19, 0x06, 0xd2, 0x53, 0xb8, 0x3b, 0x64, 0x7b, 0x2a, 0x74, 0xfe, 0x46, 0xd0, 0xb5, 0x3f, 0x05, - 0x28, 0x45, 0x9e, 0xe4, 0x0c, 0x4a, 0xd1, 0x06, 0x27, 0x5b, 0x53, 0xd0, 0x46, 0xbf, 0x05, 0x74, - 0x3b, 0x9d, 0xb3, 0xc8, 0x5c, 0xcb, 0x90, 0x53, 0x28, 0xab, 0x5b, 0x9d, 0xac, 0x8d, 0x49, 0x71, - 0x38, 0xfc, 0x82, 0x52, 0x63, 0x0a, 0xee, 0x75, 0x9f, 0x05, 0x2d, 0x43, 0x2e, 0x00, 0xe2, 0x49, - 0x20, 0x33, 0x12, 0x4b, 0x2e, 0x3d, 0xba, 0x93, 0xd2, 0x7b, 0xb4, 0x8e, 0x70, 0x0d, 0xdd, 0xb8, - 0x8e, 0xd1, 0x3d, 0xa6, 0x65, 0xc8, 0x37, 0xb8, 0x3d, 0x32, 0xd1, 0x64, 0x37, 0x55, 0x7a, 0xea, - 0x9e, 0xa0, 0xb5, 0x79, 0x42, 0xa2, 0xbb, 0x9b, 0xb0, 0x3a, 0x36, 0xdf, 0x13, 0x6b, 0xdb, 0x4b, - 0x57, 0x5b, 0x72, 0x4b, 0x44, 0x42, 0xc9, 0xc6, 0x9c, 0x25, 0x54, 0x72, 0xf8, 0x66, 0x09, 0x35, - 0x32, 0x2a, 0x5a, 0x86, 0x7c, 0x80, 0x25, 0x65, 0x86, 0x26, 0xd6, 0xa2, 0xcf, 0xa8, 0x65, 0x0c, - 0x78, 0xbf, 0x0e, 0xca, 0x43, 0x74, 0x3f, 0x7e, 0xc7, 0xbd, 0x1d, 0x02, 0x7f, 0x7a, 0x66, 0x3b, - 0xec, 0xac, 0xdf, 0xd0, 0x9b, 0x6e, 0xd7, 0xb0, 0xdd, 0x73, 0xbc, 0x30, 0xc4, 0x43, 0x92, 0x5f, - 0x1b, 0x18, 0x36, 0xf6, 0xd0, 0x1f, 0xae, 0x18, 0xc3, 0x76, 0x8d, 0xf8, 0xad, 0xdb, 0x28, 0x70, - 0xfb, 0xd3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x76, 0x0d, 0x62, 0x00, 0x0b, 0x00, 0x00, -} - // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -858,34 +785,34 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type UIServiceClient interface { // - //Get entity specified in request. - //This process returns a single of entity specs. + // Get entity specified in request. + // This process returns a single of entity specs. GetEntity(ctx context.Context, in *UIServiceTypes_GetEntityRequest, opts ...grpc.CallOption) (*UIServiceTypes_GetEntityResponse, error) // - //Get all entities. - //This process returns a list of entity specs. + // Get all entities. + // This process returns a list of entity specs. ListEntities(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UIServiceTypes_ListEntitiesResponse, error) // - //Get feature specified in request. + // Get feature specified in request. GetFeature(ctx context.Context, in *UIServiceTypes_GetFeatureRequest, opts ...grpc.CallOption) (*UIServiceTypes_GetFeatureResponse, error) // - //Get all features. - //This process returns a list of feature specs. + // Get all features. + // This process returns a list of feature specs. ListFeatures(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UIServiceTypes_ListFeaturesResponse, error) // - //Get feature group specified in request. + // Get feature group specified in request. GetFeatureGroup(ctx context.Context, in *UIServiceTypes_GetFeatureGroupRequest, opts ...grpc.CallOption) (*UIServiceTypes_GetFeatureGroupResponse, error) // - //Get all feature groups. - //This process returns a list of feature group specs. + // Get all feature groups. + // This process returns a list of feature group specs. ListFeatureGroups(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UIServiceTypes_ListFeatureGroupsResponse, error) // - //Get storage spec specified in request. + // Get storage spec specified in request. // GetStorage(ctx context.Context, in *UIServiceTypes_GetStorageRequest, opts ...grpc.CallOption) (*UIServiceTypes_GetStorageResponse, error) // - //Get all storage specs. - //This process returns a list of storage specs. + // Get all storage specs. + // This process returns a list of storage specs. ListStorage(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UIServiceTypes_ListStorageResponse, error) } @@ -972,66 +899,37 @@ func (c *uIServiceClient) ListStorage(ctx context.Context, in *empty.Empty, opts // UIServiceServer is the server API for UIService service. type UIServiceServer interface { // - //Get entity specified in request. - //This process returns a single of entity specs. + // Get entity specified in request. + // This process returns a single of entity specs. GetEntity(context.Context, *UIServiceTypes_GetEntityRequest) (*UIServiceTypes_GetEntityResponse, error) // - //Get all entities. - //This process returns a list of entity specs. + // Get all entities. + // This process returns a list of entity specs. ListEntities(context.Context, *empty.Empty) (*UIServiceTypes_ListEntitiesResponse, error) // - //Get feature specified in request. + // Get feature specified in request. GetFeature(context.Context, *UIServiceTypes_GetFeatureRequest) (*UIServiceTypes_GetFeatureResponse, error) // - //Get all features. - //This process returns a list of feature specs. + // Get all features. + // This process returns a list of feature specs. ListFeatures(context.Context, *empty.Empty) (*UIServiceTypes_ListFeaturesResponse, error) // - //Get feature group specified in request. + // Get feature group specified in request. GetFeatureGroup(context.Context, *UIServiceTypes_GetFeatureGroupRequest) (*UIServiceTypes_GetFeatureGroupResponse, error) // - //Get all feature groups. - //This process returns a list of feature group specs. + // Get all feature groups. + // This process returns a list of feature group specs. ListFeatureGroups(context.Context, *empty.Empty) (*UIServiceTypes_ListFeatureGroupsResponse, error) // - //Get storage spec specified in request. + // Get storage spec specified in request. // GetStorage(context.Context, *UIServiceTypes_GetStorageRequest) (*UIServiceTypes_GetStorageResponse, error) // - //Get all storage specs. - //This process returns a list of storage specs. + // Get all storage specs. + // This process returns a list of storage specs. ListStorage(context.Context, *empty.Empty) (*UIServiceTypes_ListStorageResponse, error) } -// UnimplementedUIServiceServer can be embedded to have forward compatible implementations. -type UnimplementedUIServiceServer struct { -} - -func (*UnimplementedUIServiceServer) GetEntity(ctx context.Context, req *UIServiceTypes_GetEntityRequest) (*UIServiceTypes_GetEntityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEntity not implemented") -} -func (*UnimplementedUIServiceServer) ListEntities(ctx context.Context, req *empty.Empty) (*UIServiceTypes_ListEntitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListEntities not implemented") -} -func (*UnimplementedUIServiceServer) GetFeature(ctx context.Context, req *UIServiceTypes_GetFeatureRequest) (*UIServiceTypes_GetFeatureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeature not implemented") -} -func (*UnimplementedUIServiceServer) ListFeatures(ctx context.Context, req *empty.Empty) (*UIServiceTypes_ListFeaturesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListFeatures not implemented") -} -func (*UnimplementedUIServiceServer) GetFeatureGroup(ctx context.Context, req *UIServiceTypes_GetFeatureGroupRequest) (*UIServiceTypes_GetFeatureGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeatureGroup not implemented") -} -func (*UnimplementedUIServiceServer) ListFeatureGroups(ctx context.Context, req *empty.Empty) (*UIServiceTypes_ListFeatureGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListFeatureGroups not implemented") -} -func (*UnimplementedUIServiceServer) GetStorage(ctx context.Context, req *UIServiceTypes_GetStorageRequest) (*UIServiceTypes_GetStorageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStorage not implemented") -} -func (*UnimplementedUIServiceServer) ListStorage(ctx context.Context, req *empty.Empty) (*UIServiceTypes_ListStorageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListStorage not implemented") -} - func RegisterUIServiceServer(s *grpc.Server, srv UIServiceServer) { s.RegisterService(&_UIService_serviceDesc, srv) } @@ -1220,3 +1118,60 @@ var _UIService_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "feast/core/UIService.proto", } + +func init() { + proto.RegisterFile("feast/core/UIService.proto", fileDescriptor_UIService_04866529701c634c) +} + +var fileDescriptor_UIService_04866529701c634c = []byte{ + // 784 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xcd, 0x47, 0x49, 0x9a, 0x69, 0x5a, 0xe8, 0x82, 0xda, 0xb0, 0x50, 0x51, 0x99, 0x03, 0x91, + 0xda, 0xda, 0x6a, 0x28, 0x37, 0x24, 0xa4, 0xd2, 0x52, 0x21, 0x71, 0x00, 0xa7, 0x05, 0x0a, 0x5c, + 0x9c, 0x64, 0xe2, 0xba, 0x4d, 0x62, 0xd7, 0xde, 0x50, 0x05, 0x8e, 0x88, 0x1b, 0xfc, 0x26, 0xfe, + 0x16, 0x47, 0x94, 0xdd, 0xb5, 0xbd, 0x4e, 0x9a, 0xc4, 0xa9, 0xb8, 0x25, 0x3b, 0x33, 0x6f, 0x67, + 0xde, 0x9b, 0x19, 0x2f, 0xd0, 0x36, 0x5a, 0x01, 0x33, 0x9a, 0xae, 0x8f, 0xc6, 0xc9, 0xeb, 0x3a, + 0xfa, 0x5f, 0x9d, 0x26, 0xea, 0x9e, 0xef, 0x32, 0x97, 0x00, 0xb7, 0xe9, 0x43, 0x1b, 0x7d, 0x28, + 0xfc, 0x02, 0x0f, 0x9b, 0x81, 0x71, 0xd8, 0x63, 0x0e, 0x1b, 0xd4, 0x3d, 0x6c, 0x0a, 0x4f, 0xba, + 0xa1, 0x5a, 0x5f, 0xa1, 0xc5, 0xfa, 0x3e, 0x2a, 0x66, 0xed, 0x1a, 0xf3, 0x91, 0xef, 0xf6, 0xbd, + 0x49, 0x10, 0x75, 0xe6, 0xfa, 0x96, 0xad, 0x42, 0x3c, 0xb0, 0x5d, 0xd7, 0xee, 0xa0, 0xc1, 0xff, + 0x35, 0xfa, 0x6d, 0x03, 0xbb, 0x1e, 0x1b, 0x48, 0xe3, 0xa3, 0x51, 0x23, 0x73, 0xba, 0x18, 0x30, + 0xab, 0xeb, 0x09, 0x07, 0xed, 0x6f, 0x19, 0x56, 0xa2, 0xea, 0x8e, 0x07, 0x1e, 0x06, 0xf4, 0x77, + 0x16, 0xca, 0xa2, 0x8e, 0x03, 0x64, 0x96, 0xd3, 0x21, 0x5b, 0xb0, 0x30, 0xbc, 0xbc, 0x92, 0xdd, + 0xcc, 0x56, 0x97, 0x6a, 0xeb, 0xba, 0x28, 0x9e, 0xe7, 0xa3, 0xc7, 0x05, 0x9b, 0xdc, 0x89, 0x10, + 0x58, 0x38, 0x77, 0x1b, 0x41, 0x25, 0xb7, 0x99, 0xaf, 0x96, 0x4c, 0xfe, 0x9b, 0x3c, 0x87, 0xa5, + 0x8e, 0x15, 0xb0, 0x13, 0xaf, 0x65, 0x31, 0x6c, 0x55, 0xf2, 0x1c, 0x87, 0xea, 0x22, 0x37, 0x3d, + 0xcc, 0x4d, 0x3f, 0x0e, 0x73, 0x33, 0x55, 0x77, 0xaa, 0xc1, 0x9d, 0x23, 0x64, 0xe2, 0x22, 0x13, + 0x2f, 0xfb, 0x18, 0x30, 0xb2, 0x02, 0x39, 0xa7, 0xc5, 0x13, 0x2a, 0x99, 0x39, 0xa7, 0x45, 0x8f, + 0x61, 0x55, 0xf1, 0x09, 0x3c, 0xb7, 0x17, 0x20, 0x79, 0x01, 0x05, 0xe4, 0x27, 0x32, 0xf3, 0x27, + 0x7a, 0x2c, 0x9b, 0x9e, 0x2c, 0x5a, 0x57, 0x0b, 0x36, 0x65, 0x18, 0xfd, 0x0c, 0xf7, 0xde, 0x38, + 0x81, 0x80, 0x75, 0x30, 0x88, 0x80, 0x5f, 0xc2, 0x22, 0xca, 0xb3, 0x4a, 0x76, 0x33, 0x3f, 0x0f, + 0x74, 0x14, 0x48, 0x7f, 0xe4, 0x60, 0x59, 0x2a, 0x2e, 0x79, 0xde, 0x4e, 0xf0, 0x5c, 0x49, 0xf0, + 0xac, 0xb4, 0x8e, 0x24, 0x5a, 0x83, 0x72, 0xc3, 0xb1, 0x2f, 0xfb, 0xe8, 0x0f, 0xde, 0x3b, 0x78, + 0x55, 0xc9, 0x71, 0x32, 0x12, 0x67, 0xa4, 0x02, 0x45, 0xec, 0x59, 0x8d, 0x8e, 0x24, 0x7d, 0xd1, + 0x0c, 0xff, 0x46, 0x32, 0x2d, 0x4c, 0x96, 0xe9, 0xd6, 0x5c, 0x32, 0x91, 0x3d, 0x28, 0x36, 0x7d, + 0xe4, 0x91, 0x85, 0x99, 0x91, 0xa1, 0x2b, 0x7d, 0xcc, 0x85, 0x93, 0xd5, 0x4d, 0x52, 0xf7, 0x57, + 0x16, 0x88, 0xea, 0x25, 0x65, 0xd8, 0x87, 0x62, 0x5b, 0x1c, 0x49, 0xca, 0xaa, 0x53, 0x54, 0x48, + 0x50, 0x6d, 0x86, 0x81, 0xa4, 0x06, 0x45, 0xdf, 0xba, 0x1a, 0xd2, 0xca, 0x09, 0x9c, 0x46, 0x7b, + 0xe8, 0x48, 0xbf, 0x88, 0xb6, 0x90, 0xb6, 0xb8, 0x2d, 0x0e, 0x60, 0x51, 0xc2, 0x86, 0x6d, 0x91, + 0x3e, 0xa1, 0x28, 0x92, 0xfe, 0xcc, 0x02, 0x51, 0x37, 0x81, 0x6c, 0x8e, 0xdd, 0x44, 0x73, 0x6c, + 0x5c, 0x97, 0x65, 0xb4, 0x38, 0x64, 0x87, 0x8c, 0xe8, 0x99, 0x9b, 0x6f, 0xec, 0xaa, 0xb0, 0x16, + 0x73, 0xce, 0xa1, 0x27, 0xc9, 0xd3, 0x81, 0xf5, 0x31, 0x4f, 0x49, 0xc9, 0x3b, 0x28, 0xb7, 0x95, + 0x73, 0x99, 0xfd, 0xce, 0x6c, 0x5a, 0x94, 0xd2, 0xcd, 0x04, 0x04, 0xf5, 0xe0, 0xbe, 0xc2, 0x3e, + 0x3f, 0x8b, 0x25, 0xa8, 0xc3, 0xb2, 0xea, 0x1c, 0xea, 0x30, 0xe7, 0x85, 0x49, 0x0c, 0xfa, 0x1d, + 0x96, 0xe5, 0xda, 0x4d, 0x31, 0xa8, 0xca, 0x82, 0xfe, 0x2f, 0x32, 0x88, 0x01, 0x91, 0xa8, 0x93, + 0x14, 0xf8, 0xc8, 0xe7, 0x23, 0x72, 0x8a, 0xe7, 0x23, 0x10, 0x47, 0x29, 0xe6, 0x23, 0x51, 0xa1, + 0x19, 0x06, 0xd2, 0x53, 0xb8, 0x3b, 0x64, 0x7b, 0x2a, 0x74, 0xfe, 0x46, 0xd0, 0xb5, 0x3f, 0x05, + 0x28, 0x45, 0x9e, 0xe4, 0x0c, 0x4a, 0xd1, 0x06, 0x27, 0x5b, 0x53, 0xd0, 0x46, 0xbf, 0x05, 0x74, + 0x3b, 0x9d, 0xb3, 0xc8, 0x5c, 0xcb, 0x90, 0x53, 0x28, 0xab, 0x5b, 0x9d, 0xac, 0x8d, 0x49, 0x71, + 0x38, 0xfc, 0x82, 0x52, 0x63, 0x0a, 0xee, 0x75, 0x9f, 0x05, 0x2d, 0x43, 0x2e, 0x00, 0xe2, 0x49, + 0x20, 0x33, 0x12, 0x4b, 0x2e, 0x3d, 0xba, 0x93, 0xd2, 0x7b, 0xb4, 0x8e, 0x70, 0x0d, 0xdd, 0xb8, + 0x8e, 0xd1, 0x3d, 0xa6, 0x65, 0xc8, 0x37, 0xb8, 0x3d, 0x32, 0xd1, 0x64, 0x37, 0x55, 0x7a, 0xea, + 0x9e, 0xa0, 0xb5, 0x79, 0x42, 0xa2, 0xbb, 0x9b, 0xb0, 0x3a, 0x36, 0xdf, 0x13, 0x6b, 0xdb, 0x4b, + 0x57, 0x5b, 0x72, 0x4b, 0x44, 0x42, 0xc9, 0xc6, 0x9c, 0x25, 0x54, 0x72, 0xf8, 0x66, 0x09, 0x35, + 0x32, 0x2a, 0x5a, 0x86, 0x7c, 0x80, 0x25, 0x65, 0x86, 0x26, 0xd6, 0xa2, 0xcf, 0xa8, 0x65, 0x0c, + 0x78, 0xbf, 0x0e, 0xca, 0x43, 0x74, 0x3f, 0x7e, 0xc7, 0xbd, 0x1d, 0x02, 0x7f, 0x7a, 0x66, 0x3b, + 0xec, 0xac, 0xdf, 0xd0, 0x9b, 0x6e, 0xd7, 0xb0, 0xdd, 0x73, 0xbc, 0x30, 0xc4, 0x43, 0x92, 0x5f, + 0x1b, 0x18, 0x36, 0xf6, 0xd0, 0x1f, 0xae, 0x18, 0xc3, 0x76, 0x8d, 0xf8, 0xad, 0xdb, 0x28, 0x70, + 0xfb, 0xd3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x76, 0x0d, 0x62, 0x00, 0x0b, 0x00, 0x00, +} diff --git a/protos/generated/go/feast/serving/Serving.pb.go b/protos/generated/go/feast/serving/Serving.pb.go index c2366dafa9..6f61517bee 100644 --- a/protos/generated/go/feast/serving/Serving.pb.go +++ b/protos/generated/go/feast/serving/Serving.pb.go @@ -1,18 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/serving/Serving.proto -package serving +package serving // import "github.com/gojek/feast/protos/generated/go/feast/serving" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import types "github.com/gojek/feast/protos/generated/go/feast/types" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" import ( - context "context" - fmt "fmt" - types "github.com/gojek/feast/protos/generated/go/feast/types" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -24,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type QueryFeaturesRequest struct { // e.g. "driver", "customer", "city". @@ -45,17 +44,16 @@ func (m *QueryFeaturesRequest) Reset() { *m = QueryFeaturesRequest{} } func (m *QueryFeaturesRequest) String() string { return proto.CompactTextString(m) } func (*QueryFeaturesRequest) ProtoMessage() {} func (*QueryFeaturesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7609de6de542e6f0, []int{0} + return fileDescriptor_Serving_f91320f9a3f0c4cf, []int{0} } - func (m *QueryFeaturesRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryFeaturesRequest.Unmarshal(m, b) } func (m *QueryFeaturesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_QueryFeaturesRequest.Marshal(b, m, deterministic) } -func (m *QueryFeaturesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryFeaturesRequest.Merge(m, src) +func (dst *QueryFeaturesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeaturesRequest.Merge(dst, src) } func (m *QueryFeaturesRequest) XXX_Size() int { return xxx_messageInfo_QueryFeaturesRequest.Size(m) @@ -101,17 +99,16 @@ func (m *QueryFeaturesResponse) Reset() { *m = QueryFeaturesResponse{} } func (m *QueryFeaturesResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeaturesResponse) ProtoMessage() {} func (*QueryFeaturesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7609de6de542e6f0, []int{1} + return fileDescriptor_Serving_f91320f9a3f0c4cf, []int{1} } - func (m *QueryFeaturesResponse) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QueryFeaturesResponse.Unmarshal(m, b) } func (m *QueryFeaturesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_QueryFeaturesResponse.Marshal(b, m, deterministic) } -func (m *QueryFeaturesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryFeaturesResponse.Merge(m, src) +func (dst *QueryFeaturesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeaturesResponse.Merge(dst, src) } func (m *QueryFeaturesResponse) XXX_Size() int { return xxx_messageInfo_QueryFeaturesResponse.Size(m) @@ -148,17 +145,16 @@ func (m *Entity) Reset() { *m = Entity{} } func (m *Entity) String() string { return proto.CompactTextString(m) } func (*Entity) ProtoMessage() {} func (*Entity) Descriptor() ([]byte, []int) { - return fileDescriptor_7609de6de542e6f0, []int{2} + return fileDescriptor_Serving_f91320f9a3f0c4cf, []int{2} } - func (m *Entity) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Entity.Unmarshal(m, b) } func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Entity.Marshal(b, m, deterministic) } -func (m *Entity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Entity.Merge(m, src) +func (dst *Entity) XXX_Merge(src proto.Message) { + xxx_messageInfo_Entity.Merge(dst, src) } func (m *Entity) XXX_Size() int { return xxx_messageInfo_Entity.Size(m) @@ -190,17 +186,16 @@ func (m *FeatureValue) Reset() { *m = FeatureValue{} } func (m *FeatureValue) String() string { return proto.CompactTextString(m) } func (*FeatureValue) ProtoMessage() {} func (*FeatureValue) Descriptor() ([]byte, []int) { - return fileDescriptor_7609de6de542e6f0, []int{3} + return fileDescriptor_Serving_f91320f9a3f0c4cf, []int{3} } - func (m *FeatureValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FeatureValue.Unmarshal(m, b) } func (m *FeatureValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FeatureValue.Marshal(b, m, deterministic) } -func (m *FeatureValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureValue.Merge(m, src) +func (dst *FeatureValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeatureValue.Merge(dst, src) } func (m *FeatureValue) XXX_Size() int { return xxx_messageInfo_FeatureValue.Size(m) @@ -234,39 +229,6 @@ func init() { proto.RegisterType((*FeatureValue)(nil), "feast.serving.FeatureValue") } -func init() { proto.RegisterFile("feast/serving/Serving.proto", fileDescriptor_7609de6de542e6f0) } - -var fileDescriptor_7609de6de542e6f0 = []byte{ - // 429 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xd1, 0x8a, 0xd3, 0x40, - 0x14, 0x75, 0x5a, 0x5c, 0x36, 0x77, 0x0d, 0xca, 0xe0, 0x62, 0xc8, 0x8a, 0x96, 0xac, 0x0f, 0x01, - 0x61, 0x06, 0xe3, 0x4b, 0xf1, 0x45, 0x5c, 0x58, 0xa1, 0x2f, 0x4b, 0x8d, 0x22, 0x52, 0x7c, 0x49, - 0xed, 0x6d, 0x4c, 0xdb, 0x64, 0x62, 0x66, 0x52, 0xc8, 0xf7, 0xf8, 0x59, 0xfe, 0x8c, 0x74, 0x66, - 0xd2, 0x26, 0xa5, 0xe8, 0x3e, 0x25, 0x33, 0xe7, 0xde, 0x73, 0xce, 0xcc, 0x3d, 0x03, 0x57, 0x4b, - 0x4c, 0xa4, 0xe2, 0x12, 0xab, 0x6d, 0x56, 0xa4, 0xfc, 0xb3, 0xf9, 0xb2, 0xb2, 0x12, 0x4a, 0x50, - 0x57, 0x83, 0xcc, 0x82, 0xfe, 0xcb, 0x54, 0x88, 0x74, 0x83, 0x5c, 0x83, 0xf3, 0x7a, 0xc9, 0x55, - 0x96, 0xa3, 0x54, 0x49, 0x5e, 0x9a, 0x7a, 0xff, 0x99, 0x21, 0x53, 0x4d, 0x89, 0x92, 0x7f, 0x4d, - 0x36, 0x35, 0x1a, 0x20, 0x28, 0xe1, 0xe9, 0xa7, 0x1a, 0xab, 0xe6, 0x23, 0x26, 0xaa, 0xae, 0x50, - 0xc6, 0xf8, 0xab, 0x46, 0xa9, 0xe8, 0x0b, 0x00, 0x2c, 0x54, 0xa6, 0x9a, 0xbb, 0x24, 0x47, 0x8f, - 0x8c, 0x48, 0xe8, 0xc4, 0x9d, 0x1d, 0xea, 0xc3, 0xb9, 0x59, 0x4d, 0x16, 0xde, 0x60, 0x34, 0x0c, - 0x9d, 0x78, 0xbf, 0xa6, 0xcf, 0xc1, 0x59, 0x1a, 0xba, 0xc9, 0xc2, 0x1b, 0x6a, 0xf0, 0xb0, 0x11, - 0xfc, 0x21, 0x70, 0x79, 0x24, 0x29, 0x4b, 0x51, 0x48, 0xfc, 0xaf, 0xe6, 0x9d, 0xd5, 0xcc, 0x50, - 0x6a, 0xcd, 0x8b, 0x28, 0x62, 0xbd, 0x7b, 0x60, 0x27, 0x79, 0xd9, 0xad, 0x6d, 0xba, 0x2d, 0x54, - 0xd5, 0xc4, 0x7b, 0x0e, 0x3f, 0x06, 0xb7, 0x07, 0xd1, 0x27, 0x30, 0x5c, 0x63, 0x63, 0x95, 0x77, - 0xbf, 0xf4, 0x35, 0x3c, 0xdc, 0xee, 0x6e, 0xcb, 0x1b, 0x8c, 0x48, 0x78, 0x11, 0x5d, 0x1e, 0xe9, - 0xe9, 0xf6, 0x26, 0x36, 0x35, 0xef, 0x06, 0x63, 0x12, 0xfc, 0x26, 0x70, 0x66, 0x76, 0xe9, 0x7b, - 0x38, 0xb7, 0xa7, 0x96, 0x1e, 0xd1, 0x76, 0xaf, 0x4f, 0xb6, 0xb3, 0xd6, 0xb0, 0xf5, 0xd7, 0x36, - 0xf9, 0xdf, 0xc0, 0xed, 0x41, 0x27, 0xfc, 0xbd, 0xe9, 0xfb, 0xbb, 0x3a, 0x12, 0xb0, 0xed, 0x7a, - 0xe0, 0x5d, 0x97, 0x15, 0x3c, 0xea, 0x42, 0x34, 0x6c, 0x69, 0x88, 0xa6, 0xa1, 0x96, 0x46, 0xc7, - 0x85, 0x75, 0xbb, 0xe9, 0x18, 0x9c, 0x7d, 0xb6, 0xac, 0xa8, 0xcf, 0x4c, 0xfa, 0x58, 0x9b, 0x3e, - 0xf6, 0xa5, 0xad, 0x88, 0x0f, 0xc5, 0xd1, 0x0a, 0xc0, 0x66, 0xf8, 0xc3, 0x74, 0x42, 0xbf, 0x83, - 0xdb, 0x1b, 0x16, 0xbd, 0xfe, 0xf7, 0x28, 0x75, 0x2a, 0xfd, 0x57, 0xf7, 0x99, 0x77, 0xf0, 0xe0, - 0x66, 0x06, 0xfd, 0x07, 0x72, 0xf3, 0xf8, 0x20, 0x3d, 0xdd, 0xb9, 0x9c, 0x8d, 0xd3, 0x4c, 0xfd, - 0xac, 0xe7, 0xec, 0x87, 0xc8, 0x79, 0x2a, 0x56, 0xb8, 0xe6, 0xe6, 0x85, 0xe8, 0x33, 0x48, 0x9e, - 0x62, 0x81, 0x55, 0xa2, 0x70, 0xc1, 0x53, 0xc1, 0x7b, 0x0f, 0x71, 0x7e, 0xa6, 0x4b, 0xde, 0xfe, - 0x0d, 0x00, 0x00, 0xff, 0xff, 0x77, 0xb5, 0x0e, 0xd1, 0xa0, 0x03, 0x00, 0x00, -} - // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn @@ -306,14 +268,6 @@ type ServingAPIServer interface { QueryFeatures(context.Context, *QueryFeaturesRequest) (*QueryFeaturesResponse, error) } -// UnimplementedServingAPIServer can be embedded to have forward compatible implementations. -type UnimplementedServingAPIServer struct { -} - -func (*UnimplementedServingAPIServer) QueryFeatures(ctx context.Context, req *QueryFeaturesRequest) (*QueryFeaturesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryFeatures not implemented") -} - func RegisterServingAPIServer(s *grpc.Server, srv ServingAPIServer) { s.RegisterService(&_ServingAPI_serviceDesc, srv) } @@ -348,3 +302,38 @@ var _ServingAPI_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "feast/serving/Serving.proto", } + +func init() { + proto.RegisterFile("feast/serving/Serving.proto", fileDescriptor_Serving_f91320f9a3f0c4cf) +} + +var fileDescriptor_Serving_f91320f9a3f0c4cf = []byte{ + // 429 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xd1, 0x8a, 0xd3, 0x40, + 0x14, 0x75, 0x5a, 0x5c, 0x36, 0x77, 0x0d, 0xca, 0xe0, 0x62, 0xc8, 0x8a, 0x96, 0xac, 0x0f, 0x01, + 0x61, 0x06, 0xe3, 0x4b, 0xf1, 0x45, 0x5c, 0x58, 0xa1, 0x2f, 0x4b, 0x8d, 0x22, 0x52, 0x7c, 0x49, + 0xed, 0x6d, 0x4c, 0xdb, 0x64, 0x62, 0x66, 0x52, 0xc8, 0xf7, 0xf8, 0x59, 0xfe, 0x8c, 0x74, 0x66, + 0xd2, 0x26, 0xa5, 0xe8, 0x3e, 0x25, 0x33, 0xe7, 0xde, 0x73, 0xce, 0xcc, 0x3d, 0x03, 0x57, 0x4b, + 0x4c, 0xa4, 0xe2, 0x12, 0xab, 0x6d, 0x56, 0xa4, 0xfc, 0xb3, 0xf9, 0xb2, 0xb2, 0x12, 0x4a, 0x50, + 0x57, 0x83, 0xcc, 0x82, 0xfe, 0xcb, 0x54, 0x88, 0x74, 0x83, 0x5c, 0x83, 0xf3, 0x7a, 0xc9, 0x55, + 0x96, 0xa3, 0x54, 0x49, 0x5e, 0x9a, 0x7a, 0xff, 0x99, 0x21, 0x53, 0x4d, 0x89, 0x92, 0x7f, 0x4d, + 0x36, 0x35, 0x1a, 0x20, 0x28, 0xe1, 0xe9, 0xa7, 0x1a, 0xab, 0xe6, 0x23, 0x26, 0xaa, 0xae, 0x50, + 0xc6, 0xf8, 0xab, 0x46, 0xa9, 0xe8, 0x0b, 0x00, 0x2c, 0x54, 0xa6, 0x9a, 0xbb, 0x24, 0x47, 0x8f, + 0x8c, 0x48, 0xe8, 0xc4, 0x9d, 0x1d, 0xea, 0xc3, 0xb9, 0x59, 0x4d, 0x16, 0xde, 0x60, 0x34, 0x0c, + 0x9d, 0x78, 0xbf, 0xa6, 0xcf, 0xc1, 0x59, 0x1a, 0xba, 0xc9, 0xc2, 0x1b, 0x6a, 0xf0, 0xb0, 0x11, + 0xfc, 0x21, 0x70, 0x79, 0x24, 0x29, 0x4b, 0x51, 0x48, 0xfc, 0xaf, 0xe6, 0x9d, 0xd5, 0xcc, 0x50, + 0x6a, 0xcd, 0x8b, 0x28, 0x62, 0xbd, 0x7b, 0x60, 0x27, 0x79, 0xd9, 0xad, 0x6d, 0xba, 0x2d, 0x54, + 0xd5, 0xc4, 0x7b, 0x0e, 0x3f, 0x06, 0xb7, 0x07, 0xd1, 0x27, 0x30, 0x5c, 0x63, 0x63, 0x95, 0x77, + 0xbf, 0xf4, 0x35, 0x3c, 0xdc, 0xee, 0x6e, 0xcb, 0x1b, 0x8c, 0x48, 0x78, 0x11, 0x5d, 0x1e, 0xe9, + 0xe9, 0xf6, 0x26, 0x36, 0x35, 0xef, 0x06, 0x63, 0x12, 0xfc, 0x26, 0x70, 0x66, 0x76, 0xe9, 0x7b, + 0x38, 0xb7, 0xa7, 0x96, 0x1e, 0xd1, 0x76, 0xaf, 0x4f, 0xb6, 0xb3, 0xd6, 0xb0, 0xf5, 0xd7, 0x36, + 0xf9, 0xdf, 0xc0, 0xed, 0x41, 0x27, 0xfc, 0xbd, 0xe9, 0xfb, 0xbb, 0x3a, 0x12, 0xb0, 0xed, 0x7a, + 0xe0, 0x5d, 0x97, 0x15, 0x3c, 0xea, 0x42, 0x34, 0x6c, 0x69, 0x88, 0xa6, 0xa1, 0x96, 0x46, 0xc7, + 0x85, 0x75, 0xbb, 0xe9, 0x18, 0x9c, 0x7d, 0xb6, 0xac, 0xa8, 0xcf, 0x4c, 0xfa, 0x58, 0x9b, 0x3e, + 0xf6, 0xa5, 0xad, 0x88, 0x0f, 0xc5, 0xd1, 0x0a, 0xc0, 0x66, 0xf8, 0xc3, 0x74, 0x42, 0xbf, 0x83, + 0xdb, 0x1b, 0x16, 0xbd, 0xfe, 0xf7, 0x28, 0x75, 0x2a, 0xfd, 0x57, 0xf7, 0x99, 0x77, 0xf0, 0xe0, + 0x66, 0x06, 0xfd, 0x07, 0x72, 0xf3, 0xf8, 0x20, 0x3d, 0xdd, 0xb9, 0x9c, 0x8d, 0xd3, 0x4c, 0xfd, + 0xac, 0xe7, 0xec, 0x87, 0xc8, 0x79, 0x2a, 0x56, 0xb8, 0xe6, 0xe6, 0x85, 0xe8, 0x33, 0x48, 0x9e, + 0x62, 0x81, 0x55, 0xa2, 0x70, 0xc1, 0x53, 0xc1, 0x7b, 0x0f, 0x71, 0x7e, 0xa6, 0x4b, 0xde, 0xfe, + 0x0d, 0x00, 0x00, 0xff, 0xff, 0x77, 0xb5, 0x0e, 0xd1, 0xa0, 0x03, 0x00, 0x00, +} diff --git a/protos/generated/go/feast/specs/EntitySpec.pb.go b/protos/generated/go/feast/specs/EntitySpec.pb.go index 75ef9aa318..0f4374c679 100644 --- a/protos/generated/go/feast/specs/EntitySpec.pb.go +++ b/protos/generated/go/feast/specs/EntitySpec.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/specs/EntitySpec.proto -package specs +package specs // import "github.com/gojek/feast/protos/generated/go/feast/specs" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,7 +16,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type EntitySpec struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -33,17 +31,16 @@ func (m *EntitySpec) Reset() { *m = EntitySpec{} } func (m *EntitySpec) String() string { return proto.CompactTextString(m) } func (*EntitySpec) ProtoMessage() {} func (*EntitySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_a3230229c2278d5e, []int{0} + return fileDescriptor_EntitySpec_b8950ded39b854cb, []int{0} } - func (m *EntitySpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_EntitySpec.Unmarshal(m, b) } func (m *EntitySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_EntitySpec.Marshal(b, m, deterministic) } -func (m *EntitySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntitySpec.Merge(m, src) +func (dst *EntitySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_EntitySpec.Merge(dst, src) } func (m *EntitySpec) XXX_Size() int { return xxx_messageInfo_EntitySpec.Size(m) @@ -79,9 +76,11 @@ func init() { proto.RegisterType((*EntitySpec)(nil), "feast.specs.EntitySpec") } -func init() { proto.RegisterFile("feast/specs/EntitySpec.proto", fileDescriptor_a3230229c2278d5e) } +func init() { + proto.RegisterFile("feast/specs/EntitySpec.proto", fileDescriptor_EntitySpec_b8950ded39b854cb) +} -var fileDescriptor_a3230229c2278d5e = []byte{ +var fileDescriptor_EntitySpec_b8950ded39b854cb = []byte{ // 177 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0x4b, 0x4d, 0x2c, 0x2e, 0xd1, 0x2f, 0x2e, 0x48, 0x4d, 0x2e, 0xd6, 0x77, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0x0c, 0x2e, diff --git a/protos/generated/go/feast/specs/FeatureGroupSpec.pb.go b/protos/generated/go/feast/specs/FeatureGroupSpec.pb.go index ed04332693..f6bf2fcc43 100644 --- a/protos/generated/go/feast/specs/FeatureGroupSpec.pb.go +++ b/protos/generated/go/feast/specs/FeatureGroupSpec.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/specs/FeatureGroupSpec.proto -package specs +package specs // import "github.com/gojek/feast/protos/generated/go/feast/specs" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,32 +16,31 @@ 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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type FeatureGroupSpec struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` - DataStores *DataStores `protobuf:"bytes,3,opt,name=dataStores,proto3" json:"dataStores,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` + Options map[string]string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FeatureGroupSpec) Reset() { *m = FeatureGroupSpec{} } func (m *FeatureGroupSpec) String() string { return proto.CompactTextString(m) } func (*FeatureGroupSpec) ProtoMessage() {} func (*FeatureGroupSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_df3b6a9e736b5719, []int{0} + return fileDescriptor_FeatureGroupSpec_863105520104cb04, []int{0} } - func (m *FeatureGroupSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FeatureGroupSpec.Unmarshal(m, b) } func (m *FeatureGroupSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FeatureGroupSpec.Marshal(b, m, deterministic) } -func (m *FeatureGroupSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureGroupSpec.Merge(m, src) +func (dst *FeatureGroupSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeatureGroupSpec.Merge(dst, src) } func (m *FeatureGroupSpec) XXX_Size() int { return xxx_messageInfo_FeatureGroupSpec.Size(m) @@ -68,32 +65,38 @@ func (m *FeatureGroupSpec) GetTags() []string { return nil } -func (m *FeatureGroupSpec) GetDataStores() *DataStores { +func (m *FeatureGroupSpec) GetOptions() map[string]string { if m != nil { - return m.DataStores + return m.Options } return nil } func init() { proto.RegisterType((*FeatureGroupSpec)(nil), "feast.specs.FeatureGroupSpec") + proto.RegisterMapType((map[string]string)(nil), "feast.specs.FeatureGroupSpec.OptionsEntry") } -func init() { proto.RegisterFile("feast/specs/FeatureGroupSpec.proto", fileDescriptor_df3b6a9e736b5719) } +func init() { + proto.RegisterFile("feast/specs/FeatureGroupSpec.proto", fileDescriptor_FeatureGroupSpec_863105520104cb04) +} -var fileDescriptor_df3b6a9e736b5719 = []byte{ - // 203 bytes of a gzipped FileDescriptorProto +var fileDescriptor_FeatureGroupSpec_863105520104cb04 = []byte{ + // 245 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0x4b, 0x4d, 0x2c, 0x2e, 0xd1, 0x2f, 0x2e, 0x48, 0x4d, 0x2e, 0xd6, 0x77, 0x4b, 0x4d, 0x2c, 0x29, 0x2d, 0x4a, 0x75, 0x2f, 0xca, 0x2f, 0x2d, 0x08, 0x2e, 0x48, 0x4d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, - 0x06, 0xab, 0xd1, 0x03, 0xab, 0x91, 0x92, 0xc5, 0xa2, 0x01, 0xa1, 0x56, 0x29, 0x9f, 0x4b, 0x00, - 0xdd, 0x14, 0x21, 0x3e, 0x2e, 0xa6, 0xcc, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0xa6, - 0xcc, 0x14, 0x21, 0x21, 0x2e, 0x96, 0x92, 0xc4, 0xf4, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0xce, - 0x20, 0x30, 0x5b, 0xc8, 0x9c, 0x8b, 0x2b, 0x25, 0xb1, 0x24, 0x31, 0xb8, 0x24, 0xbf, 0x28, 0xb5, - 0x58, 0x82, 0x59, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5c, 0x0f, 0xc9, 0x62, 0x3d, 0x17, 0xb8, 0x74, - 0x10, 0x92, 0x52, 0xa7, 0x18, 0x2e, 0x64, 0xe7, 0x39, 0x89, 0xa2, 0xdb, 0x1e, 0x00, 0x72, 0x56, - 0x94, 0x59, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x56, - 0x6a, 0xb6, 0x3e, 0xc4, 0x1b, 0x60, 0x47, 0x17, 0xeb, 0xa7, 0xa7, 0xe6, 0xa5, 0x16, 0x25, 0x96, - 0xa4, 0xa6, 0xe8, 0xa7, 0xe7, 0xeb, 0x23, 0x79, 0x30, 0x89, 0x0d, 0xac, 0xc0, 0x18, 0x10, 0x00, - 0x00, 0xff, 0xff, 0xca, 0x2b, 0x72, 0xe3, 0x27, 0x01, 0x00, 0x00, + 0x06, 0xab, 0xd1, 0x03, 0xab, 0x91, 0x92, 0xc5, 0xa2, 0x01, 0xa1, 0x56, 0x69, 0x07, 0x23, 0x97, + 0x00, 0xba, 0x31, 0x42, 0x7c, 0x5c, 0x4c, 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, + 0x4c, 0x99, 0x29, 0x42, 0x42, 0x5c, 0x2c, 0x25, 0x89, 0xe9, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, + 0x9c, 0x41, 0x60, 0xb6, 0x90, 0x0b, 0x17, 0x7b, 0x7e, 0x41, 0x49, 0x66, 0x7e, 0x5e, 0xb1, 0x04, + 0xb3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x96, 0x1e, 0x92, 0xb5, 0x7a, 0x18, 0x4e, 0xf3, 0x87, 0x28, + 0x76, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0x82, 0x69, 0x95, 0xb2, 0xe2, 0xe2, 0x41, 0x96, 0x10, 0x12, + 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x84, 0x5a, 0x0d, 0x62, 0x0a, 0x89, 0x70, 0xb1, 0x96, 0x25, 0xe6, + 0x94, 0xa6, 0x4a, 0x30, 0x81, 0xc5, 0x20, 0x1c, 0x2b, 0x26, 0x0b, 0x46, 0xa7, 0x18, 0x2e, 0x64, + 0x8f, 0x3a, 0x89, 0xa2, 0x5b, 0x19, 0x00, 0xf2, 0x60, 0x94, 0x59, 0x7a, 0x66, 0x49, 0x46, 0x69, + 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x56, 0x6a, 0xb6, 0x3e, 0x24, 0x40, 0xc0, 0xde, + 0x2f, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x4f, 0xcf, 0xd7, 0x47, + 0x0a, 0xaa, 0x24, 0x36, 0xb0, 0x02, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xb3, 0x0b, + 0xcf, 0x71, 0x01, 0x00, 0x00, } diff --git a/protos/generated/go/feast/specs/FeatureSpec.pb.go b/protos/generated/go/feast/specs/FeatureSpec.pb.go index a8cbb886a8..2432d8213f 100644 --- a/protos/generated/go/feast/specs/FeatureSpec.pb.go +++ b/protos/generated/go/feast/specs/FeatureSpec.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/specs/FeatureSpec.proto -package specs +package specs // import "github.com/gojek/feast/protos/generated/go/feast/specs" -import ( - fmt "fmt" - types "github.com/gojek/feast/protos/generated/go/feast/types" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import types "github.com/gojek/feast/protos/generated/go/feast/types" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -19,7 +17,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type FeatureSpec struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -32,7 +30,6 @@ type FeatureSpec struct { Group string `protobuf:"bytes,9,opt,name=group,proto3" json:"group,omitempty"` Tags []string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` Options map[string]string `protobuf:"bytes,11,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - DataStores *DataStores `protobuf:"bytes,12,opt,name=dataStores,proto3" json:"dataStores,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -42,17 +39,16 @@ func (m *FeatureSpec) Reset() { *m = FeatureSpec{} } func (m *FeatureSpec) String() string { return proto.CompactTextString(m) } func (*FeatureSpec) ProtoMessage() {} func (*FeatureSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_b8f1468f11147fbe, []int{0} + return fileDescriptor_FeatureSpec_182bc164237cde02, []int{0} } - func (m *FeatureSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FeatureSpec.Unmarshal(m, b) } func (m *FeatureSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FeatureSpec.Marshal(b, m, deterministic) } -func (m *FeatureSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureSpec.Merge(m, src) +func (dst *FeatureSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeatureSpec.Merge(dst, src) } func (m *FeatureSpec) XXX_Size() int { return xxx_messageInfo_FeatureSpec.Size(m) @@ -133,146 +129,38 @@ func (m *FeatureSpec) GetOptions() map[string]string { return nil } -func (m *FeatureSpec) GetDataStores() *DataStores { - if m != nil { - return m.DataStores - } - return nil -} - -type DataStores struct { - Serving *DataStore `protobuf:"bytes,1,opt,name=serving,proto3" json:"serving,omitempty"` - Warehouse *DataStore `protobuf:"bytes,2,opt,name=warehouse,proto3" json:"warehouse,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DataStores) Reset() { *m = DataStores{} } -func (m *DataStores) String() string { return proto.CompactTextString(m) } -func (*DataStores) ProtoMessage() {} -func (*DataStores) Descriptor() ([]byte, []int) { - return fileDescriptor_b8f1468f11147fbe, []int{1} -} - -func (m *DataStores) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DataStores.Unmarshal(m, b) -} -func (m *DataStores) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DataStores.Marshal(b, m, deterministic) -} -func (m *DataStores) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataStores.Merge(m, src) -} -func (m *DataStores) XXX_Size() int { - return xxx_messageInfo_DataStores.Size(m) -} -func (m *DataStores) XXX_DiscardUnknown() { - xxx_messageInfo_DataStores.DiscardUnknown(m) -} - -var xxx_messageInfo_DataStores proto.InternalMessageInfo - -func (m *DataStores) GetServing() *DataStore { - if m != nil { - return m.Serving - } - return nil -} - -func (m *DataStores) GetWarehouse() *DataStore { - if m != nil { - return m.Warehouse - } - return nil -} - -type DataStore struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Options map[string]string `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DataStore) Reset() { *m = DataStore{} } -func (m *DataStore) String() string { return proto.CompactTextString(m) } -func (*DataStore) ProtoMessage() {} -func (*DataStore) Descriptor() ([]byte, []int) { - return fileDescriptor_b8f1468f11147fbe, []int{2} -} - -func (m *DataStore) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DataStore.Unmarshal(m, b) -} -func (m *DataStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DataStore.Marshal(b, m, deterministic) -} -func (m *DataStore) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataStore.Merge(m, src) -} -func (m *DataStore) XXX_Size() int { - return xxx_messageInfo_DataStore.Size(m) -} -func (m *DataStore) XXX_DiscardUnknown() { - xxx_messageInfo_DataStore.DiscardUnknown(m) -} - -var xxx_messageInfo_DataStore proto.InternalMessageInfo - -func (m *DataStore) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *DataStore) GetOptions() map[string]string { - if m != nil { - return m.Options - } - return nil -} - func init() { proto.RegisterType((*FeatureSpec)(nil), "feast.specs.FeatureSpec") proto.RegisterMapType((map[string]string)(nil), "feast.specs.FeatureSpec.OptionsEntry") - proto.RegisterType((*DataStores)(nil), "feast.specs.DataStores") - proto.RegisterType((*DataStore)(nil), "feast.specs.DataStore") - proto.RegisterMapType((map[string]string)(nil), "feast.specs.DataStore.OptionsEntry") } -func init() { proto.RegisterFile("feast/specs/FeatureSpec.proto", fileDescriptor_b8f1468f11147fbe) } - -var fileDescriptor_b8f1468f11147fbe = []byte{ - // 451 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xdf, 0x6b, 0xd4, 0x40, - 0x10, 0x26, 0x49, 0xdb, 0x33, 0x93, 0x52, 0xca, 0x22, 0xed, 0x72, 0x2a, 0x84, 0x13, 0xe1, 0x9e, - 0x12, 0x39, 0xc5, 0x1f, 0x05, 0x11, 0x8a, 0xe7, 0xab, 0x92, 0x4a, 0x05, 0xdf, 0xb6, 0xc9, 0x98, - 0xc6, 0x7a, 0xd9, 0xb0, 0xbb, 0x69, 0xc9, 0x3f, 0xe2, 0x9f, 0xe1, 0xdf, 0x28, 0x3b, 0x7b, 0xd7, - 0xec, 0xe1, 0xf9, 0xe4, 0xdb, 0xcc, 0x7e, 0xdf, 0x7e, 0x3b, 0xf3, 0xed, 0x0c, 0x3c, 0xf9, 0x8e, - 0x42, 0x9b, 0x5c, 0x77, 0x58, 0xea, 0xfc, 0x23, 0x0a, 0xd3, 0x2b, 0xbc, 0xe8, 0xb0, 0xcc, 0x3a, - 0x25, 0x8d, 0x64, 0x09, 0xc1, 0x19, 0xc1, 0xd3, 0xc7, 0x3e, 0x77, 0xd9, 0x9a, 0xc6, 0x0c, 0x23, - 0x75, 0xba, 0xa5, 0x74, 0x61, 0xa4, 0x12, 0xb5, 0xa7, 0x34, 0x3d, 0x75, 0xb0, 0x19, 0x3a, 0xd4, - 0xf9, 0xa5, 0xf8, 0xd9, 0xa3, 0x03, 0x66, 0xbf, 0x23, 0x48, 0xbc, 0x87, 0xd9, 0x11, 0x84, 0x4d, - 0xc5, 0x83, 0x34, 0x98, 0xc7, 0x45, 0xd8, 0x54, 0x8c, 0xc1, 0x5e, 0x2b, 0x56, 0xc8, 0x43, 0x3a, - 0xa1, 0x98, 0x3d, 0x84, 0x7d, 0x79, 0xd7, 0xa2, 0xe2, 0x11, 0x1d, 0xba, 0x84, 0xa5, 0x90, 0x54, - 0xa8, 0x4b, 0xd5, 0x74, 0xa6, 0x91, 0x2d, 0xdf, 0x23, 0xcc, 0x3f, 0x62, 0xc7, 0x10, 0xf5, 0xaa, - 0xe1, 0xfb, 0x84, 0xd8, 0x90, 0xbd, 0x85, 0xf8, 0xd6, 0x16, 0xf3, 0x65, 0xe8, 0x90, 0x4f, 0xd2, - 0x60, 0x7e, 0xb4, 0x78, 0x94, 0xb9, 0xa6, 0xa9, 0xd4, 0xec, 0x72, 0x83, 0x66, 0xcb, 0xb6, 0x5f, - 0x15, 0x23, 0x9b, 0x9d, 0xc0, 0x01, 0x92, 0x09, 0xfc, 0x01, 0xe9, 0xad, 0x33, 0x5b, 0x5c, 0xad, - 0x64, 0xdf, 0xf1, 0xd8, 0x15, 0x47, 0x89, 0x6d, 0xc3, 0x88, 0x5a, 0x73, 0x48, 0x23, 0xdb, 0x86, - 0x8d, 0xd9, 0x7b, 0x98, 0x48, 0x2a, 0x4c, 0xf3, 0x24, 0x8d, 0xe6, 0xc9, 0xe2, 0x59, 0xe6, 0xf9, - 0x9d, 0xf9, 0xdf, 0xf1, 0xc9, 0xf1, 0x96, 0xad, 0x51, 0x43, 0xb1, 0xb9, 0xc5, 0x5e, 0x03, 0x54, - 0xc2, 0x08, 0xeb, 0x36, 0x6a, 0x7e, 0x98, 0x06, 0xf3, 0x64, 0x71, 0xba, 0xa5, 0xf1, 0xe1, 0x1e, - 0x2e, 0x3c, 0xea, 0xf4, 0x0c, 0x0e, 0x7d, 0x45, 0x6b, 0xcc, 0x0d, 0x0e, 0x6b, 0xd7, 0x6d, 0x68, - 0xbb, 0xa0, 0x56, 0xd7, 0xbe, 0xbb, 0xe4, 0x2c, 0x7c, 0x13, 0xcc, 0x0c, 0xc0, 0xa8, 0xca, 0x9e, - 0xc3, 0x44, 0xa3, 0xba, 0x6d, 0xda, 0x9a, 0x6e, 0x27, 0x8b, 0x93, 0xdd, 0xef, 0x17, 0x1b, 0x1a, - 0x7b, 0x09, 0xf1, 0x9d, 0x50, 0x78, 0x2d, 0x7b, 0xed, 0xd4, 0xff, 0x7d, 0x67, 0x24, 0xce, 0x7e, - 0x05, 0x10, 0xdf, 0x03, 0x7f, 0x0d, 0xc9, 0xbb, 0xd1, 0xc9, 0x90, 0x9c, 0x7c, 0xba, 0x5b, 0x71, - 0xb7, 0x8f, 0xff, 0x63, 0xc7, 0xf9, 0x57, 0xf0, 0x97, 0xe4, 0xfc, 0xd8, 0xfb, 0xb5, 0xcf, 0x76, - 0xc0, 0xbf, 0xbd, 0xaa, 0x1b, 0x73, 0xdd, 0x5f, 0x65, 0xa5, 0x5c, 0xe5, 0xb5, 0xfc, 0x81, 0x37, - 0xb9, 0x5b, 0x05, 0x1a, 0x7f, 0x9d, 0xd7, 0xd8, 0xa2, 0x12, 0x06, 0xab, 0xbc, 0x96, 0xb9, 0xb7, - 0x43, 0x57, 0x07, 0x44, 0x78, 0xf1, 0x27, 0x00, 0x00, 0xff, 0xff, 0xca, 0xfb, 0xc4, 0x86, 0xa3, - 0x03, 0x00, 0x00, +func init() { + proto.RegisterFile("feast/specs/FeatureSpec.proto", fileDescriptor_FeatureSpec_182bc164237cde02) +} + +var fileDescriptor_FeatureSpec_182bc164237cde02 = []byte{ + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x51, 0x4d, 0x6b, 0xe3, 0x30, + 0x10, 0xc5, 0x76, 0x3e, 0x36, 0xf2, 0x12, 0x82, 0x58, 0x76, 0x85, 0x77, 0x17, 0x4c, 0xa1, 0x90, + 0x93, 0x04, 0x29, 0x94, 0x36, 0x97, 0x42, 0x20, 0xbd, 0xb6, 0x24, 0x25, 0x85, 0xde, 0x1c, 0x7b, + 0xea, 0xba, 0x69, 0x2c, 0x23, 0xc9, 0x2d, 0xfe, 0xe1, 0xbd, 0x17, 0x8d, 0x12, 0xa2, 0xde, 0x66, + 0xe6, 0x3d, 0x8d, 0xde, 0xbc, 0x47, 0xfe, 0x3f, 0x43, 0xa6, 0x8d, 0xd0, 0x0d, 0xe4, 0x5a, 0xdc, + 0x42, 0x66, 0x5a, 0x05, 0xeb, 0x06, 0x72, 0xde, 0x28, 0x69, 0x24, 0x8d, 0x11, 0xe6, 0x08, 0x27, + 0xff, 0x7c, 0xee, 0xb2, 0x36, 0x95, 0xe9, 0x4e, 0xd4, 0xe4, 0xdb, 0xa6, 0xb5, 0x91, 0x2a, 0x2b, + 0xbd, 0x4d, 0xc9, 0x1f, 0x07, 0x9b, 0xae, 0x01, 0x2d, 0x36, 0xd9, 0x5b, 0x0b, 0x0e, 0x38, 0xfb, + 0x0c, 0x49, 0xec, 0x7d, 0x4c, 0xc7, 0x24, 0xac, 0x0a, 0x16, 0xa4, 0xc1, 0x74, 0xb4, 0x0a, 0xab, + 0x82, 0x52, 0xd2, 0xab, 0xb3, 0x3d, 0xb0, 0x10, 0x27, 0x58, 0xd3, 0x5f, 0xa4, 0x2f, 0x3f, 0x6a, + 0x50, 0x2c, 0xc2, 0xa1, 0x6b, 0x68, 0x4a, 0xe2, 0x02, 0x74, 0xae, 0xaa, 0xc6, 0x54, 0xb2, 0x66, + 0x3d, 0xc4, 0xfc, 0x11, 0x9d, 0x90, 0xa8, 0x55, 0x15, 0xeb, 0x23, 0x62, 0x4b, 0x7a, 0x4d, 0x46, + 0xef, 0x56, 0xcc, 0x43, 0xd7, 0x00, 0x1b, 0xa6, 0xc1, 0x74, 0x3c, 0xfb, 0xcb, 0xdd, 0xd1, 0x28, + 0x95, 0x6f, 0x8e, 0x28, 0x5f, 0xd6, 0xed, 0x7e, 0x75, 0x62, 0xd3, 0xdf, 0x64, 0x00, 0x68, 0x02, + 0xfb, 0x81, 0xfb, 0x0e, 0x9d, 0x15, 0x57, 0x2a, 0xd9, 0x36, 0x6c, 0xe4, 0xc4, 0x61, 0x63, 0xcf, + 0x30, 0x59, 0xa9, 0x19, 0x49, 0x23, 0x7b, 0x86, 0xad, 0xe9, 0x0d, 0x19, 0x4a, 0x14, 0xa6, 0x59, + 0x9c, 0x46, 0xd3, 0x78, 0x76, 0xce, 0x3d, 0xbf, 0xb9, 0x1f, 0xc7, 0x9d, 0xe3, 0x2d, 0x6b, 0xa3, + 0xba, 0xd5, 0xf1, 0x55, 0x32, 0x27, 0x3f, 0x7d, 0xc0, 0xde, 0xb7, 0x83, 0xee, 0x60, 0x9e, 0x2d, + 0xad, 0x18, 0x54, 0x7c, 0xb0, 0xcf, 0x35, 0xf3, 0xf0, 0x2a, 0x58, 0x3c, 0x12, 0x3f, 0xdc, 0xc5, + 0xc4, 0xfb, 0xed, 0xde, 0x06, 0xf3, 0x74, 0x59, 0x56, 0xe6, 0xa5, 0xdd, 0xf2, 0x5c, 0xee, 0x45, + 0x29, 0x5f, 0x61, 0x27, 0x5c, 0x84, 0x18, 0x9b, 0x16, 0x25, 0xd4, 0xa0, 0x32, 0x03, 0x85, 0x28, + 0xa5, 0xf0, 0xb2, 0xdf, 0x0e, 0x90, 0x70, 0xf1, 0x15, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xd8, 0x93, + 0x97, 0x5b, 0x02, 0x00, 0x00, } diff --git a/protos/generated/go/feast/specs/ImportJobSpecs.pb.go b/protos/generated/go/feast/specs/ImportJobSpecs.pb.go index 924175e7bd..c75520403d 100644 --- a/protos/generated/go/feast/specs/ImportJobSpecs.pb.go +++ b/protos/generated/go/feast/specs/ImportJobSpecs.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/specs/ImportJobSpecs.proto -package specs +package specs // import "github.com/gojek/feast/protos/generated/go/feast/specs" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,36 +16,35 @@ 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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type ImportJobSpecs struct { - JobId string `protobuf:"bytes,1,opt,name=jobId,proto3" json:"jobId,omitempty"` - ImportSpec *ImportSpec `protobuf:"bytes,2,opt,name=importSpec,proto3" json:"importSpec,omitempty"` - EntitySpecs []*EntitySpec `protobuf:"bytes,3,rep,name=entitySpecs,proto3" json:"entitySpecs,omitempty"` - FeatureSpecs []*FeatureSpec `protobuf:"bytes,4,rep,name=featureSpecs,proto3" json:"featureSpecs,omitempty"` - ServingStorageSpecs []*StorageSpec `protobuf:"bytes,5,rep,name=servingStorageSpecs,proto3" json:"servingStorageSpecs,omitempty"` - WarehouseStorageSpecs []*StorageSpec `protobuf:"bytes,6,rep,name=warehouseStorageSpecs,proto3" json:"warehouseStorageSpecs,omitempty"` - ErrorsStorageSpec *StorageSpec `protobuf:"bytes,7,opt,name=errorsStorageSpec,proto3" json:"errorsStorageSpec,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + JobId string `protobuf:"bytes,1,opt,name=jobId,proto3" json:"jobId,omitempty"` + ImportSpec *ImportSpec `protobuf:"bytes,2,opt,name=importSpec,proto3" json:"importSpec,omitempty"` + EntitySpecs []*EntitySpec `protobuf:"bytes,3,rep,name=entitySpecs,proto3" json:"entitySpecs,omitempty"` + FeatureSpecs []*FeatureSpec `protobuf:"bytes,4,rep,name=featureSpecs,proto3" json:"featureSpecs,omitempty"` + ServingStorageSpec *StorageSpec `protobuf:"bytes,5,opt,name=servingStorageSpec,proto3" json:"servingStorageSpec,omitempty"` + WarehouseStorageSpec *StorageSpec `protobuf:"bytes,6,opt,name=warehouseStorageSpec,proto3" json:"warehouseStorageSpec,omitempty"` + ErrorsStorageSpec *StorageSpec `protobuf:"bytes,7,opt,name=errorsStorageSpec,proto3" json:"errorsStorageSpec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImportJobSpecs) Reset() { *m = ImportJobSpecs{} } func (m *ImportJobSpecs) String() string { return proto.CompactTextString(m) } func (*ImportJobSpecs) ProtoMessage() {} func (*ImportJobSpecs) Descriptor() ([]byte, []int) { - return fileDescriptor_ca149f837727a759, []int{0} + return fileDescriptor_ImportJobSpecs_876ba7e8763b3d51, []int{0} } - func (m *ImportJobSpecs) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportJobSpecs.Unmarshal(m, b) } func (m *ImportJobSpecs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ImportJobSpecs.Marshal(b, m, deterministic) } -func (m *ImportJobSpecs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportJobSpecs.Merge(m, src) +func (dst *ImportJobSpecs) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportJobSpecs.Merge(dst, src) } func (m *ImportJobSpecs) XXX_Size() int { return xxx_messageInfo_ImportJobSpecs.Size(m) @@ -86,16 +83,16 @@ func (m *ImportJobSpecs) GetFeatureSpecs() []*FeatureSpec { return nil } -func (m *ImportJobSpecs) GetServingStorageSpecs() []*StorageSpec { +func (m *ImportJobSpecs) GetServingStorageSpec() *StorageSpec { if m != nil { - return m.ServingStorageSpecs + return m.ServingStorageSpec } return nil } -func (m *ImportJobSpecs) GetWarehouseStorageSpecs() []*StorageSpec { +func (m *ImportJobSpecs) GetWarehouseStorageSpec() *StorageSpec { if m != nil { - return m.WarehouseStorageSpecs + return m.WarehouseStorageSpec } return nil } @@ -111,28 +108,29 @@ func init() { proto.RegisterType((*ImportJobSpecs)(nil), "feast.specs.ImportJobSpecs") } -func init() { proto.RegisterFile("feast/specs/ImportJobSpecs.proto", fileDescriptor_ca149f837727a759) } - -var fileDescriptor_ca149f837727a759 = []byte{ - // 306 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x4b, 0xc3, 0x40, - 0x10, 0x85, 0xa9, 0xb5, 0x15, 0xb7, 0x22, 0xb8, 0x55, 0x5c, 0x44, 0x21, 0x78, 0xea, 0x29, 0x0b, - 0x0a, 0x8a, 0xe0, 0xa9, 0x60, 0xa1, 0x3d, 0x88, 0xa4, 0xb7, 0xde, 0x92, 0x76, 0xba, 0x4d, 0xa5, - 0x99, 0xb0, 0xbb, 0x51, 0xfc, 0x6f, 0xfe, 0x38, 0xc9, 0x06, 0x9a, 0x59, 0x92, 0xe2, 0x71, 0xf3, - 0xbe, 0x37, 0xcc, 0xcb, 0x3c, 0x16, 0xac, 0x21, 0x36, 0x56, 0x9a, 0x1c, 0x96, 0x46, 0x4e, 0x77, - 0x39, 0x6a, 0x3b, 0xc3, 0x64, 0x5e, 0x3e, 0xc3, 0x5c, 0xa3, 0x45, 0x3e, 0x70, 0x44, 0xe8, 0x88, - 0x9b, 0xdb, 0x26, 0x5e, 0xb2, 0x15, 0xea, 0xab, 0x6f, 0x99, 0x4d, 0xed, 0x0f, 0x51, 0xef, 0xa8, - 0x3a, 0x81, 0xd8, 0x16, 0x1a, 0x0e, 0xc9, 0x73, 0x8b, 0x3a, 0x56, 0x44, 0xbe, 0xff, 0xed, 0xb2, - 0x73, 0x7f, 0x3f, 0x7e, 0xc9, 0x7a, 0x5b, 0x4c, 0xa6, 0x2b, 0xd1, 0x09, 0x3a, 0xa3, 0xd3, 0xa8, - 0x7a, 0xf0, 0x67, 0xc6, 0xd2, 0xfd, 0x62, 0xe2, 0x28, 0xe8, 0x8c, 0x06, 0x0f, 0xd7, 0x21, 0x09, - 0x11, 0xd6, 0x7b, 0x47, 0x04, 0xe5, 0x2f, 0x6c, 0x00, 0xfb, 0x9d, 0x8d, 0xe8, 0x06, 0xdd, 0x86, - 0xb3, 0xce, 0x14, 0x51, 0x96, 0xbf, 0xb2, 0xb3, 0x75, 0x1d, 0xc8, 0x88, 0x63, 0xe7, 0x15, 0x9e, - 0x97, 0x24, 0x8e, 0x3c, 0x9a, 0xcf, 0xd8, 0xd0, 0x80, 0xfe, 0x4a, 0x33, 0x45, 0x62, 0x1b, 0xd1, - 0x6b, 0x19, 0x42, 0x80, 0xa8, 0xcd, 0xc4, 0xdf, 0xd9, 0xd5, 0x77, 0xac, 0x61, 0x83, 0x85, 0x01, - 0x6f, 0x5a, 0xff, 0x9f, 0x69, 0xed, 0x36, 0x3e, 0x61, 0x17, 0xa0, 0x35, 0x6a, 0x43, 0xbe, 0x8a, - 0x13, 0xf7, 0x53, 0x0f, 0xcf, 0x6a, 0x5a, 0xc6, 0x0b, 0x46, 0x7b, 0x34, 0x1e, 0xfa, 0xa7, 0xfc, - 0x28, 0x4f, 0xbc, 0x78, 0x52, 0xa9, 0xdd, 0x14, 0x49, 0xb8, 0xc4, 0x9d, 0x54, 0xb8, 0x85, 0x4f, - 0x59, 0x55, 0xc2, 0x15, 0xc0, 0x48, 0x05, 0x19, 0xe8, 0xd8, 0xc2, 0x4a, 0x2a, 0x94, 0xa4, 0x2c, - 0x49, 0xdf, 0x01, 0x8f, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xf2, 0xf3, 0xa2, 0xcc, 0x02, - 0x00, 0x00, +func init() { + proto.RegisterFile("feast/specs/ImportJobSpecs.proto", fileDescriptor_ImportJobSpecs_876ba7e8763b3d51) +} + +var fileDescriptor_ImportJobSpecs_876ba7e8763b3d51 = []byte{ + // 304 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x51, 0x4b, 0xfb, 0x30, + 0x14, 0xc5, 0xd9, 0xbf, 0xff, 0x4d, 0x4c, 0x45, 0x30, 0x0e, 0x0c, 0xa2, 0x50, 0x7c, 0xda, 0x53, + 0x03, 0x0a, 0x8a, 0xe0, 0xd3, 0xc0, 0xe1, 0xc4, 0x07, 0xe9, 0xde, 0xf6, 0xd6, 0x6e, 0x77, 0x59, + 0x27, 0xeb, 0x2d, 0x49, 0xaa, 0xf8, 0xcd, 0xfc, 0x78, 0xd2, 0x14, 0xd6, 0x1b, 0x3a, 0xd9, 0x63, + 0x38, 0xbf, 0x73, 0x38, 0x87, 0x5c, 0x16, 0xad, 0x20, 0x35, 0x56, 0x9a, 0x12, 0x16, 0x46, 0x4e, + 0xb7, 0x25, 0x6a, 0xfb, 0x8a, 0xd9, 0xac, 0x7e, 0xc6, 0xa5, 0x46, 0x8b, 0x3c, 0x74, 0x44, 0xec, + 0x88, 0xcb, 0xab, 0x2e, 0x5e, 0xb3, 0x0d, 0xea, 0xab, 0xcf, 0x85, 0xcd, 0xed, 0x37, 0x51, 0xaf, + 0xa9, 0x3a, 0x81, 0xd4, 0x56, 0x1a, 0xfe, 0x92, 0x67, 0x16, 0x75, 0xaa, 0x88, 0x7c, 0xf3, 0x13, + 0xb0, 0x53, 0xbf, 0x1f, 0x1f, 0xb2, 0xfe, 0x06, 0xb3, 0xe9, 0x52, 0xf4, 0xa2, 0xde, 0xe8, 0x38, + 0x69, 0x1e, 0xfc, 0x81, 0xb1, 0x7c, 0x57, 0x4c, 0xfc, 0x8b, 0x7a, 0xa3, 0xf0, 0xf6, 0x22, 0x26, + 0x23, 0xe2, 0xb6, 0x77, 0x42, 0x50, 0xfe, 0xc8, 0x42, 0xd8, 0x75, 0x36, 0x22, 0x88, 0x82, 0x8e, + 0xb3, 0xdd, 0x94, 0x50, 0x96, 0x3f, 0xb1, 0x93, 0x55, 0x3b, 0xc8, 0x88, 0xff, 0xce, 0x2b, 0x3c, + 0x2f, 0x59, 0x9c, 0x78, 0x34, 0x7f, 0x61, 0xdc, 0x80, 0xfe, 0xcc, 0x0b, 0x45, 0x66, 0x8b, 0xbe, + 0x6b, 0xee, 0x67, 0x10, 0x3d, 0xd9, 0xe3, 0xe1, 0x6f, 0x6c, 0xf8, 0x95, 0x6a, 0x58, 0x63, 0x65, + 0x80, 0x66, 0x0d, 0x0e, 0x64, 0xed, 0x75, 0xf1, 0x09, 0x3b, 0x03, 0xad, 0x51, 0x1b, 0x1a, 0x75, + 0x74, 0x20, 0xaa, 0x6b, 0x19, 0xcf, 0x19, 0xbd, 0xa1, 0xf1, 0xb9, 0xff, 0x8d, 0xef, 0xf5, 0xf7, + 0xce, 0xef, 0x55, 0x6e, 0xd7, 0x55, 0x16, 0x2f, 0x70, 0x2b, 0x15, 0x6e, 0xe0, 0x43, 0x36, 0xe7, + 0xe0, 0x3e, 0xdf, 0x48, 0x05, 0x05, 0xe8, 0xd4, 0xc2, 0x52, 0x2a, 0x94, 0xe4, 0x50, 0xb2, 0x81, + 0x03, 0xee, 0x7e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x48, 0xca, 0x5a, 0x01, 0xc8, 0x02, 0x00, 0x00, } diff --git a/protos/generated/go/feast/specs/ImportSpec.pb.go b/protos/generated/go/feast/specs/ImportSpec.pb.go index d7788c1372..d16f9fa07b 100644 --- a/protos/generated/go/feast/specs/ImportSpec.pb.go +++ b/protos/generated/go/feast/specs/ImportSpec.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/specs/ImportSpec.proto -package specs +package specs // import "github.com/gojek/feast/protos/generated/go/feast/specs" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -19,7 +17,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type ImportSpec struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` @@ -36,17 +34,16 @@ func (m *ImportSpec) Reset() { *m = ImportSpec{} } func (m *ImportSpec) String() string { return proto.CompactTextString(m) } func (*ImportSpec) ProtoMessage() {} func (*ImportSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_bf21bfd2215b3e0c, []int{0} + return fileDescriptor_ImportSpec_673bc4f248a91137, []int{0} } - func (m *ImportSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportSpec.Unmarshal(m, b) } func (m *ImportSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ImportSpec.Marshal(b, m, deterministic) } -func (m *ImportSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImportSpec.Merge(m, src) +func (dst *ImportSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImportSpec.Merge(dst, src) } func (m *ImportSpec) XXX_Size() int { return xxx_messageInfo_ImportSpec.Size(m) @@ -110,17 +107,16 @@ func (m *Schema) Reset() { *m = Schema{} } func (m *Schema) String() string { return proto.CompactTextString(m) } func (*Schema) ProtoMessage() {} func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_bf21bfd2215b3e0c, []int{1} + return fileDescriptor_ImportSpec_673bc4f248a91137, []int{1} } - func (m *Schema) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Schema.Unmarshal(m, b) } func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Schema.Marshal(b, m, deterministic) } -func (m *Schema) XXX_Merge(src proto.Message) { - xxx_messageInfo_Schema.Merge(m, src) +func (dst *Schema) XXX_Merge(src proto.Message) { + xxx_messageInfo_Schema.Merge(dst, src) } func (m *Schema) XXX_Size() int { return xxx_messageInfo_Schema.Size(m) @@ -182,14 +178,76 @@ func (m *Schema) GetEntityIdColumn() string { return "" } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Schema) XXX_OneofWrappers() []interface{} { - return []interface{}{ +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Schema) 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 _Schema_OneofMarshaler, _Schema_OneofUnmarshaler, _Schema_OneofSizer, []interface{}{ (*Schema_TimestampColumn)(nil), (*Schema_TimestampValue)(nil), } } +func _Schema_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Schema) + // timestamp + switch x := m.Timestamp.(type) { + case *Schema_TimestampColumn: + b.EncodeVarint(5<<3 | proto.WireBytes) + b.EncodeStringBytes(x.TimestampColumn) + case *Schema_TimestampValue: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.TimestampValue); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Schema.Timestamp has unexpected type %T", x) + } + return nil +} + +func _Schema_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Schema) + switch tag { + case 5: // timestamp.timestampColumn + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Timestamp = &Schema_TimestampColumn{x} + return true, err + case 6: // timestamp.timestampValue + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(timestamp.Timestamp) + err := b.DecodeMessage(msg) + m.Timestamp = &Schema_TimestampValue{msg} + return true, err + default: + return false, nil + } +} + +func _Schema_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Schema) + // timestamp + switch x := m.Timestamp.(type) { + case *Schema_TimestampColumn: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.TimestampColumn))) + n += len(x.TimestampColumn) + case *Schema_TimestampValue: + s := proto.Size(x.TimestampValue) + 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 Field struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` FeatureId string `protobuf:"bytes,2,opt,name=featureId,proto3" json:"featureId,omitempty"` @@ -202,17 +260,16 @@ func (m *Field) Reset() { *m = Field{} } func (m *Field) String() string { return proto.CompactTextString(m) } func (*Field) ProtoMessage() {} func (*Field) Descriptor() ([]byte, []int) { - return fileDescriptor_bf21bfd2215b3e0c, []int{2} + return fileDescriptor_ImportSpec_673bc4f248a91137, []int{2} } - func (m *Field) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Field.Unmarshal(m, b) } func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Field.Marshal(b, m, deterministic) } -func (m *Field) XXX_Merge(src proto.Message) { - xxx_messageInfo_Field.Merge(m, src) +func (dst *Field) XXX_Merge(src proto.Message) { + xxx_messageInfo_Field.Merge(dst, src) } func (m *Field) XXX_Size() int { return xxx_messageInfo_Field.Size(m) @@ -245,9 +302,11 @@ func init() { proto.RegisterType((*Field)(nil), "feast.specs.Field") } -func init() { proto.RegisterFile("feast/specs/ImportSpec.proto", fileDescriptor_bf21bfd2215b3e0c) } +func init() { + proto.RegisterFile("feast/specs/ImportSpec.proto", fileDescriptor_ImportSpec_673bc4f248a91137) +} -var fileDescriptor_bf21bfd2215b3e0c = []byte{ +var fileDescriptor_ImportSpec_673bc4f248a91137 = []byte{ // 440 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x5d, 0x8f, 0x93, 0x40, 0x14, 0x5d, 0xca, 0x16, 0xed, 0x6d, 0xdc, 0x9a, 0xab, 0x0f, 0x84, 0x6c, 0x62, 0xd3, 0x07, 0x6d, diff --git a/protos/generated/go/feast/specs/StorageSpec.pb.go b/protos/generated/go/feast/specs/StorageSpec.pb.go index 180fcf14c5..fefe56a1be 100644 --- a/protos/generated/go/feast/specs/StorageSpec.pb.go +++ b/protos/generated/go/feast/specs/StorageSpec.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/specs/StorageSpec.proto -package specs +package specs // import "github.com/gojek/feast/protos/generated/go/feast/specs" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,7 +16,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type StorageSpec struct { // unique identifier for this instance @@ -38,17 +36,16 @@ func (m *StorageSpec) Reset() { *m = StorageSpec{} } func (m *StorageSpec) String() string { return proto.CompactTextString(m) } func (*StorageSpec) ProtoMessage() {} func (*StorageSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_7783b72a0d689614, []int{0} + return fileDescriptor_StorageSpec_bfb8a5e5cf34de95, []int{0} } - func (m *StorageSpec) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StorageSpec.Unmarshal(m, b) } func (m *StorageSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_StorageSpec.Marshal(b, m, deterministic) } -func (m *StorageSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageSpec.Merge(m, src) +func (dst *StorageSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageSpec.Merge(dst, src) } func (m *StorageSpec) XXX_Size() int { return xxx_messageInfo_StorageSpec.Size(m) @@ -85,9 +82,11 @@ func init() { proto.RegisterMapType((map[string]string)(nil), "feast.specs.StorageSpec.OptionsEntry") } -func init() { proto.RegisterFile("feast/specs/StorageSpec.proto", fileDescriptor_7783b72a0d689614) } +func init() { + proto.RegisterFile("feast/specs/StorageSpec.proto", fileDescriptor_StorageSpec_bfb8a5e5cf34de95) +} -var fileDescriptor_7783b72a0d689614 = []byte{ +var fileDescriptor_StorageSpec_bfb8a5e5cf34de95 = []byte{ // 227 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x4b, 0x4d, 0x2c, 0x2e, 0xd1, 0x2f, 0x2e, 0x48, 0x4d, 0x2e, 0xd6, 0x0f, 0x2e, 0xc9, 0x2f, 0x4a, 0x4c, 0x4f, 0x0d, diff --git a/protos/generated/go/feast/storage/BigTable.pb.go b/protos/generated/go/feast/storage/BigTable.pb.go index 7ad1e0d5b9..50b0ad906e 100644 --- a/protos/generated/go/feast/storage/BigTable.pb.go +++ b/protos/generated/go/feast/storage/BigTable.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/storage/BigTable.proto -package storage +package storage // import "github.com/gojek/feast/protos/generated/go/feast/storage" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,7 +16,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type BigTableRowKey struct { // This should be the first 7 characters of a sha1 of the entityKey proto encoded @@ -34,17 +32,16 @@ func (m *BigTableRowKey) Reset() { *m = BigTableRowKey{} } func (m *BigTableRowKey) String() string { return proto.CompactTextString(m) } func (*BigTableRowKey) ProtoMessage() {} func (*BigTableRowKey) Descriptor() ([]byte, []int) { - return fileDescriptor_1d33ec3bd45c712c, []int{0} + return fileDescriptor_BigTable_367a7ab40da489b0, []int{0} } - func (m *BigTableRowKey) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BigTableRowKey.Unmarshal(m, b) } func (m *BigTableRowKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BigTableRowKey.Marshal(b, m, deterministic) } -func (m *BigTableRowKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_BigTableRowKey.Merge(m, src) +func (dst *BigTableRowKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_BigTableRowKey.Merge(dst, src) } func (m *BigTableRowKey) XXX_Size() int { return xxx_messageInfo_BigTableRowKey.Size(m) @@ -80,9 +77,11 @@ func init() { proto.RegisterType((*BigTableRowKey)(nil), "feast.storage.BigTableRowKey") } -func init() { proto.RegisterFile("feast/storage/BigTable.proto", fileDescriptor_1d33ec3bd45c712c) } +func init() { + proto.RegisterFile("feast/storage/BigTable.proto", fileDescriptor_BigTable_367a7ab40da489b0) +} -var fileDescriptor_1d33ec3bd45c712c = []byte{ +var fileDescriptor_BigTable_367a7ab40da489b0 = []byte{ // 193 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x8f, 0xb1, 0x0b, 0x82, 0x40, 0x18, 0x47, 0xb1, 0x20, 0xf0, 0x40, 0x87, 0x9b, 0x1c, 0x24, 0xa2, 0x21, 0x9a, 0x3c, 0xa2, 0xa5, diff --git a/protos/generated/go/feast/storage/Redis.pb.go b/protos/generated/go/feast/storage/Redis.pb.go index 4d42fa2fcc..49f80a061e 100644 --- a/protos/generated/go/feast/storage/Redis.pb.go +++ b/protos/generated/go/feast/storage/Redis.pb.go @@ -1,15 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/storage/Redis.proto -package storage +package storage // import "github.com/gojek/feast/protos/generated/go/feast/storage" -import ( - fmt "fmt" - types "github.com/gojek/feast/protos/generated/go/feast/types" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import types "github.com/gojek/feast/protos/generated/go/feast/types" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -20,16 +18,16 @@ 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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type RedisBucketKey struct { // Entity key from the FeatureRow EntityKey string `protobuf:"bytes,2,opt,name=entityKey,proto3" json:"entityKey,omitempty"` - //* + // * // This should be the first 7 characters of a sha1 of the featureId // This is just to save storage space as it's kept in memory. FeatureIdSha1Prefix string `protobuf:"bytes,3,opt,name=featureIdSha1Prefix,proto3" json:"featureIdSha1Prefix,omitempty"` - //* + // * // This groups a feature's values (for different eventTimestamps), // into buckets so many can be retrieved together. // @@ -45,17 +43,16 @@ func (m *RedisBucketKey) Reset() { *m = RedisBucketKey{} } func (m *RedisBucketKey) String() string { return proto.CompactTextString(m) } func (*RedisBucketKey) ProtoMessage() {} func (*RedisBucketKey) Descriptor() ([]byte, []int) { - return fileDescriptor_64e898a359fc9e5d, []int{0} + return fileDescriptor_Redis_cef62c817c1622ce, []int{0} } - func (m *RedisBucketKey) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RedisBucketKey.Unmarshal(m, b) } func (m *RedisBucketKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RedisBucketKey.Marshal(b, m, deterministic) } -func (m *RedisBucketKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisBucketKey.Merge(m, src) +func (dst *RedisBucketKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedisBucketKey.Merge(dst, src) } func (m *RedisBucketKey) XXX_Size() int { return xxx_messageInfo_RedisBucketKey.Size(m) @@ -87,7 +84,7 @@ func (m *RedisBucketKey) GetBucketId() uint64 { return 0 } -//* +// * // Because in redis features are stored as a key per feature not per // feature row, we need the event timestamp in the value. type RedisBucketValue struct { @@ -102,17 +99,16 @@ func (m *RedisBucketValue) Reset() { *m = RedisBucketValue{} } func (m *RedisBucketValue) String() string { return proto.CompactTextString(m) } func (*RedisBucketValue) ProtoMessage() {} func (*RedisBucketValue) Descriptor() ([]byte, []int) { - return fileDescriptor_64e898a359fc9e5d, []int{1} + return fileDescriptor_Redis_cef62c817c1622ce, []int{1} } - func (m *RedisBucketValue) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RedisBucketValue.Unmarshal(m, b) } func (m *RedisBucketValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RedisBucketValue.Marshal(b, m, deterministic) } -func (m *RedisBucketValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisBucketValue.Merge(m, src) +func (dst *RedisBucketValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedisBucketValue.Merge(dst, src) } func (m *RedisBucketValue) XXX_Size() int { return xxx_messageInfo_RedisBucketValue.Size(m) @@ -137,7 +133,7 @@ func (m *RedisBucketValue) GetEventTimestamp() *timestamp.Timestamp { return nil } -//* +// * // This allows us to group multiple bucket values together in a // single list to make it easier to keep sets together type RedisBucketValueList struct { @@ -151,17 +147,16 @@ func (m *RedisBucketValueList) Reset() { *m = RedisBucketValueList{} } func (m *RedisBucketValueList) String() string { return proto.CompactTextString(m) } func (*RedisBucketValueList) ProtoMessage() {} func (*RedisBucketValueList) Descriptor() ([]byte, []int) { - return fileDescriptor_64e898a359fc9e5d, []int{2} + return fileDescriptor_Redis_cef62c817c1622ce, []int{2} } - func (m *RedisBucketValueList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RedisBucketValueList.Unmarshal(m, b) } func (m *RedisBucketValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_RedisBucketValueList.Marshal(b, m, deterministic) } -func (m *RedisBucketValueList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisBucketValueList.Merge(m, src) +func (dst *RedisBucketValueList) XXX_Merge(src proto.Message) { + xxx_messageInfo_RedisBucketValueList.Merge(dst, src) } func (m *RedisBucketValueList) XXX_Size() int { return xxx_messageInfo_RedisBucketValueList.Size(m) @@ -185,9 +180,9 @@ func init() { proto.RegisterType((*RedisBucketValueList)(nil), "feast.storage.RedisBucketValueList") } -func init() { proto.RegisterFile("feast/storage/Redis.proto", fileDescriptor_64e898a359fc9e5d) } +func init() { proto.RegisterFile("feast/storage/Redis.proto", fileDescriptor_Redis_cef62c817c1622ce) } -var fileDescriptor_64e898a359fc9e5d = []byte{ +var fileDescriptor_Redis_cef62c817c1622ce = []byte{ // 325 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcd, 0x4f, 0xf2, 0x40, 0x10, 0xc6, 0xd3, 0x97, 0x57, 0x22, 0x4b, 0x24, 0x66, 0x35, 0xb1, 0x36, 0x26, 0x34, 0x9c, 0x7a, diff --git a/protos/generated/go/feast/types/Feature.pb.go b/protos/generated/go/feast/types/Feature.pb.go index 0ef6e65d55..51ed41fb54 100644 --- a/protos/generated/go/feast/types/Feature.pb.go +++ b/protos/generated/go/feast/types/Feature.pb.go @@ -1,13 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/types/Feature.proto -package types +package types // import "github.com/gojek/feast/protos/generated/go/feast/types" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -18,7 +16,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Feature struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -32,17 +30,16 @@ func (m *Feature) Reset() { *m = Feature{} } func (m *Feature) String() string { return proto.CompactTextString(m) } func (*Feature) ProtoMessage() {} func (*Feature) Descriptor() ([]byte, []int) { - return fileDescriptor_4e19474999533fc9, []int{0} + return fileDescriptor_Feature_c2a5d99d9bf3ca9c, []int{0} } - func (m *Feature) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Feature.Unmarshal(m, b) } func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Feature.Marshal(b, m, deterministic) } -func (m *Feature) XXX_Merge(src proto.Message) { - xxx_messageInfo_Feature.Merge(m, src) +func (dst *Feature) XXX_Merge(src proto.Message) { + xxx_messageInfo_Feature.Merge(dst, src) } func (m *Feature) XXX_Size() int { return xxx_messageInfo_Feature.Size(m) @@ -71,9 +68,9 @@ func init() { proto.RegisterType((*Feature)(nil), "feast.types.Feature") } -func init() { proto.RegisterFile("feast/types/Feature.proto", fileDescriptor_4e19474999533fc9) } +func init() { proto.RegisterFile("feast/types/Feature.proto", fileDescriptor_Feature_c2a5d99d9bf3ca9c) } -var fileDescriptor_4e19474999533fc9 = []byte{ +var fileDescriptor_Feature_c2a5d99d9bf3ca9c = []byte{ // 173 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0x4b, 0x4d, 0x2c, 0x2e, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x77, 0x4b, 0x4d, 0x2c, 0x29, 0x2d, 0x4a, 0xd5, diff --git a/protos/generated/go/feast/types/FeatureRow.pb.go b/protos/generated/go/feast/types/FeatureRow.pb.go index 9d482da4a4..b2f9f5de40 100644 --- a/protos/generated/go/feast/types/FeatureRow.pb.go +++ b/protos/generated/go/feast/types/FeatureRow.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/types/FeatureRow.proto -package types +package types // import "github.com/gojek/feast/protos/generated/go/feast/types" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -19,62 +17,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.ProtoPackageIsVersion3 // please upgrade the proto package - -type FeatureRowKey struct { - EntityKey string `protobuf:"bytes,1,opt,name=entityKey,proto3" json:"entityKey,omitempty"` - EventTimestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=eventTimestamp,proto3" json:"eventTimestamp,omitempty"` - EntityName string `protobuf:"bytes,4,opt,name=entityName,proto3" json:"entityName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FeatureRowKey) Reset() { *m = FeatureRowKey{} } -func (m *FeatureRowKey) String() string { return proto.CompactTextString(m) } -func (*FeatureRowKey) ProtoMessage() {} -func (*FeatureRowKey) Descriptor() ([]byte, []int) { - return fileDescriptor_fbbea9c89787d1c7, []int{0} -} - -func (m *FeatureRowKey) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FeatureRowKey.Unmarshal(m, b) -} -func (m *FeatureRowKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FeatureRowKey.Marshal(b, m, deterministic) -} -func (m *FeatureRowKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureRowKey.Merge(m, src) -} -func (m *FeatureRowKey) XXX_Size() int { - return xxx_messageInfo_FeatureRowKey.Size(m) -} -func (m *FeatureRowKey) XXX_DiscardUnknown() { - xxx_messageInfo_FeatureRowKey.DiscardUnknown(m) -} - -var xxx_messageInfo_FeatureRowKey proto.InternalMessageInfo - -func (m *FeatureRowKey) GetEntityKey() string { - if m != nil { - return m.EntityKey - } - return "" -} - -func (m *FeatureRowKey) GetEventTimestamp() *timestamp.Timestamp { - if m != nil { - return m.EventTimestamp - } - return nil -} - -func (m *FeatureRowKey) GetEntityName() string { - if m != nil { - return m.EntityName - } - return "" -} +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type FeatureRow struct { EntityKey string `protobuf:"bytes,1,opt,name=entityKey,proto3" json:"entityKey,omitempty"` @@ -90,17 +33,16 @@ func (m *FeatureRow) Reset() { *m = FeatureRow{} } func (m *FeatureRow) String() string { return proto.CompactTextString(m) } func (*FeatureRow) ProtoMessage() {} func (*FeatureRow) Descriptor() ([]byte, []int) { - return fileDescriptor_fbbea9c89787d1c7, []int{1} + return fileDescriptor_FeatureRow_b534c07ebff1be93, []int{0} } - func (m *FeatureRow) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FeatureRow.Unmarshal(m, b) } func (m *FeatureRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FeatureRow.Marshal(b, m, deterministic) } -func (m *FeatureRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureRow.Merge(m, src) +func (dst *FeatureRow) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeatureRow.Merge(dst, src) } func (m *FeatureRow) XXX_Size() int { return xxx_messageInfo_FeatureRow.Size(m) @@ -140,29 +82,29 @@ func (m *FeatureRow) GetEntityName() string { } func init() { - proto.RegisterType((*FeatureRowKey)(nil), "feast.types.FeatureRowKey") proto.RegisterType((*FeatureRow)(nil), "feast.types.FeatureRow") } -func init() { proto.RegisterFile("feast/types/FeatureRow.proto", fileDescriptor_fbbea9c89787d1c7) } - -var fileDescriptor_fbbea9c89787d1c7 = []byte{ - // 266 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x91, 0xc1, 0x4a, 0xc4, 0x30, - 0x10, 0x86, 0x89, 0x2b, 0xe2, 0xce, 0xa2, 0x42, 0xf1, 0x50, 0xcb, 0xa2, 0x65, 0x4f, 0x3d, 0x65, - 0x64, 0x05, 0x1f, 0xa0, 0x07, 0x2f, 0x0b, 0x22, 0x45, 0x3c, 0x78, 0x4b, 0x75, 0x1a, 0xab, 0xb6, - 0x29, 0xcd, 0x54, 0xe9, 0x63, 0xf8, 0x46, 0x3e, 0x9a, 0x98, 0xd0, 0x6d, 0x11, 0xc1, 0x9b, 0xd7, - 0xf9, 0xff, 0x7c, 0xf3, 0x4f, 0x7e, 0x58, 0x16, 0xa4, 0x2c, 0x23, 0xf7, 0x0d, 0x59, 0xbc, 0x22, - 0xc5, 0x5d, 0x4b, 0x99, 0x79, 0x97, 0x4d, 0x6b, 0xd8, 0x04, 0x0b, 0xa7, 0x4a, 0xa7, 0x46, 0x67, - 0xda, 0x18, 0xfd, 0x4a, 0xe8, 0xa4, 0xbc, 0x2b, 0x90, 0xcb, 0x8a, 0x2c, 0xab, 0xaa, 0xf1, 0xee, - 0xe8, 0xe4, 0x17, 0x96, 0x97, 0x56, 0x1f, 0x02, 0x0e, 0x46, 0xfa, 0x86, 0xfa, 0x60, 0x09, 0x73, - 0xaa, 0xb9, 0xe4, 0x7e, 0x43, 0x7d, 0x28, 0x62, 0x91, 0xcc, 0xb3, 0x71, 0x10, 0xa4, 0x70, 0x48, - 0x6f, 0x54, 0xf3, 0xed, 0xb0, 0x22, 0x9c, 0xc5, 0x22, 0x59, 0xac, 0x23, 0xe9, 0x43, 0xc8, 0x21, - 0x84, 0xdc, 0x3a, 0xb2, 0x1f, 0x2f, 0x82, 0x53, 0x00, 0x0f, 0xbc, 0x56, 0x15, 0x85, 0xbb, 0x6e, - 0xc5, 0x64, 0xb2, 0xfa, 0x14, 0x00, 0x63, 0xa6, 0x3f, 0x02, 0x9d, 0xc3, 0x7e, 0xe1, 0xbd, 0x36, - 0xdc, 0x89, 0x67, 0xc9, 0x62, 0x7d, 0x2c, 0x27, 0x9f, 0x23, 0x07, 0xd0, 0xd6, 0xf5, 0x1f, 0x27, - 0xa4, 0x77, 0x30, 0x6d, 0x28, 0x3d, 0x1a, 0xcf, 0xb9, 0xf9, 0x86, 0xdf, 0x5f, 0xea, 0x92, 0x9f, - 0xba, 0x5c, 0x3e, 0x98, 0x0a, 0xb5, 0x79, 0xa6, 0x17, 0xf4, 0x15, 0xb9, 0xd5, 0x16, 0x35, 0xd5, - 0xd4, 0x2a, 0xa6, 0x47, 0xd4, 0x06, 0x27, 0xe5, 0xe5, 0x7b, 0xce, 0x70, 0xf1, 0x15, 0x00, 0x00, - 0xff, 0xff, 0xa8, 0x83, 0xb6, 0x9f, 0x1e, 0x02, 0x00, 0x00, +func init() { + proto.RegisterFile("feast/types/FeatureRow.proto", fileDescriptor_FeatureRow_b534c07ebff1be93) +} + +var fileDescriptor_FeatureRow_b534c07ebff1be93 = []byte{ + // 248 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0x85, 0x40, + 0x14, 0x86, 0xb1, 0x1b, 0xd1, 0x3d, 0x42, 0xc1, 0xd0, 0xc2, 0xe4, 0x52, 0xd2, 0xca, 0xd5, 0x9c, + 0xb8, 0x41, 0x0f, 0xe0, 0xa2, 0x4d, 0x10, 0x21, 0xd1, 0xa2, 0xdd, 0x58, 0xc7, 0xc9, 0x4a, 0x47, + 0x9c, 0x63, 0xe1, 0xdb, 0xf5, 0x68, 0xd1, 0x0c, 0x5e, 0x87, 0x68, 0x7b, 0xfe, 0xcf, 0xdf, 0x6f, + 0x7e, 0xd8, 0xd4, 0xa4, 0x2c, 0x23, 0x4f, 0x3d, 0x59, 0xbc, 0x21, 0xc5, 0xe3, 0x40, 0xa5, 0xf9, + 0x92, 0xfd, 0x60, 0xd8, 0x88, 0xd8, 0xa5, 0xd2, 0xa5, 0xe9, 0xb9, 0x36, 0x46, 0x7f, 0x10, 0xba, + 0xa8, 0x1a, 0x6b, 0xe4, 0xa6, 0x25, 0xcb, 0xaa, 0xed, 0x3d, 0x9d, 0x9e, 0xfe, 0xd3, 0xe5, 0xa3, + 0x8b, 0xef, 0x08, 0x60, 0x69, 0x17, 0x1b, 0x58, 0x53, 0xc7, 0x0d, 0x4f, 0xb7, 0x34, 0x25, 0x51, + 0x16, 0xe5, 0xeb, 0x72, 0x39, 0x88, 0x4b, 0x38, 0xac, 0x3d, 0x6b, 0x93, 0xbd, 0x6c, 0x95, 0xc7, + 0xdb, 0x13, 0x19, 0x88, 0xc8, 0xb9, 0x68, 0x47, 0x89, 0x02, 0x8e, 0xe8, 0x93, 0x3a, 0x7e, 0x98, + 0x8d, 0x92, 0x55, 0x16, 0xe5, 0xf1, 0x36, 0x95, 0xde, 0x59, 0xce, 0xce, 0x72, 0x47, 0x94, 0x7f, + 0xbe, 0x10, 0x67, 0x00, 0x5e, 0xe1, 0x4e, 0xb5, 0x94, 0xec, 0x3b, 0xa9, 0xe0, 0x52, 0x3c, 0x42, + 0xb8, 0x46, 0x71, 0xbc, 0x3c, 0xe7, 0xfe, 0xb7, 0xfc, 0xe9, 0x5a, 0x37, 0xfc, 0x3a, 0x56, 0xf2, + 0xd9, 0xb4, 0xa8, 0xcd, 0x1b, 0xbd, 0xa3, 0x9f, 0xc3, 0xfd, 0xda, 0xa2, 0xa6, 0x8e, 0x06, 0xc5, + 0xf4, 0x82, 0xda, 0x60, 0x30, 0x54, 0x75, 0xe0, 0x80, 0xab, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x1d, 0xcd, 0xff, 0x6c, 0x8a, 0x01, 0x00, 0x00, } diff --git a/protos/generated/go/feast/types/FeatureRowExtended.pb.go b/protos/generated/go/feast/types/FeatureRowExtended.pb.go index e8371fcfcd..ad89f27db2 100644 --- a/protos/generated/go/feast/types/FeatureRowExtended.pb.go +++ b/protos/generated/go/feast/types/FeatureRowExtended.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/types/FeatureRowExtended.proto -package types +package types // import "github.com/gojek/feast/protos/generated/go/feast/types" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -19,7 +17,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Error struct { Cause string `protobuf:"bytes,1,opt,name=cause,proto3" json:"cause,omitempty"` @@ -35,17 +33,16 @@ func (m *Error) Reset() { *m = Error{} } func (m *Error) String() string { return proto.CompactTextString(m) } func (*Error) ProtoMessage() {} func (*Error) Descriptor() ([]byte, []int) { - return fileDescriptor_7823aa2c72575793, []int{0} + return fileDescriptor_FeatureRowExtended_bfd3c37956d1a040, []int{0} } - func (m *Error) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Error.Unmarshal(m, b) } func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Error.Marshal(b, m, deterministic) } -func (m *Error) XXX_Merge(src proto.Message) { - xxx_messageInfo_Error.Merge(m, src) +func (dst *Error) XXX_Merge(src proto.Message) { + xxx_messageInfo_Error.Merge(dst, src) } func (m *Error) XXX_Size() int { return xxx_messageInfo_Error.Size(m) @@ -96,17 +93,16 @@ func (m *Attempt) Reset() { *m = Attempt{} } func (m *Attempt) String() string { return proto.CompactTextString(m) } func (*Attempt) ProtoMessage() {} func (*Attempt) Descriptor() ([]byte, []int) { - return fileDescriptor_7823aa2c72575793, []int{1} + return fileDescriptor_FeatureRowExtended_bfd3c37956d1a040, []int{1} } - func (m *Attempt) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Attempt.Unmarshal(m, b) } func (m *Attempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Attempt.Marshal(b, m, deterministic) } -func (m *Attempt) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attempt.Merge(m, src) +func (dst *Attempt) XXX_Merge(src proto.Message) { + xxx_messageInfo_Attempt.Merge(dst, src) } func (m *Attempt) XXX_Size() int { return xxx_messageInfo_Attempt.Size(m) @@ -144,17 +140,16 @@ func (m *FeatureRowExtended) Reset() { *m = FeatureRowExtended{} } func (m *FeatureRowExtended) String() string { return proto.CompactTextString(m) } func (*FeatureRowExtended) ProtoMessage() {} func (*FeatureRowExtended) Descriptor() ([]byte, []int) { - return fileDescriptor_7823aa2c72575793, []int{2} + return fileDescriptor_FeatureRowExtended_bfd3c37956d1a040, []int{2} } - func (m *FeatureRowExtended) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FeatureRowExtended.Unmarshal(m, b) } func (m *FeatureRowExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FeatureRowExtended.Marshal(b, m, deterministic) } -func (m *FeatureRowExtended) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeatureRowExtended.Merge(m, src) +func (dst *FeatureRowExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeatureRowExtended.Merge(dst, src) } func (m *FeatureRowExtended) XXX_Size() int { return xxx_messageInfo_FeatureRowExtended.Size(m) @@ -193,10 +188,10 @@ func init() { } func init() { - proto.RegisterFile("feast/types/FeatureRowExtended.proto", fileDescriptor_7823aa2c72575793) + proto.RegisterFile("feast/types/FeatureRowExtended.proto", fileDescriptor_FeatureRowExtended_bfd3c37956d1a040) } -var fileDescriptor_7823aa2c72575793 = []byte{ +var fileDescriptor_FeatureRowExtended_bfd3c37956d1a040 = []byte{ // 338 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x6b, 0xea, 0x40, 0x10, 0xc6, 0xf1, 0xf9, 0xf2, 0x7c, 0x4e, 0x6e, 0x8b, 0x60, 0x08, 0xd2, 0x16, 0xe9, 0xc1, 0x5e, diff --git a/protos/generated/go/feast/types/Value.pb.go b/protos/generated/go/feast/types/Value.pb.go index a7ef038e1d..b9c26f8c4b 100644 --- a/protos/generated/go/feast/types/Value.pb.go +++ b/protos/generated/go/feast/types/Value.pb.go @@ -1,14 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: feast/types/Value.proto -package types +package types // import "github.com/gojek/feast/protos/generated/go/feast/types" -import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - math "math" -) +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -19,7 +17,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.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type ValueType_Enum int32 @@ -46,7 +44,6 @@ var ValueType_Enum_name = map[int32]string{ 7: "BOOL", 8: "TIMESTAMP", } - var ValueType_Enum_value = map[string]int32{ "UNKNOWN": 0, "BYTES": 1, @@ -62,9 +59,8 @@ var ValueType_Enum_value = map[string]int32{ func (x ValueType_Enum) String() string { return proto.EnumName(ValueType_Enum_name, int32(x)) } - func (ValueType_Enum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{0, 0} + return fileDescriptor_Value_0680a2f024df1112, []int{0, 0} } type ValueType struct { @@ -77,17 +73,16 @@ func (m *ValueType) Reset() { *m = ValueType{} } func (m *ValueType) String() string { return proto.CompactTextString(m) } func (*ValueType) ProtoMessage() {} func (*ValueType) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{0} + return fileDescriptor_Value_0680a2f024df1112, []int{0} } - func (m *ValueType) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValueType.Unmarshal(m, b) } func (m *ValueType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ValueType.Marshal(b, m, deterministic) } -func (m *ValueType) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueType.Merge(m, src) +func (dst *ValueType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValueType.Merge(dst, src) } func (m *ValueType) XXX_Size() int { return xxx_messageInfo_ValueType.Size(m) @@ -118,17 +113,16 @@ func (m *Value) Reset() { *m = Value{} } func (m *Value) String() string { return proto.CompactTextString(m) } func (*Value) ProtoMessage() {} func (*Value) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{1} + return fileDescriptor_Value_0680a2f024df1112, []int{1} } - func (m *Value) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Value.Unmarshal(m, b) } func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Value.Marshal(b, m, deterministic) } -func (m *Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Value.Merge(m, src) +func (dst *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(dst, src) } func (m *Value) XXX_Size() int { return xxx_messageInfo_Value.Size(m) @@ -254,9 +248,9 @@ func (m *Value) GetTimestampVal() *timestamp.Timestamp { return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Value) XXX_OneofWrappers() []interface{} { - return []interface{}{ +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Value) 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 _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ (*Value_BytesVal)(nil), (*Value_StringVal)(nil), (*Value_Int32Val)(nil), @@ -268,6 +262,151 @@ func (*Value) XXX_OneofWrappers() []interface{} { } } +func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Value) + // val + switch x := m.Val.(type) { + case *Value_BytesVal: + b.EncodeVarint(1<<3 | proto.WireBytes) + b.EncodeRawBytes(x.BytesVal) + case *Value_StringVal: + b.EncodeVarint(2<<3 | proto.WireBytes) + b.EncodeStringBytes(x.StringVal) + case *Value_Int32Val: + b.EncodeVarint(3<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Int32Val)) + case *Value_Int64Val: + b.EncodeVarint(4<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Int64Val)) + case *Value_DoubleVal: + b.EncodeVarint(5<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.DoubleVal)) + case *Value_FloatVal: + b.EncodeVarint(6<<3 | proto.WireFixed32) + b.EncodeFixed32(uint64(math.Float32bits(x.FloatVal))) + case *Value_BoolVal: + t := uint64(0) + if x.BoolVal { + t = 1 + } + b.EncodeVarint(7<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *Value_TimestampVal: + b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.TimestampVal); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Value.Val has unexpected type %T", x) + } + return nil +} + +func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Value) + switch tag { + case 1: // val.bytesVal + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Val = &Value_BytesVal{x} + return true, err + case 2: // val.stringVal + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Val = &Value_StringVal{x} + return true, err + case 3: // val.int32Val + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Val = &Value_Int32Val{int32(x)} + return true, err + case 4: // val.int64Val + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Val = &Value_Int64Val{int64(x)} + return true, err + case 5: // val.doubleVal + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Val = &Value_DoubleVal{math.Float64frombits(x)} + return true, err + case 6: // val.floatVal + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Val = &Value_FloatVal{math.Float32frombits(uint32(x))} + return true, err + case 7: // val.boolVal + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Val = &Value_BoolVal{x != 0} + return true, err + case 8: // val.timestampVal + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(timestamp.Timestamp) + err := b.DecodeMessage(msg) + m.Val = &Value_TimestampVal{msg} + return true, err + default: + return false, nil + } +} + +func _Value_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Value) + // val + switch x := m.Val.(type) { + case *Value_BytesVal: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.BytesVal))) + n += len(x.BytesVal) + case *Value_StringVal: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.StringVal))) + n += len(x.StringVal) + case *Value_Int32Val: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Int32Val)) + case *Value_Int64Val: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Int64Val)) + case *Value_DoubleVal: + n += 1 // tag and wire + n += 8 + case *Value_FloatVal: + n += 1 // tag and wire + n += 4 + case *Value_BoolVal: + n += 1 // tag and wire + n += 1 + case *Value_TimestampVal: + s := proto.Size(x.TimestampVal) + 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 ValueList struct { // Types that are valid to be assigned to ValueList: // *ValueList_BytesList @@ -288,17 +427,16 @@ func (m *ValueList) Reset() { *m = ValueList{} } func (m *ValueList) String() string { return proto.CompactTextString(m) } func (*ValueList) ProtoMessage() {} func (*ValueList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{2} + return fileDescriptor_Value_0680a2f024df1112, []int{2} } - func (m *ValueList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ValueList.Unmarshal(m, b) } func (m *ValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_ValueList.Marshal(b, m, deterministic) } -func (m *ValueList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueList.Merge(m, src) +func (dst *ValueList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValueList.Merge(dst, src) } func (m *ValueList) XXX_Size() int { return xxx_messageInfo_ValueList.Size(m) @@ -424,9 +562,9 @@ func (m *ValueList) GetTimestampList() *TimestampList { return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ValueList) XXX_OneofWrappers() []interface{} { - return []interface{}{ +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ValueList) 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 _ValueList_OneofMarshaler, _ValueList_OneofUnmarshaler, _ValueList_OneofSizer, []interface{}{ (*ValueList_BytesList)(nil), (*ValueList_StringList)(nil), (*ValueList_Int32List)(nil), @@ -438,6 +576,180 @@ func (*ValueList) XXX_OneofWrappers() []interface{} { } } +func _ValueList_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ValueList) + // valueList + switch x := m.ValueList.(type) { + case *ValueList_BytesList: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.BytesList); err != nil { + return err + } + case *ValueList_StringList: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.StringList); err != nil { + return err + } + case *ValueList_Int32List: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Int32List); err != nil { + return err + } + case *ValueList_Int64List: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Int64List); err != nil { + return err + } + case *ValueList_DoubleList: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DoubleList); err != nil { + return err + } + case *ValueList_FloatList: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.FloatList); err != nil { + return err + } + case *ValueList_BoolList: + b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.BoolList); err != nil { + return err + } + case *ValueList_TimestampList: + b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.TimestampList); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ValueList.ValueList has unexpected type %T", x) + } + return nil +} + +func _ValueList_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ValueList) + switch tag { + case 1: // valueList.bytesList + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(BytesList) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_BytesList{msg} + return true, err + case 2: // valueList.stringList + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(StringList) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_StringList{msg} + return true, err + case 3: // valueList.int32List + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Int32List) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_Int32List{msg} + return true, err + case 4: // valueList.int64List + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Int64List) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_Int64List{msg} + return true, err + case 5: // valueList.doubleList + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DoubleList) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_DoubleList{msg} + return true, err + case 6: // valueList.floatList + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(FloatList) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_FloatList{msg} + return true, err + case 7: // valueList.boolList + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(BoolList) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_BoolList{msg} + return true, err + case 8: // valueList.timestampList + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TimestampList) + err := b.DecodeMessage(msg) + m.ValueList = &ValueList_TimestampList{msg} + return true, err + default: + return false, nil + } +} + +func _ValueList_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ValueList) + // valueList + switch x := m.ValueList.(type) { + case *ValueList_BytesList: + s := proto.Size(x.BytesList) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_StringList: + s := proto.Size(x.StringList) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_Int32List: + s := proto.Size(x.Int32List) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_Int64List: + s := proto.Size(x.Int64List) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_DoubleList: + s := proto.Size(x.DoubleList) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_FloatList: + s := proto.Size(x.FloatList) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_BoolList: + s := proto.Size(x.BoolList) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *ValueList_TimestampList: + s := proto.Size(x.TimestampList) + 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 BytesList struct { Val [][]byte `protobuf:"bytes,1,rep,name=val,proto3" json:"val,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -449,17 +761,16 @@ func (m *BytesList) Reset() { *m = BytesList{} } func (m *BytesList) String() string { return proto.CompactTextString(m) } func (*BytesList) ProtoMessage() {} func (*BytesList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{3} + return fileDescriptor_Value_0680a2f024df1112, []int{3} } - func (m *BytesList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BytesList.Unmarshal(m, b) } func (m *BytesList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BytesList.Marshal(b, m, deterministic) } -func (m *BytesList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BytesList.Merge(m, src) +func (dst *BytesList) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesList.Merge(dst, src) } func (m *BytesList) XXX_Size() int { return xxx_messageInfo_BytesList.Size(m) @@ -488,17 +799,16 @@ func (m *StringList) Reset() { *m = StringList{} } func (m *StringList) String() string { return proto.CompactTextString(m) } func (*StringList) ProtoMessage() {} func (*StringList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{4} + return fileDescriptor_Value_0680a2f024df1112, []int{4} } - func (m *StringList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_StringList.Unmarshal(m, b) } func (m *StringList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_StringList.Marshal(b, m, deterministic) } -func (m *StringList) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringList.Merge(m, src) +func (dst *StringList) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringList.Merge(dst, src) } func (m *StringList) XXX_Size() int { return xxx_messageInfo_StringList.Size(m) @@ -527,17 +837,16 @@ func (m *Int32List) Reset() { *m = Int32List{} } func (m *Int32List) String() string { return proto.CompactTextString(m) } func (*Int32List) ProtoMessage() {} func (*Int32List) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{5} + return fileDescriptor_Value_0680a2f024df1112, []int{5} } - func (m *Int32List) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Int32List.Unmarshal(m, b) } func (m *Int32List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Int32List.Marshal(b, m, deterministic) } -func (m *Int32List) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int32List.Merge(m, src) +func (dst *Int32List) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int32List.Merge(dst, src) } func (m *Int32List) XXX_Size() int { return xxx_messageInfo_Int32List.Size(m) @@ -566,17 +875,16 @@ func (m *Int64List) Reset() { *m = Int64List{} } func (m *Int64List) String() string { return proto.CompactTextString(m) } func (*Int64List) ProtoMessage() {} func (*Int64List) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{6} + return fileDescriptor_Value_0680a2f024df1112, []int{6} } - func (m *Int64List) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Int64List.Unmarshal(m, b) } func (m *Int64List) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Int64List.Marshal(b, m, deterministic) } -func (m *Int64List) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int64List.Merge(m, src) +func (dst *Int64List) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64List.Merge(dst, src) } func (m *Int64List) XXX_Size() int { return xxx_messageInfo_Int64List.Size(m) @@ -605,17 +913,16 @@ func (m *DoubleList) Reset() { *m = DoubleList{} } func (m *DoubleList) String() string { return proto.CompactTextString(m) } func (*DoubleList) ProtoMessage() {} func (*DoubleList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{7} + return fileDescriptor_Value_0680a2f024df1112, []int{7} } - func (m *DoubleList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DoubleList.Unmarshal(m, b) } func (m *DoubleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_DoubleList.Marshal(b, m, deterministic) } -func (m *DoubleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleList.Merge(m, src) +func (dst *DoubleList) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleList.Merge(dst, src) } func (m *DoubleList) XXX_Size() int { return xxx_messageInfo_DoubleList.Size(m) @@ -644,17 +951,16 @@ func (m *FloatList) Reset() { *m = FloatList{} } func (m *FloatList) String() string { return proto.CompactTextString(m) } func (*FloatList) ProtoMessage() {} func (*FloatList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{8} + return fileDescriptor_Value_0680a2f024df1112, []int{8} } - func (m *FloatList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FloatList.Unmarshal(m, b) } func (m *FloatList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_FloatList.Marshal(b, m, deterministic) } -func (m *FloatList) XXX_Merge(src proto.Message) { - xxx_messageInfo_FloatList.Merge(m, src) +func (dst *FloatList) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatList.Merge(dst, src) } func (m *FloatList) XXX_Size() int { return xxx_messageInfo_FloatList.Size(m) @@ -683,17 +989,16 @@ func (m *BoolList) Reset() { *m = BoolList{} } func (m *BoolList) String() string { return proto.CompactTextString(m) } func (*BoolList) ProtoMessage() {} func (*BoolList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{9} + return fileDescriptor_Value_0680a2f024df1112, []int{9} } - func (m *BoolList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BoolList.Unmarshal(m, b) } func (m *BoolList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_BoolList.Marshal(b, m, deterministic) } -func (m *BoolList) XXX_Merge(src proto.Message) { - xxx_messageInfo_BoolList.Merge(m, src) +func (dst *BoolList) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolList.Merge(dst, src) } func (m *BoolList) XXX_Size() int { return xxx_messageInfo_BoolList.Size(m) @@ -722,17 +1027,16 @@ func (m *TimestampList) Reset() { *m = TimestampList{} } func (m *TimestampList) String() string { return proto.CompactTextString(m) } func (*TimestampList) ProtoMessage() {} func (*TimestampList) Descriptor() ([]byte, []int) { - return fileDescriptor_47c504407d284ecc, []int{10} + return fileDescriptor_Value_0680a2f024df1112, []int{10} } - func (m *TimestampList) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TimestampList.Unmarshal(m, b) } func (m *TimestampList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_TimestampList.Marshal(b, m, deterministic) } -func (m *TimestampList) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimestampList.Merge(m, src) +func (dst *TimestampList) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimestampList.Merge(dst, src) } func (m *TimestampList) XXX_Size() int { return xxx_messageInfo_TimestampList.Size(m) @@ -751,7 +1055,6 @@ func (m *TimestampList) GetVal() []*timestamp.Timestamp { } func init() { - proto.RegisterEnum("feast.types.ValueType_Enum", ValueType_Enum_name, ValueType_Enum_value) proto.RegisterType((*ValueType)(nil), "feast.types.ValueType") proto.RegisterType((*Value)(nil), "feast.types.Value") proto.RegisterType((*ValueList)(nil), "feast.types.ValueList") @@ -763,11 +1066,12 @@ func init() { proto.RegisterType((*FloatList)(nil), "feast.types.FloatList") proto.RegisterType((*BoolList)(nil), "feast.types.BoolList") proto.RegisterType((*TimestampList)(nil), "feast.types.TimestampList") + proto.RegisterEnum("feast.types.ValueType_Enum", ValueType_Enum_name, ValueType_Enum_value) } -func init() { proto.RegisterFile("feast/types/Value.proto", fileDescriptor_47c504407d284ecc) } +func init() { proto.RegisterFile("feast/types/Value.proto", fileDescriptor_Value_0680a2f024df1112) } -var fileDescriptor_47c504407d284ecc = []byte{ +var fileDescriptor_Value_0680a2f024df1112 = []byte{ // 626 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xd1, 0x6f, 0x9a, 0x50, 0x14, 0xc6, 0xb9, 0x22, 0x0a, 0xc7, 0x36, 0x21, 0x37, 0xd9, 0xda, 0x34, 0x6d, 0x47, 0x7c, 0xe2, diff --git a/serving/src/main/java/feast/serving/config/ServingApiConfiguration.java b/serving/src/main/java/feast/serving/config/ServingApiConfiguration.java index ab800c7b5b..db95dad859 100644 --- a/serving/src/main/java/feast/serving/config/ServingApiConfiguration.java +++ b/serving/src/main/java/feast/serving/config/ServingApiConfiguration.java @@ -17,8 +17,11 @@ package feast.serving.config; +import com.google.common.base.Strings; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import feast.serving.service.CachedSpecStorage; import feast.serving.service.CoreService; import feast.serving.service.FeatureStorageRegistry; @@ -26,6 +29,8 @@ import feast.specs.StorageSpecProto.StorageSpec; import io.opentracing.Tracer; import io.opentracing.contrib.concurrent.TracedExecutorService; +import java.lang.reflect.Type; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; @@ -41,15 +46,28 @@ import org.springframework.http.converter.protobuf.ProtobufJsonFormatHttpMessageConverter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -/** Global bean configuration. */ +/** + * Global bean configuration. + */ @Slf4j @Configuration public class ServingApiConfiguration implements WebMvcConfigurer { - @Autowired private ProtobufJsonFormatHttpMessageConverter protobufConverter; + @Autowired + private ProtobufJsonFormatHttpMessageConverter protobufConverter; private ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(); + private static Map convertJsonStringToMap(String jsonString) { + if (jsonString == null || jsonString.equals("") || jsonString.equals("{}")) { + return Collections.emptyMap(); + } + Type stringMapType = new TypeToken>() { + }.getType(); + return new Gson().fromJson(jsonString, stringMapType); + } + + @Bean public AppConfig getAppConfig( @Value("${feast.redispool.maxsize}") int redisPoolMaxSize, @@ -87,13 +105,22 @@ public SpecStorage getCoreServiceSpecStorage( @Bean public FeatureStorageRegistry getFeatureStorageRegistry( - SpecStorage specStorage, AppConfig appConfig, Tracer tracer) { + @Value("${feast.store.serving.type}") String storageType, + @Value("${feast.store.serving.options}") String storageOptions, + AppConfig appConfig, Tracer tracer) { + storageOptions = Strings.isNullOrEmpty(storageOptions) ? "{}" : storageOptions; + Map optionsMap = convertJsonStringToMap(storageOptions); + StorageSpec storageSpec = StorageSpec.getDefaultInstance(); + if (Strings.isNullOrEmpty(storageType)) { + storageSpec = StorageSpec.newBuilder() + .setId("SERVING") + .setType(storageType) + .putAllOptions(optionsMap) + .build(); + } FeatureStorageRegistry registry = new FeatureStorageRegistry(appConfig, tracer); try { - Map storageSpecs = specStorage.getAllStorageSpecs(); - for (StorageSpec storageSpec : storageSpecs.values()) { - registry.connect(storageSpec); - } + registry.connect(storageSpec); } catch (Exception e) { log.error( "Unable to create a pre-populated storage registry, connection will be made in ad-hoc basis", diff --git a/serving/src/main/java/feast/serving/service/BigTableFeatureStorage.java b/serving/src/main/java/feast/serving/service/BigTableFeatureStorage.java index 379e1b6aa0..c2681a6ce2 100644 --- a/serving/src/main/java/feast/serving/service/BigTableFeatureStorage.java +++ b/serving/src/main/java/feast/serving/service/BigTableFeatureStorage.java @@ -17,18 +17,21 @@ package feast.serving.service; -import com.google.common.base.Strings; +import com.google.cloud.bigtable.hbase.BigtableConfiguration; +import com.google.common.base.Preconditions; import com.google.protobuf.Timestamp; import com.google.protobuf.util.Timestamps; import feast.serving.exception.FeatureRetrievalException; import feast.serving.model.FeatureValue; import feast.specs.FeatureSpecProto.FeatureSpec; +import feast.specs.StorageSpecProto.StorageSpec; import feast.storage.BigTableProto.BigTableRowKey; import feast.types.ValueProto.Value; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; import org.apache.hadoop.hbase.Cell; @@ -38,23 +41,51 @@ import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.Table; -/** Connector to BigTable instance. */ +/** + * Connector to BigTable instance. + */ @Slf4j public class BigTableFeatureStorage implements FeatureStorage { public static final String TYPE = "bigtable"; - private static final byte[] DEFAULT_COLUMN_FAMILY = "default".getBytes(); + private static final String DEFAULT_COLUMN_FAMILY = "default"; public static String OPT_BIGTABLE_PROJECT = "project"; public static String OPT_BIGTABLE_INSTANCE = "instance"; public static String OPT_BIGTABLE_TABLE_PREFIX = "tablePrefix"; - public static String SERVING_OPT_BIGTABLE_COLUMN_FAMILY = "family"; - private final Connection connection; + public static String STORAGE_OPT_BIGTABLE_COLUMN_FAMILY = "family"; + public static String FEATURE_OPT_BIGTABLE_COLUMN_FAMILY = "bigtable.family"; + + private final StorageSpec storageSpec; + private final BigTableConnectionFactory connectionFactory; + private transient Connection connection; + - public BigTableFeatureStorage(Connection connection) { - this.connection = connection; + public BigTableFeatureStorage(StorageSpec storageSpec) { + Preconditions.checkArgument(storageSpec.getType().equals(TYPE)); + this.storageSpec = storageSpec; + this.connectionFactory = new BigTableConnectionFactory(storageSpec); } - /** {@inheritDoc} */ + /** + * For tests + */ + public BigTableFeatureStorage(StorageSpec storageSpec, + BigTableConnectionFactory connectionFactory) { + Preconditions.checkArgument(storageSpec.getType().equals(TYPE)); + this.storageSpec = storageSpec; + this.connectionFactory = connectionFactory; + } + + protected Connection getConnection() { + if (connection == null) { + connection = connectionFactory.connect(); + } + return connection; + } + + /** + * {@inheritDoc} + */ @Override public List getFeature( String entityName, Collection entityIds, Collection featureSpecs) { @@ -79,7 +110,7 @@ private List getCurrentFeatureInternal( String featureId = featureSpec.getId(); byte[] featureIdBytes = featureSpec.getId().getBytes(); List gets = createGets(entityIds, featureSpec); - try (Table table = connection.getTable(TableName.valueOf(entityName))) { + try (Table table = getConnection().getTable(TableName.valueOf(entityName))) { Result[] results = table.get(gets); for (Result result : results) { Cell currentCell = result.getColumnLatestCell(getColumnFamily(featureSpec), featureIdBytes); @@ -164,10 +195,23 @@ private BigTableRowKey createRowKey( */ private byte[] getColumnFamily(FeatureSpec fs) { String family = - fs.getDataStores().getServing().getOptionsMap().get(SERVING_OPT_BIGTABLE_COLUMN_FAMILY); - if (Strings.isNullOrEmpty(family)) { - return DEFAULT_COLUMN_FAMILY; + fs.getOptionsOrDefault(FEATURE_OPT_BIGTABLE_COLUMN_FAMILY, null); + if (family == null) { + family = storageSpec + .getOptionsOrDefault(STORAGE_OPT_BIGTABLE_COLUMN_FAMILY, DEFAULT_COLUMN_FAMILY); } return family.getBytes(); } + + @AllArgsConstructor + public static class BigTableConnectionFactory { + + private StorageSpec storageSpec; + + Connection connect() { + return BigtableConfiguration.connect( + storageSpec.getOptionsOrThrow(BigTableFeatureStorage.OPT_BIGTABLE_PROJECT), + storageSpec.getOptionsOrThrow(BigTableFeatureStorage.OPT_BIGTABLE_INSTANCE)); + } + } } diff --git a/serving/src/main/java/feast/serving/service/CachedSpecStorage.java b/serving/src/main/java/feast/serving/service/CachedSpecStorage.java index bddcdbc23f..8745d7f983 100644 --- a/serving/src/main/java/feast/serving/service/CachedSpecStorage.java +++ b/serving/src/main/java/feast/serving/service/CachedSpecStorage.java @@ -28,18 +28,20 @@ import java.util.Map; import lombok.extern.slf4j.Slf4j; -/** SpecStorage implementation with built-in in-memory cache. */ +/** + * SpecStorage implementation with built-in in-memory cache. + */ @Slf4j public class CachedSpecStorage implements SpecStorage { - private static final int MAX_SPEC_COUNT = 10000; + + private static final int MAX_SPEC_COUNT = 1000; private final CoreService coreService; private final LoadingCache entitySpecCache; private final CacheLoader entitySpecLoader; private final LoadingCache featureSpecCache; private final CacheLoader featureSpecLoader; - private final LoadingCache storageSpecCache; - private final CacheLoader storageSpecLoader; + private StorageSpec storageSpec; public CachedSpecStorage(CoreService coreService) { this.coreService = coreService; @@ -53,12 +55,6 @@ public CachedSpecStorage(CoreService coreService) { (String key) -> coreService.getFeatureSpecs(Collections.singletonList(key)).get(key)); featureSpecCache = CacheBuilder.newBuilder().maximumSize(MAX_SPEC_COUNT).build(featureSpecLoader); - - storageSpecLoader = - CacheLoader.from( - (String key) -> coreService.getStorageSpecs(Collections.singletonList(key)).get(key)); - storageSpecCache = - CacheBuilder.newBuilder().maximumSize(MAX_SPEC_COUNT).build(storageSpecLoader); } @Override @@ -93,54 +89,19 @@ public Map getFeatureSpecs(Iterable featureIds) { } } - @Override - public Map getAllFeatureSpecs() { - try { - Map result = coreService.getAllFeatureSpecs(); - featureSpecCache.putAll(result); - return result; - } catch (Exception e) { - log.error("Error while retrieving feature spec: {}", e); - throw new SpecRetrievalException("Error while retrieving feature spec", e); - } - } - - @Override - public Map getStorageSpecs(Iterable storageIds) { - try { - return storageSpecCache.getAll(storageIds); - } catch (Exception e) { - log.error("Error while retrieving storage spec: {}", e); - throw new SpecRetrievalException("Error while retrieving storage spec", e); - } - } - - @Override - public Map getAllStorageSpecs() { - try { - Map result = coreService.getAllStorageSpecs(); - storageSpecCache.putAll(result); - return result; - } catch (Exception e) { - log.error("Error while retrieving storage spec: {}", e); - throw new SpecRetrievalException("Error while retrieving storage spec", e); - } - } - @Override public boolean isConnected() { return coreService.isConnected(); } - /** Preload all spec into cache. */ + /** + * Preload all spec into cache. + */ public void populateCache() { Map featureSpecMap = coreService.getAllFeatureSpecs(); featureSpecCache.putAll(featureSpecMap); Map entitySpecMap = coreService.getAllEntitySpecs(); entitySpecCache.putAll(entitySpecMap); - - Map storageSpecMap = coreService.getAllStorageSpecs(); - storageSpecCache.putAll(storageSpecMap); } } diff --git a/serving/src/main/java/feast/serving/service/CoreService.java b/serving/src/main/java/feast/serving/service/CoreService.java index 3c8ca076e9..62a0c7b3c4 100644 --- a/serving/src/main/java/feast/serving/service/CoreService.java +++ b/serving/src/main/java/feast/serving/service/CoreService.java @@ -18,26 +18,32 @@ package feast.serving.service; import com.google.protobuf.Empty; -import io.grpc.ConnectivityState; -import io.grpc.ManagedChannel; -import io.grpc.ManagedChannelBuilder; -import io.grpc.StatusRuntimeException; -import lombok.extern.slf4j.Slf4j; import feast.core.CoreServiceGrpc; -import feast.core.CoreServiceProto.CoreServiceTypes.*; +import feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesRequest; +import feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesResponse; +import feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesRequest; +import feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesResponse; +import feast.core.CoreServiceProto.CoreServiceTypes.ListEntitiesResponse; +import feast.core.CoreServiceProto.CoreServiceTypes.ListFeaturesResponse; import feast.serving.exception.SpecRetrievalException; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureSpecProto.FeatureSpec; -import feast.specs.StorageSpecProto.StorageSpec; - +import io.grpc.ConnectivityState; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.StatusRuntimeException; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Function; import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; -/** Class responsible for retrieving Feature, Entity, and Storage Spec from Feast Core service. */ +/** + * Class responsible for retrieving Feature, Entity, and Storage Spec from Feast Core service. + */ @Slf4j public class CoreService implements SpecStorage { + private final ManagedChannel channel; private final CoreServiceGrpc.CoreServiceBlockingStub blockingStub; @@ -129,46 +135,6 @@ public Map getAllFeatureSpecs() { } } - /** - * Get map of {@link StorageSpec} from Core API, given a collection of storageId. - * - * @param storageIds collection of storageId to retrieve. - * @return map of storage id as key and {@link StorageSpec} as value. - * @throws SpecRetrievalException if any error happens during retrieval - */ - public Map getStorageSpecs(Iterable storageIds) { - try { - GetStorageRequest request = GetStorageRequest.newBuilder().addAllIds(storageIds).build(); - - GetStorageResponse response = blockingStub.getStorage(request); - return response - .getStorageSpecsList() - .stream() - .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); - } catch (StatusRuntimeException e) { - log.error("GRPC error in getStorageSpecs: {}", e.getStatus()); - throw new SpecRetrievalException("Unable to retrieve storage specs", e); - } - } - - /** - * Get all {@link StorageSpec} from Core API. - * - * @return map of storage id as key and {@link StorageSpec} as value. - */ - public Map getAllStorageSpecs() { - try { - ListStorageResponse response = blockingStub.listStorage(Empty.getDefaultInstance()); - return response - .getStorageSpecsList() - .stream() - .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); - } catch (StatusRuntimeException e) { - log.error("GRPC error in getAllStorageSpecs, {}", e.getStatus()); - throw new SpecRetrievalException("Unable to retrieve storage specs", e); - } - } - /** * Check whether connection to core service is ready. * @@ -181,8 +147,6 @@ public boolean isConnected() { /** * Shutdown GRPC channel. - * - * @throws InterruptedException */ public void shutdown() throws InterruptedException { log.info("Shutting down CoreService"); diff --git a/serving/src/main/java/feast/serving/service/FeastServing.java b/serving/src/main/java/feast/serving/service/FeastServing.java index 0e1ee830ab..1975cc44a4 100644 --- a/serving/src/main/java/feast/serving/service/FeastServing.java +++ b/serving/src/main/java/feast/serving/service/FeastServing.java @@ -22,14 +22,10 @@ import feast.serving.ServingAPIProto.QueryFeaturesRequest; import feast.serving.ServingAPIProto.QueryFeaturesResponse; import feast.specs.FeatureSpecProto.FeatureSpec; -import feast.specs.StorageSpecProto.StorageSpec; import io.opentracing.Scope; import io.opentracing.Tracer; -import java.util.ArrayList; import java.util.Collection; -import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -42,19 +38,18 @@ @Slf4j public class FeastServing { + public static final String SERVING_STORAGE_ID = "SERVING"; + private final SpecStorage specStorage; - private final FeatureStorageRegistry featureStorageRegistry; private final Tracer tracer; private final FeatureRetrievalDispatcher featureRetrievalDispatcher; @Autowired public FeastServing( FeatureRetrievalDispatcher featureRetrievalDispatcher, - FeatureStorageRegistry featureStorageRegistry, SpecStorage specStorage, Tracer tracer) { this.specStorage = specStorage; - this.featureStorageRegistry = featureStorageRegistry; this.featureRetrievalDispatcher = featureRetrievalDispatcher; this.tracer = tracer; } @@ -69,13 +64,6 @@ public QueryFeaturesResponse queryFeatures(QueryFeaturesRequest request) { try (Scope scope = tracer.buildSpan("FeastServing-queryFeatures").startActive(true)) { Collection featureSpecs = getFeatureSpecs(request.getFeatureIdList()); - // create connection to feature storage if necessary - checkAndConnectFeatureStorage( - featureSpecs - .stream() - .map(featureSpec -> featureSpec.getDataStores().getServing().getId()) - .collect(Collectors.toList())); - scope.span().log("start retrieving all feature"); Map result = featureRetrievalDispatcher.dispatchFeatureRetrieval( @@ -93,29 +81,6 @@ public QueryFeaturesResponse queryFeatures(QueryFeaturesRequest request) { } } - /** - * Check whether {@code featureStorageRegistry} has the connection to the associated feature - * storage. If the connection doesn't exist then create one by first retrieve storage spec from - * the {@code specStorage}. - * - * @param storageIds collection of storage ID to be checked. - */ - private void checkAndConnectFeatureStorage(Collection storageIds) { - List unknownStorageId = new ArrayList<>(); - for (String storageId : storageIds) { - if (!featureStorageRegistry.hasStorageId(storageId)) { - unknownStorageId.add(storageId); - } - } - - if (!unknownStorageId.isEmpty()) { - Map storageSpecs = specStorage.getStorageSpecs(unknownStorageId); - for (StorageSpec spec : storageSpecs.values()) { - featureStorageRegistry.connect(spec); - } - } - } - /** * Attach request details with associated feature spec. * diff --git a/serving/src/main/java/feast/serving/service/FeatureRetrievalDispatcher.java b/serving/src/main/java/feast/serving/service/FeatureRetrievalDispatcher.java index 97ed05957a..e9a9ee67bd 100644 --- a/serving/src/main/java/feast/serving/service/FeatureRetrievalDispatcher.java +++ b/serving/src/main/java/feast/serving/service/FeatureRetrievalDispatcher.java @@ -17,27 +17,16 @@ package feast.serving.service; -import static java.util.stream.Collectors.groupingBy; - -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.ListeningExecutorService; +import com.google.common.collect.Lists; import feast.serving.ServingAPIProto.Entity; -import feast.serving.config.AppConfig; -import feast.serving.exception.FeatureRetrievalException; import feast.serving.model.FeatureValue; import feast.serving.util.EntityMapBuilder; import feast.specs.FeatureSpecProto.FeatureSpec; import io.opentracing.Scope; -import io.opentracing.Span; import io.opentracing.Tracer; -import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,19 +37,13 @@ public class FeatureRetrievalDispatcher { private final FeatureStorageRegistry featureStorageRegistry; private final Tracer tracer; - private final ListeningExecutorService executorService; - private final int timeout; @Autowired public FeatureRetrievalDispatcher( FeatureStorageRegistry featureStorageRegistry, - ListeningExecutorService executorService, - AppConfig appConfig, Tracer tracer) { this.featureStorageRegistry = featureStorageRegistry; this.tracer = tracer; - this.executorService = executorService; - this.timeout = appConfig.getTimeout(); } /** @@ -77,13 +60,7 @@ public FeatureRetrievalDispatcher( public Map dispatchFeatureRetrieval( String entityName, Collection entityIds, Collection featureSpecs) { - Map> groupedFeatureSpecs = groupByStorage(featureSpecs); - - if (groupedFeatureSpecs.size() <= 1) { - return runInCurrentThread(entityName, entityIds, groupedFeatureSpecs); - } else { - return runWithExecutorService(entityName, entityIds, groupedFeatureSpecs); - } + return runInCurrentThread(entityName, entityIds, Lists.newArrayList(featureSpecs)); } /** @@ -91,18 +68,17 @@ public Map dispatchFeatureRetrieval( * * @param entityName entity name of of the feature. * @param entityIds list of entity ID of the feature to be retrieved. - * @param groupedFeatureSpecs feature spec grouped by storage ID. + * @param featureSpecs list of feature specs * @return entity map containing the result of feature retrieval. */ private Map runInCurrentThread( String entityName, Collection entityIds, - Map> groupedFeatureSpecs) { + List featureSpecs) { try (Scope scope = tracer.buildSpan("FeatureRetrievalDispatcher-runInCurrentThread").startActive(true)) { - String storageId = groupedFeatureSpecs.keySet().iterator().next(); - List featureSpecs = groupedFeatureSpecs.get(storageId); + String storageId = FeastServing.SERVING_STORAGE_ID; FeatureStorage featureStorage = featureStorageRegistry.get(storageId); List featureValues; @@ -113,65 +89,4 @@ private Map runInCurrentThread( return builder.toEntityMap(); } } - - /** - * Execute feature retrieval in parallel using executor service. - * - * @param entityName entity name of the feature. - * @param entityIds list of entity ID. - * @param groupedFeatureSpec feature specs grouped by serving storage ID. - * @return entity map containing result of feature retrieval. - */ - private Map runWithExecutorService( - String entityName, - Collection entityIds, - Map> groupedFeatureSpec) { - try (Scope scope = - tracer.buildSpan("FeatureRetrievalDispatcher-runWithExecutorService").startActive(true)) { - Span span = scope.span(); - List> futures = new ArrayList<>(); - EntityMapBuilder entityMapBuilder = new EntityMapBuilder(); - for (Map.Entry> entry : groupedFeatureSpec.entrySet()) { - FeatureStorage featureStorage = featureStorageRegistry.get(entry.getKey()); - List featureSpecs = entry.getValue(); - futures.add( - executorService.submit( - () -> { - List featureValues = - featureStorage.getFeature(entityName, entityIds, featureSpecs); - entityMapBuilder.addFeatureValueList(featureValues); - return null; - })); - } - span.log("submitted all task"); - ListenableFuture> combined = Futures.allAsList(futures); - try { - combined.get(timeout, TimeUnit.SECONDS); - span.log("completed getting all result"); - return entityMapBuilder.toEntityMap(); - } catch (InterruptedException e) { - log.error("Interrupted exception while processing futures", e); - throw new FeatureRetrievalException("Interrupted exception while processing futures", e); - } catch (ExecutionException e) { - log.error("Execution exception while processing futures", e); - throw new FeatureRetrievalException("Execution exception while processing futures", e); - } catch (TimeoutException e) { - log.error("Timeout exception while processing futures", e); - throw new FeatureRetrievalException( - "Timeout exception exception while processing futures", e); - } - } - } - - /** - * Group request by its serving storage ID. - * - * @param featureSpecs list of request. - * @return request grouped by serving storage ID. - */ - private Map> groupByStorage(Collection featureSpecs) { - return featureSpecs - .stream() - .collect(groupingBy(featureSpec -> featureSpec.getDataStores().getServing().getId())); - } } diff --git a/serving/src/main/java/feast/serving/service/FeatureStorageRegistry.java b/serving/src/main/java/feast/serving/service/FeatureStorageRegistry.java index f7b12fde40..d9c47ba666 100644 --- a/serving/src/main/java/feast/serving/service/FeatureStorageRegistry.java +++ b/serving/src/main/java/feast/serving/service/FeatureStorageRegistry.java @@ -17,7 +17,6 @@ package feast.serving.service; -import com.google.cloud.bigtable.hbase.BigtableConfiguration; import com.google.common.annotations.VisibleForTesting; import feast.serving.config.AppConfig; import feast.specs.StorageSpecProto.StorageSpec; @@ -25,13 +24,15 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import lombok.extern.slf4j.Slf4j; -import org.apache.hadoop.hbase.client.Connection; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; -/** Service providing a mapping of storage ID and its {@link FeatureStorage} */ +/** + * Service providing a mapping of storage ID and its {@link FeatureStorage} + */ @Slf4j public class FeatureStorageRegistry { + private final Map featureStorageMap = new ConcurrentHashMap<>(); private final AppConfig appConfig; @@ -42,17 +43,6 @@ public FeatureStorageRegistry(AppConfig appConfig, Tracer tracer) { this.tracer = tracer; } - /** - * Check whether the storageId is known. - * - * @param storageId storage ID. - * @return true if the registry has the associated feature storage instance, otherwise return - * false. - */ - public boolean hasStorageId(String storageId) { - return featureStorageMap.containsKey(storageId); - } - /** * Get the feature storage associated with the given storage ID. * @@ -76,11 +66,8 @@ public FeatureStorage connect(StorageSpec storageSpec) { FeatureStorage fs; if (storageSpec.getType().equals(BigTableFeatureStorage.TYPE)) { - Connection c = - BigtableConfiguration.connect( - options.get(BigTableFeatureStorage.OPT_BIGTABLE_PROJECT), - options.get(BigTableFeatureStorage.OPT_BIGTABLE_INSTANCE)); - fs = new BigTableFeatureStorage(c); + + fs = new BigTableFeatureStorage(storageSpec); featureStorageMap.put(storageSpec.getId(), fs); } else if (storageSpec.getType().equals(RedisFeatureStorage.TYPE)) { JedisPoolConfig poolConfig = new JedisPoolConfig(); diff --git a/serving/src/main/java/feast/serving/service/SpecStorage.java b/serving/src/main/java/feast/serving/service/SpecStorage.java index 3eb82735b5..b304c34bab 100644 --- a/serving/src/main/java/feast/serving/service/SpecStorage.java +++ b/serving/src/main/java/feast/serving/service/SpecStorage.java @@ -28,6 +28,7 @@ * StorageSpec}. */ public interface SpecStorage { + /** * Get a map of {@link EntitySpec} from Core API, given a collection of entityId. * @@ -53,29 +54,6 @@ public interface SpecStorage { */ Map getFeatureSpecs(Iterable featureIds); - /** - * Get all {@link FeatureSpec} available in Core API. - * - * @return map of {@link FeatureSpec}, where the key is feature id. - */ - Map getAllFeatureSpecs(); - - /** - * Get map of {@link StorageSpec} from Core API, given a collection of storageId. - * - * @param storageIds collection of storageId to retrieve. - * @return map of {@link StorageSpec}, where the key is storage id. - * @throws SpecRetrievalException if any error happens during retrieval - */ - Map getStorageSpecs(Iterable storageIds); - - /** - * Get all {@link StorageSpec} from Core API. - * - * @return map of {@link StorageSpec}, where the key is storage id. - */ - Map getAllStorageSpecs(); - /** * Check whether connection to spec storage is ready. * diff --git a/serving/src/main/java/feast/serving/util/SpecUtil.java b/serving/src/main/java/feast/serving/util/SpecUtil.java deleted file mode 100644 index 09405f935e..0000000000 --- a/serving/src/main/java/feast/serving/util/SpecUtil.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2018 The Feast Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package feast.serving.util; - -import org.joda.time.Duration; -import feast.serving.service.RedisFeatureStorage; -import feast.specs.FeatureSpecProto.FeatureSpec; -import org.joda.time.format.ISOPeriodFormat; - -/** Utility class for Spec storage. */ -public final class SpecUtil { - - private SpecUtil() {} - - /** - * Return bucket's duration/size of a certain feature - * - * @param featureSpec feature spec. - * @return bucket size. - * @throws IllegalArgumentException if the bucket size is not specified in the {@code featureSpec} - * or unable to parse the value. - */ - public static Duration getBucketSize(FeatureSpec featureSpec) { - try { - String bucketSize = - featureSpec - .getDataStores() - .getServing() - .getOptionsMap() - .get(RedisFeatureStorage.OPT_REDIS_BUCKET_SIZE); - if (bucketSize == null) { - return Duration.standardHours(1); // use duration 1H if bucket time is not specified (align with ingestion) - } - return ISOPeriodFormat.standard().parsePeriod(bucketSize).toStandardDuration(); - } catch (Exception e) { - throw new IllegalArgumentException( - "Unable to get bucket size of feature spec: " + featureSpec.getId(), e); - } - } -} diff --git a/serving/src/main/resources/application.properties b/serving/src/main/resources/application.properties index 0327f18769..f7d0023638 100644 --- a/serving/src/main/resources/application.properties +++ b/serving/src/main/resources/application.properties @@ -19,6 +19,9 @@ grpc.port=${FEAST_SERVING_GRPC_PORT:6566} feast.core.host=${FEAST_CORE_HOST:localhost} feast.core.grpc.port=${FEAST_CORE_GRPC_PORT:6565} +feast.store.serving.type = ${STORE_SERVING_TYPE:} +feast.store.serving.options = ${STORE_SERVING_OPTIONS:{}} + feast.threadpool.max=${FEAST_MAX_NB_THREAD:128} feast.maxentity=${FEAST_MAX_ENTITY_PER_BATCH:2000} feast.timeout=${FEAST_RETRIEVAL_TIMEOUT:5} diff --git a/serving/src/test/java/feast/serving/grpc/FeastServingTest.java b/serving/src/test/java/feast/serving/grpc/FeastServingTest.java index ffdf66fd99..b7b8c9b1fd 100644 --- a/serving/src/test/java/feast/serving/grpc/FeastServingTest.java +++ b/serving/src/test/java/feast/serving/grpc/FeastServingTest.java @@ -28,6 +28,7 @@ import feast.serving.service.FeastServing; import feast.serving.service.FeatureRetrievalDispatcher; import feast.serving.service.FeatureStorageRegistry; +import feast.serving.service.RedisFeatureStorage; import feast.serving.service.SpecStorage; import feast.serving.testutil.FakeSpecStorage; import feast.specs.FeatureSpecProto.FeatureSpec; @@ -45,8 +46,10 @@ public class FeastServingTest { SpecStorage specStorage; - @Mock FeatureStorageRegistry featureStorageRegistry; - @Mock FeatureRetrievalDispatcher featureRetrievalDispatcher; + @Mock + FeatureStorageRegistry featureStorageRegistry; + @Mock + FeatureRetrievalDispatcher featureRetrievalDispatcher; // class under test private FeastServing feast; @@ -54,10 +57,9 @@ public class FeastServingTest { @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - specStorage = new FakeSpecStorage(); - feast = - new FeastServing( - featureRetrievalDispatcher, featureStorageRegistry, specStorage, GlobalTracer.get()); + specStorage = new FakeSpecStorage(RedisFeatureStorage.TYPE); + feast = new FeastServing( + featureRetrievalDispatcher, specStorage, GlobalTracer.get()); } @Test diff --git a/serving/src/test/java/feast/serving/service/BigTableFeatureStorageTestITCase.java b/serving/src/test/java/feast/serving/service/BigTableFeatureStorageTestITCase.java index 6212a6e29d..16c0f6852c 100644 --- a/serving/src/test/java/feast/serving/service/BigTableFeatureStorageTestITCase.java +++ b/serving/src/test/java/feast/serving/service/BigTableFeatureStorageTestITCase.java @@ -17,12 +17,16 @@ package feast.serving.service; +import static org.mockito.Mockito.when; + import com.google.cloud.bigtable.hbase.BigtableConfiguration; import com.google.cloud.bigtable.hbase.BigtableOptionsFactory; import com.google.protobuf.Timestamp; import feast.serving.model.FeatureValue; +import feast.serving.service.BigTableFeatureStorage.BigTableConnectionFactory; import feast.serving.testutil.BigTablePopulator; import feast.specs.FeatureSpecProto.FeatureSpec; +import feast.specs.StorageSpecProto.StorageSpec; import feast.types.ValueProto.ValueType; import java.util.ArrayList; import java.util.Arrays; @@ -32,16 +36,16 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; public class BigTableFeatureStorageTestITCase { + private static final String ENTITY_NAME = "test_entity"; // The object under test BigTableFeatureStorage featureStorage; - private BigTablePopulator bigTablePopulator; private List entityIds; - private Timestamp now; private Connection connection; @@ -50,9 +54,16 @@ public void setUp() throws Exception { Configuration config = BigtableConfiguration.configure("dummyProject", "dummyInstance"); config.set(BigtableOptionsFactory.BIGTABLE_EMULATOR_HOST_KEY, "localhost:8080"); connection = BigtableConfiguration.connect(config); + + BigTableConnectionFactory connectionFactory = Mockito.mock(BigTableConnectionFactory.class); + when(connectionFactory.connect()).thenReturn(connection); + // ideally use bigtable emulator. bigTablePopulator = new BigTablePopulator(connection); - featureStorage = new BigTableFeatureStorage(connection); + StorageSpec storageSpec = StorageSpec.newBuilder() + .setId(FeastServing.SERVING_STORAGE_ID) + .setType(BigTableFeatureStorage.TYPE).build(); + featureStorage = new BigTableFeatureStorage(storageSpec, connectionFactory); entityIds = createEntityIds(10); now = Timestamp.newBuilder().setSeconds(System.currentTimeMillis() / 1000).build(); diff --git a/serving/src/test/java/feast/serving/service/CachedSpecStorageTest.java b/serving/src/test/java/feast/serving/service/CachedSpecStorageTest.java index 76a7b78061..5b3e8adfed 100644 --- a/serving/src/test/java/feast/serving/service/CachedSpecStorageTest.java +++ b/serving/src/test/java/feast/serving/service/CachedSpecStorageTest.java @@ -1,7 +1,7 @@ package feast.serving.service; import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; @@ -9,14 +9,12 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.google.common.testing.FakeTicker; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.StorageSpecProto.StorageSpec; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.TimeUnit; import org.junit.Before; import org.junit.Test; @@ -35,34 +33,26 @@ public void setUp() throws Exception { public void testPopulateCache() { Map featureSpecMap = new HashMap<>(); featureSpecMap.put("feature_1", mock(FeatureSpec.class)); - - Map storageSpecMap = new HashMap<>(); - storageSpecMap.put("storage_1", mock(StorageSpec.class)); - Map entitySpecMap = new HashMap<>(); entitySpecMap.put("entity_1", mock(EntitySpec.class)); when(coreService.getAllFeatureSpecs()).thenReturn(featureSpecMap); when(coreService.getAllEntitySpecs()).thenReturn(entitySpecMap); - when(coreService.getAllStorageSpecs()).thenReturn(storageSpecMap); - cachedSpecStorage.populateCache(); + Map result = cachedSpecStorage.getFeatureSpecs(Collections.singletonList("feature_1")); - Map result1 = - cachedSpecStorage.getStorageSpecs(Collections.singletonList("storage_1")); Map result2 = cachedSpecStorage.getEntitySpecs(Collections.singletonList("entity_1")); assertThat(result.size(), equalTo(1)); - assertThat(result1.size(), equalTo(1)); assertThat(result2.size(), equalTo(1)); verify(coreService, times(0)).getFeatureSpecs(any(Iterable.class)); - verify(coreService, times(0)).getStorageSpecs(any(Iterable.class)); verify(coreService, times(0)).getEntitySpecs(any(Iterable.class)); } + @Test public void reloadFailureShouldReturnOldValue() { Map featureSpecMap = new HashMap<>(); @@ -78,29 +68,21 @@ public void reloadFailureShouldReturnOldValue() { when(coreService.getFeatureSpecs(any(Iterable.class))).thenThrow(new RuntimeException("error")); when(coreService.getAllEntitySpecs()).thenReturn(entitySpecMap); when(coreService.getEntitySpecs(any(Iterable.class))).thenThrow(new RuntimeException("error")); - when(coreService.getAllStorageSpecs()).thenReturn(storageSpecMap); - when(coreService.getStorageSpecs(any(Iterable.class))).thenThrow(new RuntimeException("error")); cachedSpecStorage.populateCache(); Map result = cachedSpecStorage.getFeatureSpecs(Collections.singletonList("feature_1")); - Map result1 = - cachedSpecStorage.getStorageSpecs(Collections.singletonList("storage_1")); Map result2 = cachedSpecStorage.getEntitySpecs(Collections.singletonList("entity_1")); assertThat(result.size(), equalTo(1)); - assertThat(result1.size(), equalTo(1)); assertThat(result2.size(), equalTo(1)); verify(coreService, times(0)).getFeatureSpecs(any(Iterable.class)); - verify(coreService, times(0)).getStorageSpecs(any(Iterable.class)); verify(coreService, times(0)).getEntitySpecs(any(Iterable.class)); result = cachedSpecStorage.getFeatureSpecs(Collections.singletonList("feature_1")); - result1 = cachedSpecStorage.getStorageSpecs(Collections.singletonList("storage_1")); result2 = cachedSpecStorage.getEntitySpecs(Collections.singletonList("entity_1")); assertThat(result.size(), equalTo(1)); - assertThat(result1.size(), equalTo(1)); assertThat(result2.size(), equalTo(1)); } } \ No newline at end of file diff --git a/serving/src/test/java/feast/serving/service/CoreServiceTest.java b/serving/src/test/java/feast/serving/service/CoreServiceTest.java index cc0551948a..deb2790421 100644 --- a/serving/src/test/java/feast/serving/service/CoreServiceTest.java +++ b/serving/src/test/java/feast/serving/service/CoreServiceTest.java @@ -30,11 +30,8 @@ import feast.core.CoreServiceProto.CoreServiceTypes.GetEntitiesResponse; import feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesRequest; import feast.core.CoreServiceProto.CoreServiceTypes.GetFeaturesResponse; -import feast.core.CoreServiceProto.CoreServiceTypes.GetStorageRequest; -import feast.core.CoreServiceProto.CoreServiceTypes.GetStorageResponse; import feast.core.CoreServiceProto.CoreServiceTypes.ListEntitiesResponse; import feast.core.CoreServiceProto.CoreServiceTypes.ListFeaturesResponse; -import feast.core.CoreServiceProto.CoreServiceTypes.ListStorageResponse; import feast.serving.exception.SpecRetrievalException; import feast.specs.EntitySpecProto.EntitySpec; import feast.specs.FeatureSpecProto.FeatureSpec; @@ -62,9 +59,11 @@ public class CoreServiceTest { - @Rule public final GrpcCleanupRule grpcCleanupRule = new GrpcCleanupRule(); + @Rule + public final GrpcCleanupRule grpcCleanupRule = new GrpcCleanupRule(); - @Rule public final ExpectedException expectedException = ExpectedException.none(); + @Rule + public final ExpectedException expectedException = ExpectedException.none(); private final MutableHandlerRegistry serviceRegistry = new MutableHandlerRegistry(); private CoreService client; @@ -271,100 +270,6 @@ public void getAllFeatureSpecs_shouldThrowSpecRetrievalExceptionWhenErrorHappen( client.getAllFeatureSpecs(); } - @Test - public void getStorageSpecs_shouldSendCorrectRequest() { - List storageIds = Arrays.asList("redis1", "big_table1"); - AtomicReference deliveredRequest = new AtomicReference<>(); - CoreServiceImplBase service = - new CoreServiceImplBase() { - @Override - public void getStorage( - GetStorageRequest request, StreamObserver responseObserver) { - deliveredRequest.set(request); - responseObserver.onNext( - GetStorageResponse.newBuilder() - .addAllStorageSpecs(getFakeStorageSpecs().values()) - .build()); - responseObserver.onCompleted(); - } - }; - - serviceRegistry.addService(service); - - client.getStorageSpecs(storageIds); - - List expected = - storageIds.stream().map(s -> ByteString.copyFromUtf8(s)).collect(Collectors.toList()); - List actual = deliveredRequest.get().getIdsList().asByteStringList(); - - assertThat(actual, containsInAnyOrder(expected.toArray())); - } - - @Test - public void getStorageSpecs_shouldReturnRequestedStorageSpecs() { - List storageIds = Arrays.asList("redis1", "big_table1"); - AtomicReference deliveredRequest = new AtomicReference<>(); - CoreServiceImplBase service = - new CoreServiceImplBase() { - @Override - public void getStorage( - GetStorageRequest request, StreamObserver responseObserver) { - deliveredRequest.set(request); - responseObserver.onNext( - GetStorageResponse.newBuilder() - .addAllStorageSpecs(getFakeStorageSpecs().values()) - .build()); - responseObserver.onCompleted(); - } - }; - - serviceRegistry.addService(service); - - Map results = client.getStorageSpecs(storageIds); - - assertThat(results.entrySet(), everyItem(isIn(getFakeStorageSpecs().entrySet()))); - } - - @Test - public void getStorageSpecs_shouldThrowSpecsRetrievalExceptionWhenErrorHappen() { - expectedException.expect(SpecRetrievalException.class); - expectedException.expectMessage("Unable to retrieve storage specs"); - expectedException.expectCause(instanceOf(StatusRuntimeException.class)); - - List storageIds = Arrays.asList("redis1", "big_table1"); - client.getStorageSpecs(storageIds); - } - - @Test - public void getAllStorageSpecs_shouldReturnRequestedStorageSpecs() { - CoreServiceImplBase service = - new CoreServiceImplBase() { - @Override - public void listStorage( - Empty request, StreamObserver responseObserver) { - responseObserver.onNext( - ListStorageResponse.newBuilder() - .addAllStorageSpecs(getFakeStorageSpecs().values()) - .build()); - responseObserver.onCompleted(); - } - }; - - serviceRegistry.addService(service); - - Map results = client.getAllStorageSpecs(); - - assertThat(results.entrySet(), everyItem(isIn(getFakeStorageSpecs().entrySet()))); - } - - @Test - public void getAllStorageSpecs_shouldThrowSpecsRetrievalExceptionWhenErrorHappen() { - expectedException.expect(SpecRetrievalException.class); - expectedException.expectMessage("Unable to retrieve storage specs"); - expectedException.expectCause(instanceOf(StatusRuntimeException.class)); - - client.getAllStorageSpecs(); - } private Map getFakeFeatureSpecs() { FeatureSpec spec1 = @@ -410,12 +315,11 @@ private Map getFakeEntitySpecs() { .collect(Collectors.toMap(EntitySpec::getName, Function.identity())); } - private Map getFakeStorageSpecs() { - StorageSpec spec1 = StorageSpec.newBuilder().setId("redis1").build(); - - StorageSpec spec2 = StorageSpec.newBuilder().setId("bigtable1").build(); - - return Stream.of(spec1, spec2) - .collect(Collectors.toMap(StorageSpec::getId, Function.identity())); + private StorageSpec getFakeStorageSpec() { + StorageSpec spec = StorageSpec.newBuilder().setId(FeastServing.SERVING_STORAGE_ID) + .setType("redis") + .putOptions("host", "localhost") + .putOptions("port", "1234").build(); + return spec; } } diff --git a/serving/src/test/java/feast/serving/service/FeatureRetrievalDispatcherTest.java b/serving/src/test/java/feast/serving/service/FeatureRetrievalDispatcherTest.java index 2103be849b..b1d5b190d0 100644 --- a/serving/src/test/java/feast/serving/service/FeatureRetrievalDispatcherTest.java +++ b/serving/src/test/java/feast/serving/service/FeatureRetrievalDispatcherTest.java @@ -18,51 +18,40 @@ package feast.serving.service; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; -import com.google.common.util.concurrent.ListeningExecutorService; -import com.google.common.util.concurrent.MoreExecutors; import feast.serving.config.AppConfig; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import io.opentracing.util.GlobalTracer; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.Callable; -import java.util.concurrent.Executors; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; public class FeatureRetrievalDispatcherTest { - @Mock FeatureStorageRegistry featureStorageRegistry; + + @Mock + FeatureStorageRegistry featureStorageRegistry; private FeatureRetrievalDispatcher dispatcher; private List entityIds; - private ListeningExecutorService executorService; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); entityIds = createEntityIds(10); - AppConfig appConfig = AppConfig.builder().timeout(1).build(); - executorService = spy(MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor())); dispatcher = new FeatureRetrievalDispatcher( - featureStorageRegistry, executorService, appConfig, GlobalTracer.get()); + featureStorageRegistry, GlobalTracer.get()); } @Test - public void shouldUseCurrentThreadIfRequestIsSmallEnough() { + public void shouldGetFeaturesFromStorage() { String entityName = "entity"; FeatureStorage featureStorage = mock(FeatureStorage.class); when(featureStorage.getFeature(any(String.class), any(List.class), any(List.class))) @@ -74,87 +63,10 @@ public void shouldUseCurrentThreadIfRequestIsSmallEnough() { dispatcher.dispatchFeatureRetrieval( entityName, entityIds, Collections.singletonList(featureSpec)); - verifyZeroInteractions(executorService); verify(featureStorage) .getFeature(entityName, entityIds, Collections.singletonList(featureSpec)); } - @Test - public void shouldUseCurrentThreadIfRequestFromSameStorage() { - String storageId1 = "REDIS1"; - - FeatureStorage redis1 = mock(FeatureStorage.class); - when(featureStorageRegistry.get(storageId1)).thenReturn(redis1); - - when(redis1.getFeature(any(String.class), any(List.class), any(List.class))) - .thenReturn(Collections.emptyList()); - - String entityName = "entity"; - String featureId1 = "entity.feature_1"; - FeatureSpec featureSpec1 = - FeatureSpec.newBuilder() - .setId(featureId1) - .setDataStores( - DataStores.newBuilder().setServing(DataStore.newBuilder().setId(storageId1))) - .build(); - - String featureId2 = "entity.feature_2"; - FeatureSpec featureSpec2 = - FeatureSpec.newBuilder() - .setId(featureId2) - .setDataStores( - DataStores.newBuilder().setServing(DataStore.newBuilder().setId(storageId1))) - .build(); - - dispatcher.dispatchFeatureRetrieval( - entityName, - entityIds, - Arrays.asList(featureSpec1, featureSpec2)); - - verify(redis1).getFeature(entityName, entityIds, Arrays.asList(featureSpec1, featureSpec2)); - verifyZeroInteractions(executorService); - } - - @Test - public void shouldUseExecutorServiceIfRequestFromMoreThanOneStorage() { - String storageId1 = "REDIS1"; - String storageId2 = "REDIS2"; - - FeatureStorage redis1 = mock(FeatureStorage.class); - FeatureStorage redis2 = mock(FeatureStorage.class); - when(featureStorageRegistry.get(storageId1)).thenReturn(redis1); - when(featureStorageRegistry.get(storageId2)).thenReturn(redis2); - - when(redis1.getFeature(any(String.class), any(List.class), any(List.class))) - .thenReturn(Collections.emptyList()); - when(redis2.getFeature(any(String.class), any(List.class), any(List.class))) - .thenReturn(Collections.emptyList()); - - String entityName = "entity"; - String featureId1 = "entity.feature_1"; - FeatureSpec featureSpec1 = - FeatureSpec.newBuilder() - .setId(featureId1) - .setDataStores( - DataStores.newBuilder().setServing(DataStore.newBuilder().setId(storageId1))) - .build(); - - String featureId2 = "entity.feature_2"; - FeatureSpec featureSpec2 = - FeatureSpec.newBuilder() - .setId(featureId2) - .setDataStores( - DataStores.newBuilder().setServing(DataStore.newBuilder().setId(storageId2))) - .build(); - - dispatcher.dispatchFeatureRetrieval( - entityName, entityIds, Arrays.asList(featureSpec1, featureSpec2)); - - verify(redis1).getFeature(entityName, entityIds, Collections.singletonList(featureSpec1)); - verify(redis2).getFeature(entityName, entityIds, Collections.singletonList(featureSpec2)); - verify(executorService, atLeast(2)).submit(any(Callable.class)); - } - private List createEntityIds(int count) { List entityIds = new ArrayList<>(); for (int i = 0; i < count; i++) { diff --git a/serving/src/test/java/feast/serving/service/RedisFeatureStorageTest.java b/serving/src/test/java/feast/serving/service/RedisFeatureStorageTest.java index 2a70b78983..adb2ba859b 100644 --- a/serving/src/test/java/feast/serving/service/RedisFeatureStorageTest.java +++ b/serving/src/test/java/feast/serving/service/RedisFeatureStorageTest.java @@ -22,8 +22,6 @@ import com.google.protobuf.Timestamp; import feast.serving.model.FeatureValue; import feast.serving.testutil.RedisPopulator; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.types.ValueProto.ValueType; import io.opentracing.util.GlobalTracer; @@ -112,17 +110,15 @@ public void getFeatures_shouldReturnLastValue() { } private FeatureSpec createFeatureSpec(String featureName) { - DataStore servingDatastoreSpec = DataStore.newBuilder().setId("REDIS").build(); - return createFeatureSpec(featureName, ValueType.Enum.STRING, servingDatastoreSpec); + return createFeatureSpec(featureName, ValueType.Enum.STRING); } private FeatureSpec createFeatureSpec( - String featureName, ValueType.Enum valType, DataStore dataStoreSpec) { + String featureName, ValueType.Enum valType) { String entityName = "entity"; String featureId = String.format("%s.%s", entityName, featureName); FeatureSpec spec = FeatureSpec.newBuilder() - .setDataStores(DataStores.newBuilder().setServing(dataStoreSpec)) .setEntity(entityName) .setId(featureId) .setName(featureName) diff --git a/serving/src/test/java/feast/serving/testutil/FakeSpecStorage.java b/serving/src/test/java/feast/serving/testutil/FakeSpecStorage.java index 3c110cda83..f392b47b3c 100644 --- a/serving/src/test/java/feast/serving/testutil/FakeSpecStorage.java +++ b/serving/src/test/java/feast/serving/testutil/FakeSpecStorage.java @@ -17,16 +17,11 @@ package feast.serving.testutil; -import feast.serving.service.BigTableFeatureStorage; -import feast.serving.service.RedisFeatureStorage; import feast.serving.service.SpecStorage; import feast.specs.EntitySpecProto.EntitySpec; -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; import feast.specs.FeatureSpecProto.FeatureSpec; import feast.specs.StorageSpecProto.StorageSpec; import feast.types.ValueProto.ValueType; - import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -38,19 +33,28 @@ public class FakeSpecStorage implements SpecStorage { Map entitySpecMap = new HashMap<>(); Map featureSpecMap = new HashMap<>(); - Map storageSpecMap = new HashMap<>(); + StorageSpec storageSpec; - public FakeSpecStorage() { - // populate with hardcoded value - String bigTableId = "BIGTABLE1"; + public FakeSpecStorage(String storageType) { String lastOpportunityId = "driver.last_opportunity"; String lastOpportunityName = "last_opportunity"; String dailyCompletedBookingId = "driver.total_completed_booking"; String dailyCompletedBookingName = "total_completed_booking"; - DataStore bigTable = DataStore.newBuilder().setId(bigTableId).build(); - String redisId = "REDIS1"; - DataStore redis = DataStore.newBuilder().setId(redisId).build(); + if (storageType.equals("bigtable")) { + // populate with hardcoded value + storageSpec = StorageSpec.newBuilder().setId("SERVING").setType("bigtable") + .putOptions("project", "project") + .putOptions("instance", "instance") + .putOptions("family", "default") + .putOptions("prefix", "") + .build(); + } else if (storageType.equals("redis")) { + storageSpec = StorageSpec.newBuilder().setId("SERVING").setType("redis") + .putOptions("host", "localhost") + .putOptions("port", "1234") + .build(); + } EntitySpec driver = EntitySpec.newBuilder().setName("driver").build(); @@ -61,7 +65,6 @@ public FakeSpecStorage() { .setId(lastOpportunityId) .setName(lastOpportunityName) .setValueType(ValueType.Enum.INT64) - .setDataStores(DataStores.newBuilder().setServing(redis).build()) .build(); FeatureSpec totalCompleted = @@ -69,30 +72,10 @@ public FakeSpecStorage() { .setId(dailyCompletedBookingId) .setName(dailyCompletedBookingName) .setValueType(ValueType.Enum.INT64) - .setDataStores(DataStores.newBuilder().setServing(redis).build()) .build(); featureSpecMap.put(lastOpportunityId, lastOpportunity); featureSpecMap.put(dailyCompletedBookingId, totalCompleted); - - StorageSpec bigTableSpec = - StorageSpec.newBuilder() - .setId(bigTableId) - .setType(RedisFeatureStorage.TYPE) - .putOptions(BigTableFeatureStorage.OPT_BIGTABLE_PROJECT, "the-big-data-staging-007") - .putOptions(BigTableFeatureStorage.OPT_BIGTABLE_INSTANCE, "ds-staging") - .build(); - - StorageSpec redisSpec = - StorageSpec.newBuilder() - .setId(redisId) - .setType(RedisFeatureStorage.TYPE) - .putOptions(RedisFeatureStorage.OPT_REDIS_HOST, "10.148.0.6") - .putOptions(RedisFeatureStorage.OPT_REDIS_PORT, "6379") - .build(); - - storageSpecMap.put(bigTableId, bigTableSpec); - storageSpecMap.put(redisId, redisSpec); } @Override @@ -114,23 +97,6 @@ public Map getFeatureSpecs(Iterable featureIds) { .collect(Collectors.toMap(Function.identity(), featureSpecMap::get)); } - @Override - public Map getAllFeatureSpecs() { - return Collections.unmodifiableMap(featureSpecMap); - } - - @Override - public Map getStorageSpecs(Iterable storageIds) { - return StreamSupport.stream(storageIds.spliterator(), false) - .filter(storageSpecMap::containsKey) - .collect(Collectors.toMap(Function.identity(), storageSpecMap::get)); - } - - @Override - public Map getAllStorageSpecs() { - return Collections.unmodifiableMap(storageSpecMap); - } - @Override public boolean isConnected() { return true; diff --git a/serving/src/test/java/feast/serving/util/SpecUtilTest.java b/serving/src/test/java/feast/serving/util/SpecUtilTest.java deleted file mode 100644 index dbcb38c80a..0000000000 --- a/serving/src/test/java/feast/serving/util/SpecUtilTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2018 The Feast Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package feast.serving.util; - -import feast.specs.FeatureSpecProto.DataStore; -import feast.specs.FeatureSpecProto.DataStores; -import feast.specs.FeatureSpecProto.FeatureSpec; -import org.joda.time.Duration; -import org.junit.Test; - -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.*; - -public class SpecUtilTest { - @Test - public void shouldBeAbleToParseIsoDurationProperly() { - DataStore servingDatastore = DataStore.newBuilder() - .putOptions("bucketSize", "P1D") - .build(); - DataStores dataStores = DataStores.newBuilder() - .setServing(servingDatastore) - .build(); - FeatureSpec featureSpec = FeatureSpec.newBuilder() - .setDataStores(dataStores) - .build(); - - Duration duration = SpecUtil.getBucketSize(featureSpec); - assertThat(duration, equalTo(Duration.standardDays(1))); - } - - @Test - public void shouldReturn1HourAsDefault(){ - DataStore servingDatastore = DataStore.newBuilder() - .build(); - DataStores dataStores = DataStores.newBuilder() - .setServing(servingDatastore) - .build(); - FeatureSpec featureSpec = FeatureSpec.newBuilder() - .setDataStores(dataStores) - .build(); - - Duration duration = SpecUtil.getBucketSize(featureSpec); - assertThat(duration, equalTo(Duration.standardHours(1))); - } -} \ No newline at end of file