diff --git a/all protos/Aggregation.proto b/all protos/Aggregation.proto new file mode 100644 index 00000000000..d2d6cab7021 --- /dev/null +++ b/all protos/Aggregation.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "AggregationProto"; +option java_package = "feast.proto.core"; + +import "google/protobuf/duration.proto"; + +message Aggregation { + string column = 1; + string function = 2; + google.protobuf.Duration time_window = 3; + google.protobuf.Duration slide_interval = 4; +} \ No newline at end of file diff --git a/all protos/Connector.proto b/all protos/Connector.proto new file mode 100644 index 00000000000..4e4ec51774d --- /dev/null +++ b/all protos/Connector.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package grpc.connector; + +import "google/protobuf/timestamp.proto"; +import "feast/types/Value.proto"; +import "feast/types/EntityKey.proto"; +import "feast/serving/ServingService.proto"; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/serving"; + +message ConnectorFeature { + feast.serving.FeatureReferenceV2 reference = 1; + google.protobuf.Timestamp timestamp = 2; + feast.types.Value value = 3; +} + +message ConnectorFeatureList { + repeated ConnectorFeature featureList = 1; +} + +service OnlineStore { + rpc OnlineRead(OnlineReadRequest) returns (OnlineReadResponse); +} + +message OnlineReadRequest { + repeated feast.types.EntityKey entityKeys = 1; + string view = 2; + repeated string features = 3; +} + +message OnlineReadResponse { + repeated ConnectorFeatureList results = 1; +} \ No newline at end of file diff --git a/all protos/DataFormat.proto b/all protos/DataFormat.proto new file mode 100644 index 00000000000..c453e5e4c83 --- /dev/null +++ b/all protos/DataFormat.proto @@ -0,0 +1,61 @@ +// +// Copyright 2020 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. +// + + +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "DataFormatProto"; +option java_package = "feast.proto.core"; + +// Defines the file format encoding the features/entity data in files +message FileFormat { + // Defines options for the Parquet data format + message ParquetFormat {} + + oneof format { + ParquetFormat parquet_format = 1; + } +} + +// Defines the data format encoding features/entity data in data streams +message StreamFormat { + // Defines options for the protobuf data format + message ProtoFormat { + // Classpath to the generated Java Protobuf class that can be used to decode + // Feature data from the obtained stream message + string class_path = 1; + } + + // Defines options for the avro data format + message AvroFormat { + // Optional if used in a File DataSource as schema is embedded in avro file. + // Specifies the schema of the Avro message as JSON string. + string schema_json = 1; + } + + message JsonFormat { + string schema_json = 1; + } + + // Specifies the data format and format specific options + oneof format { + AvroFormat avro_format = 1; + ProtoFormat proto_format = 2; + JsonFormat json_format = 3; + } +} diff --git a/all protos/DataSource.proto b/all protos/DataSource.proto new file mode 100644 index 00000000000..3992d2c247d --- /dev/null +++ b/all protos/DataSource.proto @@ -0,0 +1,271 @@ +// +// Copyright 2020 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. +// + + +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "DataSourceProto"; +option java_package = "feast.proto.core"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "feast/core/DataFormat.proto"; +import "feast/types/Value.proto"; +import "feast/core/Feature.proto"; + +// Defines a Data Source that can be used source Feature data +// Next available id: 28 +message DataSource { + // Field indexes should *not* be reused. Not sure if fields 6-10 were used previously or not, + // but they are going to be reserved for backwards compatibility. + reserved 6 to 10; + + // Type of Data Source. + // Next available id: 12 + enum SourceType { + INVALID = 0; + BATCH_FILE = 1; + BATCH_SNOWFLAKE = 8; + BATCH_BIGQUERY = 2; + BATCH_REDSHIFT = 5; + STREAM_KAFKA = 3; + STREAM_KINESIS = 4; + CUSTOM_SOURCE = 6; + REQUEST_SOURCE = 7; + PUSH_SOURCE = 9; + BATCH_TRINO = 10; + BATCH_SPARK = 11; + BATCH_ATHENA = 12; + } + + // Unique name of data source within the project + string name = 20; + + // Name of Feast project that this data source belongs to. + string project = 21; + + string description = 23; + + map tags = 24; + + string owner = 25; + + SourceType type = 1; + + // Defines mapping between fields in the sourced data + // and fields in parent FeatureTable. + map field_mapping = 2; + + // Must specify event timestamp column name + string timestamp_field = 3; + + // (Optional) Specify partition column + // useful for file sources + string date_partition_column = 4; + + // Must specify creation timestamp column name + string created_timestamp_column = 5; + + // This is an internal field that is represents the python class for the data source object a proto object represents. + // This should be set by feast, and not by users. + // The field is used primarily by custom data sources and is mandatory for them to set. Feast may set it for + // first party sources as well. + string data_source_class_type = 17; + + // Optional batch source for streaming sources for historical features and materialization. + DataSource batch_source = 26; + + SourceMeta meta = 50; + + message SourceMeta { + google.protobuf.Timestamp earliestEventTimestamp = 1; + google.protobuf.Timestamp latestEventTimestamp = 2; + } + + // Defines options for DataSource that sources features from a file + message FileOptions { + FileFormat file_format = 1; + + // Target URL of file to retrieve and source features from. + // s3://path/to/file for AWS S3 storage + // gs://path/to/file for GCP GCS storage + // file:///path/to/file for local storage + string uri = 2; + + // override AWS S3 storage endpoint with custom S3 endpoint + string s3_endpoint_override = 3; + } + + // Defines options for DataSource that sources features from a BigQuery Query + message BigQueryOptions { + // Full table reference in the form of [project:dataset.table] + string table = 1; + + // SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective + // entity columns + string query = 2; + } + + // Defines options for DataSource that sources features from a Trino Query + message TrinoOptions { + // Full table reference in the form of [project:dataset.table] + string table = 1; + + // SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective + // entity columns + string query = 2; + } + + // Defines options for DataSource that sources features from Kafka messages. + // Each message should be a Protobuf that can be decoded with the generated + // Java Protobuf class at the given class path + message KafkaOptions { + // Comma separated list of Kafka bootstrap servers. Used for feature tables without a defined source host[:port]] + string kafka_bootstrap_servers = 1; + + // Kafka topic to collect feature data from. + string topic = 2; + + // Defines the stream data format encoding feature/entity data in Kafka messages. + StreamFormat message_format = 3; + + // Watermark delay threshold for stream data + google.protobuf.Duration watermark_delay_threshold = 4; + } + + // Defines options for DataSource that sources features from Kinesis records. + // Each record should be a Protobuf that can be decoded with the generated + // Java Protobuf class at the given class path + message KinesisOptions { + // AWS region of the Kinesis stream + string region = 1; + + // Name of the Kinesis stream to obtain feature data from. + string stream_name = 2; + + // Defines the data format encoding the feature/entity data in Kinesis records. + // Kinesis Data Sources support Avro and Proto as data formats. + StreamFormat record_format = 3; + } + + // Defines options for DataSource that sources features from a Redshift Query + message RedshiftOptions { + // Redshift table name + string table = 1; + + // SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective + // entity columns + string query = 2; + + // Redshift schema name + string schema = 3; + + // Redshift database name + string database = 4; + } + + // Defines options for DataSource that sources features from a Athena Query + message AthenaOptions { + // Athena table name + string table = 1; + + // SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective + // entity columns + string query = 2; + + // Athena database name + string database = 3; + + // Athena schema name + string data_source = 4; + } + + // Defines options for DataSource that sources features from a Snowflake Query + message SnowflakeOptions { + // Snowflake table name + string table = 1; + + // SQL query that returns a table containing feature data. Must contain an event_timestamp column, and respective + // entity columns + string query = 2; + + // Snowflake schema name + string schema = 3; + + // Snowflake schema name + string database = 4; + + // Snowflake warehouse name + string warehouse = 5; + } + + // Defines options for DataSource that sources features from a spark table/query + message SparkOptions { + // Table name + string table = 1; + + // Spark SQl query that returns the table, this is an alternative to `table` + string query = 2; + + // Path from which spark can read the table, this is an alternative to `table` + string path = 3; + + // Format of files at `path` (e.g. parquet, avro, etc) + string file_format = 4; + } + + // Defines configuration for custom third-party data sources. + message CustomSourceOptions { + // Serialized configuration information for the data source. The implementer of the custom data source is + // responsible for serializing and deserializing data from bytes + bytes configuration = 1; + } + + // Defines options for DataSource that sources features from request data + message RequestDataOptions { + reserved 1; + // Mapping of feature name to type + map deprecated_schema = 2; + + repeated FeatureSpecV2 schema = 3; + + } + + // Defines options for DataSource that supports pushing data to it. This allows data to be pushed to + // the online store on-demand, such as by stream consumers. + message PushOptions { + reserved 1; + } + + + // DataSource options. + oneof options { + FileOptions file_options = 11; + BigQueryOptions bigquery_options = 12; + KafkaOptions kafka_options = 13; + KinesisOptions kinesis_options = 14; + RedshiftOptions redshift_options = 15; + RequestDataOptions request_data_options = 18; + CustomSourceOptions custom_options = 16; + SnowflakeOptions snowflake_options = 19; + PushOptions push_options = 22; + SparkOptions spark_options = 27; + TrinoOptions trino_options = 30; + AthenaOptions athena_options = 35; + } +} diff --git a/all protos/DatastoreTable.proto b/all protos/DatastoreTable.proto new file mode 100644 index 00000000000..4246a6ae6e7 --- /dev/null +++ b/all protos/DatastoreTable.proto @@ -0,0 +1,39 @@ +// +// * Copyright 2021 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. +// + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "DatastoreTableProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +import "google/protobuf/wrappers.proto"; + +// Represents a Datastore table +message DatastoreTable { + // Feast project of the table + string project = 1; + + // Name of the table + string name = 2; + + // GCP project id + google.protobuf.StringValue project_id = 3; + + // Datastore namespace + google.protobuf.StringValue namespace = 4; +} \ No newline at end of file diff --git a/all protos/DynamoDBTable.proto b/all protos/DynamoDBTable.proto new file mode 100644 index 00000000000..4e5c8714e84 --- /dev/null +++ b/all protos/DynamoDBTable.proto @@ -0,0 +1,31 @@ +// +// * Copyright 2021 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. +// + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "DynamoDBTableProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +// Represents a DynamoDB table +message DynamoDBTable { + // Name of the table + string name = 1; + + // Region of the table + string region = 2; +} \ No newline at end of file diff --git a/all protos/Entity.proto b/all protos/Entity.proto new file mode 100644 index 00000000000..d8d8bedc5eb --- /dev/null +++ b/all protos/Entity.proto @@ -0,0 +1,60 @@ +// +// * Copyright 2020 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. +// + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "EntityProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +import "feast/types/Value.proto"; +import "google/protobuf/timestamp.proto"; + +message Entity { + // User-specified specifications of this entity. + EntitySpecV2 spec = 1; + // System-populated metadata for this entity. + EntityMeta meta = 2; +} + +message EntitySpecV2 { + // Name of the entity. + string name = 1; + + // Name of Feast project that this feature table belongs to. + string project = 9; + + // Type of the entity. + feast.types.ValueType.Enum value_type = 2; + + // Description of the entity. + string description = 3; + + // Join key for the entity (i.e. name of the column the entity maps to). + string join_key = 4; + + // User defined metadata + map tags = 8; + + // Owner of the entity. + string owner = 10; +} + +message EntityMeta { + google.protobuf.Timestamp created_timestamp = 1; + google.protobuf.Timestamp last_updated_timestamp = 2; +} diff --git a/all protos/EntityKey.proto b/all protos/EntityKey.proto new file mode 100644 index 00000000000..d7eebf25d03 --- /dev/null +++ b/all protos/EntityKey.proto @@ -0,0 +1,30 @@ +/* + * 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. + */ + +syntax = "proto3"; + +import "feast/types/Value.proto"; + +package feast.types; + +option java_package = "feast.proto.types"; +option java_outer_classname = "EntityKeyProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/types"; + +message EntityKey { + repeated string join_keys = 1; + repeated feast.types.Value entity_values = 2; +} diff --git a/all protos/Feature.proto b/all protos/Feature.proto new file mode 100644 index 00000000000..f6826bef810 --- /dev/null +++ b/all protos/Feature.proto @@ -0,0 +1,36 @@ +// +// Copyright 2020 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. +// + +syntax = "proto3"; +package feast.core; + + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "FeatureProto"; +option java_package = "feast.proto.core"; + +import "feast/types/Value.proto"; + +message FeatureSpecV2 { + // Name of the feature. Not updatable. + string name = 1; + + // Value type of the feature. Not updatable. + feast.types.ValueType.Enum value_type = 2; + + // Tags for user defined metadata on a feature + map tags = 3; +} diff --git a/all protos/FeatureService.proto b/all protos/FeatureService.proto new file mode 100644 index 00000000000..80d32eb4dec --- /dev/null +++ b/all protos/FeatureService.proto @@ -0,0 +1,98 @@ +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "FeatureServiceProto"; +option java_package = "feast.proto.core"; + +import "google/protobuf/timestamp.proto"; +import "feast/core/FeatureViewProjection.proto"; + +message FeatureService { + // User-specified specifications of this feature service. + FeatureServiceSpec spec = 1; + + // System-populated metadata for this feature service. + FeatureServiceMeta meta = 2; +} + +message FeatureServiceSpec { + // Name of the Feature Service. Must be unique. Not updated. + string name = 1; + + // Name of Feast project that this Feature Service belongs to. + string project = 2; + + // Represents a projection that's to be applied on top of the FeatureView. + // Contains data such as the features to use from a FeatureView. + repeated FeatureViewProjection features = 3; + + // User defined metadata + map tags = 4; + + // Description of the feature service. + string description = 5; + + // Owner of the feature service. + string owner = 6; + + // (optional) if provided logging will be enabled for this feature service. + LoggingConfig logging_config = 7; +} + + +message FeatureServiceMeta { + // Time where this Feature Service is created + google.protobuf.Timestamp created_timestamp = 1; + + // Time where this Feature Service is last updated + google.protobuf.Timestamp last_updated_timestamp = 2; + +} + + +message LoggingConfig { + float sample_rate = 1; + + oneof destination { + FileDestination file_destination = 3; + BigQueryDestination bigquery_destination = 4; + RedshiftDestination redshift_destination = 5; + SnowflakeDestination snowflake_destination = 6; + CustomDestination custom_destination = 7; + AthenaDestination athena_destination = 8; + } + + message FileDestination { + string path = 1; + string s3_endpoint_override = 2; + + // column names to use for partitioning + repeated string partition_by = 3; + } + + message BigQueryDestination { + // Full table reference in the form of [project:dataset.table] + string table_ref = 1; + } + + message RedshiftDestination { + // Destination table name. ClusterId and database will be taken from an offline store config + string table_name = 1; + } + + message AthenaDestination { + // Destination table name. data_source and database will be taken from an offline store config + string table_name = 1; + } + + message SnowflakeDestination { + // Destination table name. Schema and database will be taken from an offline store config + string table_name = 1; + } + + message CustomDestination { + string kind = 1; + map config = 2; + } +} diff --git a/all protos/FeatureTable.proto b/all protos/FeatureTable.proto new file mode 100644 index 00000000000..4054db58aed --- /dev/null +++ b/all protos/FeatureTable.proto @@ -0,0 +1,86 @@ +// +// Copyright 2020 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. +// + + +syntax = "proto3"; +package feast.core; + + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "FeatureTableProto"; +option java_package = "feast.proto.core"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "feast/core/DataSource.proto"; +import "feast/core/Feature.proto"; + +message FeatureTable { + // User-specified specifications of this feature table. + FeatureTableSpec spec = 1; + + // System-populated metadata for this feature table. + FeatureTableMeta meta = 2; +} + +message FeatureTableSpec { + // Name of the feature table. Must be unique. Not updated. + string name = 1; + + // Name of Feast project that this feature table belongs to. + string project = 9; + + // List names of entities to associate with the Features defined in this + // Feature Table. Not updatable. + repeated string entities = 3; + + // List of features specifications for each feature defined with this feature table. + repeated FeatureSpecV2 features = 4; + + // User defined metadata + map labels = 5; + + // Features in this feature table can only be retrieved from online serving + // younger than max age. Age is measured as the duration of time between + // the feature's event timestamp and when the feature is retrieved + // Feature values outside max age will be returned as unset values and indicated to end user + google.protobuf.Duration max_age = 6; + + // Batch/Offline DataSource to source batch/offline feature data. + // Only batch DataSource can be specified + // (ie source type should start with 'BATCH_') + DataSource batch_source = 7; + + // Stream/Online DataSource to source stream/online feature data. + // Only stream DataSource can be specified + // (ie source type should start with 'STREAM_') + DataSource stream_source = 8; +} + +message FeatureTableMeta { + // Time where this Feature Table is created + google.protobuf.Timestamp created_timestamp = 1; + + // Time where this Feature Table is last updated + google.protobuf.Timestamp last_updated_timestamp = 2; + + // Auto incrementing revision no. of this Feature Table + int64 revision = 3; + + // Hash entities, features, batch_source and stream_source to inform JobService if + // jobs should be restarted should hash change + string hash = 4; +} diff --git a/all protos/FeatureView.proto b/all protos/FeatureView.proto new file mode 100644 index 00000000000..c9e38bf3448 --- /dev/null +++ b/all protos/FeatureView.proto @@ -0,0 +1,94 @@ +// +// Copyright 2020 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. +// + + +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "FeatureViewProto"; +option java_package = "feast.proto.core"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "feast/core/DataSource.proto"; +import "feast/core/Feature.proto"; + +message FeatureView { + // User-specified specifications of this feature view. + FeatureViewSpec spec = 1; + + // System-populated metadata for this feature view. + FeatureViewMeta meta = 2; +} + +// Next available id: 13 +// TODO(adchia): refactor common fields from this and ODFV into separate metadata proto +message FeatureViewSpec { + // Name of the feature view. Must be unique. Not updated. + string name = 1; + + // Name of Feast project that this feature view belongs to. + string project = 2; + + // List of names of entities associated with this feature view. + repeated string entities = 3; + + // List of specifications for each feature defined as part of this feature view. + repeated FeatureSpecV2 features = 4; + + // List of specifications for each entity defined as part of this feature view. + repeated FeatureSpecV2 entity_columns = 12; + + // Description of the feature view. + string description = 10; + + // User defined metadata + map tags = 5; + + // Owner of the feature view. + string owner = 11; + + // Features in this feature view can only be retrieved from online serving + // younger than ttl. Ttl is measured as the duration of time between + // the feature's event timestamp and when the feature is retrieved + // Feature values outside ttl will be returned as unset values and indicated to end user + google.protobuf.Duration ttl = 6; + + // Batch/Offline DataSource where this view can retrieve offline feature data. + DataSource batch_source = 7; + // Streaming DataSource from where this view can consume "online" feature data. + DataSource stream_source = 9; + + // Whether these features should be served online or not + bool online = 8; +} + +message FeatureViewMeta { + // Time where this Feature View is created + google.protobuf.Timestamp created_timestamp = 1; + + // Time where this Feature View is last updated + google.protobuf.Timestamp last_updated_timestamp = 2; + + // List of pairs (start_time, end_time) for which this feature view has been materialized. + repeated MaterializationInterval materialization_intervals = 3; +} + +message MaterializationInterval { + google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp end_time = 2; +} diff --git a/all protos/FeatureViewProjection.proto b/all protos/FeatureViewProjection.proto new file mode 100644 index 00000000000..36d17632e7d --- /dev/null +++ b/all protos/FeatureViewProjection.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "FeatureReferenceProto"; +option java_package = "feast.proto.core"; + +import "feast/core/Feature.proto"; + + +// A projection to be applied on top of a FeatureView. +// Contains the modifications to a FeatureView such as the features subset to use. +message FeatureViewProjection { + // The feature view name + string feature_view_name = 1; + + // Alias for feature view name + string feature_view_name_alias = 3; + + // The features of the feature view that are a part of the feature reference. + repeated FeatureSpecV2 feature_columns = 2; + + // Map for entity join_key overrides of feature data entity join_key to entity data join_key + map join_key_map = 4; +} diff --git a/all protos/Field.proto b/all protos/Field.proto new file mode 100644 index 00000000000..8349263cc60 --- /dev/null +++ b/all protos/Field.proto @@ -0,0 +1,30 @@ +/* + * 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. + */ + +syntax = "proto3"; + +import "feast/types/Value.proto"; + +package feast.types; + +option java_package = "feast.proto.types"; +option java_outer_classname = "FieldProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/types"; + +message Field { + string name = 1; + feast.types.ValueType.Enum value = 2; +} diff --git a/all protos/HealthService.proto b/all protos/HealthService.proto new file mode 100644 index 00000000000..342db35d4c3 --- /dev/null +++ b/all protos/HealthService.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package grpc.health.v1; + +option java_package = "io.grpc.health.v1"; +option java_outer_classname = "HealthProto"; + +message HealthCheckRequest { + string service = 1; +} + +enum ServingStatus { + UNKNOWN = 0; + SERVING = 1; + NOT_SERVING = 2; +} + +message HealthCheckResponse { + ServingStatus status = 1; +} + +service Health { + rpc Check(HealthCheckRequest) returns (HealthCheckResponse); +} \ No newline at end of file diff --git a/all protos/InfraObject.proto b/all protos/InfraObject.proto new file mode 100644 index 00000000000..35204015173 --- /dev/null +++ b/all protos/InfraObject.proto @@ -0,0 +1,51 @@ +// +// * Copyright 2021 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. +// + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "InfraObjectProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +import "feast/core/DatastoreTable.proto"; +import "feast/core/DynamoDBTable.proto"; +import "feast/core/SqliteTable.proto"; + +// Represents a set of infrastructure objects managed by Feast +message Infra { + // List of infrastructure objects managed by Feast + repeated InfraObject infra_objects = 1; +} + +// Represents a single infrastructure object managed by Feast +message InfraObject { + // Represents the Python class for the infrastructure object + string infra_object_class_type = 1; + + // The infrastructure object + oneof infra_object { + DynamoDBTable dynamodb_table = 2; + DatastoreTable datastore_table = 3; + SqliteTable sqlite_table = 4; + CustomInfra custom_infra = 100; + } + + // Allows for custom infra objects to be added + message CustomInfra { + bytes field = 1; + } +} \ No newline at end of file diff --git a/all protos/OnDemandFeatureView.proto b/all protos/OnDemandFeatureView.proto new file mode 100644 index 00000000000..50bf8b6f557 --- /dev/null +++ b/all protos/OnDemandFeatureView.proto @@ -0,0 +1,89 @@ +// +// Copyright 2020 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. +// + + +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "OnDemandFeatureViewProto"; +option java_package = "feast.proto.core"; + +import "google/protobuf/timestamp.proto"; +import "feast/core/FeatureView.proto"; +import "feast/core/FeatureViewProjection.proto"; +import "feast/core/Feature.proto"; +import "feast/core/DataSource.proto"; + +message OnDemandFeatureView { + // User-specified specifications of this feature view. + OnDemandFeatureViewSpec spec = 1; + OnDemandFeatureViewMeta meta = 2; +} + +// Next available id: 9 +message OnDemandFeatureViewSpec { + // Name of the feature view. Must be unique. Not updated. + string name = 1; + + // Name of Feast project that this feature view belongs to. + string project = 2; + + // List of features specifications for each feature defined with this feature view. + repeated FeatureSpecV2 features = 3; + + // Map of sources for this feature view. + map sources = 4; + + UserDefinedFunction user_defined_function = 5; + + // Description of the on demand feature view. + string description = 6; + + // User defined metadata. + map tags = 7; + + // Owner of the on demand feature view. + string owner = 8; +} + +message OnDemandFeatureViewMeta { + // Time where this Feature View is created + google.protobuf.Timestamp created_timestamp = 1; + + // Time where this Feature View is last updated + google.protobuf.Timestamp last_updated_timestamp = 2; +} + +message OnDemandSource { + oneof source { + FeatureView feature_view = 1; + FeatureViewProjection feature_view_projection = 3; + DataSource request_data_source = 2; + } +} + +// Serialized representation of python function. +message UserDefinedFunction { + // The function name + string name = 1; + + // The python-syntax function body (serialized by dill) + bytes body = 2; + + // The string representation of the udf + string body_text = 3; +} diff --git a/all protos/Redis.proto b/all protos/Redis.proto new file mode 100644 index 00000000000..c89e0b6b2fa --- /dev/null +++ b/all protos/Redis.proto @@ -0,0 +1,33 @@ +/* + * Copyright 2019 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. + */ + +syntax = "proto3"; + +import "feast/types/Value.proto"; + +package feast.storage; + +option java_outer_classname = "RedisProto"; +option java_package = "feast.proto.storage"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/storage"; + +message RedisKeyV2 { + string project = 1; + + repeated string entity_names = 2; + + repeated feast.types.Value entity_values = 3; +} diff --git a/all protos/Registry.proto b/all protos/Registry.proto new file mode 100644 index 00000000000..7d80d8c837f --- /dev/null +++ b/all protos/Registry.proto @@ -0,0 +1,61 @@ +// +// * Copyright 2020 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. +// + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "RegistryProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +import "feast/core/Entity.proto"; +import "feast/core/FeatureService.proto"; +import "feast/core/FeatureTable.proto"; +import "feast/core/FeatureView.proto"; +import "feast/core/InfraObject.proto"; +import "feast/core/OnDemandFeatureView.proto"; +import "feast/core/RequestFeatureView.proto"; +import "feast/core/StreamFeatureView.proto"; +import "feast/core/DataSource.proto"; +import "feast/core/SavedDataset.proto"; +import "feast/core/ValidationProfile.proto"; +import "google/protobuf/timestamp.proto"; + +// Next id: 16 +message Registry { + repeated Entity entities = 1; + repeated FeatureTable feature_tables = 2; + repeated FeatureView feature_views = 6; + repeated DataSource data_sources = 12; + repeated OnDemandFeatureView on_demand_feature_views = 8; + repeated RequestFeatureView request_feature_views = 9; + repeated StreamFeatureView stream_feature_views = 14; + repeated FeatureService feature_services = 7; + repeated SavedDataset saved_datasets = 11; + repeated ValidationReference validation_references = 13; + Infra infra = 10; + // Tracking metadata of Feast by project + repeated ProjectMetadata project_metadata = 15; + + string registry_schema_version = 3; // to support migrations; incremented when schema is changed + string version_id = 4; // version id, random string generated on each update of the data; now used only for debugging purposes + google.protobuf.Timestamp last_updated = 5; +} + +message ProjectMetadata { + string project = 1; + string project_uuid = 2; +} diff --git a/all protos/RequestFeatureView.proto b/all protos/RequestFeatureView.proto new file mode 100644 index 00000000000..4049053c2be --- /dev/null +++ b/all protos/RequestFeatureView.proto @@ -0,0 +1,51 @@ +// +// Copyright 2021 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. +// + + +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "RequestFeatureViewProto"; +option java_package = "feast.proto.core"; + +import "feast/core/DataSource.proto"; + +message RequestFeatureView { + // User-specified specifications of this feature view. + RequestFeatureViewSpec spec = 1; +} + +// Next available id: 7 +message RequestFeatureViewSpec { + // Name of the feature view. Must be unique. Not updated. + string name = 1; + + // Name of Feast project that this feature view belongs to. + string project = 2; + + // Request data which contains the underlying data schema and list of associated features + DataSource request_data_source = 3; + + // Description of the request feature view. + string description = 4; + + // User defined metadata. + map tags = 5; + + // Owner of the request feature view. + string owner = 6; +} diff --git a/all protos/SavedDataset.proto b/all protos/SavedDataset.proto new file mode 100644 index 00000000000..111548aa480 --- /dev/null +++ b/all protos/SavedDataset.proto @@ -0,0 +1,83 @@ +// +// Copyright 2021 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. +// + + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "SavedDatasetProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +import "google/protobuf/timestamp.proto"; +import "feast/core/DataSource.proto"; + +message SavedDatasetSpec { + // Name of the dataset. Must be unique since it's possible to overwrite dataset by name + string name = 1; + + // Name of Feast project that this Dataset belongs to. + string project = 2; + + // list of feature references with format ":" + repeated string features = 3; + + // entity columns + request columns from all feature views used during retrieval + repeated string join_keys = 4; + + // Whether full feature names are used in stored data + bool full_feature_names = 5; + + SavedDatasetStorage storage = 6; + + // Optional and only populated if generated from a feature service fetch + string feature_service_name = 8; + + // User defined metadata + map tags = 7; +} + +message SavedDatasetStorage { + oneof kind { + DataSource.FileOptions file_storage = 4; + DataSource.BigQueryOptions bigquery_storage = 5; + DataSource.RedshiftOptions redshift_storage = 6; + DataSource.SnowflakeOptions snowflake_storage = 7; + DataSource.TrinoOptions trino_storage = 8; + DataSource.SparkOptions spark_storage = 9; + DataSource.CustomSourceOptions custom_storage = 10; + DataSource.AthenaOptions athena_storage = 11; + } +} + +message SavedDatasetMeta { + // Time when this saved dataset is created + google.protobuf.Timestamp created_timestamp = 1; + + // Time when this saved dataset is last updated + google.protobuf.Timestamp last_updated_timestamp = 2; + + // Min timestamp in the dataset (needed for retrieval) + google.protobuf.Timestamp min_event_timestamp = 3; + + // Max timestamp in the dataset (needed for retrieval) + google.protobuf.Timestamp max_event_timestamp = 4; +} + +message SavedDataset { + SavedDatasetSpec spec = 1; + SavedDatasetMeta meta = 2; +} diff --git a/all protos/ServingService.proto b/all protos/ServingService.proto new file mode 100644 index 00000000000..a940b725025 --- /dev/null +++ b/all protos/ServingService.proto @@ -0,0 +1,133 @@ +/* + * 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. + */ + +syntax = "proto3"; + +package feast.serving; + +import "google/protobuf/timestamp.proto"; +import "feast/types/Value.proto"; + +option java_package = "feast.proto.serving"; +option java_outer_classname = "ServingAPIProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/serving"; + +service ServingService { + // Get information about this Feast serving. + rpc GetFeastServingInfo (GetFeastServingInfoRequest) returns (GetFeastServingInfoResponse); + // Get online features synchronously. + rpc GetOnlineFeatures (GetOnlineFeaturesRequest) returns (GetOnlineFeaturesResponse); +} + +message GetFeastServingInfoRequest {} + +message GetFeastServingInfoResponse { + // Feast version of this serving deployment. + string version = 1; +} + +message FeatureReferenceV2 { + // Name of the Feature View to retrieve the feature from. + string feature_view_name = 1; + + // Name of the Feature to retrieve the feature from. + string feature_name = 2; +} + +// ToDo (oleksii): remove this message (since it's not used) and move EntityRow on package level +message GetOnlineFeaturesRequestV2 { + // List of features that are being retrieved + repeated FeatureReferenceV2 features = 4; + + // List of entity rows, containing entity id and timestamp data. + // Used during retrieval of feature rows and for joining feature + // rows into a final dataset + repeated EntityRow entity_rows = 2; + + // Optional field to specify project name override. If specified, uses the + // given project for retrieval. Overrides the projects specified in + // Feature References if both are specified. + string project = 5; + + message EntityRow { + // Request timestamp of this row. This value will be used, + // together with maxAge, to determine feature staleness. + google.protobuf.Timestamp timestamp = 1; + + // Map containing mapping of entity name to entity value. + map fields = 2; + } +} + +// In JSON "val" field can be omitted +message FeatureList { + repeated string val = 1; +} + +message GetOnlineFeaturesRequest { + oneof kind { + string feature_service = 1; + FeatureList features = 2; + } + // The entity data is specified in a columnar format + // A map of entity name -> list of values + map entities = 3; + bool full_feature_names = 4; + + // Context for OnDemand Feature Transformation + // (was moved to dedicated parameter to avoid unnecessary separation logic on serving side) + // A map of variable name -> list of values + map request_context = 5; +} + +message GetOnlineFeaturesResponse { + GetOnlineFeaturesResponseMetadata metadata = 1; + + // Length of "results" array should match length of requested features. + // We also preserve the same order of features here as in metadata.feature_names + repeated FeatureVector results = 2; + + message FeatureVector { + repeated feast.types.Value values = 1; + repeated FieldStatus statuses = 2; + repeated google.protobuf.Timestamp event_timestamps = 3; + } +} + +message GetOnlineFeaturesResponseMetadata { + FeatureList feature_names = 1; +} + +enum FieldStatus { + // Status is unset for this field. + INVALID = 0; + + // Field value is present for this field and age is within max age. + PRESENT = 1; + + // Values could be found for entity key and age is within max age, but + // this field value is assigned a value on ingestion into feast. + NULL_VALUE = 2; + + // Entity key did not return any values as they do not exist in Feast. + // This could suggest that the feature values have not yet been ingested + // into feast or the ingestion failed. + NOT_FOUND = 3; + + // Values could be found for entity key, but field values are outside the maximum + // allowable range. + OUTSIDE_MAX_AGE = 4; +} diff --git a/all protos/SqliteTable.proto b/all protos/SqliteTable.proto new file mode 100644 index 00000000000..8665be840ae --- /dev/null +++ b/all protos/SqliteTable.proto @@ -0,0 +1,31 @@ +// +// * Copyright 2021 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. +// + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "SqliteTableProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +// Represents a Sqlite table +message SqliteTable { + // Absolute path of the table + string path = 1; + + // Name of the table + string name = 2; +} \ No newline at end of file diff --git a/all protos/Store.proto b/all protos/Store.proto new file mode 100644 index 00000000000..c92a526354d --- /dev/null +++ b/all protos/Store.proto @@ -0,0 +1,130 @@ +// +// * Copyright 2019 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. +// + +syntax = "proto3"; +package feast.core; + +option java_package = "feast.proto.core"; +option java_outer_classname = "StoreProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +// Store provides a location where Feast reads and writes feature values. +// Feature values will be written to the Store in the form of FeatureRow elements. +// The way FeatureRow is encoded and decoded when it is written to and read from +// the Store depends on the type of the Store. +// +message Store { + + enum StoreType { + // These positions should not be reused. + reserved 2, 3, 12, 13; + + INVALID = 0; + + // Redis stores a FeatureRow element as a key, value pair. + // + // The Redis data types used (https://redis.io/topics/data-types): + // - key: STRING + // - value: STRING + // + // Encodings: + // - key: byte array of RedisKey (refer to feast.storage.RedisKeyV2) + // - value: Redis hashmap + // + REDIS = 1; + + REDIS_CLUSTER = 4; + } + + message RedisConfig { + string host = 1; + int32 port = 2; + // Optional. The number of milliseconds to wait before retrying failed Redis connection. + // By default, Feast uses exponential backoff policy and "initial_backoff_ms" sets the initial wait duration. + int32 initial_backoff_ms = 3; + // Optional. Maximum total number of retries for connecting to Redis. Default to zero retries. + int32 max_retries = 4; + // Optional. How often flush data to redis + int32 flush_frequency_seconds = 5; + // Optional. Connect over SSL. + bool ssl = 6; + } + + message RedisClusterConfig { + // List of Redis Uri for all the nodes in Redis Cluster, comma separated. Eg. host1:6379, host2:6379 + string connection_string = 1; + int32 initial_backoff_ms = 2; + int32 max_retries = 3; + // Optional. How often flush data to redis + int32 flush_frequency_seconds = 4; + // Optional. Append a prefix to the Redis Key + string key_prefix = 5; + // Optional. Enable fallback to another key prefix if the original key is not present. + // Useful for migrating key prefix without re-ingestion. Disabled by default. + bool enable_fallback = 6; + // Optional. This would be the fallback prefix to use if enable_fallback is true. + string fallback_prefix = 7; + + // Optional. Priority of nodes when reading from cluster + enum ReadFrom { + MASTER = 0; + MASTER_PREFERRED = 1; + REPLICA = 2; + REPLICA_PREFERRED = 3; + } + ReadFrom read_from = 8; + } + + message Subscription { + // Name of project that the feature sets belongs to. This can be one of + // - [project_name] + // - * + // If an asterisk is provided, filtering on projects will be disabled. All projects will + // be matched. It is NOT possible to provide an asterisk with a string in order to do + // pattern matching. + string project = 3; + + // Name of the desired feature set. Asterisks can be used as wildcards in the name. + // Matching on names is only permitted if a specific project is defined. It is disallowed + // If the project name is set to "*" + // e.g. + // - * can be used to match all feature sets + // - my-feature-set* can be used to match all features prefixed by "my-feature-set" + // - my-feature-set-6 can be used to select a single feature set + string name = 1; + + // All matches with exclude enabled will be filtered out instead of added + bool exclude = 4; + + // Feature set version was removed in v0.5.0. + reserved 2; + } + + // Name of the store. + string name = 1; + + // Type of store. + StoreType type = 2; + + // Feature sets to subscribe to. + repeated Subscription subscriptions = 4; + + // Configuration to connect to the store. Required. + oneof config { + RedisConfig redis_config = 11; + RedisClusterConfig redis_cluster_config = 14; + } +} diff --git a/all protos/StreamFeatureView.proto b/all protos/StreamFeatureView.proto new file mode 100644 index 00000000000..3181bdf3602 --- /dev/null +++ b/all protos/StreamFeatureView.proto @@ -0,0 +1,91 @@ +// +// Copyright 2020 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. +// + + +syntax = "proto3"; +package feast.core; + +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; +option java_outer_classname = "StreamFeatureViewProto"; +option java_package = "feast.proto.core"; + + +import "google/protobuf/duration.proto"; +import "feast/core/OnDemandFeatureView.proto"; +import "feast/core/FeatureView.proto"; +import "feast/core/Feature.proto"; +import "feast/core/DataSource.proto"; +import "feast/core/Aggregation.proto"; + +message StreamFeatureView { + // User-specified specifications of this feature view. + StreamFeatureViewSpec spec = 1; + FeatureViewMeta meta = 2; +} + +// Next available id: 17 +message StreamFeatureViewSpec { + // Name of the feature view. Must be unique. Not updated. + string name = 1; + + // Name of Feast project that this feature view belongs to. + string project = 2; + + // List of names of entities associated with this feature view. + repeated string entities = 3; + + // List of specifications for each feature defined as part of this feature view. + repeated FeatureSpecV2 features = 4; + + // List of specifications for each entity defined as part of this feature view. + repeated FeatureSpecV2 entity_columns = 5; + + // Description of the feature view. + string description = 6; + + // User defined metadata + map tags = 7; + + // Owner of the feature view. + string owner = 8; + + // Features in this feature view can only be retrieved from online serving + // younger than ttl. Ttl is measured as the duration of time between + // the feature's event timestamp and when the feature is retrieved + // Feature values outside ttl will be returned as unset values and indicated to end user + google.protobuf.Duration ttl = 9; + + // Batch/Offline DataSource where this view can retrieve offline feature data. + DataSource batch_source = 10; + // Streaming DataSource from where this view can consume "online" feature data. + DataSource stream_source = 11; + + // Whether these features should be served online or not + bool online = 12; + + // Serialized function that is encoded in the streamfeatureview + UserDefinedFunction user_defined_function = 13; + + // Mode of execution + string mode = 14; + + // Aggregation definitions + repeated Aggregation aggregations = 15; + + // Timestamp field for aggregation + string timestamp_field = 16; +} + diff --git a/all protos/TransformationService.proto b/all protos/TransformationService.proto new file mode 100644 index 00000000000..bd1a7917f3c --- /dev/null +++ b/all protos/TransformationService.proto @@ -0,0 +1,67 @@ +/* + * Copyright 2021 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. + */ + +syntax = "proto3"; + +package feast.serving; + +option java_package = "feast.proto.serving"; +option java_outer_classname = "TransformationServiceAPIProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/serving"; + +service TransformationService { + rpc GetTransformationServiceInfo (GetTransformationServiceInfoRequest) returns (GetTransformationServiceInfoResponse); + + rpc TransformFeatures (TransformFeaturesRequest) returns (TransformFeaturesResponse); +} + +message ValueType { + oneof value { + // Having a oneOf provides forward compatibility if we need to support compound types + // that are not supported by arrow natively. + bytes arrow_value = 1; + } +} + +message GetTransformationServiceInfoRequest {} + +message GetTransformationServiceInfoResponse { + // Feast version of this transformation service deployment. + string version = 1; + + // Type of transformation service deployment. This is either Python, or custom + TransformationServiceType type = 2; + + string transformation_service_type_details = 3; +} + +message TransformFeaturesRequest { + string on_demand_feature_view_name = 1; + string project = 2; + + ValueType transformation_input = 3; +} + +message TransformFeaturesResponse { + ValueType transformation_output = 3; +} + +enum TransformationServiceType { + TRANSFORMATION_SERVICE_TYPE_INVALID = 0; + TRANSFORMATION_SERVICE_TYPE_PYTHON = 1; + + TRANSFORMATION_SERVICE_TYPE_CUSTOM = 100; +} diff --git a/all protos/ValidationProfile.proto b/all protos/ValidationProfile.proto new file mode 100644 index 00000000000..10027995859 --- /dev/null +++ b/all protos/ValidationProfile.proto @@ -0,0 +1,60 @@ +// +// Copyright 2021 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. +// + + +syntax = "proto3"; + +package feast.core; +option java_package = "feast.proto.core"; +option java_outer_classname = "ValidationProfile"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/core"; + +message GEValidationProfiler { + message UserDefinedProfiler { + // The python-syntax function body (serialized by dill) + bytes body = 1; + } + + UserDefinedProfiler profiler = 1; +} + +message GEValidationProfile { + // JSON-serialized ExpectationSuite object + bytes expectation_suite = 1; +} + +message ValidationReference { + // Unique name of validation reference within the project + string name = 1; + // Name of saved dataset used as reference dataset + string reference_dataset_name = 2; + // Name of Feast project that this object source belongs to + string project = 3; + // Description of the validation reference + string description = 4; + // User defined metadata + map tags = 5; + + // validation profiler + oneof profiler { + GEValidationProfiler ge_profiler = 6; + } + + // (optional) cached validation profile (to avoid constant recalculation) + oneof cached_profile { + GEValidationProfile ge_profile = 7; + } +} diff --git a/all protos/Value.proto b/all protos/Value.proto new file mode 100644 index 00000000000..b273fecfeae --- /dev/null +++ b/all protos/Value.proto @@ -0,0 +1,109 @@ +/* + * 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. + */ + +syntax = "proto3"; + +package feast.types; + +option java_package = "feast.proto.types"; +option java_outer_classname = "ValueProto"; +option go_package = "github.com/feast-dev/feast/go/protos/feast/types"; + +message ValueType { + enum Enum { + INVALID = 0; + BYTES = 1; + STRING = 2; + INT32 = 3; + INT64 = 4; + DOUBLE = 5; + FLOAT = 6; + BOOL = 7; + UNIX_TIMESTAMP = 8; + BYTES_LIST = 11; + STRING_LIST = 12; + INT32_LIST = 13; + INT64_LIST = 14; + DOUBLE_LIST = 15; + FLOAT_LIST = 16; + BOOL_LIST = 17; + UNIX_TIMESTAMP_LIST = 18; + NULL = 19; + } +} + +message Value { + // ValueType is referenced by the metadata types, FeatureInfo and EntityInfo. + // The enum values do not have to match the oneof val field ids, but they should. + // In JSON "*_val" field can be omitted + oneof val { + bytes bytes_val = 1; + string string_val = 2; + int32 int32_val = 3; + int64 int64_val = 4; + double double_val = 5; + float float_val = 6; + bool bool_val = 7; + int64 unix_timestamp_val = 8; + BytesList bytes_list_val = 11; + StringList string_list_val = 12; + Int32List int32_list_val = 13; + Int64List int64_list_val = 14; + DoubleList double_list_val = 15; + FloatList float_list_val = 16; + BoolList bool_list_val = 17; + Int64List unix_timestamp_list_val = 18; + Null null_val = 19; + } +} + +enum Null { + NULL = 0; +} + +message BytesList { + repeated bytes val = 1; +} + +message StringList { + repeated string val = 1; +} + +message Int32List { + repeated int32 val = 1; +} + +message Int64List { + repeated int64 val = 1; +} + +message DoubleList { + repeated double val = 1; +} + +message FloatList { + repeated float val = 1; +} + +message BoolList { + repeated bool val = 1; +} + +// This is to avoid an issue of being unable to specify `repeated value` in oneofs or maps +// In JSON "val" field can be omitted +message RepeatedValue { + repeated Value val = 1; +} \ No newline at end of file diff --git a/java/pom.xml b/java/pom.xml index 5f1c8f5df90..1e3453e1c2d 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -21,7 +21,6 @@ Feast Feature Store for Machine Learning ${github.url} - dev.feast feast-parent ${revision} @@ -52,7 +51,7 @@ 0.26.0 - 2.17.1 + 2.19.0 2.9.9 2.0.2 1.18.24 @@ -250,13 +249,6 @@ - - spotless-check - process-test-classes - - check - - @@ -424,34 +416,6 @@ - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - --pinentry-mode - loopback - - - - ${gpg.passphrase} - - - - diff --git a/java/serving-client/pom.xml b/java/serving-client/pom.xml index 7b8838a009c..24d2d6f969f 100644 --- a/java/serving-client/pom.xml +++ b/java/serving-client/pom.xml @@ -18,7 +18,7 @@ 5.5.2 - 2.28.2 + 4.11.0 0.33.0 diff --git a/java/serving-client/src/main/java/dev/feast/FeastClient.java b/java/serving-client/src/main/java/dev/feast/FeastClient.java index c10a76ecf81..dd3e9014556 100644 --- a/java/serving-client/src/main/java/dev/feast/FeastClient.java +++ b/java/serving-client/src/main/java/dev/feast/FeastClient.java @@ -17,6 +17,8 @@ package dev.feast; import com.google.common.collect.Lists; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import feast.proto.serving.ServingAPIProto; import feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest; import feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse; @@ -24,17 +26,21 @@ import feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse; import feast.proto.serving.ServingServiceGrpc; import feast.proto.serving.ServingServiceGrpc.ServingServiceBlockingStub; +import feast.proto.serving.ServingServiceGrpc.ServingServiceFutureStub; import feast.proto.types.ValueProto; import io.grpc.CallCredentials; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts; import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; +import io.grpc.stub.StreamObserver; import io.opentracing.contrib.grpc.TracingClientInterceptor; import io.opentracing.util.GlobalTracer; import java.io.File; +import java.time.Duration; import java.time.Instant; import java.util.*; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import javax.net.ssl.SSLException; @@ -46,9 +52,15 @@ public class FeastClient implements AutoCloseable { Logger logger = LoggerFactory.getLogger(FeastClient.class); private static final int CHANNEL_SHUTDOWN_TIMEOUT_SEC = 5; + private static final int DEFAULT_MAX_MESSAGE_SIZE = 64 * 1024 * 1024; // 64MB + private static final int DEFAULT_BATCH_SIZE = 1000; + private static final Duration DEFAULT_KEEP_ALIVE_TIME = Duration.ofSeconds(60); + private static final Duration DEFAULT_KEEP_ALIVE_TIMEOUT = Duration.ofSeconds(20); private final ManagedChannel channel; - private final ServingServiceBlockingStub stub; + private final ServingServiceBlockingStub blockingStub; + private final ServingServiceFutureStub asyncStub; + private final int batchSize; /** * Create a client to access Feast Serving. @@ -72,30 +84,33 @@ public static FeastClient create(String host, int port) { * @return {@link FeastClient} */ public static FeastClient createSecure(String host, int port, SecurityConfig securityConfig) { - // Configure client TLS ManagedChannel channel = null; if (securityConfig.isTLSEnabled()) { + NettyChannelBuilder builder = NettyChannelBuilder.forAddress(host, port) + .maxInboundMessageSize(DEFAULT_MAX_MESSAGE_SIZE) + .maxInboundMetadataSize(DEFAULT_MAX_MESSAGE_SIZE) + .keepAliveTime(DEFAULT_KEEP_ALIVE_TIME.toMillis(), TimeUnit.MILLISECONDS) + .keepAliveTimeout(DEFAULT_KEEP_ALIVE_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS) + .keepAliveWithoutCalls(true); + if (securityConfig.getCertificatePath().isPresent()) { String certificatePath = securityConfig.getCertificatePath().get(); - // Use custom certificate for TLS - File certificateFile = new File(certificatePath); try { - channel = - NettyChannelBuilder.forAddress(host, port) - .useTransportSecurity() - .sslContext(GrpcSslContexts.forClient().trustManager(certificateFile).build()) - .build(); + builder.useTransportSecurity() + .sslContext(GrpcSslContexts.forClient().trustManager(new File(certificatePath)).build()); } catch (SSLException e) { throw new IllegalArgumentException( String.format("Invalid Certificate provided at path: %s", certificatePath), e); } } else { - // Use system certificates for TLS - channel = ManagedChannelBuilder.forAddress(host, port).useTransportSecurity().build(); + builder.useTransportSecurity(); } + channel = builder.build(); } else { - // Disable TLS - channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext().build(); + channel = ManagedChannelBuilder.forAddress(host, port) + .maxInboundMessageSize(DEFAULT_MAX_MESSAGE_SIZE) + .usePlaintext() + .build(); } return new FeastClient(channel, securityConfig.getCredentials()); @@ -107,7 +122,7 @@ public static FeastClient createSecure(String host, int port, SecurityConfig sec * @return {@link GetFeastServingInfoResponse} containing Feast version, Serving type etc. */ public GetFeastServingInfoResponse getFeastServingInfo() { - return stub.getFeastServingInfo(GetFeastServingInfoRequest.newBuilder().build()); + return blockingStub.getFeastServingInfo(GetFeastServingInfoRequest.newBuilder().build()); } /** @@ -129,7 +144,7 @@ public List getOnlineFeatures(List featureRefs, List entities) requestBuilder.putAllEntities(getEntityValuesMap(entities)); - GetOnlineFeaturesResponse response = stub.getOnlineFeatures(requestBuilder.build()); + GetOnlineFeaturesResponse response = blockingStub.getOnlineFeatures(requestBuilder.build()); List results = Lists.newArrayList(); if (response.getResultsCount() == 0) { @@ -201,19 +216,94 @@ public List getOnlineFeatures(List featureRefs, List rows, Str return getOnlineFeatures(featureRefs, rows); } + public CompletableFuture> getOnlineFeaturesAsync( + List featureRefs, List entities) { + return getOnlineFeaturesAsync(featureRefs, entities, null); + } + + public CompletableFuture> getOnlineFeaturesAsync( + List featureRefs, List entities, String project) { + + GetOnlineFeaturesRequest.Builder requestBuilder = GetOnlineFeaturesRequest.newBuilder(); + requestBuilder.setFeatures( + ServingAPIProto.FeatureList.newBuilder().addAllVal(featureRefs).build()); + requestBuilder.putAllEntities(getEntityValuesMap(entities)); + + GetOnlineFeaturesRequest request = requestBuilder.build(); + ListenableFuture future = asyncStub.getOnlineFeatures(request); + + CompletableFuture> result = new CompletableFuture<>(); + future.addListener(() -> { + try { + GetOnlineFeaturesResponse response = future.get(); + result.complete(processOnlineFeaturesResponse(response, entities)); + } catch (Exception e) { + result.completeExceptionally(e); + } + }, MoreExecutors.directExecutor()); + + return result; + } + + private List processOnlineFeaturesResponse( + GetOnlineFeaturesResponse response, List entities) { + List results = Lists.newArrayList(); + if (response.getResultsCount() == 0) { + return results; + } + + for (int rowIdx = 0; rowIdx < response.getResults(0).getValuesCount(); rowIdx++) { + Row row = Row.create(); + for (int featureIdx = 0; featureIdx < response.getResultsCount(); featureIdx++) { + row.set( + response.getMetadata().getFeatureNames().getVal(featureIdx), + response.getResults(featureIdx).getValues(rowIdx), + response.getResults(featureIdx).getStatuses(rowIdx)); + + row.setEntityTimestamp( + Instant.ofEpochSecond( + response.getResults(featureIdx).getEventTimestamps(rowIdx).getSeconds())); + } + + // Add entity fields + entities.get(rowIdx).getFields().forEach(row::set); + results.add(row); + } + return results; + } + + public List getOnlineFeaturesInBatches( + List featureRefs, List entities, String project) { + List results = new ArrayList<>(); + + for (int i = 0; i < entities.size(); i += batchSize) { + int end = Math.min(entities.size(), i + batchSize); + List batch = entities.subList(i, end); + results.addAll(getOnlineFeatures(featureRefs, batch, project)); + } + + return results; + } + protected FeastClient(ManagedChannel channel, Optional credentials) { this.channel = channel; + this.batchSize = DEFAULT_BATCH_SIZE; TracingClientInterceptor tracingInterceptor = TracingClientInterceptor.newBuilder().withTracer(GlobalTracer.get()).build(); ServingServiceBlockingStub servingStub = ServingServiceGrpc.newBlockingStub(tracingInterceptor.intercept(channel)); + ServingServiceFutureStub asyncServingStub = + ServingServiceGrpc.newFutureStub(tracingInterceptor.intercept(channel)); + if (credentials.isPresent()) { servingStub = servingStub.withCallCredentials(credentials.get()); + asyncServingStub = asyncServingStub.withCallCredentials(credentials.get()); } - this.stub = servingStub; + this.blockingStub = servingStub; + this.asyncStub = asyncServingStub; } public void close() throws Exception { diff --git a/java/serving-client/src/test/java/dev/feast/FeastClientTest.java b/java/serving-client/src/test/java/dev/feast/FeastClientTest.java index 1dfb9989c95..e6a7e6c9f2d 100644 --- a/java/serving-client/src/test/java/dev/feast/FeastClientTest.java +++ b/java/serving-client/src/test/java/dev/feast/FeastClientTest.java @@ -39,40 +39,42 @@ import java.util.List; import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; public class FeastClientTest { private final String AUTH_TOKEN = "test token"; - @Rule public GrpcCleanupRule grpcRule; + @RegisterExtension + public GrpcCleanupRule grpcRule = new GrpcCleanupRule(); + private AtomicBoolean isAuthenticated; - private ServingServiceImplBase servingMock = - mock( - ServingServiceImplBase.class, - delegatesTo( - new ServingServiceImplBase() { - @Override - public void getOnlineFeatures( - GetOnlineFeaturesRequest request, - StreamObserver responseObserver) { - if (!request.equals(FeastClientTest.getFakeRequest())) { - responseObserver.onError(Status.FAILED_PRECONDITION.asRuntimeException()); - } - - responseObserver.onNext(FeastClientTest.getFakeResponse()); - responseObserver.onCompleted(); - } - })); - + private ServingServiceImplBase servingMock; private FeastClient client; - @Before + @BeforeEach public void setup() throws Exception { - this.grpcRule = new GrpcCleanupRule(); this.isAuthenticated = new AtomicBoolean(false); + + // Create the mock with newer Mockito API + this.servingMock = mock(ServingServiceImplBase.class, invocation -> { + if (invocation.getMethod().getName().equals("getOnlineFeatures")) { + GetOnlineFeaturesRequest request = invocation.getArgument(0); + StreamObserver responseObserver = invocation.getArgument(1); + + if (!request.equals(FeastClientTest.getFakeRequest())) { + responseObserver.onError(Status.FAILED_PRECONDITION.asRuntimeException()); + return null; + } + + responseObserver.onNext(FeastClientTest.getFakeResponse()); + responseObserver.onCompleted(); + } + return null; + }); + // setup fake serving service String serverName = InProcessServerBuilder.generateName(); this.grpcRule.register( diff --git a/java/serving/REDIS_PERFORMANCE_OPTIMIZATIONS.md b/java/serving/REDIS_PERFORMANCE_OPTIMIZATIONS.md new file mode 100644 index 00000000000..ca16b6e33e2 --- /dev/null +++ b/java/serving/REDIS_PERFORMANCE_OPTIMIZATIONS.md @@ -0,0 +1,198 @@ +# Redis Performance Optimizations in Feast Java Serving + +This document outlines the performance optimizations implemented for fetching features from Redis within the Feast Java Serving module. These enhancements aim to reduce latency, increase throughput, and improve the overall efficiency of online feature retrieval. + +## 1. Overview of Optimizations + +The following key optimizations have been implemented: + +1. **Optimized Redis Client Adapter**: Introduces robust connection pooling for both standalone and cluster Redis setups using Apache Commons Pool2 and fine-tuned Lettuce client options. +2. **Request Pipelining**: Batches multiple Redis commands (HMGET/HGETALL) into single network round trips, significantly reducing overhead. +3. **Local Feature Caching**: Implements an in-memory cache using Caffeine to store frequently accessed features, reducing direct Redis lookups. +4. **Adaptive HMGET/HGETALL Threshold**: Dynamically adjusts the strategy for fetching multiple fields based on observed performance, rather than a fixed threshold. +5. **Asynchronous Processing & Parallelism**: Leverages `CompletableFuture` and an `ExecutorService` for non-blocking operations and potential parallel processing of cache misses. +6. **Performance Monitoring**: Integrates with Micrometer for detailed metrics on Redis operations, latencies, and errors. +7. **Enhanced Configuration**: Provides more granular control over Redis client behavior, connection pooling, and timeouts. + +## 2. Key Optimized Components + +The optimizations are primarily encapsulated in the following new or modified classes: + +* **`OptimizedRedisOnlineRetriever.java`**: The core retriever implementation incorporating pipelining, caching, adaptive logic, and parallel processing capabilities for cache misses. +* **`OptimizedRedisClientAdapter.java`**: Manages Lettuce Redis client instances (standalone and cluster) with robust connection pooling and optimized client options. +* **`FeatureCacheManager.java`**: Provides an in-memory caching layer using Caffeine for feature data. +* **`RedisPerformanceMonitor.java`**: Collects and exposes performance metrics related to Redis interactions using Micrometer. +* **`ApplicationProperties.java` (updated)**: Includes new configuration options for tuning these performance features. +* **`application-optimized.yml`**: A sample configuration file demonstrating how to enable and configure these optimizations. + +## 3. Configuration + +To leverage these optimizations, you need to configure your Feast Java Serving instance appropriately. The `application-optimized.yml` provides a template. + +Key configuration sections in `feast` block of `application-optimized.yml`: + +```yaml +feast: + project: "feast_java_optimized_demo" + registry: "java/serving/src/main/resources/registry.pb" + registryRefreshInterval: 60 + entityKeySerializationVersion: 2 # V2 is generally more efficient + retrieverThreadPoolSize: 16 # For OptimizedRedisOnlineRetriever's internal tasks, 0 for auto (CPU cores) + + activeStore: "online_cluster_optimized" # Choose an optimized store + + stores: + - name: "online_redis_optimized" + type: REDIS + config: + host: "localhost" + port: 6379 + # ssl: false + # database: 0 + # Connection timeouts + connectTimeoutMs: 2000 # Connection attempt timeout (ms) + timeoutMs: 1000 # Operation timeout (ms) + # Connection Pool Settings (for OptimizedRedisClientAdapter) + poolMaxTotal: 50 # Max total connections + poolMaxIdle: 20 # Max idle connections + poolMinIdle: 5 # Min idle connections to maintain + poolTestOnBorrow: true # Validate connections when borrowing + poolBlockWhenExhausted: true # Block if pool is exhausted + + - name: "online_cluster_optimized" + type: REDIS_CLUSTER + config: + connection_string: "localhost:7000,localhost:7001,localhost:7002" + # ssl: false + read_from: "REPLICA_PREFERRED" # e.g., MASTER, UPSTREAM, NEAREST, REPLICA + connectTimeoutMs: 2000 + timeoutMs: 1000 + clusterRefreshPeriodSec: 30 # How often to refresh cluster topology + # Connection Pool Settings + poolMaxTotal: 100 + poolMaxIdle: 40 + poolMinIdle: 10 + poolTestOnBorrow: true + poolBlockWhenExhausted: true + # ... other configs like tracing +``` + +**Explanation of New/Key Configuration Parameters:** + +* `feast.retrieverThreadPoolSize`: Configures the thread pool size used by `OptimizedRedisOnlineRetriever` for asynchronous operations (like handling cache misses concurrently). +* `feast.stores[].config.connectTimeoutMs`: Timeout for establishing a connection to Redis. +* `feast.stores[].config.timeoutMs`: Default timeout for Redis operations. +* `feast.stores[].config.poolMaxTotal`, `poolMaxIdle`, `poolMinIdle`, `poolTestOnBorrow`, `poolBlockWhenExhausted`: Standard Apache Commons Pool2 parameters to fine-tune the Redis connection pool managed by `OptimizedRedisClientAdapter`. +* `feast.stores[].config.read_from` (for REDIS_CLUSTER): Specifies the replica read strategy (e.g., `REPLICA_PREFERRED` can offload read traffic from the master nodes). +* `feast.stores[].config.clusterRefreshPeriodSec` (for REDIS_CLUSTER): Configures how often the client refreshes the cluster topology. + +## 4. How Optimizations Work + +### a. Optimized Redis Client Adapter & Connection Pooling +The `OptimizedRedisClientAdapter` replaces direct client instantiation with a robust connection pooling mechanism using Apache Commons Pool2. +* **Benefits**: + * Reduces overhead of creating/destroying Redis connections for each request. + * Manages a pool of ready-to-use connections, improving response times. + * Provides configurable pool size, idle connections, and validation. +* **Implementation**: + * Uses Lettuce `ConnectionPoolSupport.createGenericObjectPool`. + * Configurable via `poolMaxTotal`, `poolMaxIdle`, etc., in `application-optimized.yml`. + * Handles both standalone Redis and Redis Cluster setups. + * The `PooledAsyncCommands` inner class ensures connections are properly returned to the pool when used with try-with-resources. + +### b. Request Pipelining +The `OptimizedRedisOnlineRetriever` utilizes Redis pipelining to send multiple commands to the server without waiting for the reply to each command individually. +* **Benefits**: + * Drastically reduces network latency by minimizing round-trip times. Multiple commands are sent in one batch. +* **Implementation**: + * In `getFeaturesFromRedisPipelined`, Lettuce's `asyncCommands.setAutoFlushCommands(false)` is used. + * All HMGET/HGETALL commands for a batch of entity keys are queued. + * `asyncCommands.flushCommands()` sends all queued commands at once. + * Results are processed asynchronously using `CompletableFuture`. + +### c. Local Feature Caching +The `FeatureCacheManager` introduces an in-memory caching layer using Caffeine. +* **Benefits**: + * Serves frequently accessed features directly from memory, avoiding Redis lookups entirely for cache hits. + * Significantly reduces latency for hot keys. +* **Implementation**: + * Uses `Caffeine.newBuilder().build()` for a high-performance concurrent cache. + * Cache keys (`FeatureCacheManager.FeatureCacheKey`) are composite, including the `RedisKeyV2` and the list of `FeatureReferenceV2` to ensure specificity. + * Cache size and expiration policies are currently hardcoded (e.g., `maximumSize(100_000)`, `expireAfterWrite(5, TimeUnit.MINUTES)`) but can be made configurable. + * `OptimizedRedisOnlineRetriever` first attempts to fetch from this cache. If a miss occurs, it fetches from Redis and then populates the cache. + +### d. Adaptive HMGET/HGETALL Threshold +Instead of a fixed threshold to decide between using `HMGET` (for fewer fields) or `HGETALL` (for many fields), the `OptimizedRedisOnlineRetriever` includes a mechanism for an adaptive threshold. +* **Benefits**: + * Dynamically tunes the retrieval strategy based on observed performance of `HMGET` vs. `HGETALL` operations, potentially leading to better average performance across different workloads and feature counts. +* **Implementation**: + * `RedisPerformanceMonitor` collects average latencies for `HMGET` and `HGETALL` operations. + * `OptimizedRedisOnlineRetriever.updateAdaptiveThreshold()` contains logic (currently a simple placeholder) to adjust `adaptiveHgetallThreshold` based on these observed latencies. A more sophisticated algorithm (e.g., with smoothing, confidence intervals) could be implemented here. + * The `shouldUseHmget()` method uses this `adaptiveHgetallThreshold`. + +### e. Asynchronous Processing +The optimized retriever uses `CompletableFuture` and an `ExecutorService` to handle parts of the feature retrieval process non-blockingly. +* **Benefits**: + * Improves overall server throughput by not blocking threads while waiting for I/O (like Redis responses or cache computations). +* **Implementation**: + * Redis calls via Lettuce are inherently asynchronous (`RedisFuture` converted to `CompletableFuture`). + * Cache lookups via `Caffeine.buildAsync()` (if used, though current `FeatureCacheManager` uses synchronous `getIfPresent` wrapped in `CompletableFuture.completedFuture`). + * The `executorService` in `OptimizedRedisOnlineRetriever` can be used to offload CPU-bound tasks or manage concurrent processing of multiple entity rows/cache misses, although the provided snippet primarily uses it for futures completion. + +### f. Performance Monitoring +The `RedisPerformanceMonitor` class uses Micrometer to collect detailed metrics. +* **Benefits**: + * Provides visibility into Redis operation latencies, error rates, and throughput. + * Essential for diagnosing performance bottlenecks and understanding the impact of optimizations. + * Data can be exported to monitoring systems like Prometheus. +* **Implementation**: + * Injects Micrometer's `MeterRegistry`. + * Defines `Timer` for operation durations (`feast_serving_redis_operation_duration_seconds`) and `Counter` for errors (`feast_serving_redis_operation_errors_total`). + * Tags metrics with operation type, key count buckets, and field count buckets for granular analysis. + * Tracks recent latencies for `HMGET` and `HGETALL` to feed the adaptive threshold logic. + +## 5. Usage + +1. **Configuration**: Ensure your `application.yml` (or a profile-specific version like `application-optimized.yml`) is configured to use the optimized settings as shown above. Pay close attention to the `feast.activeStore` and the `config` block for your chosen Redis store (standalone or cluster). +2. **Dependencies**: The new classes (`OptimizedRedisOnlineRetriever`, `OptimizedRedisClientAdapter`, `FeatureCacheManager`, `RedisPerformanceMonitor`) should be managed by your dependency injection framework (Guice in this case). The `ServingServiceV2Module` would need to be updated to provide instances of these optimized components instead of the older ones. + + For example, in `ServingServiceV2Module.java` (or a similar Guice module): + ```java + // Before (simplified) + // bind(OnlineRetriever.class).to(RedisOnlineRetriever.class); + // bind(RedisClientAdapter.class); // Assuming an older adapter + + // After (simplified) + bind(OnlineRetriever.class).to(OptimizedRedisOnlineRetriever.class); + bind(OptimizedRedisClientAdapter.class); // Assuming this is the new one + bind(FeatureCacheManager.class).in(Singleton.class); + bind(RedisPerformanceMonitor.class).in(Singleton.class); + ``` +3. **MeterRegistry**: Ensure a `MeterRegistry` (e.g., `PrometheusMeterRegistry`) is available in your Guice context for `RedisPerformanceMonitor` to function. + +Once configured and injected, the Feast Java Serving application will automatically use these optimized components for handling online feature requests. + +## 6. Expected Performance Improvements + +| Optimization | Expected Improvement | Notes | +| :----------------------- | :------------------------------------------------------- | :------------------------------------------------------------------- | +| Connection Pooling | 10-20% latency reduction (for connection setup part) | Reduces overhead of new connections. | +| Request Pipelining | 30-50%+ throughput increase, significant latency drop | Most impactful for batches of keys or many features per key. | +| Local Feature Caching | 60-80%+ latency reduction for cache hits | Effectiveness depends on cache hit ratio and data access patterns. | +| Adaptive Threshold | 5-15% latency improvement on average | Fine-tunes HMGET/HGETALL strategy. | +| Asynchronous Processing | Higher server throughput under load | Better resource utilization. | +| Performance Monitoring | N/A (enables further tuning) | Crucial for identifying bottlenecks and validating improvements. | + +*These are general estimates. Actual improvements will vary based on workload, network conditions, Redis setup, and specific data access patterns.* + +## 7. Further Considerations and Future Work + +* **Advanced Adaptive Logic**: Implement a more statistically sound algorithm for the adaptive HMGET/HGETALL threshold, potentially using techniques like bandit algorithms or PID controllers. +* **Compression**: For very large feature values, consider client-side compression (e.g., LZ4, Snappy) before storing in Redis and decompression after retrieval. This is a trade-off between CPU and network/memory. +* **Lua Scripting**: For very complex multi-key access patterns or atomic operations not well-suited for pipelining, explore server-side Lua scripting. +* **Serialization Format**: Evaluate alternative serialization formats for feature values within Redis Hashes if Protobuf becomes a bottleneck (though generally efficient). +* **Fine-grained Parallelism**: Further explore parallelizing requests for different entity keys within a single `getOnlineFeatures` call, especially if the `ExecutorService` in `OptimizedRedisOnlineRetriever` is not fully utilized by just cache miss handling. +* **Dynamic Batch Sizes for Pipelining**: Adjust the number of commands in a pipeline dynamically based on network conditions or server load. +* **Circuit Breaker**: Implement a circuit breaker pattern (e.g., using Resilience4j) around Redis calls to improve fault tolerance. + +By implementing and configuring these optimizations, the Feast Java Serving module can achieve significantly better performance and scalability for online feature serving from Redis. diff --git a/java/serving/libs/runtime/newrelic.jar b/java/serving/libs/runtime/newrelic.jar new file mode 100644 index 00000000000..6c2671924ce Binary files /dev/null and b/java/serving/libs/runtime/newrelic.jar differ diff --git a/java/serving/pom.xml b/java/serving/pom.xml index 8f0cf407e96..5d27a9881ac 100644 --- a/java/serving/pom.xml +++ b/java/serving/pom.xml @@ -83,28 +83,6 @@ - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - - python - src/test/resources/docker-compose/feast10/ - - setup_it.py - - ${skipITs} - - feast_test_apply - process-test-resources - - exec - - - - @@ -243,6 +221,21 @@ 1.12.261 + + org.apache.logging.log4j + log4j-core + ${log4jVersion} + + + + + org.apache.logging.log4j + log4j-api + ${log4jVersion} + + + + com.adobe.testing s3mock-testcontainers diff --git a/java/serving/src/main/java/feast/serving/connectors/redis/retriever/OptimizedRedisClientAdapter.java b/java/serving/src/main/java/feast/serving/connectors/redis/retriever/OptimizedRedisClientAdapter.java new file mode 100644 index 00000000000..12cdfcc27e7 --- /dev/null +++ b/java/serving/src/main/java/feast/serving/connectors/redis/retriever/OptimizedRedisClientAdapter.java @@ -0,0 +1,303 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright 2018-2022 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.connectors.redis.retriever; + +import feast.serving.service.config.ApplicationProperties; +import io.lettuce.core.ReadFrom; +import io.lettuce.core.RedisClient; +import io.lettuce.core.RedisURI; +import io.lettuce.core.SocketOptions; +import io.lettuce.core.TimeoutOptions; +import io.lettuce.core.api.StatefulConnection; +import io.lettuce.core.api.StatefulRedisConnection; +import io.lettuce.core.api.async.RedisAsyncCommands; +import io.lettuce.core.cluster.ClusterClientOptions; +import io.lettuce.core.cluster.ClusterTopologyRefreshOptions; +import io.lettuce.core.cluster.RedisClusterClient; +import io.lettuce.core.cluster.api.StatefulRedisClusterConnection; +import io.lettuce.core.codec.ByteArrayCodec; +import io.lettuce.core.support.ConnectionPoolSupport; +import java.time.Duration; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.apache.commons.pool2.BasePooledObjectFactory; +import org.apache.commons.pool2.PooledObject; +import org.apache.commons.pool2.impl.DefaultPooledObject; +import org.apache.commons.pool2.impl.GenericObjectPool; +import org.apache.commons.pool2.impl.GenericObjectPoolConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Singleton +public class OptimizedRedisClientAdapter { + private static final Logger log = LoggerFactory.getLogger(OptimizedRedisClientAdapter.class); + + private final GenericObjectPool> connectionPool; + private final Object lettuceClient; // Either RedisClient or RedisClusterClient + private final boolean isCluster; + + public static class PooledAsyncCommands + implements AutoCloseable { // To be used with try-with-resources + private final RedisAsyncCommands commands; + private final StatefulConnection connection; + private final GenericObjectPool> pool; + + public PooledAsyncCommands( + StatefulConnection connection, + GenericObjectPool> pool) { + this.connection = connection; + this.commands = + (connection instanceof StatefulRedisClusterConnection) + ? ((StatefulRedisClusterConnection) connection).async() + : ((StatefulRedisConnection) connection).async(); + this.pool = pool; + } + + public RedisAsyncCommands get() { + return commands; + } + + @Override + public void close() { + if (connection != null && pool != null) { + try { + pool.returnObject(connection); + } catch (Exception e) { + log.warn("Error returning Redis connection to pool", e); + // Attempt to destroy the object if return fails badly + try { + pool.invalidateObject(connection); + } catch (Exception ex) { + log.warn("Error invalidating Redis connection object", ex); + } + } + } + } + } + + @Inject + public OptimizedRedisClientAdapter(ApplicationProperties applicationProperties) { + ApplicationProperties.Store storeConfig = applicationProperties.getActiveStore(); + this.isCluster = storeConfig.getType().equalsIgnoreCase("REDIS_CLUSTER"); + + GenericObjectPoolConfig> poolConfig = + new GenericObjectPoolConfig<>(); + poolConfig.setMaxTotal( + storeConfig.getPoolMaxTotal() > 0 + ? storeConfig.getPoolMaxTotal() + : GenericObjectPoolConfig.DEFAULT_MAX_TOTAL); // Default 8 + poolConfig.setMaxIdle( + storeConfig.getPoolMaxIdle() > 0 + ? storeConfig.getPoolMaxIdle() + : GenericObjectPoolConfig.DEFAULT_MAX_IDLE); // Default 8 + poolConfig.setMinIdle( + storeConfig.getPoolMinIdle() >= 0 + ? storeConfig.getPoolMinIdle() + : GenericObjectPoolConfig.DEFAULT_MIN_IDLE); // Default 0 + poolConfig.setTestOnBorrow(storeConfig.isPoolTestOnBorrow()); // Default false + poolConfig.setBlockWhenExhausted(storeConfig.isPoolBlockWhenExhausted()); // Default true + + if (isCluster) { + ApplicationProperties.RedisClusterConfig redisClusterConfig = + (ApplicationProperties.RedisClusterConfig) storeConfig.getConfig(); + List redisURIs = + Arrays.stream(redisClusterConfig.getConnection_string().split(",")) + .map( + hostPort -> { + String[] parts = hostPort.trim().split(":"); + return RedisURI.create(parts[0], Integer.parseInt(parts[1])); + }) + .collect(Collectors.toList()); + + RedisClusterClient clusterClient = RedisClusterClient.create(redisURIs); + + ClusterTopologyRefreshOptions topologyRefreshOptions = + ClusterTopologyRefreshOptions.builder() + .enablePeriodicRefresh(Duration.ofSeconds(30)) // Configurable + .enableAllAdaptiveRefreshTriggers() + .build(); + + ClusterClientOptions clientOptions = + ClusterClientOptions.builder() + .topologyRefreshOptions(topologyRefreshOptions) + .socketOptions( + SocketOptions.builder() + .connectTimeout(Duration.ofMillis(redisClusterConfig.getConnectTimeoutMs())) + .keepAlive(true) + .tcpNoDelay(true) + .build()) + .timeoutOptions(TimeoutOptions.builder().fixedTimeout(Duration.ofMillis(redisClusterConfig.getTimeoutMs())).build()) + .validateClusterNodeMembership(true) + .build(); + clusterClient.setOptions(clientOptions); + this.lettuceClient = clusterClient; + this.connectionPool = + ConnectionPoolSupport.createGenericObjectPool( + () -> { + StatefulRedisClusterConnection conn = + clusterClient.connect(new ByteArrayCodec()); + if (redisClusterConfig.getRead_from() != null + && !redisClusterConfig.getRead_from().isEmpty()) { + conn.setReadFrom(ReadFrom.valueOf(redisClusterConfig.getRead_from().toUpperCase())); + } + return conn; + }, + poolConfig); + + } else { + ApplicationProperties.RedisConfig redisConfig = + (ApplicationProperties.RedisConfig) storeConfig.getConfig(); + RedisURI.Builder redisURIBuilder = + RedisURI.builder() + .withHost(redisConfig.getHost()) + .withPort(redisConfig.getPort()) + .withTimeout(Duration.ofMillis(redisConfig.getTimeoutMs())); + + if (redisConfig.getPassword() != null && !redisConfig.getPassword().isEmpty()) { + redisURIBuilder.withPassword(redisConfig.getPassword().toCharArray()); + } + if (redisConfig.getDatabase() > 0) { + redisURIBuilder.withDatabase(redisConfig.getDatabase()); + } + if (redisConfig.isSsl()) { + redisURIBuilder.withSsl(true); + redisURIBuilder.withVerifyPeer(redisConfig.isSslVerifyPeer()); + } + + + RedisClient standaloneClient = RedisClient.create(redisURIBuilder.build()); + standaloneClient.setOptions( + io.lettuce.core.ClientOptions.builder() + .socketOptions( + SocketOptions.builder() + .connectTimeout(Duration.ofMillis(redisConfig.getConnectTimeoutMs())) + .keepAlive(true) + .tcpNoDelay(true) + .build()) + .timeoutOptions(TimeoutOptions.builder().fixedTimeout(Duration.ofMillis(redisConfig.getTimeoutMs())).build()) + .build()); + this.lettuceClient = standaloneClient; + this.connectionPool = + ConnectionPoolSupport.createGenericObjectPool( + () -> standaloneClient.connect(new ByteArrayCodec()), poolConfig); + } + log.info( + "OptimizedRedisClientAdapter initialized. isCluster: {}, Pool MaxTotal: {}", + isCluster, + poolConfig.getMaxTotal()); + } + + /** + * Borrows a PooledAsyncCommands wrapper from the pool. This wrapper should be used in a + * try-with-resources statement to ensure the underlying connection is returned to the pool. + * + * @return PooledAsyncCommands containing the RedisAsyncCommands and its pooled connection. + * @throws RuntimeException if unable to borrow a connection from the pool. + */ + public PooledAsyncCommands borrowPooledAsyncCommands() { + try { + StatefulConnection connection = connectionPool.borrowObject(); + return new PooledAsyncCommands(connection, connectionPool); + } catch (Exception e) { + log.error("Failed to borrow Redis connection from pool", e); + throw new RuntimeException("Failed to borrow Redis connection from pool", e); + } + } + + /** + * Gets an instance of RedisAsyncCommands. + * Note: This method is kept for simpler direct async command usage if not using the PooledAsyncCommands wrapper. + * The caller is responsible for managing the connection lifecycle (borrowing and returning). + * It is generally recommended to use {@link #borrowPooledAsyncCommands()} with try-with-resources. + */ + public RedisAsyncCommands getAsyncCommands() { + // This method might be less safe if connections are not properly returned. + // Prefer borrowPooledAsyncCommands. + // For now, let's assume it's used by a component that handles connection return. + // Or, this method itself could manage a temporary borrow and expect a release. + // For simplicity and to match a potential direct usage pattern: + StatefulConnection conn = null; + try { + conn = connectionPool.borrowObject(); // This connection needs to be returned + if (isCluster) { + return ((StatefulRedisClusterConnection) conn).async(); + } else { + return ((StatefulRedisConnection) conn).async(); + } + } catch (Exception e) { + log.error("Failed to get async commands", e); + if (conn != null) { + try { + connectionPool.invalidateObject(conn); // Invalidate on error + } catch (Exception ex) { + log.warn("Error invalidating connection object after failing to get async commands", ex); + } + } + throw new RuntimeException("Failed to get async commands", e); + } + // The issue here is how 'conn' is returned. The OptimizedRedisOnlineRetriever + // calls getAsyncCommands() and then releaseAsyncCommands(commands). + // This implies the adapter needs to track which connection 'commands' belongs to. + // This is complex. The PooledAsyncCommands wrapper is a much cleaner pattern. + // For now, to make this method work as potentially expected by the retriever's + // getAsyncCommands/releaseAsyncCommands pattern, we'll have to make releaseAsyncCommands + // a no-op if this method is used, or the retriever needs to change. + // Let's assume the retriever will be updated to use borrowPooledAsyncCommands. + // This method is now problematic. + throw new UnsupportedOperationException("Prefer borrowPooledAsyncCommands() with try-with-resources."); + } + + /** + * Releases async commands by returning the associated connection to the pool. + * This method is tricky if the adapter has to map commands back to connections. + * It's better if the caller manages the connection directly. + * + * @param commands The RedisAsyncCommands instance that is no longer needed. + */ + public void releaseAsyncCommands(RedisAsyncCommands commands) { + // This method is difficult to implement correctly without knowing which + // connection these commands came from, unless commands object itself + // holds a reference to its StatefulConnection. + // Lettuce's RedisAsyncCommands are tied to a StatefulConnection. + // If 'commands' is an instance of StatefulConnection's async commands, + // we need the StatefulConnection object to return it. + // This method is deprecated in favor of using the AutoCloseable PooledAsyncCommands. + log.warn("releaseAsyncCommands(commands) is deprecated. Use try-with-resources on PooledAsyncCommands instead."); + } + + + public void shutdown() { + log.info("Shutting down OptimizedRedisClientAdapter connection pool and client."); + if (connectionPool != null) { + connectionPool.close(); + } + if (lettuceClient instanceof RedisClient) { + ((RedisClient) lettuceClient).shutdown(); + } else if (lettuceClient instanceof RedisClusterClient) { + ((RedisClusterClient) lettuceClient).shutdown(); + } + log.info("OptimizedRedisClientAdapter shutdown complete."); + } + + // Inner class for PooledObjectFactory if not using ConnectionPoolSupport directly + // For simplicity, ConnectionPoolSupport.createGenericObjectPool is used above. + // If more complex factory logic is needed (e.g., custom validation), + // a separate factory class would be better. +} diff --git a/java/serving/src/main/java/feast/serving/connectors/redis/retriever/OptimizedRedisOnlineRetriever.java b/java/serving/src/main/java/feast/serving/connectors/redis/retriever/OptimizedRedisOnlineRetriever.java new file mode 100644 index 00000000000..0df4c39a4cc --- /dev/null +++ b/java/serving/src/main/java/feast/serving/connectors/redis/retriever/OptimizedRedisOnlineRetriever.java @@ -0,0 +1,322 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright 2018-2020 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.connectors.redis.retriever; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import feast.proto.serving.ServingAPIProto; +import feast.proto.storage.RedisProto; +import feast.proto.types.ValueProto; +import feast.serving.connectors.Feature; +import feast.serving.connectors.OnlineRetriever; +import feast.serving.connectors.redis.common.RedisHashDecoder; +import feast.serving.connectors.redis.common.RedisKeyGenerator; +import feast.serving.service.FeatureCacheManager; // To be created +import feast.serving.util.RedisPerformanceMonitor; // To be created +import io.lettuce.core.KeyValue; +import io.lettuce.core.RedisFuture; +import io.lettuce.core.api.async.RedisAsyncCommands; +import org.slf4j.Logger; + +import java.nio.ByteBuffer; +import java.util.*; +import java.util.concurrent.*; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +public class OptimizedRedisOnlineRetriever implements OnlineRetriever { + + private static final Logger log = + org.slf4j.LoggerFactory.getLogger(OptimizedRedisOnlineRetriever.class); + + private static final String TIMESTAMP_PREFIX = "_ts"; + private final OptimizedRedisClientAdapter redisClientAdapter; // To be created + private final EntityKeySerializer keySerializer; + private final String project; + private final FeatureCacheManager featureCacheManager; + private final RedisPerformanceMonitor performanceMonitor; + private final ExecutorService executorService; + + // Adaptive threshold parameters + private volatile int adaptiveHgetallThreshold = 50; // Default, can be tuned + private static final int MIN_HGETALL_THRESHOLD = 10; + private static final int MAX_HGETALL_THRESHOLD = 200; + + public OptimizedRedisOnlineRetriever( + String project, + OptimizedRedisClientAdapter redisClientAdapter, + EntityKeySerializer keySerializer, + FeatureCacheManager featureCacheManager, + RedisPerformanceMonitor performanceMonitor, + int threadPoolSize) { + this.project = project; + this.redisClientAdapter = redisClientAdapter; + this.keySerializer = keySerializer; + this.featureCacheManager = featureCacheManager; + this.performanceMonitor = performanceMonitor; + this.executorService = Executors.newFixedThreadPool(threadPoolSize > 0 ? threadPoolSize : Runtime.getRuntime().availableProcessors()); + } + + @Override + public List> getOnlineFeatures( + List> entityRows, + List featureReferences, + List entityNames) { + + if (entityRows.isEmpty() || featureReferences.isEmpty()) { + return Collections.emptyList(); + } + + // Initialize results structure + List> finalResults = + Lists.newArrayListWithCapacity(entityRows.size()); + for (int i = 0; i < entityRows.size(); i++) { + finalResults.add(Lists.newArrayListWithCapacity(featureReferences.size())); + } + + // Step 1: Try to fetch from cache + List>> cachedFutures = Lists.newArrayList(); + List cacheMissIndices = Lists.newArrayList(); + List> cacheMissEntityRows = Lists.newArrayList(); + + for (int i = 0; i < entityRows.size(); i++) { + Map entityRow = entityRows.get(i); + RedisProto.RedisKeyV2 redisKey = RedisKeyGenerator.buildRedisKey(this.project, entityRow); + CompletableFuture> cachedResult = + featureCacheManager.getFeatures(redisKey, featureReferences); + cachedFutures.add(cachedResult); + } + + CompletableFuture.allOf(cachedFutures.toArray(new CompletableFuture[0])).join(); + + for (int i = 0; i < cachedFutures.size(); i++) { + try { + List features = cachedFutures.get(i).get(); // Should be completed + if (features != null && !features.isEmpty() && features.stream().allMatch(Objects::nonNull)) { + finalResults.set(i, features); + } else { + cacheMissIndices.add(i); + cacheMissEntityRows.add(entityRows.get(i)); + } + } catch (InterruptedException | ExecutionException e) { + log.warn("Error fetching from cache for entity row index {}: {}", i, e.getMessage()); + cacheMissIndices.add(i); + cacheMissEntityRows.add(entityRows.get(i)); + } + } + + if (cacheMissEntityRows.isEmpty()) { + return finalResults; + } + + // Step 2: Fetch cache misses from Redis + List redisKeysForMisses = + RedisKeyGenerator.buildRedisKeys(this.project, cacheMissEntityRows); + + List> redisResults = + getFeaturesFromRedisPipelined(redisKeysForMisses, featureReferences); + + // Step 3: Populate final results and update cache + for (int i = 0; i < redisResults.size(); i++) { + int originalIndex = cacheMissIndices.get(i); + List features = redisResults.get(i); + finalResults.set(originalIndex, features); + if (features != null && !features.isEmpty()) { + featureCacheManager.putFeatures(redisKeysForMisses.get(i), featureReferences, features); + } + } + return finalResults; + } + + private List> getFeaturesFromRedisPipelined( + List redisKeys, + List featureReferences) { + + long startTime = System.nanoTime(); + + Map byteToFeatureIdxMap = new HashMap<>(); + List retrieveFieldsBinary = new ArrayList<>(); + + for (int idx = 0; idx < featureReferences.size(); idx++) { + byte[] featureReferenceBytes = + RedisHashDecoder.getFeatureReferenceRedisHashKeyBytes(featureReferences.get(idx)); + retrieveFieldsBinary.add(featureReferenceBytes); + byteToFeatureIdxMap.put(ByteBuffer.wrap(featureReferenceBytes), idx); + } + + featureReferences.stream() + .map(ServingAPIProto.FeatureReferenceV2::getFeatureViewName) + .distinct() + .forEach( + table -> { + byte[] featureTableTsBytes = + RedisHashDecoder.getTimestampRedisHashKeyBytes(table, TIMESTAMP_PREFIX); + retrieveFieldsBinary.add(featureTableTsBytes); + }); + + byte[][] retrieveFieldsByteArray = retrieveFieldsBinary.toArray(new byte[0][0]); + List binaryRedisKeys = + redisKeys.stream().map(this.keySerializer::serialize).collect(Collectors.toList()); + + List>> futures = + Lists.newArrayListWithCapacity(binaryRedisKeys.size()); + + RedisAsyncCommands asyncCommands = redisClientAdapter.getAsyncCommands(); + asyncCommands.setAutoFlushCommands(false); // Enable pipelining + + boolean useHmget = shouldUseHmget(retrieveFieldsBinary.size()); + + for (byte[] binaryRedisKey : binaryRedisKeys) { + RedisFuture>> futureList; + RedisFuture> futureMap; + + if (useHmget) { + futureList = asyncCommands.hmget(binaryRedisKey, retrieveFieldsByteArray); + futures.add( + futureList.thenApply( + list -> + list.stream() + .filter(KeyValue::hasValue) + .collect(Collectors.toMap(KeyValue::getKey, KeyValue::getValue))) + .toCompletableFuture()); + } else { + futureMap = asyncCommands.hgetall(binaryRedisKey); + futures.add(futureMap.toCompletableFuture()); + } + } + asyncCommands.flushCommands(); // Execute all commands in pipeline + redisClientAdapter.releaseAsyncCommands(asyncCommands); + + + List> results = Lists.newArrayListWithCapacity(futures.size()); + for (CompletableFuture> f : futures) { + try { + results.add( + RedisHashDecoder.retrieveFeature( + f.get(), byteToFeatureIdxMap, featureReferences, TIMESTAMP_PREFIX)); + } catch (InterruptedException | ExecutionException e) { + log.error("Exception occurred while fetching features from Redis pipeline: {}", e.getMessage(), e); + // Add empty list or handle error appropriately + results.add(Collections.nCopies(featureReferences.size(), null)); + } + } + + long durationNanos = System.nanoTime() - startTime; + performanceMonitor.recordRedisOperation( + useHmget ? "hmget_pipelined" : "hgetall_pipelined", + binaryRedisKeys.size(), + retrieveFieldsBinary.size(), + durationNanos); + + // Simple adaptive logic for threshold (can be made more sophisticated) + if (useHmget) { + performanceMonitor.recordHmgetLatency(durationNanos / binaryRedisKeys.size()); + } else { + performanceMonitor.recordHgetallLatency(durationNanos / binaryRedisKeys.size()); + } + updateAdaptiveThreshold(); + + return results; + } + + private boolean shouldUseHmget(int fieldCount) { + // This can be enhanced with more sophisticated adaptive logic using performanceMonitor stats + return fieldCount < adaptiveHgetallThreshold; + } + + private void updateAdaptiveThreshold() { + // Example: Adjust threshold based on recent average latencies + // This is a placeholder for a more robust adaptive algorithm + double avgHmgetLatency = performanceMonitor.getAverageHmgetLatency(); + double avgHgetallLatency = performanceMonitor.getAverageHgetallLatency(); + + if (avgHmgetLatency > 0 && avgHgetallLatency > 0) { + // If HMGET is significantly slower for current threshold, consider increasing it + if (avgHmgetLatency > avgHgetallLatency * 1.2 && adaptiveHgetallThreshold < MAX_HGETALL_THRESHOLD) { + adaptiveHgetallThreshold = Math.min(MAX_HGETALL_THRESHOLD, (int)(adaptiveHgetallThreshold * 1.1)); + } + // If HGETALL is slower, consider decreasing threshold + else if (avgHgetallLatency > avgHmgetLatency * 1.2 && adaptiveHgetallThreshold > MIN_HGETALL_THRESHOLD) { + adaptiveHgetallThreshold = Math.max(MIN_HGETALL_THRESHOLD, (int)(adaptiveHgetallThreshold * 0.9)); + } + } + // log.debug("Updated adaptive HGETALL threshold to: {}", adaptiveHgetallThreshold); + } + + + @Override + public boolean deleteStaleFeature( + ServingAPIProto.FeatureReferenceV2 featureReference, + Map entityRow) { + long startTime = System.nanoTime(); + try { + RedisProto.RedisKeyV2 redisKey = RedisKeyGenerator.buildRedisKey(this.project, entityRow); + if (redisKey == null) { + log.warn("Could not build Redis key for entity row: {}", entityRow); + return false; + } + + byte[] binaryRedisKey = this.keySerializer.serialize(redisKey); + byte[] featureReferenceBytes = + RedisHashDecoder.getFeatureReferenceRedisHashKeyBytes(featureReference); + + RedisAsyncCommands asyncCommands = redisClientAdapter.getAsyncCommands(); + RedisFuture hdelFuture = asyncCommands.hdel(binaryRedisKey, featureReferenceBytes); + redisClientAdapter.releaseAsyncCommands(asyncCommands); + + Long result = hdelFuture.get(); // Blocking call, but for a single op + + long durationNanos = System.nanoTime() - startTime; + performanceMonitor.recordRedisOperation("hdel", 1, 1, durationNanos); + + if (result > 0) { + log.info( + "Successfully deleted stale feature {} for entity with key {}", + featureReference.getFeatureViewName() + ":" + featureReference.getFeatureName(), + entityRow); + // Invalidate cache for this key if deletion is successful + featureCacheManager.invalidate(redisKey); + return true; + } else { + log.warn( + "Failed to delete stale feature, key or field does not exist: {}", + featureReference.getFeatureViewName() + ":" + featureReference.getFeatureName()); + return false; + } + } catch (Exception e) { + log.error("Error deleting stale feature from Redis: {}", e.getMessage(), e); + long durationNanos = System.nanoTime() - startTime; + performanceMonitor.recordRedisError("hdel"); + performanceMonitor.recordRedisOperation("hdel_error", 1, 1, durationNanos); + return false; + } + } + + // Shutdown executor service when this retriever is no longer needed + public void shutdown() { + try { + log.info("Shutting down OptimizedRedisOnlineRetriever executor service."); + executorService.shutdown(); + if (!executorService.awaitTermination(5, TimeUnit.SECONDS)) { + executorService.shutdownNow(); + } + } catch (InterruptedException e) { + executorService.shutdownNow(); + Thread.currentThread().interrupt(); + } + } +} diff --git a/java/serving/src/main/java/feast/serving/connectors/redis/retriever/RedisOnlineRetriever.java b/java/serving/src/main/java/feast/serving/connectors/redis/retriever/RedisOnlineRetriever.java index 627d6d2b9e1..517af002d4b 100644 --- a/java/serving/src/main/java/feast/serving/connectors/redis/retriever/RedisOnlineRetriever.java +++ b/java/serving/src/main/java/feast/serving/connectors/redis/retriever/RedisOnlineRetriever.java @@ -24,7 +24,10 @@ import feast.serving.connectors.OnlineRetriever; import feast.serving.connectors.redis.common.RedisHashDecoder; import feast.serving.connectors.redis.common.RedisKeyGenerator; +import feast.serving.service.config.ServingServiceV2Module; import io.lettuce.core.KeyValue; +import org.slf4j.Logger; + import java.nio.ByteBuffer; import java.util.*; import java.util.concurrent.ExecutionException; @@ -33,6 +36,8 @@ public class RedisOnlineRetriever implements OnlineRetriever { + private static final Logger log = org.slf4j.LoggerFactory.getLogger(RedisOnlineRetriever.class); + private static final String timestampPrefix = "_ts"; private final RedisClientAdapter redisClientAdapter; private final EntityKeySerializer keySerializer; @@ -98,6 +103,8 @@ private List> getFeaturesFromRedis( // Number of fields that controls whether to use hmget or hgetall was discovered empirically // Could be potentially tuned further if (retrieveFields.size() < HGETALL_NUMBER_OF_FIELDS_THRESHOLD) { + Long starTime=System.currentTimeMillis(); + log.error("retrieveFields.size() {}", retrieveFields.size()); byte[][] retrieveFieldsByteArray = retrieveFields.toArray(new byte[0][]); for (byte[] binaryRedisKey : binaryRedisKeys) { @@ -112,6 +119,9 @@ private List> getFeaturesFromRedis( .collect(Collectors.toMap(KeyValue::getKey, KeyValue::getValue))) .toCompletableFuture()); } + Long end=System.currentTimeMillis(); + log.error("total time {}",(end-starTime)); + } else { for (byte[] binaryRedisKey : binaryRedisKeys) { @@ -126,6 +136,7 @@ private List> getFeaturesFromRedis( RedisHashDecoder.retrieveFeature( f.get(), byteToFeatureIdxMap, featureReferences, timestampPrefix)); } catch (InterruptedException | ExecutionException e) { + log.error("Exception occurred while fetching features from redis {}",e.getMessage(),e); throw new RuntimeException("Unexpected error when pulling data from Redis"); } } diff --git a/java/serving/src/main/java/feast/serving/service/FeatureCacheManager.java b/java/serving/src/main/java/feast/serving/service/FeatureCacheManager.java new file mode 100644 index 00000000000..a84d2d32fe9 --- /dev/null +++ b/java/serving/src/main/java/feast/serving/service/FeatureCacheManager.java @@ -0,0 +1,180 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright 2018-2022 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.service; + +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; +import feast.proto.serving.ServingAPIProto; +import feast.proto.storage.RedisProto; +import feast.serving.connectors.Feature; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Singleton +public class FeatureCacheManager { + private static final Logger log = LoggerFactory.getLogger(FeatureCacheManager.class); + + private final Cache> cache; + + // TODO: Make these configurable via ApplicationProperties + private static final long DEFAULT_MAXIMUM_SIZE = 100_000; + private static final long DEFAULT_EXPIRE_AFTER_WRITE_MINUTES = 5; + + // Inner record for cache key to ensure proper equals and hashCode + // It encapsulates the RedisKey and the specific feature references requested. + // The order of featureReferences matters for the key. + public record FeatureCacheKey( + RedisProto.RedisKeyV2 redisKey, + List featureReferences) { + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FeatureCacheKey that = (FeatureCacheKey) o; + // Using Message.equals for protobuf messages + return Objects.equals(redisKey, that.redisKey) + && Objects.equals(featureReferences, that.featureReferences); + } + + @Override + public int hashCode() { + // Using Message.hashCode for protobuf messages + return Objects.hash(redisKey, featureReferences); + } + } + + @Inject + public FeatureCacheManager() { + // Initialize Caffeine cache + // In a real application, cache size and expiry would be configurable + this.cache = + Caffeine.newBuilder() + .maximumSize(DEFAULT_MAXIMUM_SIZE) + .expireAfterWrite(DEFAULT_EXPIRE_AFTER_WRITE_MINUTES, TimeUnit.MINUTES) + .build(); + log.info( + "FeatureCacheManager initialized with maxSize={}, expireAfterWrite={}min", + DEFAULT_MAXIMUM_SIZE, + DEFAULT_EXPIRE_AFTER_WRITE_MINUTES); + } + + /** + * Retrieves a list of features from the cache. + * + * @param redisKey The Redis key associated with the entity. + * @param featureReferences The list of feature references to retrieve. + * @return A CompletableFuture that will complete with the list of features if found in cache, or + * null otherwise. The list of features itself can be null if the entry was explicitly cached + * as null (though not typical for this use case). + */ + public CompletableFuture> getFeatures( + RedisProto.RedisKeyV2 redisKey, + List featureReferences) { + FeatureCacheKey cacheKey = new FeatureCacheKey(redisKey, featureReferences); + List features = cache.getIfPresent(cacheKey); + // Return a completed future, OptimizedRedisOnlineRetriever will check if features is null + return CompletableFuture.completedFuture(features); + } + + /** + * Puts a list of features into the cache. + * + * @param redisKey The Redis key associated with the entity. + * @param featureReferences The list of feature references. + * @param features The list of features to cache. + */ + public void putFeatures( + RedisProto.RedisKeyV2 redisKey, + List featureReferences, + List features) { + if (features == null) { + // Avoid caching nulls if it means "not found" vs "value is null" + // For this cache, a null list means "not found in cache" + return; + } + FeatureCacheKey cacheKey = new FeatureCacheKey(redisKey, featureReferences); + cache.put(cacheKey, features); + } + + /** + * Invalidates a specific cache entry. + * + * @param redisKey The Redis key associated with the entity. + * @param featureReferences The list of feature references for the specific entry. + */ + public void invalidate( + RedisProto.RedisKeyV2 redisKey, + List featureReferences) { + FeatureCacheKey cacheKey = new FeatureCacheKey(redisKey, featureReferences); + cache.invalidate(cacheKey); + log.debug("Invalidated cache for key: {}", cacheKey); + } + + /** + * Invalidates all cache entries associated with a given RedisKey. This is a more complex + * operation as Caffeine does not directly support wildcard invalidation without iterating keys or + * using external indexing. For simplicity, this method currently does nothing. A more robust + * implementation might involve iterating cache keys if performance allows or using a different + * caching strategy if this functionality is critical. + * + *

