The version filter is optional; If not provided, this method will return all featureSet * versions of the featureSet name provided. Valid version filters should optionally contain a - * comparator (<, <=, >, etc) and a version number, e.g. 10, <10, >=1 + * comparator (<, <=, >, etc) and a version number, e.g. 10, <10, >=1 * * @param filter filter containing the desired featureSet name and version filter * @return ListFeatureSetsResponse with list of featureSets found matching the filter diff --git a/core/src/main/java/feast/core/util/PackageUtil.java b/core/src/main/java/feast/core/util/PackageUtil.java index ef27332ac0..20b2310644 100644 --- a/core/src/main/java/feast/core/util/PackageUtil.java +++ b/core/src/main/java/feast/core/util/PackageUtil.java @@ -49,8 +49,9 @@ public class PackageUtil { * handled by default in Apache Beam. * *
- * @code + ** URL url = new URL("jar:file:/tmp/springexample/target/spring-example-1.0-SNAPSHOT.jar!/BOOT-INF/lib/beam-sdks-java-core-2.16.0.jar!/"); + *
* String resolvedPath = resolveSpringBootPackageClasspath(url); * // resolvedPath should point to "/tmp/springexample/target/spring-example-1.0-SNAPSHOT/BOOT-INF/lib/beam-sdks-java-core-2.16.0.jar" * // Note that spring-example-1.0-SNAPSHOT.jar is extracted in the process. diff --git a/core/src/main/proto/feast b/core/src/main/proto/feast deleted file mode 120000 index d520da9126..0000000000 --- a/core/src/main/proto/feast +++ /dev/null @@ -1 +0,0 @@ -../../../../protos/feast \ No newline at end of file diff --git a/core/src/main/proto/third_party b/core/src/main/proto/third_party deleted file mode 120000 index 363d20598e..0000000000 --- a/core/src/main/proto/third_party +++ /dev/null @@ -1 +0,0 @@ -../../../../protos/third_party \ No newline at end of file diff --git a/datatypes/java/README.md b/datatypes/java/README.md new file mode 100644 index 0000000000..a062144ff3 --- /dev/null +++ b/datatypes/java/README.md @@ -0,0 +1,43 @@ +Feast Data Types for Java +========================= + +This module produces Java class files for Feast's data type and gRPC service +definitions, from Protobuf IDL. These are used across Feast components for wire +interchange, contracts, etc. + +End users of Feast will be best served by our Java SDK which adds higher-level +conveniences, but the data types are published independently for custom needs, +without any additional dependencies the SDK may add. + +Dependency Coordinates +---------------------- + +```xml ++ +``` + +Using the `.proto` Definitions +------------------------------ + +The `.proto` definitions are packaged as resources within the Maven artifact, +which may be useful to `include` them in dependent Protobuf definitions in a +downstream project, or for other JVM languages to consume from their builds to +generate more idiomatic bindings. + +Google's Gradle plugin, for instance, [can use protos in dependencies][Gradle] +either for `include` or to compile with a different `protoc` plugin than Java. + +[sbt-protoc] offers similar functionality for sbt/Scala. + +[Gradle]: https://github.com/google/protobuf-gradle-plugin#protos-in-dependencies +[sbt-protoc]: https://github.com/thesamet/sbt-protoc + +Publishing +---------- + +TODO: this module should be published to Maven Central upon Feast releases—this +needs to be set up in POM configuration and release automation. diff --git a/datatypes/java/pom.xml b/datatypes/java/pom.xml new file mode 100644 index 0000000000..a6dfa8e345 --- /dev/null +++ b/datatypes/java/pom.xml @@ -0,0 +1,72 @@ + + +dev.feast +datatypes-java +0.3.6-SNAPSHOT ++ diff --git a/sdk/java/src/main/proto/feast b/datatypes/java/src/main/proto/feast similarity index 100% rename from sdk/java/src/main/proto/feast rename to datatypes/java/src/main/proto/feast diff --git a/datatypes/java/src/main/proto/third_party b/datatypes/java/src/main/proto/third_party new file mode 120000 index 0000000000..f015f8477d --- /dev/null +++ b/datatypes/java/src/main/proto/third_party @@ -0,0 +1 @@ +../../../../../protos/third_party \ No newline at end of file diff --git a/infra/docker/core/Dockerfile b/infra/docker/core/Dockerfile index c4cfe34b71..91ef030dc9 100644 --- a/infra/docker/core/Dockerfile +++ b/infra/docker/core/Dockerfile @@ -12,7 +12,7 @@ WORKDIR /build # the existing .m2 directory to $FEAST_REPO_ROOT/.m2 # ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false" -RUN mvn --also-make --projects core,ingestion -Drevision=$REVISION \ +RUN mvn --also-make --projects core,ingestion \ -DskipTests=true --batch-mode package # # Unpack the jar and copy the files into production Docker image diff --git a/infra/docker/serving/Dockerfile b/infra/docker/serving/Dockerfile index 3517183d78..5605c8846d 100644 --- a/infra/docker/serving/Dockerfile +++ b/infra/docker/serving/Dockerfile @@ -12,7 +12,7 @@ WORKDIR /build # the existing .m2 directory to $FEAST_REPO_ROOT/.m2 # ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false" -RUN mvn --also-make --projects serving -Drevision=$REVISION \ +RUN mvn --also-make --projects serving \ -DskipTests=true --batch-mode package # ============================================================ diff --git a/ingestion/pom.xml b/ingestion/pom.xml index 72ac60578b..35ca4eb698 100644 --- a/ingestion/pom.xml +++ b/ingestion/pom.xml @@ -21,7 +21,7 @@4.0.0 + +Feast Data Types for Java ++ Data types and service contracts used throughout Feast components and + their interchanges. These are generated from Protocol Buffers and gRPC + definitions included in the package. + +datatypes-java + ++ + +dev.feast +feast-parent +${revision} +../.. ++ + ++ ++ +org.xolstice.maven.plugins +protobuf-maven-plugin ++ +true ++ com.google.protobuf:protoc:${protocVersion}:exe:${os.detected.classifier} + +grpc-java ++ io.grpc:protoc-gen-grpc-java:${grpcVersion}:exe:${os.detected.classifier} + ++ ++ ++ +compile +compile-custom +test-compile ++ ++ +io.grpc +grpc-services +4.0.0 - @@ -31,10 +31,6 @@feast +dev.feast feast-parent ${revision} - - org.xolstice.maven.plugins -protobuf-maven-plugin -org.apache.maven.plugins maven-shade-plugin @@ -90,6 +86,12 @@+ + +dev.feast +datatypes-java +${project.version} +org.glassfish javax.el diff --git a/ingestion/src/main/proto/feast b/ingestion/src/main/proto/feast deleted file mode 120000 index d520da9126..0000000000 --- a/ingestion/src/main/proto/feast +++ /dev/null @@ -1 +0,0 @@ -../../../../protos/feast \ No newline at end of file diff --git a/ingestion/src/main/proto/feast_ingestion/types/CoalesceAccum.proto b/ingestion/src/main/proto/feast_ingestion/types/CoalesceAccum.proto deleted file mode 100644 index cb64dd715f..0000000000 --- a/ingestion/src/main/proto/feast_ingestion/types/CoalesceAccum.proto +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2018 The Feast Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -syntax = "proto3"; - -import "google/protobuf/timestamp.proto"; -import "feast/types/Field.proto"; - -option java_package = "feast_ingestion.types"; -option java_outer_classname = "CoalesceAccumProto"; - -// Accumlator for merging feature rows. -message CoalesceAccum { - string entityKey = 1; - google.protobuf.Timestamp eventTimestamp = 3; - string entityName = 4; - - mapfeatures = 6; - // map of features to their counter values when they were last added to accumulator - map featureMarks = 7; - int64 counter = 8; -} \ No newline at end of file diff --git a/ingestion/src/main/proto/feast_ingestion/types/CoalesceKey.proto b/ingestion/src/main/proto/feast_ingestion/types/CoalesceKey.proto deleted file mode 100644 index 9730b49ec3..0000000000 --- a/ingestion/src/main/proto/feast_ingestion/types/CoalesceKey.proto +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2018 The Feast Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -syntax = "proto3"; - -option java_package = "feast_ingestion.types"; -option java_outer_classname = "CoalesceKeyProto"; - -message CoalesceKey { - string entityName = 1; - string entityKey = 2; -} \ No newline at end of file diff --git a/ingestion/src/main/proto/third_party b/ingestion/src/main/proto/third_party deleted file mode 120000 index 363d20598e..0000000000 --- a/ingestion/src/main/proto/third_party +++ /dev/null @@ -1 +0,0 @@ -../../../../protos/third_party \ No newline at end of file diff --git a/ingestion/src/test/proto/DriverArea.proto b/ingestion/src/test/proto/DriverArea.proto deleted file mode 100644 index fee838b9e1..0000000000 --- a/ingestion/src/test/proto/DriverArea.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package feast; - -option java_outer_classname = "DriverAreaProto"; - -message DriverArea { - int32 driverId = 1; - int32 areaId = 2; -} \ No newline at end of file diff --git a/ingestion/src/test/proto/Ping.proto b/ingestion/src/test/proto/Ping.proto deleted file mode 100644 index b1069afa5b..0000000000 --- a/ingestion/src/test/proto/Ping.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package feast; -import "google/protobuf/timestamp.proto"; - -option java_outer_classname = "PingProto"; - -message Ping { - double lat = 1; - double lng = 2; - google.protobuf.Timestamp timestamp = 3; -} diff --git a/pom.xml b/pom.xml index 9858674067..28011960cc 100644 --- a/pom.xml +++ b/pom.xml @@ -22,12 +22,13 @@ Feature Store for Machine Learning ${github.url} -feast +dev.feast feast-parent ${revision} pom + datatypes/java ingestion core serving @@ -35,7 +36,7 @@- 0.3.2-SNAPSHOT +0.3.6-SNAPSHOT https://github.com/gojek/feast UTF-8 @@ -48,7 +49,6 @@2.16.0 1.91.0 0.8.0 -1.9.10 1.3 2.3.0 @@ -59,9 +59,18 @@+ Gojek -https://www.gojek.io/ +https://www.gojek.com + ++ +Feast Authors +${github.url} +Gojek +https://www.gojek.com +Apache License, Version 2.0 @@ -82,15 +91,15 @@${github.url}/issues +- @@ -280,10 +289,36 @@- feast-snapshot -file:///tmp/snapshot +ossrh +https://oss.sonatype.org/content/repositories/snapshots - feast -file:///tmp/snapshot +ossrh +https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + +org.apache.maven.plugins +maven-source-plugin +3.2.1 ++ ++ +attach-sources ++ +jar-no-fork ++ org.apache.maven.plugins +maven-javadoc-plugin +3.1.1 ++ ++ +attach-javadocs ++ +jar ++ + com.diffplug.spotless spotless-maven-plugin -1.26.0 +1.26.1 @@ -398,6 +433,78 @@ true + + +org.sonatype.plugins +nexus-staging-maven-plugin +1.6.8 +true ++ +ossrh +https://oss.sonatype.org/ + +true ++ + +org.codehaus.mojo +flatten-maven-plugin +1.1.0 ++ +oss ++ ++ +flatten +process-resources ++ +flatten ++ +flatten.clean +clean ++ +clean ++ org.apache.maven.plugins +maven-gpg-plugin +1.6 ++ ++ +sign-artifacts +verify ++ + +sign ++ ++ + + +--pinentry-mode +loopback +${gpg.passphrase} +@@ -436,25 +543,6 @@ diff --git a/sdk/java/pom.xml b/sdk/java/pom.xml index 2c8b1d837a..e8a82a485f 100644 --- a/sdk/java/pom.xml +++ b/sdk/java/pom.xml @@ -6,10 +6,10 @@org.xolstice.maven.plugins protobuf-maven-plugin 0.6.1 -- -true -- com.google.protobuf:protoc:${protocVersion}:exe:${os.detected.classifier} - -grpc-java -- io.grpc:protoc-gen-grpc-java:${grpcVersion}:exe:${os.detected.classifier} - -- - -- -compile -compile-custom -test-compile -Feast SDK for Java SDK for registering, storing, and retrieving features -feast-client +feast-sdk - feast +dev.feast feast-parent ${revision} ../.. @@ -21,6 +21,12 @@+ + +dev.feast +datatypes-java +${project.version} +io.grpc @@ -79,10 +85,6 @@- - org.xolstice.maven.plugins -protobuf-maven-plugin -- org.apache.maven.plugins diff --git a/serving/pom.xml b/serving/pom.xml index 3d41c18b8d..1e8d1b83a6 100644 --- a/serving/pom.xml +++ b/serving/pom.xml @@ -21,7 +21,7 @@4.0.0 - @@ -47,10 +47,6 @@feast +dev.feast feast-parent ${revision} false - org.xolstice.maven.plugins -protobuf-maven-plugin -org.apache.maven.plugins maven-failsafe-plugin @@ -74,6 +70,12 @@+ + +dev.feast +datatypes-java +${project.version} +org.slf4j diff --git a/serving/src/main/proto/feast b/serving/src/main/proto/feast deleted file mode 120000 index d520da9126..0000000000 --- a/serving/src/main/proto/feast +++ /dev/null @@ -1 +0,0 @@ -../../../../protos/feast \ No newline at end of file diff --git a/serving/src/main/proto/third_party b/serving/src/main/proto/third_party deleted file mode 120000 index 363d20598e..0000000000 --- a/serving/src/main/proto/third_party +++ /dev/null @@ -1 +0,0 @@ -../../../../protos/third_party \ No newline at end of file