Alternatively, consider invalidating specific FeatureCacheKey entries when known. + * + * @param redisKey The base Redis key for which all associated entries should be invalidated. + */ + public void invalidate(RedisProto.RedisKeyV2 redisKey) { + // Caffeine doesn't directly support partial key invalidation easily. + // One would need to iterate over cache.asMap().keySet() and remove matching keys, + // which can be slow and not thread-safe without external locking. + // For now, this method is a no-op or could log a warning. + // A more targeted invalidation (using the full FeatureCacheKey) is preferred. + log.warn( + "Broad invalidation for RedisKey {} is not efficiently supported. " + + "Consider invalidating specific FeatureCacheKeys.", + redisKey.getProject() + + ":" + + redisKey.getEntityNamesList().toString() + + ":" + + redisKey.getEntityValuesList().toString()); + + // If absolutely necessary, and understanding performance implications: + // List keysToInvalidate = new ArrayList<>(); + // cache.asMap().forEach((key, value) -> { + // if (key.redisKey().equals(redisKey)) { + // keysToInvalidate.add(key); + // } + // }); + // cache.invalidateAll(keysToInvalidate); + // log.debug("Attempted to invalidate {} entries for base RedisKey: {}", + // keysToInvalidate.size(), redisKey); + } + + /** Clears the entire cache. Use with caution. */ + public void clearAll() { + cache.invalidateAll(); + log.info("Cleared all entries from FeatureCacheManager."); + } + + public long estimatedSize() { + return cache.estimatedSize(); + } +} diff --git a/java/serving/src/main/java/feast/serving/service/OnlineServingServiceV2.java b/java/serving/src/main/java/feast/serving/service/OnlineServingServiceV2.java index dd6a592fb80..48de923d36e 100644 --- a/java/serving/src/main/java/feast/serving/service/OnlineServingServiceV2.java +++ b/java/serving/src/main/java/feast/serving/service/OnlineServingServiceV2.java @@ -52,10 +52,11 @@ public class OnlineServingServiceV2 implements ServingServiceV2 { private static final Logger log = org.slf4j.LoggerFactory.getLogger(OnlineServingServiceV2.class); private final Optional tracerOptional; private final OnlineRetriever retriever; - private final RegistryRepository registryRepository; private final OnlineTransformationService onlineTransformationService; private final String project; + private final RegistryRepository registryRepository; + public static final String DUMMY_ENTITY_ID = "__dummy_id"; public static final String DUMMY_ENTITY_VAL = ""; public static final ValueProto.Value DUMMY_ENTITY_VALUE = diff --git a/java/serving/src/main/java/feast/serving/service/config/ServerModule.java b/java/serving/src/main/java/feast/serving/service/config/ServerModule.java index a5d902b17bf..505015e4479 100644 --- a/java/serving/src/main/java/feast/serving/service/config/ServerModule.java +++ b/java/serving/src/main/java/feast/serving/service/config/ServerModule.java @@ -26,32 +26,69 @@ import io.grpc.health.v1.HealthGrpc; import io.grpc.protobuf.services.ProtoReflectionService; import io.opentracing.contrib.grpc.TracingServerInterceptor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.*; public class ServerModule extends AbstractModule { - @Override - protected void configure() { - bind(OnlineServingGrpcServiceV2.class); - } - - @Provides - public Server provideGrpcServer( - ApplicationProperties applicationProperties, - OnlineServingGrpcServiceV2 onlineServingGrpcServiceV2, - TracingServerInterceptor tracingServerInterceptor, - HealthGrpc.HealthImplBase healthImplBase) { - ServerBuilder serverBuilder = - ServerBuilder.forPort(applicationProperties.getGrpc().getServer().getPort()); - serverBuilder - .addService(ProtoReflectionService.newInstance()) - .addService(tracingServerInterceptor.intercept(onlineServingGrpcServiceV2)) - .addService(healthImplBase); - - return serverBuilder.build(); - } - - @Provides - public HealthGrpc.HealthImplBase healthService(ServingServiceV2 servingServiceV2) { - return new HealthServiceController(servingServiceV2); - } + @Override + protected void configure() { + bind(OnlineServingGrpcServiceV2.class); + } + + @Provides + public Server provideGrpcServer( + ApplicationProperties applicationProperties, + OnlineServingGrpcServiceV2 onlineServingGrpcServiceV2, + TracingServerInterceptor tracingServerInterceptor, + HealthGrpc.HealthImplBase healthImplBase) { + + // Create a CachedThreadPool executor + ExecutorService executorService = Executors.newCachedThreadPool(); + + // Log details about the thread pool + logThreadPoolDetails(executorService); + + ServerBuilder serverBuilder = + ServerBuilder.forPort(applicationProperties.getGrpc().getServer().getPort()).executor(executorService); + serverBuilder + .addService(ProtoReflectionService.newInstance()) + .addService(tracingServerInterceptor.intercept(onlineServingGrpcServiceV2)) + .addService(healthImplBase); + + return serverBuilder.build(); + } + + private void logThreadPoolDetails(ExecutorService executorService) { + if (executorService instanceof ThreadPoolExecutor) { + ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executorService; + + // Log relevant details about the thread pool + Logger logger = LoggerFactory.getLogger(getClass()); + + int corePoolSize = threadPoolExecutor.getCorePoolSize(); + int maximumPoolSize = threadPoolExecutor.getMaximumPoolSize(); + long keepAliveTime = threadPoolExecutor.getKeepAliveTime(TimeUnit.SECONDS); + + // Check if it's a CachedThreadPool (maximumPoolSize == Integer.MAX_VALUE means it's unbounded) + if (maximumPoolSize == Integer.MAX_VALUE) { + logger.info("Using CachedThreadPool with core pool size: {}, keep-alive time: {} seconds", + corePoolSize, keepAliveTime); + } else { + logger.info("Using FixedThreadPool with core pool size: {}, max pool size: {}, keep-alive time: {} seconds", + corePoolSize, maximumPoolSize, keepAliveTime); + } + } else { + // Log if it's not a thread pool executor + Logger logger = LoggerFactory.getLogger(getClass()); + logger.warn("Executor is not a ThreadPoolExecutor, it's: {}", executorService.getClass().getName()); + } + } + + @Provides + public HealthGrpc.HealthImplBase healthService(ServingServiceV2 servingServiceV2) { + return new HealthServiceController(servingServiceV2); + } } diff --git a/java/serving/src/main/java/feast/serving/service/controller/HealthServiceController.java b/java/serving/src/main/java/feast/serving/service/controller/HealthServiceController.java index 2ce17a57511..156585486d4 100644 --- a/java/serving/src/main/java/feast/serving/service/controller/HealthServiceController.java +++ b/java/serving/src/main/java/feast/serving/service/controller/HealthServiceController.java @@ -19,16 +19,19 @@ import com.google.inject.Inject; import feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest; import feast.serving.service.ServingServiceV2; +import feast.serving.service.config.ServingServiceV2Module; import io.grpc.health.v1.HealthGrpc.HealthImplBase; import io.grpc.health.v1.HealthProto.HealthCheckRequest; import io.grpc.health.v1.HealthProto.HealthCheckResponse; import io.grpc.health.v1.HealthProto.ServingStatus; import io.grpc.stub.StreamObserver; +import org.slf4j.Logger; // Reference: https://github.com/grpc/grpc/blob/master/doc/health-checking.md public class HealthServiceController extends HealthImplBase { private final ServingServiceV2 servingService; + private static final Logger log = org.slf4j.LoggerFactory.getLogger(HealthServiceController.class); @Inject public HealthServiceController(final ServingServiceV2 servingService) { this.servingService = servingService; @@ -37,12 +40,13 @@ public HealthServiceController(final ServingServiceV2 servingService) { @Override public void check( HealthCheckRequest request, StreamObserver responseObserver) { - // TODO: Implement proper logic to determine if ServingServiceV2 is healthy e.g. + // TODO: Implement proper logicp to determine if ServingServiceV2 is healthy e.g. // if it's online service check that it the service can retrieve dummy/random // feature table. // Implement similarly for batch service. try { + log.info("checking 1244"); servingService.getFeastServingInfo(GetFeastServingInfoRequest.getDefaultInstance()); responseObserver.onNext( HealthCheckResponse.newBuilder().setStatus(ServingStatus.SERVING).build()); diff --git a/java/serving/src/main/java/feast/serving/util/RedisPerformanceMonitor.java b/java/serving/src/main/java/feast/serving/util/RedisPerformanceMonitor.java new file mode 100644 index 00000000000..27ca445470b --- /dev/null +++ b/java/serving/src/main/java/feast/serving/util/RedisPerformanceMonitor.java @@ -0,0 +1,156 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * Copyright 2018-2022 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 io.micrometer.core.instrument.Counter; +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.Timer; +import java.util.concurrent.ConcurrentLinkedDeque; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Singleton +public class RedisPerformanceMonitor { + private static final Logger log = LoggerFactory.getLogger(RedisPerformanceMonitor.class); + + private final MeterRegistry meterRegistry; + private final Timer redisOperationTimer; + private final Counter redisErrorCounter; + + // For adaptive thresholding, keep track of recent latencies for HMGET and HGETALL + // These are per-operation latencies, not per-key/per-batch. + private static final int LATENCY_WINDOW_SIZE = 100; // Keep last 100 samples + private final ConcurrentLinkedDeque hmgetLatenciesNanos; + private final ConcurrentLinkedDeque hgetallLatenciesNanos; + + @Inject + public RedisPerformanceMonitor(MeterRegistry meterRegistry) { + this.meterRegistry = meterRegistry; + this.redisOperationTimer = + Timer.builder("feast_serving_redis_operation_duration_seconds") + .description("Duration of Redis operations") + .tag("component", "redis_retriever") + .publishPercentiles(0.5, 0.95, 0.99) + .register(meterRegistry); + + this.redisErrorCounter = + Counter.builder("feast_serving_redis_operation_errors_total") + .description("Total number of Redis operation errors") + .tag("component", "redis_retriever") + .register(meterRegistry); + + this.hmgetLatenciesNanos = new ConcurrentLinkedDeque<>(); + this.hgetallLatenciesNanos = new ConcurrentLinkedDeque<>(); + + log.info("RedisPerformanceMonitor initialized."); + } + + public void recordRedisOperation( + String operationType, int keyCount, int fieldCount, long durationNanos) { + redisOperationTimer + .withTags( + "operation", + operationType, + "key_count_bucket", + bucketize(keyCount), + "field_count_bucket", + bucketize(fieldCount)) + .record(durationNanos, TimeUnit.NANOSECONDS); + } + + public void recordRedisError(String operationType) { + redisErrorCounter.withTag("operation", operationType).increment(); + } + + public void recordHmgetLatency(long durationNanos) { + addLatencySample(hmgetLatenciesNanos, durationNanos); + } + + public void recordHgetallLatency(long durationNanos) { + addLatencySample(hgetallLatenciesNanos, durationNanos); + } + + private void addLatencySample(ConcurrentLinkedDeque deque, long latencyNanos) { + deque.addLast(latencyNanos); + while (deque.size() > LATENCY_WINDOW_SIZE) { + deque.pollFirst(); + } + } + + public double getAverageHmgetLatency() { + return calculateAverageLatency(hmgetLatenciesNanos); + } + + public double getAverageHgetallLatency() { + return calculateAverageLatency(hgetallLatenciesNanos); + } + + private double calculateAverageLatency(ConcurrentLinkedDeque deque) { + if (deque.isEmpty()) { + return 0.0; + } + // Create a snapshot to iterate over for consistency + Long[] latencies = deque.toArray(new Long[0]); + if (latencies.length == 0) { + return 0.0; + } + double sum = 0; + for (Long latency : latencies) { + if (latency != null) { + sum += latency; + } + } + return sum / latencies.length; + } + + private String bucketize(int count) { + if (count <= 0) return "0"; + if (count == 1) return "1"; + if (count <= 5) return "2-5"; + if (count <= 10) return "6-10"; + if (count <= 20) return "11-20"; + if (count <= 50) return "21-50"; + if (count <= 100) return "51-100"; + return "100+"; + } + + // Example of how to use the timer if you want to wrap an operation + public T measureOperation( + String operationType, int keyCount, int fieldCount, CallableThrowsException callable) + throws Exception { + long startTime = System.nanoTime(); + try { + T result = callable.call(); + recordRedisOperation(operationType, keyCount, fieldCount, System.nanoTime() - startTime); + return result; + } catch (Exception e) { + recordRedisError(operationType); + recordRedisOperation( + operationType + "_error", keyCount, fieldCount, System.nanoTime() - startTime); + throw e; + } + } + + @FunctionalInterface + public interface CallableThrowsException { + V call() throws Exception; + } +} diff --git a/java/serving/src/main/resources/application-dev.yaml b/java/serving/src/main/resources/application-dev.yaml new file mode 100644 index 00000000000..1158e13674d --- /dev/null +++ b/java/serving/src/main/resources/application-dev.yaml @@ -0,0 +1,26 @@ +feast: + project: "ltr_mo" + registry: "java/serving/src/main/resources/registry.pb" + activeStore: online + stores: + # Please see https://api.docs.feast.dev/grpc/feast.core.pb.html#Store for configuration options + - name: online # Name of the store (referenced by active_store) + type: REDIS # Type of the store. REDIS, REDIS_CLUSTER are available options + config: # Store specific configuration. See + host: localhost + port: 6379 +logging: + # Audit logging provides a machine readable structured JSON log that can give better + # insight into what is happening in Feast. + audit: + # Whether audit logging is enabled. + enabled: true + # Whether to enable message level (ie request/response) audit logging + messageLogging: + enabled: false + # Logging forwarder currently provides a machine readable structured JSON log to an + # external fluentd service that can give better insight into what is happening in Feast. + # Accepts console / fluentd as destination + destination: console + fluentdHost: localhost + fluentdPort: 24224 \ No newline at end of file diff --git a/java/serving/src/main/resources/application-optimized.yml b/java/serving/src/main/resources/application-optimized.yml new file mode 100644 index 00000000000..fefa5deedb1 --- /dev/null +++ b/java/serving/src/main/resources/application-optimized.yml @@ -0,0 +1,85 @@ +feature-server: + application-override.yaml: # This key is literal, based on the example structure + enabled: true # Typically a flag for Helm or similar deployment systems + feast: + project: "feast_java_optimized_demo" # Project name, can be overridden by global.project + registry: "java/serving/src/main/resources/registry.pb" # Registry path, can be overridden by global.registry.path + registryRefreshInterval: 60 # Refresh registry from source every 60 seconds. 0 to disable. + entityKeySerializationVersion: 2 # Use V2 for Redis key serialization (more efficient) + retrieverThreadPoolSize: 16 # Number of threads for the OptimizedRedisOnlineRetriever's executor service. 0 for auto (CPU cores). + + # Indicates the active store. Only a single store in the list can be active at one time. + activeStore: "online_cluster_optimized" # Example: using the optimized cluster store by default + + # List of store configurations + stores: + - name: "online_redis_optimized" # Name of the store (referenced by activeStore) + type: REDIS # Type of the store. REDIS or REDIS_CLUSTER + config: # Store specific configuration. + host: "localhost" # Replace with your Redis host + port: 6379 # Replace with your Redis port + password: "" # Optional: Your Redis password + ssl: false # Optional: Enable SSL for Redis connection + sslVerifyPeer: true # Optional: Verify peer certificate if SSL is enabled + database: 0 # Optional: Redis database number + # Connection timeouts + connectTimeoutMs: 2000 # Connection attempt timeout in milliseconds (e.g., 2000ms) + timeoutMs: 1000 # Operation timeout in milliseconds (e.g., 1000ms) + # Connection Pool Settings (for OptimizedRedisClientAdapter) + poolMaxTotal: 50 # Max total connections in the pool + poolMaxIdle: 20 # Max idle connections in the pool + poolMinIdle: 5 # Min idle connections to maintain + poolTestOnBorrow: true # Validate connections when borrowing from pool + poolBlockWhenExhausted: true # Block if pool is exhausted, otherwise throw exception + + - name: "online_cluster_optimized" + type: REDIS_CLUSTER + config: # Store specific configuration. + # Connection string specifies the host:port of Redis instances in the redis cluster. + connection_string: "marketplace-fs-mo-v1.slkos6.clustercfg.aps1.cache.amazonaws.com:6379" # Replace with your cluster nodes + password: "" # Optional: Password if your cluster nodes require it + ssl: false # Optional: Enable SSL for cluster connections + sslVerifyPeer: true # Optional + read_from: "REPLICA_PREFERRED" # Optimize reads: MASTER, UPSTREAM, NEAREST, REPLICA, REPLICA_PREFERRED, ANY_REPLICA, ANY + # Connection timeouts + connectTimeoutMs: 2000 # Connection attempt timeout in milliseconds + timeoutMs: 1000 # Operation timeout in milliseconds + clusterRefreshPeriodSec: 30 # How often to refresh cluster topology (seconds) + # Connection Pool Settings + poolMaxTotal: 100 # Typically larger pool for cluster environments + poolMaxIdle: 40 + poolMinIdle: 10 + poolTestOnBorrow: true + poolBlockWhenExhausted: true + + tracing: + # If true, Feast will provide tracing data (using OpenTracing API) for various RPC method calls + # which can be useful to debug performance issues and perform benchmarking + enabled: true # Set to true for production monitoring + # Only Jaeger tracer is supported currently via Micrometer Tracing (or direct OpenTracing integration) + tracerName: "jaeger" # This name might be conceptual; actual setup depends on tracing library + # The service name identifier for the tracing data + serviceName: "feast_serving_optimized" + +# Global settings, similar to the example override structure +global: + registry: + path: "java/serving/src/main/resources/registry.pb" # Overrides the path in feast.registry if this config system is hierarchical + cache_ttl_seconds: 60 # Corresponds to feast.registryRefreshInterval conceptually + project: "feast_java_optimized_demo" # Overrides feast.project + +# Transformation service placeholder, similar to the example +transformation-service: + # image: + # tag: dev + # Configuration for the transformation service would go here if needed + # Example: + # endpoint: "localhost:6568" # If transformation service is separate + enabled: false # Assuming it might not be used by default with this config + +# gRPC server settings for this Java application instance +# This remains top-level as it configures the running server itself, not the Feast specific definitions. +grpc: + server: + # The port number Feast Serving GRPC service should listen on + port: 6566 diff --git a/java/serving/src/main/resources/application-override.yaml b/java/serving/src/main/resources/application-override.yaml new file mode 100644 index 00000000000..79b1411d1ae --- /dev/null +++ b/java/serving/src/main/resources/application-override.yaml @@ -0,0 +1,26 @@ +feast: + project: "ltr_mo" + registry: "/var/www/feast/java/serving/src/main/resources/registry.pb" + activeStore: online_cluster + stores: + - name: online_cluster + type: REDIS_CLUSTER + config: # Store specific configuration. + connection_string: "marketplace-fs-mo-v1.slkos6.clustercfg.aps1.cache.amazonaws.com:6379" + read_from: MASTER + timeout: PT2S +logging: + audit: + enabled: true + # Log level configuration for different components + logLevel: + root: INFO + feast.serving: DEBUG # Detailed logs for serving componenta + feast.stores: TRACE # Trace logs for store interaction, for more granular tracking + feast.utils: WARN # Log warnings for utils-related components + logFile: + enabled: true + path: "/var/log/blackbuck/feast_serving.log" + maxSize: 10MB # Size of the log file before it's rotated + maxFiles: 5 # Keep up to 5 rotated log files + rollingPolicy: DAILY # Log rotation based on the day diff --git a/java/serving/src/main/resources/application.yml b/java/serving/src/main/resources/application.yml index 62ace5018e8..898fbd6b71e 100644 --- a/java/serving/src/main/resources/application.yml +++ b/java/serving/src/main/resources/application.yml @@ -1,6 +1,6 @@ feast: - project: "" - registry: "prompt_dory/data/registry.db" + project: "feast_java_demo" + registry: "java/serving/src/main/resources/registry_new.pb" registryRefreshInterval: 0 # Indicates the active store. Only a single store in the last can be active at one time. In the future this key @@ -13,7 +13,7 @@ feast: - name: online # Name of the store (referenced by active_store) type: REDIS # Type of the store. REDIS, REDIS_CLUSTER are available options config: # Store specific configuration. See - host: localhost + host: marketplace-fs-mo-v1.slkos6.clustercfg.aps1.cache.amazonaws.com port: 6379 # Subscriptions indicate which feature sets needs to be retrieved and used to populate this store - name: online_cluster diff --git a/java/serving/src/main/resources/log4j2.xml b/java/serving/src/main/resources/log4j2.xml index c75c2db13cc..bc415f580f4 100644 --- a/java/serving/src/main/resources/log4j2.xml +++ b/java/serving/src/main/resources/log4j2.xml @@ -1,23 +1,9 @@ - - + + + /var/log/blackbuck %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${hostName} --- [%15.15t] %-40.40c{1.} : %m%n%ex @@ -34,15 +20,36 @@ + + + [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n + + + + + + + + + + + + + + - + + - + + diff --git a/java/serving/src/main/resources/registry.pb b/java/serving/src/main/resources/registry.pb new file mode 100644 index 00000000000..0187d8054ce Binary files /dev/null and b/java/serving/src/main/resources/registry.pb differ diff --git a/java/serving/src/test/java/feast/serving/performance/RedisOptimizationsBenchmark.java b/java/serving/src/test/java/feast/serving/performance/RedisOptimizationsBenchmark.java new file mode 100644 index 00000000000..b11bff76b08 --- /dev/null +++ b/java/serving/src/test/java/feast/serving/performance/RedisOptimizationsBenchmark.java @@ -0,0 +1,320 @@ +package feast.serving.performance; + +import feast.proto.core.FeatureProto; +import feast.proto.serving.ServingAPIProto; +import feast.proto.storage.RedisProto; +import feast.proto.types.ValueProto; +import feast.serving.connectors.OnlineRetriever; +import feast.serving.connectors.redis.common.RedisHashDecoder; +import feast.serving.connectors.redis.common.RedisKeyGenerator; +import feast.serving.connectors.redis.retriever.*; +import feast.serving.registry.Registry; +import feast.serving.registry.RegistryRepository; +import feast.serving.service.FeatureCacheManager; +import feast.serving.service.config.ApplicationProperties; +import feast.serving.util.RedisPerformanceMonitor; + +import io.lettuce.core.RedisClient; +import io.lettuce.core.api.StatefulRedisConnection; +import io.lettuce.core.api.sync.RedisCommands; +import io.lettuce.core.codec.ByteArrayCodec; +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.simple.SimpleMeterRegistry; + +import org.openjdk.jmh.annotations.*; +import org.openjdk.jmh.infra.Blackhole; +import redis.embedded.RedisServer; + +import java.io.IOException; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +@State(Scope.Benchmark) +@Warmup(iterations = 2, time = 5) +@Measurement(iterations = 3, time = 10) +@Fork(1) +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.MICROSECONDS) +public class RedisOptimizationsBenchmark { + + private static final String TEST_PROJECT = "benchmark_project"; + private static final int REDIS_PORT = 6370; // Use a different port for embedded server + private RedisServer redisServer; + + private ApplicationProperties applicationProperties; + private RegistryRepository registryRepository; + private EntityKeySerializer entityKeySerializer; + + private OnlineRetriever originalRedisRetriever; // Representing the baseline + private OptimizedRedisOnlineRetriever optimizedRedisRetriever; + + private FeatureCacheManager featureCacheManager; + private RedisPerformanceMonitor performanceMonitor; + private OptimizedRedisClientAdapter optimizedRedisClientAdapter; + private RedisClient standaloneClient; // For direct data setup + + // Test Data + private List> singleEntityRow; + private List> batchEntityRows_10; + private List> batchEntityRows_100; + + private List fewFeatures_5; + private List manyFeatures_60; + private List entityNames; + + + @Setup(Level.Trial) + public void setupTrial() throws IOException { + redisServer = RedisServer.builder().port(REDIS_PORT).setting("maxmemory 128M").build(); + redisServer.start(); + + // Mock ApplicationProperties + applicationProperties = new ApplicationProperties(); + ApplicationProperties.FeastProperties feastProperties = new ApplicationProperties.FeastProperties(); + feastProperties.setProject(TEST_PROJECT); + feastProperties.setEntityKeySerializationVersion(2); + feastProperties.setRetrieverThreadPoolSize(4); // Configurable thread pool + + ApplicationProperties.Store storeConfig = new ApplicationProperties.Store(); + storeConfig.setName("online_redis_benchmark"); + storeConfig.setType("REDIS"); + Map redisConfigMap = new HashMap<>(); + redisConfigMap.put("host", "localhost"); + redisConfigMap.put("port", String.valueOf(REDIS_PORT)); + redisConfigMap.put("poolMaxTotal", "8"); // Default, can be tuned + storeConfig.setConfig(redisConfigMap); + + feastProperties.setStores(Collections.singletonList(storeConfig)); + feastProperties.setActiveStore("online_redis_benchmark"); + applicationProperties.setFeast(feastProperties); + + // Mock Registry + registryRepository = createMockRegistryRepository(); + entityKeySerializer = new EntityKeySerializerV2(); // Using V2 as per common config + + // Initialize components for Optimized Retriever + MeterRegistry meterRegistry = new SimpleMeterRegistry(); + featureCacheManager = new FeatureCacheManager(); // Uses default Caffeine settings + performanceMonitor = new RedisPerformanceMonitor(meterRegistry); + optimizedRedisClientAdapter = new OptimizedRedisClientAdapter(applicationProperties); + + optimizedRedisRetriever = new OptimizedRedisOnlineRetriever( + TEST_PROJECT, + optimizedRedisClientAdapter, + entityKeySerializer, + featureCacheManager, + performanceMonitor, + feastProperties.getRetrieverThreadPoolSize()); + + // Initialize components for a "Baseline" Retriever (simplified setup) + // This baseline uses the new OptimizedRedisClientAdapter but not the OptimizedRedisOnlineRetriever logic + // to simulate a less optimized path (e.g. no pipelining, no advanced caching if FeatureCacheManager is bypassed) + // For a true "original" comparison, one would need to set up the older RedisClientAdapter. + // This is a stand-in to show benefits of OptimizedRedisOnlineRetriever's internal logic. + originalRedisRetriever = new RedisOnlineRetriever( // The "original" one from main codebase + TEST_PROJECT, + new RedisClientAdapter(applicationProperties), // Basic adapter + entityKeySerializer + ); + + + // Setup direct Redis client for populating data + standaloneClient = RedisClient.create(String.format("redis://localhost:%d", REDIS_PORT)); + + // Prepare test data + entityNames = List.of("customer_id"); + singleEntityRow = generateEntityRows(1, entityNames); + batchEntityRows_10 = generateEntityRows(10, entityNames); + batchEntityRows_100 = generateEntityRows(100, entityNames); + + fewFeatures_5 = generateFeatureReferences("feature_view_1", 5); + manyFeatures_60 = generateFeatureReferences("feature_view_1", 60); // To cross HGETALL threshold + + // Populate Redis with data + populateRedisWithTestData(fewFeatures_5); + populateRedisWithTestData(manyFeatures_60); + } + + @TearDown(Level.Trial) + public void tearDownTrial() { + if (optimizedRedisRetriever != null) { + optimizedRedisRetriever.shutdown(); + } + if (optimizedRedisClientAdapter != null) { + optimizedRedisClientAdapter.shutdown(); + } + if(standaloneClient != null) { + standaloneClient.shutdown(); + } + if (redisServer != null) { + redisServer.stop(); + } + } + + private RegistryRepository createMockRegistryRepository() { + // Create a mock registry with one feature view and specified features + // For simplicity, all features have STRING type + List featureSpecs = new ArrayList<>(); + for (int i = 0; i < 100; i++) { // Max features we might request + featureSpecs.add(FeatureProto.FeatureSpecV2.newBuilder() + .setName("feature_" + i) + .setValueType(ValueProto.ValueType.Enum.STRING) + .build()); + } + + FeatureProto.FeatureViewSpec fvSpec = FeatureProto.FeatureViewSpec.newBuilder() + .setName("feature_view_1") + .addAllEntities(entityNames) + .addAllFeatures(featureSpecs) + .build(); + + FeatureProto.FeatureView fv = FeatureProto.FeatureView.newBuilder().setSpec(fvSpec).build(); + + RegistryProto.Registry registryProto = RegistryProto.Registry.newBuilder() + .addFeatureViews(fv) + .addEntities(EntityProto.Entity.newBuilder().setSpec( + EntityProto.EntitySpecV2.newBuilder().setName("customer_id").setJoinKey("customer_id").setValueType(ValueProto.ValueType.Enum.INT64) + ).build()) + .build(); + + Registry registry = new Registry(registryProto); + return new RegistryRepository(registry, TEST_PROJECT); + } + + private List> generateEntityRows(int count, List entityNames) { + List> rows = new ArrayList<>(); + for (int i = 0; i < count; i++) { + Map row = new HashMap<>(); + for (String entityName : entityNames) { + row.put(entityName, ValueProto.Value.newBuilder().setInt64Val(1000 + i).build()); + } + rows.add(row); + } + return rows; + } + + private List generateFeatureReferences(String fvName, int count) { + List refs = new ArrayList<>(); + for (int i = 0; i < count; i++) { + refs.add(ServingAPIProto.FeatureReferenceV2.newBuilder() + .setFeatureViewName(fvName) + .setFeatureName("feature_" + i) + .build()); + } + return refs; + } + + private void populateRedisWithTestData(List featuresToPopulate) { + try (StatefulRedisConnection connection = standaloneClient.connect(new ByteArrayCodec())) { + RedisCommands sync = connection.sync(); + long currentTimestampMillis = System.currentTimeMillis(); + + for (Map entityRow : batchEntityRows_100) { // Populate for all potential entities + RedisProto.RedisKeyV2 redisKeyProto = RedisKeyGenerator.buildRedisKey(TEST_PROJECT, entityRow); + byte[] redisKeyBytes = entityKeySerializer.serialize(redisKeyProto); + + Map hashData = new HashMap<>(); + for (ServingAPIProto.FeatureReferenceV2 ref : featuresToPopulate) { + byte[] fieldKey = RedisHashDecoder.getFeatureReferenceRedisHashKeyBytes(ref); + // Simple string value for benchmark + byte[] value = ValueProto.Value.newBuilder().setStringVal("value_for_" + ref.getFeatureName()).build().toByteArray(); + hashData.put(fieldKey, value); + + // Timestamp for the feature view + byte[] tsKey = RedisHashDecoder.getTimestampRedisHashKeyBytes(ref.getFeatureViewName(), "_ts"); + ValueProto.Value tsValue = ValueProto.Value.newBuilder() + .setTimestampVal(com.google.protobuf.Timestamp.newBuilder().setSeconds(currentTimestampMillis / 1000).build()) + .build(); + hashData.put(tsKey, tsValue.toByteArray()); + } + sync.hmset(redisKeyBytes, hashData); + } + } + } + + // --- Benchmark Methods --- + + // Scenario 1: Single Entity, Few Features + @Benchmark + public void baseline_singleEntity_fewFeatures(Blackhole bh) { + bh.consume(originalRedisRetriever.getOnlineFeatures(singleEntityRow, fewFeatures_5, entityNames)); + } + + @Benchmark + public void optimized_singleEntity_fewFeatures(Blackhole bh) { + bh.consume(optimizedRedisRetriever.getOnlineFeatures(singleEntityRow, fewFeatures_5, entityNames)); + } + + // Scenario 2: Single Entity, Many Features (to test HGETALL threshold effects) + @Benchmark + public void baseline_singleEntity_manyFeatures(Blackhole bh) { + bh.consume(originalRedisRetriever.getOnlineFeatures(singleEntityRow, manyFeatures_60, entityNames)); + } + + @Benchmark + public void optimized_singleEntity_manyFeatures(Blackhole bh) { + bh.consume(optimizedRedisRetriever.getOnlineFeatures(singleEntityRow, manyFeatures_60, entityNames)); + } + + // Scenario 3: Batch Entities (10), Few Features (to test pipelining/batching) + @Benchmark + public void baseline_batch10Entities_fewFeatures(Blackhole bh) { + bh.consume(originalRedisRetriever.getOnlineFeatures(batchEntityRows_10, fewFeatures_5, entityNames)); + } + + @Benchmark + public void optimized_batch10Entities_fewFeatures(Blackhole bh) { + bh.consume(optimizedRedisRetriever.getOnlineFeatures(batchEntityRows_10, fewFeatures_5, entityNames)); + } + + // Scenario 4: Batch Entities (100), Few Features + @Benchmark + public void baseline_batch100Entities_fewFeatures(Blackhole bh) { + bh.consume(originalRedisRetriever.getOnlineFeatures(batchEntityRows_100, fewFeatures_5, entityNames)); + } + + @Benchmark + public void optimized_batch100Entities_fewFeatures(Blackhole bh) { + bh.consume(optimizedRedisRetriever.getOnlineFeatures(batchEntityRows_100, fewFeatures_5, entityNames)); + } + + // Scenario 5: Cache Hit (Optimized Retriever Only) + // Run once to populate cache, then benchmark + @Benchmark + public void optimized_cached_singleEntity_fewFeatures(RedisBenchmarkState state, Blackhole bh) { + // First call to populate cache (not measured directly in this specific invocation's timing) + if (state.isFirstCacheRun) { + optimizedRedisRetriever.getOnlineFeatures(singleEntityRow, fewFeatures_5, entityNames); + state.isFirstCacheRun = false; // Ensure it only runs once per iteration for cache setup + } + // Subsequent calls should hit the cache + bh.consume(optimizedRedisRetriever.getOnlineFeatures(singleEntityRow, fewFeatures_5, entityNames)); + } + + // Add a flag to state for cache priming, if JMH doesn't reset state perfectly for this. + // For simplicity, a benchmark iteration usually calls the method multiple times. + // The first call in an iteration might populate, subsequent ones hit. + // To be more precise, one might need a @Setup(Level.Invocation) for cache priming, + // but that can add overhead. The current approach is a common way. + public boolean isFirstCacheRun = true; // This will be reset per JMH fork/iteration by default. + // If we want it per *invocation* for priming, needs @Setup(Level.Invocation) + + @Setup(Level.Iteration) + public void setupIteration() { + // Clear cache before each iteration of the cache test to ensure consistent "first miss" + if (featureCacheManager != null) { + featureCacheManager.clearAll(); + } + isFirstCacheRun = true; // Reset for the cache test + } + + /* + * To run this benchmark: + * 1. Make sure you have JMH dependencies in your pom.xml (jmh-core, jmh-generator-annprocess) + * 2. Build the project: mvn clean install + * 3. Run the benchmark: java -jar target/benchmarks.jar feast.serving.performance.RedisOptimizationsBenchmark -prof gc + * (or run from IDE with JMH plugin) + */ +} diff --git a/proto/serving/ServingAPIProto.java b/proto/serving/ServingAPIProto.java new file mode 100644 index 00000000000..2c83e08ea56 --- /dev/null +++ b/proto/serving/ServingAPIProto.java @@ -0,0 +1,10634 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: feast/serving/ServingService.proto + +package feast.proto.serving; + +public final class ServingAPIProto { + private ServingAPIProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code feast.serving.FieldStatus} + */ + public enum FieldStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *

+     * Status is unset for this field.
+     * 
+ * + * INVALID = 0; + */ + INVALID(0), + /** + *
+     * Field value is present for this field and age is within max age.
+     * 
+ * + * PRESENT = 1; + */ + PRESENT(1), + /** + *
+     * Values could be found for entity key and age is within max age, but
+     * this field value is assigned a value on ingestion into feast.
+     * 
+ * + * NULL_VALUE = 2; + */ + NULL_VALUE(2), + /** + *
+     * Entity key did not return any values as they do not exist in Feast.
+     * This could suggest that the feature values have not yet been ingested
+     * into feast or the ingestion failed.
+     * 
+ * + * NOT_FOUND = 3; + */ + NOT_FOUND(3), + /** + *
+     * Values could be found for entity key, but field values are outside the maximum
+     * allowable range.
+     * 
+ * + * OUTSIDE_MAX_AGE = 4; + */ + OUTSIDE_MAX_AGE(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Status is unset for this field.
+     * 
+ * + * INVALID = 0; + */ + public static final int INVALID_VALUE = 0; + /** + *
+     * Field value is present for this field and age is within max age.
+     * 
+ * + * PRESENT = 1; + */ + public static final int PRESENT_VALUE = 1; + /** + *
+     * Values could be found for entity key and age is within max age, but
+     * this field value is assigned a value on ingestion into feast.
+     * 
+ * + * NULL_VALUE = 2; + */ + public static final int NULL_VALUE_VALUE = 2; + /** + *
+     * Entity key did not return any values as they do not exist in Feast.
+     * This could suggest that the feature values have not yet been ingested
+     * into feast or the ingestion failed.
+     * 
+ * + * NOT_FOUND = 3; + */ + public static final int NOT_FOUND_VALUE = 3; + /** + *
+     * Values could be found for entity key, but field values are outside the maximum
+     * allowable range.
+     * 
+ * + * OUTSIDE_MAX_AGE = 4; + */ + public static final int OUTSIDE_MAX_AGE_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FieldStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FieldStatus forNumber(int value) { + switch (value) { + case 0: return INVALID; + case 1: return PRESENT; + case 2: return NULL_VALUE; + case 3: return NOT_FOUND; + case 4: return OUTSIDE_MAX_AGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + FieldStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FieldStatus findValueByNumber(int number) { + return FieldStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.getDescriptor().getEnumTypes().get(0); + } + + private static final FieldStatus[] VALUES = values(); + + public static FieldStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FieldStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:feast.serving.FieldStatus) + } + + public interface GetFeastServingInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetFeastServingInfoRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code feast.serving.GetFeastServingInfoRequest} + */ + public static final class GetFeastServingInfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetFeastServingInfoRequest) + GetFeastServingInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFeastServingInfoRequest.newBuilder() to construct. + private GetFeastServingInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFeastServingInfoRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFeastServingInfoRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetFeastServingInfoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.class, feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest other = (feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetFeastServingInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetFeastServingInfoRequest) + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.class, feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoRequest_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest build() { + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest buildPartial() { + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest result = new feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest other) { + if (other == feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetFeastServingInfoRequest) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetFeastServingInfoRequest) + private static final feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest(); + } + + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeastServingInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFeastServingInfoRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetFeastServingInfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetFeastServingInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Feast version of this serving deployment.
+     * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Feast version of this serving deployment.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code feast.serving.GetFeastServingInfoResponse} + */ + public static final class GetFeastServingInfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetFeastServingInfoResponse) + GetFeastServingInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetFeastServingInfoResponse.newBuilder() to construct. + private GetFeastServingInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFeastServingInfoResponse() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFeastServingInfoResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetFeastServingInfoResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.class, feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+     * Feast version of this serving deployment.
+     * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+     * Feast version of this serving deployment.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse other = (feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetFeastServingInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetFeastServingInfoResponse) + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.class, feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetFeastServingInfoResponse_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse build() { + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse buildPartial() { + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse result = new feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse(this); + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse other) { + if (other == feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Feast version of this serving deployment.
+       * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Feast version of this serving deployment.
+       * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Feast version of this serving deployment.
+       * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Feast version of this serving deployment.
+       * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Feast version of this serving deployment.
+       * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetFeastServingInfoResponse) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetFeastServingInfoResponse) + private static final feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse(); + } + + public static feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeastServingInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFeastServingInfoResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetFeastServingInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FeatureReferenceV2OrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.FeatureReferenceV2) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the Feature View to retrieve the feature from.
+     * 
+ * + * string feature_view_name = 1; + * @return The featureViewName. + */ + java.lang.String getFeatureViewName(); + /** + *
+     * Name of the Feature View to retrieve the feature from.
+     * 
+ * + * string feature_view_name = 1; + * @return The bytes for featureViewName. + */ + com.google.protobuf.ByteString + getFeatureViewNameBytes(); + + /** + *
+     * Name of the Feature to retrieve the feature from.
+     * 
+ * + * string feature_name = 2; + * @return The featureName. + */ + java.lang.String getFeatureName(); + /** + *
+     * Name of the Feature to retrieve the feature from.
+     * 
+ * + * string feature_name = 2; + * @return The bytes for featureName. + */ + com.google.protobuf.ByteString + getFeatureNameBytes(); + } + /** + * Protobuf type {@code feast.serving.FeatureReferenceV2} + */ + public static final class FeatureReferenceV2 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.FeatureReferenceV2) + FeatureReferenceV2OrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureReferenceV2.newBuilder() to construct. + private FeatureReferenceV2(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeatureReferenceV2() { + featureViewName_ = ""; + featureName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeatureReferenceV2(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeatureReferenceV2( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + featureViewName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + featureName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureReferenceV2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureReferenceV2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.FeatureReferenceV2.class, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder.class); + } + + public static final int FEATURE_VIEW_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object featureViewName_; + /** + *
+     * Name of the Feature View to retrieve the feature from.
+     * 
+ * + * string feature_view_name = 1; + * @return The featureViewName. + */ + @java.lang.Override + public java.lang.String getFeatureViewName() { + java.lang.Object ref = featureViewName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureViewName_ = s; + return s; + } + } + /** + *
+     * Name of the Feature View to retrieve the feature from.
+     * 
+ * + * string feature_view_name = 1; + * @return The bytes for featureViewName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeatureViewNameBytes() { + java.lang.Object ref = featureViewName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + featureViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object featureName_; + /** + *
+     * Name of the Feature to retrieve the feature from.
+     * 
+ * + * string feature_name = 2; + * @return The featureName. + */ + @java.lang.Override + public java.lang.String getFeatureName() { + java.lang.Object ref = featureName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureName_ = s; + return s; + } + } + /** + *
+     * Name of the Feature to retrieve the feature from.
+     * 
+ * + * string feature_name = 2; + * @return The bytes for featureName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeatureNameBytes() { + java.lang.Object ref = featureName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + featureName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureViewName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, featureViewName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, featureName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureViewName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, featureViewName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(featureName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, featureName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.FeatureReferenceV2)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.FeatureReferenceV2 other = (feast.proto.serving.ServingAPIProto.FeatureReferenceV2) obj; + + if (!getFeatureViewName() + .equals(other.getFeatureViewName())) return false; + if (!getFeatureName() + .equals(other.getFeatureName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FEATURE_VIEW_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFeatureViewName().hashCode(); + hash = (37 * hash) + FEATURE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFeatureName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.FeatureReferenceV2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.FeatureReferenceV2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.FeatureReferenceV2) + feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureReferenceV2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureReferenceV2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.FeatureReferenceV2.class, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.FeatureReferenceV2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + featureViewName_ = ""; + + featureName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureReferenceV2_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2 getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.FeatureReferenceV2.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2 build() { + feast.proto.serving.ServingAPIProto.FeatureReferenceV2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2 buildPartial() { + feast.proto.serving.ServingAPIProto.FeatureReferenceV2 result = new feast.proto.serving.ServingAPIProto.FeatureReferenceV2(this); + result.featureViewName_ = featureViewName_; + result.featureName_ = featureName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.FeatureReferenceV2) { + return mergeFrom((feast.proto.serving.ServingAPIProto.FeatureReferenceV2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.FeatureReferenceV2 other) { + if (other == feast.proto.serving.ServingAPIProto.FeatureReferenceV2.getDefaultInstance()) return this; + if (!other.getFeatureViewName().isEmpty()) { + featureViewName_ = other.featureViewName_; + onChanged(); + } + if (!other.getFeatureName().isEmpty()) { + featureName_ = other.featureName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.FeatureReferenceV2 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.FeatureReferenceV2) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object featureViewName_ = ""; + /** + *
+       * Name of the Feature View to retrieve the feature from.
+       * 
+ * + * string feature_view_name = 1; + * @return The featureViewName. + */ + public java.lang.String getFeatureViewName() { + java.lang.Object ref = featureViewName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureViewName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the Feature View to retrieve the feature from.
+       * 
+ * + * string feature_view_name = 1; + * @return The bytes for featureViewName. + */ + public com.google.protobuf.ByteString + getFeatureViewNameBytes() { + java.lang.Object ref = featureViewName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + featureViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the Feature View to retrieve the feature from.
+       * 
+ * + * string feature_view_name = 1; + * @param value The featureViewName to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + featureViewName_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of the Feature View to retrieve the feature from.
+       * 
+ * + * string feature_view_name = 1; + * @return This builder for chaining. + */ + public Builder clearFeatureViewName() { + + featureViewName_ = getDefaultInstance().getFeatureViewName(); + onChanged(); + return this; + } + /** + *
+       * Name of the Feature View to retrieve the feature from.
+       * 
+ * + * string feature_view_name = 1; + * @param value The bytes for featureViewName to set. + * @return This builder for chaining. + */ + public Builder setFeatureViewNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + featureViewName_ = value; + onChanged(); + return this; + } + + private java.lang.Object featureName_ = ""; + /** + *
+       * Name of the Feature to retrieve the feature from.
+       * 
+ * + * string feature_name = 2; + * @return The featureName. + */ + public java.lang.String getFeatureName() { + java.lang.Object ref = featureName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + featureName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the Feature to retrieve the feature from.
+       * 
+ * + * string feature_name = 2; + * @return The bytes for featureName. + */ + public com.google.protobuf.ByteString + getFeatureNameBytes() { + java.lang.Object ref = featureName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + featureName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the Feature to retrieve the feature from.
+       * 
+ * + * string feature_name = 2; + * @param value The featureName to set. + * @return This builder for chaining. + */ + public Builder setFeatureName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + featureName_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of the Feature to retrieve the feature from.
+       * 
+ * + * string feature_name = 2; + * @return This builder for chaining. + */ + public Builder clearFeatureName() { + + featureName_ = getDefaultInstance().getFeatureName(); + onChanged(); + return this; + } + /** + *
+       * Name of the Feature to retrieve the feature from.
+       * 
+ * + * string feature_name = 2; + * @param value The bytes for featureName to set. + * @return This builder for chaining. + */ + public Builder setFeatureNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + featureName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.FeatureReferenceV2) + } + + // @@protoc_insertion_point(class_scope:feast.serving.FeatureReferenceV2) + private static final feast.proto.serving.ServingAPIProto.FeatureReferenceV2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.FeatureReferenceV2(); + } + + public static feast.proto.serving.ServingAPIProto.FeatureReferenceV2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureReferenceV2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureReferenceV2(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetOnlineFeaturesRequestV2OrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetOnlineFeaturesRequestV2) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + java.util.List + getFeaturesList(); + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + feast.proto.serving.ServingAPIProto.FeatureReferenceV2 getFeatures(int index); + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + int getFeaturesCount(); + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + java.util.List + getFeaturesOrBuilderList(); + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder getFeaturesOrBuilder( + int index); + + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + java.util.List + getEntityRowsList(); + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow getEntityRows(int index); + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + int getEntityRowsCount(); + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + java.util.List + getEntityRowsOrBuilderList(); + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder getEntityRowsOrBuilder( + int index); + + /** + *
+     * Optional field to specify project name override. If specified, uses the
+     * given project for retrieval. Overrides the projects specified in
+     * Feature References if both are specified.
+     * 
+ * + * string project = 5; + * @return The project. + */ + java.lang.String getProject(); + /** + *
+     * Optional field to specify project name override. If specified, uses the
+     * given project for retrieval. Overrides the projects specified in
+     * Feature References if both are specified.
+     * 
+ * + * string project = 5; + * @return The bytes for project. + */ + com.google.protobuf.ByteString + getProjectBytes(); + } + /** + *
+   * ToDo (oleksii): remove this message (since it's not used) and move EntityRow on package level
+   * 
+ * + * Protobuf type {@code feast.serving.GetOnlineFeaturesRequestV2} + */ + public static final class GetOnlineFeaturesRequestV2 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetOnlineFeaturesRequestV2) + GetOnlineFeaturesRequestV2OrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOnlineFeaturesRequestV2.newBuilder() to construct. + private GetOnlineFeaturesRequestV2(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOnlineFeaturesRequestV2() { + features_ = java.util.Collections.emptyList(); + entityRows_ = java.util.Collections.emptyList(); + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOnlineFeaturesRequestV2(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetOnlineFeaturesRequestV2( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + entityRows_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + entityRows_.add( + input.readMessage(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.parser(), extensionRegistry)); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + features_.add( + input.readMessage(feast.proto.serving.ServingAPIProto.FeatureReferenceV2.parser(), extensionRegistry)); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + entityRows_ = java.util.Collections.unmodifiableList(entityRows_); + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.Builder.class); + } + + public interface EntityRowOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetOnlineFeaturesRequestV2.EntityRow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Request timestamp of this row. This value will be used,
+       * together with maxAge, to determine feature staleness.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + *
+       * Request timestamp of this row. This value will be used,
+       * together with maxAge, to determine feature staleness.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + *
+       * Request timestamp of this row. This value will be used,
+       * together with maxAge, to determine feature staleness.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + int getFieldsCount(); + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + boolean containsFields( + java.lang.String key); + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getFields(); + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + java.util.Map + getFieldsMap(); + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + + /* nullable */ +feast.proto.types.ValueProto.Value getFieldsOrDefault( + java.lang.String key, + /* nullable */ +feast.proto.types.ValueProto.Value defaultValue); + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + + feast.proto.types.ValueProto.Value getFieldsOrThrow( + java.lang.String key); + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesRequestV2.EntityRow} + */ + public static final class EntityRow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetOnlineFeaturesRequestV2.EntityRow) + EntityRowOrBuilder { + private static final long serialVersionUID = 0L; + // Use EntityRow.newBuilder() to construct. + private EntityRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityRow() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityRow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityRow( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timestamp_ != null) { + subBuilder = timestamp_.toBuilder(); + } + timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timestamp_); + timestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + fields__ = input.readMessage( + FieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + fields_.getMutableMap().put( + fields__.getKey(), fields__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp timestamp_; + /** + *
+       * Request timestamp of this row. This value will be used,
+       * together with maxAge, to determine feature staleness.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + *
+       * Request timestamp of this row. This value will be used,
+       * together with maxAge, to determine feature staleness.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + *
+       * Request timestamp of this row. This value will be used,
+       * together with maxAge, to determine feature staleness.
+       * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + public static final int FIELDS_FIELD_NUMBER = 2; + private static final class FieldsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, feast.proto.types.ValueProto.Value> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_FieldsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + feast.proto.types.ValueProto.Value.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, feast.proto.types.ValueProto.Value> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + + @java.lang.Override + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + @java.lang.Override + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.Value getFieldsOrDefault( + java.lang.String key, + feast.proto.types.ValueProto.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Map containing mapping of entity name to entity value.
+       * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.Value getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != null) { + output.writeMessage(1, getTimestamp()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetFields(), + FieldsDefaultEntryHolder.defaultEntry, + 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTimestamp()); + } + for (java.util.Map.Entry entry + : internalGetFields().getMap().entrySet()) { + com.google.protobuf.MapEntry + fields__ = FieldsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fields__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow other = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow) obj; + + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp() + .equals(other.getTimestamp())) return false; + } + if (!internalGetFields().equals( + other.internalGetFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + if (!internalGetFields().getMap().isEmpty()) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFields().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesRequestV2.EntityRow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetOnlineFeaturesRequestV2.EntityRow) + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableFields(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + internalGetMutableFields().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow build() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow buildPartial() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow result = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow(this); + int from_bitField0_ = bitField0_; + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.timestamp_ = timestampBuilder_.build(); + } + result.fields_ = internalGetFields(); + result.fields_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow other) { + if (other == feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.getDefaultInstance()) return this; + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + internalGetMutableFields().mergeFrom( + other.internalGetFields()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + + return this; + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + *
+         * Request timestamp of this row. This value will be used,
+         * together with maxAge, to determine feature staleness.
+         * 
+ * + * .google.protobuf.Timestamp timestamp = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), + getParentForChildren(), + isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, feast.proto.types.ValueProto.Value> fields_; + private com.google.protobuf.MapField + internalGetFields() { + if (fields_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + return fields_; + } + private com.google.protobuf.MapField + internalGetMutableFields() { + onChanged();; + if (fields_ == null) { + fields_ = com.google.protobuf.MapField.newMapField( + FieldsDefaultEntryHolder.defaultEntry); + } + if (!fields_.isMutable()) { + fields_ = fields_.copy(); + } + return fields_; + } + + public int getFieldsCount() { + return internalGetFields().getMap().size(); + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + + @java.lang.Override + public boolean containsFields( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetFields().getMap().containsKey(key); + } + /** + * Use {@link #getFieldsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFields() { + return getFieldsMap(); + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + @java.lang.Override + + public java.util.Map getFieldsMap() { + return internalGetFields().getMap(); + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.Value getFieldsOrDefault( + java.lang.String key, + feast.proto.types.ValueProto.Value defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFields().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.Value getFieldsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetFields().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFields() { + internalGetMutableFields().getMutableMap() + .clear(); + return this; + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + + public Builder removeFields( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableFields().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableFields() { + return internalGetMutableFields().getMutableMap(); + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + public Builder putFields( + java.lang.String key, + feast.proto.types.ValueProto.Value value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableFields().getMutableMap() + .put(key, value); + return this; + } + /** + *
+         * Map containing mapping of entity name to entity value.
+         * 
+ * + * map<string, .feast.types.Value> fields = 2; + */ + + public Builder putAllFields( + java.util.Map values) { + internalGetMutableFields().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetOnlineFeaturesRequestV2.EntityRow) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetOnlineFeaturesRequestV2.EntityRow) + private static final feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow(); + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityRow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityRow(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FEATURES_FIELD_NUMBER = 4; + private java.util.List features_; + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + @java.lang.Override + public java.util.List + getFeaturesOrBuilderList() { + return features_; + } + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2 getFeatures(int index) { + return features_.get(index); + } + /** + *
+     * List of features that are being retrieved
+     * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder getFeaturesOrBuilder( + int index) { + return features_.get(index); + } + + public static final int ENTITY_ROWS_FIELD_NUMBER = 2; + private java.util.List entityRows_; + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + @java.lang.Override + public java.util.List getEntityRowsList() { + return entityRows_; + } + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + @java.lang.Override + public java.util.List + getEntityRowsOrBuilderList() { + return entityRows_; + } + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + @java.lang.Override + public int getEntityRowsCount() { + return entityRows_.size(); + } + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow getEntityRows(int index) { + return entityRows_.get(index); + } + /** + *
+     * List of entity rows, containing entity id and timestamp data.
+     * Used during retrieval of feature rows and for joining feature
+     * rows into a final dataset
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder getEntityRowsOrBuilder( + int index) { + return entityRows_.get(index); + } + + public static final int PROJECT_FIELD_NUMBER = 5; + private volatile java.lang.Object project_; + /** + *
+     * Optional field to specify project name override. If specified, uses the
+     * given project for retrieval. Overrides the projects specified in
+     * Feature References if both are specified.
+     * 
+ * + * string project = 5; + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + *
+     * Optional field to specify project name override. If specified, uses the
+     * given project for retrieval. Overrides the projects specified in
+     * Feature References if both are specified.
+     * 
+ * + * string project = 5; + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < entityRows_.size(); i++) { + output.writeMessage(2, entityRows_.get(i)); + } + for (int i = 0; i < features_.size(); i++) { + output.writeMessage(4, features_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, project_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entityRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, entityRows_.get(i)); + } + for (int i = 0; i < features_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, features_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, project_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 other = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2) obj; + + if (!getFeaturesList() + .equals(other.getFeaturesList())) return false; + if (!getEntityRowsList() + .equals(other.getEntityRowsList())) return false; + if (!getProject() + .equals(other.getProject())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFeaturesCount() > 0) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeaturesList().hashCode(); + } + if (getEntityRowsCount() > 0) { + hash = (37 * hash) + ENTITY_ROWS_FIELD_NUMBER; + hash = (53 * hash) + getEntityRowsList().hashCode(); + } + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * ToDo (oleksii): remove this message (since it's not used) and move EntityRow on package level
+     * 
+ * + * Protobuf type {@code feast.serving.GetOnlineFeaturesRequestV2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetOnlineFeaturesRequestV2) + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeaturesFieldBuilder(); + getEntityRowsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + featuresBuilder_.clear(); + } + if (entityRowsBuilder_ == null) { + entityRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + entityRowsBuilder_.clear(); + } + project_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 build() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 buildPartial() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 result = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2(this); + int from_bitField0_ = bitField0_; + if (featuresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + features_ = java.util.Collections.unmodifiableList(features_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.features_ = features_; + } else { + result.features_ = featuresBuilder_.build(); + } + if (entityRowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + entityRows_ = java.util.Collections.unmodifiableList(entityRows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.entityRows_ = entityRows_; + } else { + result.entityRows_ = entityRowsBuilder_.build(); + } + result.project_ = project_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 other) { + if (other == feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.getDefaultInstance()) return this; + if (featuresBuilder_ == null) { + if (!other.features_.isEmpty()) { + if (features_.isEmpty()) { + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeaturesIsMutable(); + features_.addAll(other.features_); + } + onChanged(); + } + } else { + if (!other.features_.isEmpty()) { + if (featuresBuilder_.isEmpty()) { + featuresBuilder_.dispose(); + featuresBuilder_ = null; + features_ = other.features_; + bitField0_ = (bitField0_ & ~0x00000001); + featuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeaturesFieldBuilder() : null; + } else { + featuresBuilder_.addAllMessages(other.features_); + } + } + } + if (entityRowsBuilder_ == null) { + if (!other.entityRows_.isEmpty()) { + if (entityRows_.isEmpty()) { + entityRows_ = other.entityRows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEntityRowsIsMutable(); + entityRows_.addAll(other.entityRows_); + } + onChanged(); + } + } else { + if (!other.entityRows_.isEmpty()) { + if (entityRowsBuilder_.isEmpty()) { + entityRowsBuilder_.dispose(); + entityRowsBuilder_ = null; + entityRows_ = other.entityRows_; + bitField0_ = (bitField0_ & ~0x00000002); + entityRowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEntityRowsFieldBuilder() : null; + } else { + entityRowsBuilder_.addAllMessages(other.entityRows_); + } + } + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List features_ = + java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + features_ = new java.util.ArrayList(features_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureReferenceV2, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder, feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder> featuresBuilder_; + + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public java.util.List getFeaturesList() { + if (featuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(features_); + } else { + return featuresBuilder_.getMessageList(); + } + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public int getFeaturesCount() { + if (featuresBuilder_ == null) { + return features_.size(); + } else { + return featuresBuilder_.getCount(); + } + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2 getFeatures(int index) { + if (featuresBuilder_ == null) { + return features_.get(index); + } else { + return featuresBuilder_.getMessage(index); + } + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder setFeatures( + int index, feast.proto.serving.ServingAPIProto.FeatureReferenceV2 value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.set(index, value); + onChanged(); + } else { + featuresBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder setFeatures( + int index, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.set(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder addFeatures(feast.proto.serving.ServingAPIProto.FeatureReferenceV2 value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(value); + onChanged(); + } else { + featuresBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder addFeatures( + int index, feast.proto.serving.ServingAPIProto.FeatureReferenceV2 value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeaturesIsMutable(); + features_.add(index, value); + onChanged(); + } else { + featuresBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder addFeatures( + feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder addFeatures( + int index, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder builderForValue) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.add(index, builderForValue.build()); + onChanged(); + } else { + featuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, features_); + onChanged(); + } else { + featuresBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + features_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + featuresBuilder_.clear(); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public Builder removeFeatures(int index) { + if (featuresBuilder_ == null) { + ensureFeaturesIsMutable(); + features_.remove(index); + onChanged(); + } else { + featuresBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder getFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().getBuilder(index); + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder getFeaturesOrBuilder( + int index) { + if (featuresBuilder_ == null) { + return features_.get(index); } else { + return featuresBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public java.util.List + getFeaturesOrBuilderList() { + if (featuresBuilder_ != null) { + return featuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(features_); + } + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder addFeaturesBuilder() { + return getFeaturesFieldBuilder().addBuilder( + feast.proto.serving.ServingAPIProto.FeatureReferenceV2.getDefaultInstance()); + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder addFeaturesBuilder( + int index) { + return getFeaturesFieldBuilder().addBuilder( + index, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.getDefaultInstance()); + } + /** + *
+       * List of features that are being retrieved
+       * 
+ * + * repeated .feast.serving.FeatureReferenceV2 features = 4; + */ + public java.util.List + getFeaturesBuilderList() { + return getFeaturesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureReferenceV2, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder, feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureReferenceV2, feast.proto.serving.ServingAPIProto.FeatureReferenceV2.Builder, feast.proto.serving.ServingAPIProto.FeatureReferenceV2OrBuilder>( + features_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + features_ = null; + } + return featuresBuilder_; + } + + private java.util.List entityRows_ = + java.util.Collections.emptyList(); + private void ensureEntityRowsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + entityRows_ = new java.util.ArrayList(entityRows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder> entityRowsBuilder_; + + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public java.util.List getEntityRowsList() { + if (entityRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entityRows_); + } else { + return entityRowsBuilder_.getMessageList(); + } + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public int getEntityRowsCount() { + if (entityRowsBuilder_ == null) { + return entityRows_.size(); + } else { + return entityRowsBuilder_.getCount(); + } + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow getEntityRows(int index) { + if (entityRowsBuilder_ == null) { + return entityRows_.get(index); + } else { + return entityRowsBuilder_.getMessage(index); + } + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder setEntityRows( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow value) { + if (entityRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityRowsIsMutable(); + entityRows_.set(index, value); + onChanged(); + } else { + entityRowsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder setEntityRows( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder builderForValue) { + if (entityRowsBuilder_ == null) { + ensureEntityRowsIsMutable(); + entityRows_.set(index, builderForValue.build()); + onChanged(); + } else { + entityRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder addEntityRows(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow value) { + if (entityRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityRowsIsMutable(); + entityRows_.add(value); + onChanged(); + } else { + entityRowsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder addEntityRows( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow value) { + if (entityRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityRowsIsMutable(); + entityRows_.add(index, value); + onChanged(); + } else { + entityRowsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder addEntityRows( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder builderForValue) { + if (entityRowsBuilder_ == null) { + ensureEntityRowsIsMutable(); + entityRows_.add(builderForValue.build()); + onChanged(); + } else { + entityRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder addEntityRows( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder builderForValue) { + if (entityRowsBuilder_ == null) { + ensureEntityRowsIsMutable(); + entityRows_.add(index, builderForValue.build()); + onChanged(); + } else { + entityRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder addAllEntityRows( + java.lang.Iterable values) { + if (entityRowsBuilder_ == null) { + ensureEntityRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, entityRows_); + onChanged(); + } else { + entityRowsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder clearEntityRows() { + if (entityRowsBuilder_ == null) { + entityRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + entityRowsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public Builder removeEntityRows(int index) { + if (entityRowsBuilder_ == null) { + ensureEntityRowsIsMutable(); + entityRows_.remove(index); + onChanged(); + } else { + entityRowsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder getEntityRowsBuilder( + int index) { + return getEntityRowsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder getEntityRowsOrBuilder( + int index) { + if (entityRowsBuilder_ == null) { + return entityRows_.get(index); } else { + return entityRowsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public java.util.List + getEntityRowsOrBuilderList() { + if (entityRowsBuilder_ != null) { + return entityRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entityRows_); + } + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder addEntityRowsBuilder() { + return getEntityRowsFieldBuilder().addBuilder( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.getDefaultInstance()); + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder addEntityRowsBuilder( + int index) { + return getEntityRowsFieldBuilder().addBuilder( + index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.getDefaultInstance()); + } + /** + *
+       * List of entity rows, containing entity id and timestamp data.
+       * Used during retrieval of feature rows and for joining feature
+       * rows into a final dataset
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesRequestV2.EntityRow entity_rows = 2; + */ + public java.util.List + getEntityRowsBuilderList() { + return getEntityRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder> + getEntityRowsFieldBuilder() { + if (entityRowsBuilder_ == null) { + entityRowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRow.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2.EntityRowOrBuilder>( + entityRows_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + entityRows_ = null; + } + return entityRowsBuilder_; + } + + private java.lang.Object project_ = ""; + /** + *
+       * Optional field to specify project name override. If specified, uses the
+       * given project for retrieval. Overrides the projects specified in
+       * Feature References if both are specified.
+       * 
+ * + * string project = 5; + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Optional field to specify project name override. If specified, uses the
+       * given project for retrieval. Overrides the projects specified in
+       * Feature References if both are specified.
+       * 
+ * + * string project = 5; + * @return The bytes for project. + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Optional field to specify project name override. If specified, uses the
+       * given project for retrieval. Overrides the projects specified in
+       * Feature References if both are specified.
+       * 
+ * + * string project = 5; + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional field to specify project name override. If specified, uses the
+       * given project for retrieval. Overrides the projects specified in
+       * Feature References if both are specified.
+       * 
+ * + * string project = 5; + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + *
+       * Optional field to specify project name override. If specified, uses the
+       * given project for retrieval. Overrides the projects specified in
+       * Feature References if both are specified.
+       * 
+ * + * string project = 5; + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetOnlineFeaturesRequestV2) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetOnlineFeaturesRequestV2) + private static final feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2(); + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOnlineFeaturesRequestV2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetOnlineFeaturesRequestV2(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestV2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FeatureListOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.FeatureList) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string val = 1; + * @return A list containing the val. + */ + java.util.List + getValList(); + /** + * repeated string val = 1; + * @return The count of val. + */ + int getValCount(); + /** + * repeated string val = 1; + * @param index The index of the element to return. + * @return The val at the given index. + */ + java.lang.String getVal(int index); + /** + * repeated string val = 1; + * @param index The index of the value to return. + * @return The bytes of the val at the given index. + */ + com.google.protobuf.ByteString + getValBytes(int index); + } + /** + *
+   * In JSON "val" field can be omitted
+   * 
+ * + * Protobuf type {@code feast.serving.FeatureList} + */ + public static final class FeatureList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.FeatureList) + FeatureListOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureList.newBuilder() to construct. + private FeatureList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeatureList() { + val_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeatureList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeatureList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + val_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + val_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + val_ = val_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.FeatureList.class, feast.proto.serving.ServingAPIProto.FeatureList.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList val_; + /** + * repeated string val = 1; + * @return A list containing the val. + */ + public com.google.protobuf.ProtocolStringList + getValList() { + return val_; + } + /** + * repeated string val = 1; + * @return The count of val. + */ + public int getValCount() { + return val_.size(); + } + /** + * repeated string val = 1; + * @param index The index of the element to return. + * @return The val at the given index. + */ + public java.lang.String getVal(int index) { + return val_.get(index); + } + /** + * repeated string val = 1; + * @param index The index of the value to return. + * @return The bytes of the val at the given index. + */ + public com.google.protobuf.ByteString + getValBytes(int index) { + return val_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, val_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < val_.size(); i++) { + dataSize += computeStringSizeNoTag(val_.getRaw(i)); + } + size += dataSize; + size += 1 * getValList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.FeatureList)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.FeatureList other = (feast.proto.serving.ServingAPIProto.FeatureList) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.FeatureList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.FeatureList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * In JSON "val" field can be omitted
+     * 
+ * + * Protobuf type {@code feast.serving.FeatureList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.FeatureList) + feast.proto.serving.ServingAPIProto.FeatureListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.FeatureList.class, feast.proto.serving.ServingAPIProto.FeatureList.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.FeatureList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + val_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_FeatureList_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList build() { + feast.proto.serving.ServingAPIProto.FeatureList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList buildPartial() { + feast.proto.serving.ServingAPIProto.FeatureList result = new feast.proto.serving.ServingAPIProto.FeatureList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + val_ = val_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.FeatureList) { + return mergeFrom((feast.proto.serving.ServingAPIProto.FeatureList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.FeatureList other) { + if (other == feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance()) return this; + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.FeatureList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.FeatureList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList val_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new com.google.protobuf.LazyStringArrayList(val_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string val = 1; + * @return A list containing the val. + */ + public com.google.protobuf.ProtocolStringList + getValList() { + return val_.getUnmodifiableView(); + } + /** + * repeated string val = 1; + * @return The count of val. + */ + public int getValCount() { + return val_.size(); + } + /** + * repeated string val = 1; + * @param index The index of the element to return. + * @return The val at the given index. + */ + public java.lang.String getVal(int index) { + return val_.get(index); + } + /** + * repeated string val = 1; + * @param index The index of the value to return. + * @return The bytes of the val at the given index. + */ + public com.google.protobuf.ByteString + getValBytes(int index) { + return val_.getByteString(index); + } + /** + * repeated string val = 1; + * @param index The index to set the value at. + * @param value The val to set. + * @return This builder for chaining. + */ + public Builder setVal( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string val = 1; + * @param value The val to add. + * @return This builder for chaining. + */ + public Builder addVal( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + return this; + } + /** + * repeated string val = 1; + * @param values The val to add. + * @return This builder for chaining. + */ + public Builder addAllVal( + java.lang.Iterable values) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + return this; + } + /** + * repeated string val = 1; + * @return This builder for chaining. + */ + public Builder clearVal() { + val_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string val = 1; + * @param value The bytes of the val to add. + * @return This builder for chaining. + */ + public Builder addValBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValIsMutable(); + val_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.FeatureList) + } + + // @@protoc_insertion_point(class_scope:feast.serving.FeatureList) + private static final feast.proto.serving.ServingAPIProto.FeatureList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.FeatureList(); + } + + public static feast.proto.serving.ServingAPIProto.FeatureList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetOnlineFeaturesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetOnlineFeaturesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string feature_service = 1; + * @return Whether the featureService field is set. + */ + boolean hasFeatureService(); + /** + * string feature_service = 1; + * @return The featureService. + */ + java.lang.String getFeatureService(); + /** + * string feature_service = 1; + * @return The bytes for featureService. + */ + com.google.protobuf.ByteString + getFeatureServiceBytes(); + + /** + * .feast.serving.FeatureList features = 2; + * @return Whether the features field is set. + */ + boolean hasFeatures(); + /** + * .feast.serving.FeatureList features = 2; + * @return The features. + */ + feast.proto.serving.ServingAPIProto.FeatureList getFeatures(); + /** + * .feast.serving.FeatureList features = 2; + */ + feast.proto.serving.ServingAPIProto.FeatureListOrBuilder getFeaturesOrBuilder(); + + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + int getEntitiesCount(); + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + boolean containsEntities( + java.lang.String key); + /** + * Use {@link #getEntitiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getEntities(); + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + java.util.Map + getEntitiesMap(); + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + + /* nullable */ +feast.proto.types.ValueProto.RepeatedValue getEntitiesOrDefault( + java.lang.String key, + /* nullable */ +feast.proto.types.ValueProto.RepeatedValue defaultValue); + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + + feast.proto.types.ValueProto.RepeatedValue getEntitiesOrThrow( + java.lang.String key); + + /** + * bool full_feature_names = 4; + * @return The fullFeatureNames. + */ + boolean getFullFeatureNames(); + + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + int getRequestContextCount(); + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + boolean containsRequestContext( + java.lang.String key); + /** + * Use {@link #getRequestContextMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getRequestContext(); + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + java.util.Map + getRequestContextMap(); + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + + /* nullable */ +feast.proto.types.ValueProto.RepeatedValue getRequestContextOrDefault( + java.lang.String key, + /* nullable */ +feast.proto.types.ValueProto.RepeatedValue defaultValue); + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + + feast.proto.types.ValueProto.RepeatedValue getRequestContextOrThrow( + java.lang.String key); + + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.KindCase getKindCase(); + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesRequest} + */ + public static final class GetOnlineFeaturesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetOnlineFeaturesRequest) + GetOnlineFeaturesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOnlineFeaturesRequest.newBuilder() to construct. + private GetOnlineFeaturesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOnlineFeaturesRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOnlineFeaturesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetOnlineFeaturesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 1; + kind_ = s; + break; + } + case 18: { + feast.proto.serving.ServingAPIProto.FeatureList.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((feast.proto.serving.ServingAPIProto.FeatureList) kind_).toBuilder(); + } + kind_ = + input.readMessage(feast.proto.serving.ServingAPIProto.FeatureList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((feast.proto.serving.ServingAPIProto.FeatureList) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + entities_ = com.google.protobuf.MapField.newMapField( + EntitiesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + entities__ = input.readMessage( + EntitiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + entities_.getMutableMap().put( + entities__.getKey(), entities__.getValue()); + break; + } + case 32: { + + fullFeatureNames_ = input.readBool(); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + requestContext_ = com.google.protobuf.MapField.newMapField( + RequestContextDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + requestContext__ = input.readMessage( + RequestContextDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + requestContext_.getMutableMap().put( + requestContext__.getKey(), requestContext__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetEntities(); + case 5: + return internalGetRequestContext(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.Builder.class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + public enum KindCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FEATURE_SERVICE(1), + FEATURES(2), + KIND_NOT_SET(0); + private final int value; + private KindCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: return FEATURE_SERVICE; + case 2: return FEATURES; + case 0: return KIND_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public static final int FEATURE_SERVICE_FIELD_NUMBER = 1; + /** + * string feature_service = 1; + * @return Whether the featureService field is set. + */ + public boolean hasFeatureService() { + return kindCase_ == 1; + } + /** + * string feature_service = 1; + * @return The featureService. + */ + public java.lang.String getFeatureService() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 1) { + kind_ = s; + } + return s; + } + } + /** + * string feature_service = 1; + * @return The bytes for featureService. + */ + public com.google.protobuf.ByteString + getFeatureServiceBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (kindCase_ == 1) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURES_FIELD_NUMBER = 2; + /** + * .feast.serving.FeatureList features = 2; + * @return Whether the features field is set. + */ + @java.lang.Override + public boolean hasFeatures() { + return kindCase_ == 2; + } + /** + * .feast.serving.FeatureList features = 2; + * @return The features. + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList getFeatures() { + if (kindCase_ == 2) { + return (feast.proto.serving.ServingAPIProto.FeatureList) kind_; + } + return feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } + /** + * .feast.serving.FeatureList features = 2; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureListOrBuilder getFeaturesOrBuilder() { + if (kindCase_ == 2) { + return (feast.proto.serving.ServingAPIProto.FeatureList) kind_; + } + return feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } + + public static final int ENTITIES_FIELD_NUMBER = 3; + private static final class EntitiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, feast.proto.types.ValueProto.RepeatedValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_EntitiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + feast.proto.types.ValueProto.RepeatedValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, feast.proto.types.ValueProto.RepeatedValue> entities_; + private com.google.protobuf.MapField + internalGetEntities() { + if (entities_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EntitiesDefaultEntryHolder.defaultEntry); + } + return entities_; + } + + public int getEntitiesCount() { + return internalGetEntities().getMap().size(); + } + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + + @java.lang.Override + public boolean containsEntities( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetEntities().getMap().containsKey(key); + } + /** + * Use {@link #getEntitiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEntities() { + return getEntitiesMap(); + } + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + @java.lang.Override + + public java.util.Map getEntitiesMap() { + return internalGetEntities().getMap(); + } + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getEntitiesOrDefault( + java.lang.String key, + feast.proto.types.ValueProto.RepeatedValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetEntities().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The entity data is specified in a columnar format
+     * A map of entity name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getEntitiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetEntities().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int FULL_FEATURE_NAMES_FIELD_NUMBER = 4; + private boolean fullFeatureNames_; + /** + * bool full_feature_names = 4; + * @return The fullFeatureNames. + */ + @java.lang.Override + public boolean getFullFeatureNames() { + return fullFeatureNames_; + } + + public static final int REQUEST_CONTEXT_FIELD_NUMBER = 5; + private static final class RequestContextDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, feast.proto.types.ValueProto.RepeatedValue> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_RequestContextEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + feast.proto.types.ValueProto.RepeatedValue.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, feast.proto.types.ValueProto.RepeatedValue> requestContext_; + private com.google.protobuf.MapField + internalGetRequestContext() { + if (requestContext_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RequestContextDefaultEntryHolder.defaultEntry); + } + return requestContext_; + } + + public int getRequestContextCount() { + return internalGetRequestContext().getMap().size(); + } + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + + @java.lang.Override + public boolean containsRequestContext( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRequestContext().getMap().containsKey(key); + } + /** + * Use {@link #getRequestContextMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRequestContext() { + return getRequestContextMap(); + } + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + @java.lang.Override + + public java.util.Map getRequestContextMap() { + return internalGetRequestContext().getMap(); + } + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getRequestContextOrDefault( + java.lang.String key, + feast.proto.types.ValueProto.RepeatedValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRequestContext().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Context for OnDemand Feature Transformation
+     * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+     * A map of variable name -> list of values
+     * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getRequestContextOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRequestContext().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (kindCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (feast.proto.serving.ServingAPIProto.FeatureList) kind_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetEntities(), + EntitiesDefaultEntryHolder.defaultEntry, + 3); + if (fullFeatureNames_ != false) { + output.writeBool(4, fullFeatureNames_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRequestContext(), + RequestContextDefaultEntryHolder.defaultEntry, + 5); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_); + } + if (kindCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (feast.proto.serving.ServingAPIProto.FeatureList) kind_); + } + for (java.util.Map.Entry entry + : internalGetEntities().getMap().entrySet()) { + com.google.protobuf.MapEntry + entities__ = EntitiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, entities__); + } + if (fullFeatureNames_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, fullFeatureNames_); + } + for (java.util.Map.Entry entry + : internalGetRequestContext().getMap().entrySet()) { + com.google.protobuf.MapEntry + requestContext__ = RequestContextDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, requestContext__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest other = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest) obj; + + if (!internalGetEntities().equals( + other.internalGetEntities())) return false; + if (getFullFeatureNames() + != other.getFullFeatureNames()) return false; + if (!internalGetRequestContext().equals( + other.internalGetRequestContext())) return false; + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (!getFeatureService() + .equals(other.getFeatureService())) return false; + break; + case 2: + if (!getFeatures() + .equals(other.getFeatures())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetEntities().getMap().isEmpty()) { + hash = (37 * hash) + ENTITIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetEntities().hashCode(); + } + hash = (37 * hash) + FULL_FEATURE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFullFeatureNames()); + if (!internalGetRequestContext().getMap().isEmpty()) { + hash = (37 * hash) + REQUEST_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + internalGetRequestContext().hashCode(); + } + switch (kindCase_) { + case 1: + hash = (37 * hash) + FEATURE_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getFeatureService().hashCode(); + break; + case 2: + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getFeatures().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetOnlineFeaturesRequest) + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetEntities(); + case 5: + return internalGetRequestContext(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableEntities(); + case 5: + return internalGetMutableRequestContext(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableEntities().clear(); + fullFeatureNames_ = false; + + internalGetMutableRequestContext().clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest build() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest buildPartial() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest result = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest(this); + int from_bitField0_ = bitField0_; + if (kindCase_ == 1) { + result.kind_ = kind_; + } + if (kindCase_ == 2) { + if (featuresBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = featuresBuilder_.build(); + } + } + result.entities_ = internalGetEntities(); + result.entities_.makeImmutable(); + result.fullFeatureNames_ = fullFeatureNames_; + result.requestContext_ = internalGetRequestContext(); + result.requestContext_.makeImmutable(); + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest other) { + if (other == feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest.getDefaultInstance()) return this; + internalGetMutableEntities().mergeFrom( + other.internalGetEntities()); + if (other.getFullFeatureNames() != false) { + setFullFeatureNames(other.getFullFeatureNames()); + } + internalGetMutableRequestContext().mergeFrom( + other.internalGetRequestContext()); + switch (other.getKindCase()) { + case FEATURE_SERVICE: { + kindCase_ = 1; + kind_ = other.kind_; + onChanged(); + break; + } + case FEATURES: { + mergeFeatures(other.getFeatures()); + break; + } + case KIND_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int kindCase_ = 0; + private java.lang.Object kind_; + public KindCase + getKindCase() { + return KindCase.forNumber( + kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * string feature_service = 1; + * @return Whether the featureService field is set. + */ + @java.lang.Override + public boolean hasFeatureService() { + return kindCase_ == 1; + } + /** + * string feature_service = 1; + * @return The featureService. + */ + @java.lang.Override + public java.lang.String getFeatureService() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 1) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string feature_service = 1; + * @return The bytes for featureService. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeatureServiceBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 1) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (kindCase_ == 1) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string feature_service = 1; + * @param value The featureService to set. + * @return This builder for chaining. + */ + public Builder setFeatureService( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 1; + kind_ = value; + onChanged(); + return this; + } + /** + * string feature_service = 1; + * @return This builder for chaining. + */ + public Builder clearFeatureService() { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + /** + * string feature_service = 1; + * @param value The bytes for featureService to set. + * @return This builder for chaining. + */ + public Builder setFeatureServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 1; + kind_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureList, feast.proto.serving.ServingAPIProto.FeatureList.Builder, feast.proto.serving.ServingAPIProto.FeatureListOrBuilder> featuresBuilder_; + /** + * .feast.serving.FeatureList features = 2; + * @return Whether the features field is set. + */ + @java.lang.Override + public boolean hasFeatures() { + return kindCase_ == 2; + } + /** + * .feast.serving.FeatureList features = 2; + * @return The features. + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList getFeatures() { + if (featuresBuilder_ == null) { + if (kindCase_ == 2) { + return (feast.proto.serving.ServingAPIProto.FeatureList) kind_; + } + return feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return featuresBuilder_.getMessage(); + } + return feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } + } + /** + * .feast.serving.FeatureList features = 2; + */ + public Builder setFeatures(feast.proto.serving.ServingAPIProto.FeatureList value) { + if (featuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + featuresBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; + } + /** + * .feast.serving.FeatureList features = 2; + */ + public Builder setFeatures( + feast.proto.serving.ServingAPIProto.FeatureList.Builder builderForValue) { + if (featuresBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + featuresBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; + } + /** + * .feast.serving.FeatureList features = 2; + */ + public Builder mergeFeatures(feast.proto.serving.ServingAPIProto.FeatureList value) { + if (featuresBuilder_ == null) { + if (kindCase_ == 2 && + kind_ != feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance()) { + kind_ = feast.proto.serving.ServingAPIProto.FeatureList.newBuilder((feast.proto.serving.ServingAPIProto.FeatureList) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + featuresBuilder_.mergeFrom(value); + } else { + featuresBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; + } + /** + * .feast.serving.FeatureList features = 2; + */ + public Builder clearFeatures() { + if (featuresBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + featuresBuilder_.clear(); + } + return this; + } + /** + * .feast.serving.FeatureList features = 2; + */ + public feast.proto.serving.ServingAPIProto.FeatureList.Builder getFeaturesBuilder() { + return getFeaturesFieldBuilder().getBuilder(); + } + /** + * .feast.serving.FeatureList features = 2; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureListOrBuilder getFeaturesOrBuilder() { + if ((kindCase_ == 2) && (featuresBuilder_ != null)) { + return featuresBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (feast.proto.serving.ServingAPIProto.FeatureList) kind_; + } + return feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } + } + /** + * .feast.serving.FeatureList features = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureList, feast.proto.serving.ServingAPIProto.FeatureList.Builder, feast.proto.serving.ServingAPIProto.FeatureListOrBuilder> + getFeaturesFieldBuilder() { + if (featuresBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance(); + } + featuresBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureList, feast.proto.serving.ServingAPIProto.FeatureList.Builder, feast.proto.serving.ServingAPIProto.FeatureListOrBuilder>( + (feast.proto.serving.ServingAPIProto.FeatureList) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; + onChanged();; + return featuresBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, feast.proto.types.ValueProto.RepeatedValue> entities_; + private com.google.protobuf.MapField + internalGetEntities() { + if (entities_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EntitiesDefaultEntryHolder.defaultEntry); + } + return entities_; + } + private com.google.protobuf.MapField + internalGetMutableEntities() { + onChanged();; + if (entities_ == null) { + entities_ = com.google.protobuf.MapField.newMapField( + EntitiesDefaultEntryHolder.defaultEntry); + } + if (!entities_.isMutable()) { + entities_ = entities_.copy(); + } + return entities_; + } + + public int getEntitiesCount() { + return internalGetEntities().getMap().size(); + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + + @java.lang.Override + public boolean containsEntities( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetEntities().getMap().containsKey(key); + } + /** + * Use {@link #getEntitiesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEntities() { + return getEntitiesMap(); + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + @java.lang.Override + + public java.util.Map getEntitiesMap() { + return internalGetEntities().getMap(); + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getEntitiesOrDefault( + java.lang.String key, + feast.proto.types.ValueProto.RepeatedValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetEntities().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getEntitiesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetEntities().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEntities() { + internalGetMutableEntities().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + + public Builder removeEntities( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableEntities().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableEntities() { + return internalGetMutableEntities().getMutableMap(); + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + public Builder putEntities( + java.lang.String key, + feast.proto.types.ValueProto.RepeatedValue value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableEntities().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The entity data is specified in a columnar format
+       * A map of entity name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> entities = 3; + */ + + public Builder putAllEntities( + java.util.Map values) { + internalGetMutableEntities().getMutableMap() + .putAll(values); + return this; + } + + private boolean fullFeatureNames_ ; + /** + * bool full_feature_names = 4; + * @return The fullFeatureNames. + */ + @java.lang.Override + public boolean getFullFeatureNames() { + return fullFeatureNames_; + } + /** + * bool full_feature_names = 4; + * @param value The fullFeatureNames to set. + * @return This builder for chaining. + */ + public Builder setFullFeatureNames(boolean value) { + + fullFeatureNames_ = value; + onChanged(); + return this; + } + /** + * bool full_feature_names = 4; + * @return This builder for chaining. + */ + public Builder clearFullFeatureNames() { + + fullFeatureNames_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, feast.proto.types.ValueProto.RepeatedValue> requestContext_; + private com.google.protobuf.MapField + internalGetRequestContext() { + if (requestContext_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RequestContextDefaultEntryHolder.defaultEntry); + } + return requestContext_; + } + private com.google.protobuf.MapField + internalGetMutableRequestContext() { + onChanged();; + if (requestContext_ == null) { + requestContext_ = com.google.protobuf.MapField.newMapField( + RequestContextDefaultEntryHolder.defaultEntry); + } + if (!requestContext_.isMutable()) { + requestContext_ = requestContext_.copy(); + } + return requestContext_; + } + + public int getRequestContextCount() { + return internalGetRequestContext().getMap().size(); + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + + @java.lang.Override + public boolean containsRequestContext( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRequestContext().getMap().containsKey(key); + } + /** + * Use {@link #getRequestContextMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRequestContext() { + return getRequestContextMap(); + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + @java.lang.Override + + public java.util.Map getRequestContextMap() { + return internalGetRequestContext().getMap(); + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getRequestContextOrDefault( + java.lang.String key, + feast.proto.types.ValueProto.RepeatedValue defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRequestContext().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + @java.lang.Override + + public feast.proto.types.ValueProto.RepeatedValue getRequestContextOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRequestContext().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRequestContext() { + internalGetMutableRequestContext().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + + public Builder removeRequestContext( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableRequestContext().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableRequestContext() { + return internalGetMutableRequestContext().getMutableMap(); + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + public Builder putRequestContext( + java.lang.String key, + feast.proto.types.ValueProto.RepeatedValue value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableRequestContext().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Context for OnDemand Feature Transformation
+       * (was moved to dedicated parameter to avoid unnecessary separation logic on serving side)
+       * A map of variable name -> list of values
+       * 
+ * + * map<string, .feast.types.RepeatedValue> request_context = 5; + */ + + public Builder putAllRequestContext( + java.util.Map values) { + internalGetMutableRequestContext().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetOnlineFeaturesRequest) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetOnlineFeaturesRequest) + private static final feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest(); + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOnlineFeaturesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetOnlineFeaturesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetOnlineFeaturesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetOnlineFeaturesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + * @return The metadata. + */ + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata getMetadata(); + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder getMetadataOrBuilder(); + + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + java.util.List + getResultsList(); + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector getResults(int index); + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + int getResultsCount(); + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder getResultsOrBuilder( + int index); + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesResponse} + */ + public static final class GetOnlineFeaturesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetOnlineFeaturesResponse) + GetOnlineFeaturesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOnlineFeaturesResponse.newBuilder() to construct. + private GetOnlineFeaturesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOnlineFeaturesResponse() { + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOnlineFeaturesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetOnlineFeaturesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.Builder.class); + } + + public interface FeatureVectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetOnlineFeaturesResponse.FeatureVector) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .feast.types.Value values = 1; + */ + java.util.List + getValuesList(); + /** + * repeated .feast.types.Value values = 1; + */ + feast.proto.types.ValueProto.Value getValues(int index); + /** + * repeated .feast.types.Value values = 1; + */ + int getValuesCount(); + /** + * repeated .feast.types.Value values = 1; + */ + java.util.List + getValuesOrBuilderList(); + /** + * repeated .feast.types.Value values = 1; + */ + feast.proto.types.ValueProto.ValueOrBuilder getValuesOrBuilder( + int index); + + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return A list containing the statuses. + */ + java.util.List getStatusesList(); + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return The count of statuses. + */ + int getStatusesCount(); + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index of the element to return. + * @return The statuses at the given index. + */ + feast.proto.serving.ServingAPIProto.FieldStatus getStatuses(int index); + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return A list containing the enum numeric values on the wire for statuses. + */ + java.util.List + getStatusesValueList(); + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of statuses at the given index. + */ + int getStatusesValue(int index); + + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + java.util.List + getEventTimestampsList(); + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + com.google.protobuf.Timestamp getEventTimestamps(int index); + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + int getEventTimestampsCount(); + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + java.util.List + getEventTimestampsOrBuilderList(); + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + com.google.protobuf.TimestampOrBuilder getEventTimestampsOrBuilder( + int index); + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesResponse.FeatureVector} + */ + public static final class FeatureVector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetOnlineFeaturesResponse.FeatureVector) + FeatureVectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureVector.newBuilder() to construct. + private FeatureVector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeatureVector() { + values_ = java.util.Collections.emptyList(); + statuses_ = java.util.Collections.emptyList(); + eventTimestamps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeatureVector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeatureVector( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add( + input.readMessage(feast.proto.types.ValueProto.Value.parser(), extensionRegistry)); + break; + } + case 16: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + statuses_.add(rawValue); + break; + } + case 18: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + statuses_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + eventTimestamps_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + eventTimestamps_.add( + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + eventTimestamps_ = java.util.Collections.unmodifiableList(eventTimestamps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + /** + * repeated .feast.types.Value values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * repeated .feast.types.Value values = 1; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * repeated .feast.types.Value values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * repeated .feast.types.Value values = 1; + */ + @java.lang.Override + public feast.proto.types.ValueProto.Value getValues(int index) { + return values_.get(index); + } + /** + * repeated .feast.types.Value values = 1; + */ + @java.lang.Override + public feast.proto.types.ValueProto.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + public static final int STATUSES_FIELD_NUMBER = 2; + private java.util.List statuses_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, feast.proto.serving.ServingAPIProto.FieldStatus> statuses_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, feast.proto.serving.ServingAPIProto.FieldStatus>() { + public feast.proto.serving.ServingAPIProto.FieldStatus convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + feast.proto.serving.ServingAPIProto.FieldStatus result = feast.proto.serving.ServingAPIProto.FieldStatus.valueOf(from); + return result == null ? feast.proto.serving.ServingAPIProto.FieldStatus.UNRECOGNIZED : result; + } + }; + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return A list containing the statuses. + */ + @java.lang.Override + public java.util.List getStatusesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, feast.proto.serving.ServingAPIProto.FieldStatus>(statuses_, statuses_converter_); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return The count of statuses. + */ + @java.lang.Override + public int getStatusesCount() { + return statuses_.size(); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index of the element to return. + * @return The statuses at the given index. + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FieldStatus getStatuses(int index) { + return statuses_converter_.convert(statuses_.get(index)); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return A list containing the enum numeric values on the wire for statuses. + */ + @java.lang.Override + public java.util.List + getStatusesValueList() { + return statuses_; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of statuses at the given index. + */ + @java.lang.Override + public int getStatusesValue(int index) { + return statuses_.get(index); + } + private int statusesMemoizedSerializedSize; + + public static final int EVENT_TIMESTAMPS_FIELD_NUMBER = 3; + private java.util.List eventTimestamps_; + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + @java.lang.Override + public java.util.List getEventTimestampsList() { + return eventTimestamps_; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + @java.lang.Override + public java.util.List + getEventTimestampsOrBuilderList() { + return eventTimestamps_; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + @java.lang.Override + public int getEventTimestampsCount() { + return eventTimestamps_.size(); + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEventTimestamps(int index) { + return eventTimestamps_.get(index); + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEventTimestampsOrBuilder( + int index) { + return eventTimestamps_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + if (getStatusesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(statusesMemoizedSerializedSize); + } + for (int i = 0; i < statuses_.size(); i++) { + output.writeEnumNoTag(statuses_.get(i)); + } + for (int i = 0; i < eventTimestamps_.size(); i++) { + output.writeMessage(3, eventTimestamps_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < statuses_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(statuses_.get(i)); + } + size += dataSize; + if (!getStatusesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }statusesMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < eventTimestamps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, eventTimestamps_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector other = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector) obj; + + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!statuses_.equals(other.statuses_)) return false; + if (!getEventTimestampsList() + .equals(other.getEventTimestampsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + if (getStatusesCount() > 0) { + hash = (37 * hash) + STATUSES_FIELD_NUMBER; + hash = (53 * hash) + statuses_.hashCode(); + } + if (getEventTimestampsCount() > 0) { + hash = (37 * hash) + EVENT_TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getEventTimestampsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesResponse.FeatureVector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetOnlineFeaturesResponse.FeatureVector) + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + getEventTimestampsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + if (eventTimestampsBuilder_ == null) { + eventTimestamps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + eventTimestampsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector build() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector buildPartial() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector result = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + statuses_ = java.util.Collections.unmodifiableList(statuses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.statuses_ = statuses_; + if (eventTimestampsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + eventTimestamps_ = java.util.Collections.unmodifiableList(eventTimestamps_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.eventTimestamps_ = eventTimestamps_; + } else { + result.eventTimestamps_ = eventTimestampsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector other) { + if (other == feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + if (!other.statuses_.isEmpty()) { + if (statuses_.isEmpty()) { + statuses_ = other.statuses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStatusesIsMutable(); + statuses_.addAll(other.statuses_); + } + onChanged(); + } + if (eventTimestampsBuilder_ == null) { + if (!other.eventTimestamps_.isEmpty()) { + if (eventTimestamps_.isEmpty()) { + eventTimestamps_ = other.eventTimestamps_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEventTimestampsIsMutable(); + eventTimestamps_.addAll(other.eventTimestamps_); + } + onChanged(); + } + } else { + if (!other.eventTimestamps_.isEmpty()) { + if (eventTimestampsBuilder_.isEmpty()) { + eventTimestampsBuilder_.dispose(); + eventTimestampsBuilder_ = null; + eventTimestamps_ = other.eventTimestamps_; + bitField0_ = (bitField0_ & ~0x00000004); + eventTimestampsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEventTimestampsFieldBuilder() : null; + } else { + eventTimestampsBuilder_.addAllMessages(other.eventTimestamps_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.types.ValueProto.Value, feast.proto.types.ValueProto.Value.Builder, feast.proto.types.ValueProto.ValueOrBuilder> valuesBuilder_; + + /** + * repeated .feast.types.Value values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * repeated .feast.types.Value values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * repeated .feast.types.Value values = 1; + */ + public feast.proto.types.ValueProto.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder setValues( + int index, feast.proto.types.ValueProto.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder setValues( + int index, feast.proto.types.ValueProto.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder addValues(feast.proto.types.ValueProto.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder addValues( + int index, feast.proto.types.ValueProto.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder addValues( + feast.proto.types.ValueProto.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder addValues( + int index, feast.proto.types.ValueProto.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * repeated .feast.types.Value values = 1; + */ + public feast.proto.types.ValueProto.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * repeated .feast.types.Value values = 1; + */ + public feast.proto.types.ValueProto.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .feast.types.Value values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * repeated .feast.types.Value values = 1; + */ + public feast.proto.types.ValueProto.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + feast.proto.types.ValueProto.Value.getDefaultInstance()); + } + /** + * repeated .feast.types.Value values = 1; + */ + public feast.proto.types.ValueProto.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, feast.proto.types.ValueProto.Value.getDefaultInstance()); + } + /** + * repeated .feast.types.Value values = 1; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.types.ValueProto.Value, feast.proto.types.ValueProto.Value.Builder, feast.proto.types.ValueProto.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.types.ValueProto.Value, feast.proto.types.ValueProto.Value.Builder, feast.proto.types.ValueProto.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + + private java.util.List statuses_ = + java.util.Collections.emptyList(); + private void ensureStatusesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + statuses_ = new java.util.ArrayList(statuses_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return A list containing the statuses. + */ + public java.util.List getStatusesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, feast.proto.serving.ServingAPIProto.FieldStatus>(statuses_, statuses_converter_); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return The count of statuses. + */ + public int getStatusesCount() { + return statuses_.size(); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index of the element to return. + * @return The statuses at the given index. + */ + public feast.proto.serving.ServingAPIProto.FieldStatus getStatuses(int index) { + return statuses_converter_.convert(statuses_.get(index)); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index to set the value at. + * @param value The statuses to set. + * @return This builder for chaining. + */ + public Builder setStatuses( + int index, feast.proto.serving.ServingAPIProto.FieldStatus value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param value The statuses to add. + * @return This builder for chaining. + */ + public Builder addStatuses(feast.proto.serving.ServingAPIProto.FieldStatus value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusesIsMutable(); + statuses_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param values The statuses to add. + * @return This builder for chaining. + */ + public Builder addAllStatuses( + java.lang.Iterable values) { + ensureStatusesIsMutable(); + for (feast.proto.serving.ServingAPIProto.FieldStatus value : values) { + statuses_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return This builder for chaining. + */ + public Builder clearStatuses() { + statuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @return A list containing the enum numeric values on the wire for statuses. + */ + public java.util.List + getStatusesValueList() { + return java.util.Collections.unmodifiableList(statuses_); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of statuses at the given index. + */ + public int getStatusesValue(int index) { + return statuses_.get(index); + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for statuses to set. + * @return This builder for chaining. + */ + public Builder setStatusesValue( + int index, int value) { + ensureStatusesIsMutable(); + statuses_.set(index, value); + onChanged(); + return this; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param value The enum numeric value on the wire for statuses to add. + * @return This builder for chaining. + */ + public Builder addStatusesValue(int value) { + ensureStatusesIsMutable(); + statuses_.add(value); + onChanged(); + return this; + } + /** + * repeated .feast.serving.FieldStatus statuses = 2; + * @param values The enum numeric values on the wire for statuses to add. + * @return This builder for chaining. + */ + public Builder addAllStatusesValue( + java.lang.Iterable values) { + ensureStatusesIsMutable(); + for (int value : values) { + statuses_.add(value); + } + onChanged(); + return this; + } + + private java.util.List eventTimestamps_ = + java.util.Collections.emptyList(); + private void ensureEventTimestampsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + eventTimestamps_ = new java.util.ArrayList(eventTimestamps_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> eventTimestampsBuilder_; + + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public java.util.List getEventTimestampsList() { + if (eventTimestampsBuilder_ == null) { + return java.util.Collections.unmodifiableList(eventTimestamps_); + } else { + return eventTimestampsBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public int getEventTimestampsCount() { + if (eventTimestampsBuilder_ == null) { + return eventTimestamps_.size(); + } else { + return eventTimestampsBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public com.google.protobuf.Timestamp getEventTimestamps(int index) { + if (eventTimestampsBuilder_ == null) { + return eventTimestamps_.get(index); + } else { + return eventTimestampsBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder setEventTimestamps( + int index, com.google.protobuf.Timestamp value) { + if (eventTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventTimestampsIsMutable(); + eventTimestamps_.set(index, value); + onChanged(); + } else { + eventTimestampsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder setEventTimestamps( + int index, com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimestampsBuilder_ == null) { + ensureEventTimestampsIsMutable(); + eventTimestamps_.set(index, builderForValue.build()); + onChanged(); + } else { + eventTimestampsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder addEventTimestamps(com.google.protobuf.Timestamp value) { + if (eventTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventTimestampsIsMutable(); + eventTimestamps_.add(value); + onChanged(); + } else { + eventTimestampsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder addEventTimestamps( + int index, com.google.protobuf.Timestamp value) { + if (eventTimestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventTimestampsIsMutable(); + eventTimestamps_.add(index, value); + onChanged(); + } else { + eventTimestampsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder addEventTimestamps( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimestampsBuilder_ == null) { + ensureEventTimestampsIsMutable(); + eventTimestamps_.add(builderForValue.build()); + onChanged(); + } else { + eventTimestampsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder addEventTimestamps( + int index, com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimestampsBuilder_ == null) { + ensureEventTimestampsIsMutable(); + eventTimestamps_.add(index, builderForValue.build()); + onChanged(); + } else { + eventTimestampsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder addAllEventTimestamps( + java.lang.Iterable values) { + if (eventTimestampsBuilder_ == null) { + ensureEventTimestampsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, eventTimestamps_); + onChanged(); + } else { + eventTimestampsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder clearEventTimestamps() { + if (eventTimestampsBuilder_ == null) { + eventTimestamps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + eventTimestampsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public Builder removeEventTimestamps(int index) { + if (eventTimestampsBuilder_ == null) { + ensureEventTimestampsIsMutable(); + eventTimestamps_.remove(index); + onChanged(); + } else { + eventTimestampsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public com.google.protobuf.Timestamp.Builder getEventTimestampsBuilder( + int index) { + return getEventTimestampsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEventTimestampsOrBuilder( + int index) { + if (eventTimestampsBuilder_ == null) { + return eventTimestamps_.get(index); } else { + return eventTimestampsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public java.util.List + getEventTimestampsOrBuilderList() { + if (eventTimestampsBuilder_ != null) { + return eventTimestampsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(eventTimestamps_); + } + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public com.google.protobuf.Timestamp.Builder addEventTimestampsBuilder() { + return getEventTimestampsFieldBuilder().addBuilder( + com.google.protobuf.Timestamp.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public com.google.protobuf.Timestamp.Builder addEventTimestampsBuilder( + int index) { + return getEventTimestampsFieldBuilder().addBuilder( + index, com.google.protobuf.Timestamp.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Timestamp event_timestamps = 3; + */ + public java.util.List + getEventTimestampsBuilderList() { + return getEventTimestampsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEventTimestampsFieldBuilder() { + if (eventTimestampsBuilder_ == null) { + eventTimestampsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + eventTimestamps_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + eventTimestamps_ = null; + } + return eventTimestampsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetOnlineFeaturesResponse.FeatureVector) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetOnlineFeaturesResponse.FeatureVector) + private static final feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector(); + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureVector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeatureVector(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int METADATA_FIELD_NUMBER = 1; + private feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata metadata_; + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + * @return The metadata. + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata getMetadata() { + return metadata_ == null ? feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.getDefaultInstance() : metadata_; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int RESULTS_FIELD_NUMBER = 2; + private java.util.List results_; + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector getResults(int index) { + return results_.get(index); + } + /** + *
+     * Length of "results" array should match length of requested features.
+     * We also preserve the same order of features here as in metadata.feature_names
+     * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (metadata_ != null) { + output.writeMessage(1, getMetadata()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(2, results_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMetadata()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, results_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse other = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse) obj; + + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetOnlineFeaturesResponse) + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse build() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse buildPartial() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse result = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse(this); + int from_bitField0_ = bitField0_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse other) { + if (other == feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.getDefaultInstance()) return this; + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder> metadataBuilder_; + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + * @return The metadata. + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + public Builder setMetadata(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + public Builder setMetadata( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + public Builder mergeMetadata(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.getDefaultInstance() : metadata_; + } + } + /** + * .feast.serving.GetOnlineFeaturesResponseMetadata metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder> resultsBuilder_; + + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder setResults( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder setResults( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder addResults(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder addResults( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder addResults( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder addResults( + int index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.getDefaultInstance()); + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.getDefaultInstance()); + } + /** + *
+       * Length of "results" array should match length of requested features.
+       * We also preserve the same order of features here as in metadata.feature_names
+       * 
+ * + * repeated .feast.serving.GetOnlineFeaturesResponse.FeatureVector results = 2; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVector.Builder, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse.FeatureVectorOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetOnlineFeaturesResponse) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetOnlineFeaturesResponse) + private static final feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse(); + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOnlineFeaturesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetOnlineFeaturesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetOnlineFeaturesResponseMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:feast.serving.GetOnlineFeaturesResponseMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * .feast.serving.FeatureList feature_names = 1; + * @return Whether the featureNames field is set. + */ + boolean hasFeatureNames(); + /** + * .feast.serving.FeatureList feature_names = 1; + * @return The featureNames. + */ + feast.proto.serving.ServingAPIProto.FeatureList getFeatureNames(); + /** + * .feast.serving.FeatureList feature_names = 1; + */ + feast.proto.serving.ServingAPIProto.FeatureListOrBuilder getFeatureNamesOrBuilder(); + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesResponseMetadata} + */ + public static final class GetOnlineFeaturesResponseMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:feast.serving.GetOnlineFeaturesResponseMetadata) + GetOnlineFeaturesResponseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOnlineFeaturesResponseMetadata.newBuilder() to construct. + private GetOnlineFeaturesResponseMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetOnlineFeaturesResponseMetadata() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetOnlineFeaturesResponseMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetOnlineFeaturesResponseMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + feast.proto.serving.ServingAPIProto.FeatureList.Builder subBuilder = null; + if (featureNames_ != null) { + subBuilder = featureNames_.toBuilder(); + } + featureNames_ = input.readMessage(feast.proto.serving.ServingAPIProto.FeatureList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(featureNames_); + featureNames_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder.class); + } + + public static final int FEATURE_NAMES_FIELD_NUMBER = 1; + private feast.proto.serving.ServingAPIProto.FeatureList featureNames_; + /** + * .feast.serving.FeatureList feature_names = 1; + * @return Whether the featureNames field is set. + */ + @java.lang.Override + public boolean hasFeatureNames() { + return featureNames_ != null; + } + /** + * .feast.serving.FeatureList feature_names = 1; + * @return The featureNames. + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureList getFeatureNames() { + return featureNames_ == null ? feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance() : featureNames_; + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + @java.lang.Override + public feast.proto.serving.ServingAPIProto.FeatureListOrBuilder getFeatureNamesOrBuilder() { + return getFeatureNames(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (featureNames_ != null) { + output.writeMessage(1, getFeatureNames()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (featureNames_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFeatureNames()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata)) { + return super.equals(obj); + } + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata other = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata) obj; + + if (hasFeatureNames() != other.hasFeatureNames()) return false; + if (hasFeatureNames()) { + if (!getFeatureNames() + .equals(other.getFeatureNames())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFeatureNames()) { + hash = (37 * hash) + FEATURE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getFeatureNames().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code feast.serving.GetOnlineFeaturesResponseMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:feast.serving.GetOnlineFeaturesResponseMetadata) + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.class, feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.Builder.class); + } + + // Construct using feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (featureNamesBuilder_ == null) { + featureNames_ = null; + } else { + featureNames_ = null; + featureNamesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return feast.proto.serving.ServingAPIProto.internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_descriptor; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata getDefaultInstanceForType() { + return feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.getDefaultInstance(); + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata build() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata buildPartial() { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata result = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata(this); + if (featureNamesBuilder_ == null) { + result.featureNames_ = featureNames_; + } else { + result.featureNames_ = featureNamesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata) { + return mergeFrom((feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata other) { + if (other == feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata.getDefaultInstance()) return this; + if (other.hasFeatureNames()) { + mergeFeatureNames(other.getFeatureNames()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private feast.proto.serving.ServingAPIProto.FeatureList featureNames_; + private com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureList, feast.proto.serving.ServingAPIProto.FeatureList.Builder, feast.proto.serving.ServingAPIProto.FeatureListOrBuilder> featureNamesBuilder_; + /** + * .feast.serving.FeatureList feature_names = 1; + * @return Whether the featureNames field is set. + */ + public boolean hasFeatureNames() { + return featureNamesBuilder_ != null || featureNames_ != null; + } + /** + * .feast.serving.FeatureList feature_names = 1; + * @return The featureNames. + */ + public feast.proto.serving.ServingAPIProto.FeatureList getFeatureNames() { + if (featureNamesBuilder_ == null) { + return featureNames_ == null ? feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance() : featureNames_; + } else { + return featureNamesBuilder_.getMessage(); + } + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + public Builder setFeatureNames(feast.proto.serving.ServingAPIProto.FeatureList value) { + if (featureNamesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureNames_ = value; + onChanged(); + } else { + featureNamesBuilder_.setMessage(value); + } + + return this; + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + public Builder setFeatureNames( + feast.proto.serving.ServingAPIProto.FeatureList.Builder builderForValue) { + if (featureNamesBuilder_ == null) { + featureNames_ = builderForValue.build(); + onChanged(); + } else { + featureNamesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + public Builder mergeFeatureNames(feast.proto.serving.ServingAPIProto.FeatureList value) { + if (featureNamesBuilder_ == null) { + if (featureNames_ != null) { + featureNames_ = + feast.proto.serving.ServingAPIProto.FeatureList.newBuilder(featureNames_).mergeFrom(value).buildPartial(); + } else { + featureNames_ = value; + } + onChanged(); + } else { + featureNamesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + public Builder clearFeatureNames() { + if (featureNamesBuilder_ == null) { + featureNames_ = null; + onChanged(); + } else { + featureNames_ = null; + featureNamesBuilder_ = null; + } + + return this; + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + public feast.proto.serving.ServingAPIProto.FeatureList.Builder getFeatureNamesBuilder() { + + onChanged(); + return getFeatureNamesFieldBuilder().getBuilder(); + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + public feast.proto.serving.ServingAPIProto.FeatureListOrBuilder getFeatureNamesOrBuilder() { + if (featureNamesBuilder_ != null) { + return featureNamesBuilder_.getMessageOrBuilder(); + } else { + return featureNames_ == null ? + feast.proto.serving.ServingAPIProto.FeatureList.getDefaultInstance() : featureNames_; + } + } + /** + * .feast.serving.FeatureList feature_names = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureList, feast.proto.serving.ServingAPIProto.FeatureList.Builder, feast.proto.serving.ServingAPIProto.FeatureListOrBuilder> + getFeatureNamesFieldBuilder() { + if (featureNamesBuilder_ == null) { + featureNamesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + feast.proto.serving.ServingAPIProto.FeatureList, feast.proto.serving.ServingAPIProto.FeatureList.Builder, feast.proto.serving.ServingAPIProto.FeatureListOrBuilder>( + getFeatureNames(), + getParentForChildren(), + isClean()); + featureNames_ = null; + } + return featureNamesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:feast.serving.GetOnlineFeaturesResponseMetadata) + } + + // @@protoc_insertion_point(class_scope:feast.serving.GetOnlineFeaturesResponseMetadata) + private static final feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata(); + } + + public static feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOnlineFeaturesResponseMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetOnlineFeaturesResponseMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public feast.proto.serving.ServingAPIProto.GetOnlineFeaturesResponseMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetFeastServingInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetFeastServingInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetFeastServingInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetFeastServingInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_FeatureReferenceV2_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_FeatureReferenceV2_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesRequestV2_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_FieldsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_FieldsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_FeatureList_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_FeatureList_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesRequest_EntitiesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesRequest_EntitiesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesRequest_RequestContextEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesRequest_RequestContextEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"feast/serving/ServingService.proto\022\rfe" + + "ast.serving\032\037google/protobuf/timestamp.p" + + "roto\032\027feast/types/Value.proto\"\034\n\032GetFeas" + + "tServingInfoRequest\".\n\033GetFeastServingIn" + + "foResponse\022\017\n\007version\030\001 \001(\t\"E\n\022FeatureRe" + + "ferenceV2\022\031\n\021feature_view_name\030\001 \001(\t\022\024\n\014" + + "feature_name\030\002 \001(\t\"\375\002\n\032GetOnlineFeatures" + + "RequestV2\0223\n\010features\030\004 \003(\0132!.feast.serv" + + "ing.FeatureReferenceV2\022H\n\013entity_rows\030\002 " + + "\003(\01323.feast.serving.GetOnlineFeaturesReq" + + "uestV2.EntityRow\022\017\n\007project\030\005 \001(\t\032\316\001\n\tEn" + + "tityRow\022-\n\ttimestamp\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022O\n\006fields\030\002 \003(\0132?.feast.s" + + "erving.GetOnlineFeaturesRequestV2.Entity" + + "Row.FieldsEntry\032A\n\013FieldsEntry\022\013\n\003key\030\001 " + + "\001(\t\022!\n\005value\030\002 \001(\0132\022.feast.types.Value:\002" + + "8\001\"\032\n\013FeatureList\022\013\n\003val\030\001 \003(\t\"\310\003\n\030GetOn" + + "lineFeaturesRequest\022\031\n\017feature_service\030\001" + + " \001(\tH\000\022.\n\010features\030\002 \001(\0132\032.feast.serving" + + ".FeatureListH\000\022G\n\010entities\030\003 \003(\01325.feast" + + ".serving.GetOnlineFeaturesRequest.Entiti" + + "esEntry\022\032\n\022full_feature_names\030\004 \001(\010\022T\n\017r" + + "equest_context\030\005 \003(\0132;.feast.serving.Get" + + "OnlineFeaturesRequest.RequestContextEntr" + + "y\032K\n\rEntitiesEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value" + + "\030\002 \001(\0132\032.feast.types.RepeatedValue:\0028\001\032Q" + + "\n\023RequestContextEntry\022\013\n\003key\030\001 \001(\t\022)\n\005va" + + "lue\030\002 \001(\0132\032.feast.types.RepeatedValue:\0028" + + "\001B\006\n\004kind\"\302\002\n\031GetOnlineFeaturesResponse\022" + + "B\n\010metadata\030\001 \001(\01320.feast.serving.GetOnl" + + "ineFeaturesResponseMetadata\022G\n\007results\030\002" + + " \003(\01326.feast.serving.GetOnlineFeaturesRe" + + "sponse.FeatureVector\032\227\001\n\rFeatureVector\022\"" + + "\n\006values\030\001 \003(\0132\022.feast.types.Value\022,\n\010st" + + "atuses\030\002 \003(\0162\032.feast.serving.FieldStatus" + + "\0224\n\020event_timestamps\030\003 \003(\0132\032.google.prot" + + "obuf.Timestamp\"V\n!GetOnlineFeaturesRespo" + + "nseMetadata\0221\n\rfeature_names\030\001 \001(\0132\032.fea" + + "st.serving.FeatureList*[\n\013FieldStatus\022\013\n" + + "\007INVALID\020\000\022\013\n\007PRESENT\020\001\022\016\n\nNULL_VALUE\020\002\022" + + "\r\n\tNOT_FOUND\020\003\022\023\n\017OUTSIDE_MAX_AGE\020\0042\346\001\n\016" + + "ServingService\022l\n\023GetFeastServingInfo\022)." + + "feast.serving.GetFeastServingInfoRequest" + + "\032*.feast.serving.GetFeastServingInfoResp" + + "onse\022f\n\021GetOnlineFeatures\022\'.feast.servin" + + "g.GetOnlineFeaturesRequest\032(.feast.servi" + + "ng.GetOnlineFeaturesResponseBZ\n\023feast.pr" + + "oto.servingB\017ServingAPIProtoZ2github.com" + + "/feast-dev/feast/go/protos/feast/serving" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + feast.proto.types.ValueProto.getDescriptor(), + }); + internal_static_feast_serving_GetFeastServingInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_feast_serving_GetFeastServingInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetFeastServingInfoRequest_descriptor, + new java.lang.String[] { }); + internal_static_feast_serving_GetFeastServingInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_feast_serving_GetFeastServingInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetFeastServingInfoResponse_descriptor, + new java.lang.String[] { "Version", }); + internal_static_feast_serving_FeatureReferenceV2_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_feast_serving_FeatureReferenceV2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_FeatureReferenceV2_descriptor, + new java.lang.String[] { "FeatureViewName", "FeatureName", }); + internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_feast_serving_GetOnlineFeaturesRequestV2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor, + new java.lang.String[] { "Features", "EntityRows", "Project", }); + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor = + internal_static_feast_serving_GetOnlineFeaturesRequestV2_descriptor.getNestedTypes().get(0); + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor, + new java.lang.String[] { "Timestamp", "Fields", }); + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_FieldsEntry_descriptor = + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_descriptor.getNestedTypes().get(0); + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_FieldsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesRequestV2_EntityRow_FieldsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_feast_serving_FeatureList_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_feast_serving_FeatureList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_FeatureList_descriptor, + new java.lang.String[] { "Val", }); + internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_feast_serving_GetOnlineFeaturesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor, + new java.lang.String[] { "FeatureService", "Features", "Entities", "FullFeatureNames", "RequestContext", "Kind", }); + internal_static_feast_serving_GetOnlineFeaturesRequest_EntitiesEntry_descriptor = + internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor.getNestedTypes().get(0); + internal_static_feast_serving_GetOnlineFeaturesRequest_EntitiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesRequest_EntitiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_feast_serving_GetOnlineFeaturesRequest_RequestContextEntry_descriptor = + internal_static_feast_serving_GetOnlineFeaturesRequest_descriptor.getNestedTypes().get(1); + internal_static_feast_serving_GetOnlineFeaturesRequest_RequestContextEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesRequest_RequestContextEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_feast_serving_GetOnlineFeaturesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor, + new java.lang.String[] { "Metadata", "Results", }); + internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_descriptor = + internal_static_feast_serving_GetOnlineFeaturesResponse_descriptor.getNestedTypes().get(0); + internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesResponse_FeatureVector_descriptor, + new java.lang.String[] { "Values", "Statuses", "EventTimestamps", }); + internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_feast_serving_GetOnlineFeaturesResponseMetadata_descriptor, + new java.lang.String[] { "FeatureNames", }); + com.google.protobuf.TimestampProto.getDescriptor(); + feast.proto.types.ValueProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +}