Skip to content

Commit 400b20b

Browse files
author
zhilingc
committed
Add core service
1 parent 9666c40 commit 400b20b

99 files changed

Lines changed: 8927 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
### Scratch files ###
2+
scratch*
3+
4+
### Local Environment ###
5+
*local*.env
6+
7+
### Gradle ###
8+
.gradle
9+
**/build/
10+
!gradle/wrapper/gradle-wrapper.jar
11+
feast-serving.jar
12+
13+
### STS ###
14+
.apt_generated
15+
.classpath
16+
.factorypath
17+
.project
18+
.settings
19+
.springBeans
20+
.sts4-cache
21+
22+
### IntelliJ IDEA ###
23+
.idea
24+
*.iws
25+
*.iml
26+
*.ipr
27+
/out/
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
36+
## Static site ##
37+
static
38+
39+
## Feast Temporary Files ##
40+
/temp/

core/lombok.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lombok.addLombokGeneratedAnnotation = true

core/pom.xml

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2018 The Feast Authors
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
~
17+
-->
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>feast</groupId>
24+
<artifactId>feast-parent</artifactId>
25+
<version>${revision}</version>
26+
</parent>
27+
<artifactId>feast-core</artifactId>
28+
<packaging>jar</packaging>
29+
<name>Feast Core</name>
30+
31+
<build>
32+
<plugins>
33+
<plugin>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-maven-plugin</artifactId>
36+
</plugin>
37+
<plugin>
38+
<groupId>org.xolstice.maven.plugins</groupId>
39+
<artifactId>protobuf-maven-plugin</artifactId>
40+
</plugin>
41+
</plugins>
42+
</build>
43+
44+
<repositories>
45+
<repository>
46+
<id>jcenter</id>
47+
<url>https://jcenter.bintray.com/</url>
48+
</repository>
49+
</repositories>
50+
51+
<dependencies>
52+
<!--compile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"-->
53+
<dependency>
54+
<groupId>org.springframework.boot</groupId>
55+
<artifactId>spring-boot-starter-web</artifactId>
56+
<version>${springBootVersion}</version>
57+
<exclusions>
58+
<exclusion>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-starter-logging</artifactId>
61+
</exclusion>
62+
</exclusions>
63+
</dependency>
64+
<!--compile 'org.springframework.boot:spring-boot-starter-log4j2'-->
65+
<dependency>
66+
<groupId>org.springframework.boot</groupId>
67+
<artifactId>spring-boot-starter-log4j2</artifactId>
68+
<version>${springBootVersion}</version>
69+
</dependency>
70+
<!--compile 'org.lognet:grpc-spring-boot-starter:2.4.1'-->
71+
<dependency>
72+
<groupId>org.lognet</groupId>
73+
<artifactId>grpc-spring-boot-starter</artifactId>
74+
<version>2.4.1</version>
75+
</dependency>
76+
<!--compile "org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}"-->
77+
<dependency>
78+
<groupId>org.springframework.boot</groupId>
79+
<artifactId>spring-boot-starter-data-jpa</artifactId>
80+
<version>${springBootVersion}</version>
81+
</dependency>
82+
<!--compile "org.springframework.data:spring-data-jpa:${springBootVersion}"-->
83+
<dependency>
84+
<groupId>org.springframework.data</groupId>
85+
<artifactId>spring-data-jpa</artifactId>
86+
<version>${springBootVersion}</version>
87+
</dependency>
88+
<!--compile "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}"-->
89+
<dependency>
90+
<groupId>org.springframework.boot</groupId>
91+
<artifactId>spring-boot-starter-actuator</artifactId>
92+
<version>${springBootVersion}</version>
93+
</dependency>
94+
95+
96+
<!--compile "io.grpc:grpc-netty:${grpcVersion}"-->
97+
<dependency>
98+
<groupId>io.grpc</groupId>
99+
<artifactId>grpc-netty</artifactId>
100+
<version>${grpcVersion}</version>
101+
</dependency>
102+
<!--compile "io.grpc:grpc-services:${grpcVersion}"-->
103+
<dependency>
104+
<groupId>io.grpc</groupId>
105+
<artifactId>grpc-services</artifactId>
106+
<version>${grpcVersion}</version>
107+
</dependency>
108+
<!--compile "io.grpc:grpc-stub:${grpcVersion}"-->
109+
<dependency>
110+
<groupId>io.grpc</groupId>
111+
<artifactId>grpc-stub</artifactId>
112+
<version>${grpcVersion}</version>
113+
</dependency>
114+
<!--compile "com.google.protobuf:protobuf-java-util:${protobufVersion}"-->
115+
<dependency>
116+
<groupId>com.google.protobuf</groupId>
117+
<artifactId>protobuf-java-util</artifactId>
118+
<version>${protobufVersion}</version>
119+
</dependency>
120+
121+
<!--compile 'com.google.guava:guava:26.0-jre'-->
122+
<dependency>
123+
<groupId>com.google.guava</groupId>
124+
<artifactId>guava</artifactId>
125+
<version>26.0-jre</version>
126+
</dependency>
127+
<!--compile 'com.google.code.gson:gson:2.8.5'-->
128+
<dependency>
129+
<groupId>com.google.code.gson</groupId>
130+
<artifactId>gson</artifactId>
131+
<version>2.8.5</version>
132+
</dependency>
133+
<!--compile 'commons-codec:commons-codec:1.10'-->
134+
<dependency>
135+
<groupId>commons-codec</groupId>
136+
<artifactId>commons-codec</artifactId>
137+
<version>1.10</version>
138+
</dependency>
139+
<!--compile 'joda-time:joda-time:2.9.9'-->
140+
<dependency>
141+
<groupId>joda-time</groupId>
142+
<artifactId>joda-time</artifactId>
143+
<version>2.9.9</version>
144+
</dependency>
145+
<dependency>
146+
<groupId>com.google.api-client</groupId>
147+
<artifactId>google-api-client</artifactId>
148+
<version>1.27.0</version>
149+
</dependency>
150+
<dependency>
151+
<groupId>com.google.apis</groupId>
152+
<artifactId>google-api-services-dataflow</artifactId>
153+
<version>v1b3-rev266-1.25.0</version>
154+
</dependency>
155+
156+
<!--compile 'org.jdbi:jdbi3:3.0.0-beta2'-->
157+
<dependency>
158+
<groupId>org.jdbi</groupId>
159+
<artifactId>jdbi3</artifactId>
160+
<version>3.0.0-beta2</version>
161+
</dependency>
162+
<!--compile 'org.jdbi:jdbi3-sqlobject:3.4.0'-->
163+
<dependency>
164+
<groupId>org.jdbi</groupId>
165+
<artifactId>jdbi3-sqlobject</artifactId>
166+
<version>3.4.0</version>
167+
</dependency>
168+
<!--compile 'org.postgresql:postgresql:42.2.5'-->
169+
<dependency>
170+
<groupId>org.postgresql</groupId>
171+
<artifactId>postgresql</artifactId>
172+
<version>42.2.5</version>
173+
</dependency>
174+
<!--compile 'org.hibernate:hibernate-core:5.3.6.Final'-->
175+
<dependency>
176+
<groupId>org.hibernate</groupId>
177+
<artifactId>hibernate-core</artifactId>
178+
<version>5.3.6.Final</version>
179+
</dependency>
180+
<!--compile 'com.google.cloud.bigtable:bigtable-hbase-1.x:1.5.0'-->
181+
<dependency>
182+
<groupId>com.google.cloud.bigtable</groupId>
183+
<artifactId>bigtable-hbase-2.x-shaded</artifactId>
184+
<version>1.5.0</version>
185+
</dependency>
186+
<!--compile 'com.google.cloud:google-cloud-bigquery:1.48.0'-->
187+
<dependency>
188+
<groupId>com.google.cloud</groupId>
189+
<artifactId>google-cloud-bigquery</artifactId>
190+
<version>1.48.0</version>
191+
</dependency>
192+
193+
<!--compile 'com.github.spullara.mustache.java:compiler:0.9.5'-->
194+
<dependency>
195+
<groupId>com.github.spullara.mustache.java</groupId>
196+
<artifactId>compiler</artifactId>
197+
<version>0.9.5</version>
198+
</dependency>
199+
<!--compile 'io.micrometer:micrometer-core:1.0.7'-->
200+
<dependency>
201+
<groupId>io.micrometer</groupId>
202+
<artifactId>micrometer-core</artifactId>
203+
<version>1.0.7</version>
204+
</dependency>
205+
<!--compile 'io.micrometer:micrometer-registry-prometheus:1.0.7'-->
206+
<dependency>
207+
<groupId>io.micrometer</groupId>
208+
<artifactId>micrometer-registry-statsd</artifactId>
209+
<version>1.0.7</version>
210+
</dependency>
211+
<dependency>
212+
<groupId>com.datadoghq</groupId>
213+
<artifactId>java-dogstatsd-client</artifactId>
214+
<version>2.6.1</version>
215+
</dependency>
216+
217+
<!--compileOnly 'org.projectlombok:lombok:1.18.2'-->
218+
<dependency>
219+
<groupId>org.projectlombok</groupId>
220+
<artifactId>lombok</artifactId>
221+
<version>1.18.2</version>
222+
<scope>provided</scope>
223+
</dependency>
224+
225+
<!--testCompile "io.grpc:grpc-testing:${grpcVersion}"-->
226+
<dependency>
227+
<groupId>io.grpc</groupId>
228+
<artifactId>grpc-testing</artifactId>
229+
<version>${grpcVersion}</version>
230+
<scope>test</scope>
231+
</dependency>
232+
<!--testCompile 'org.hamcrest:hamcrest-all:1.3'-->
233+
<dependency>
234+
<groupId>org.hamcrest</groupId>
235+
<artifactId>hamcrest-all</artifactId>
236+
<version>1.3</version>
237+
<scope>test</scope>
238+
</dependency>
239+
<!--testCompile 'com.jayway.jsonpath:json-path-assert:2.2.0'-->
240+
<dependency>
241+
<groupId>com.jayway.jsonpath</groupId>
242+
<artifactId>json-path-assert</artifactId>
243+
<version>2.2.0</version>
244+
<scope>test</scope>
245+
</dependency>
246+
<dependency>
247+
<groupId>org.mockito</groupId>
248+
<artifactId>mockito-core</artifactId>
249+
<version>2.23.0</version>
250+
<scope>test</scope>
251+
</dependency>
252+
</dependencies>
253+
</project>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2018 The Feast Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
package feast.core;
19+
20+
import lombok.extern.slf4j.Slf4j;
21+
import org.springframework.boot.SpringApplication;
22+
import org.springframework.boot.autoconfigure.SpringBootApplication;
23+
import org.springframework.scheduling.annotation.EnableScheduling;
24+
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
25+
26+
@EnableScheduling
27+
@SpringBootApplication
28+
@EnableJpaRepositories(basePackages = "feast.core.dao")
29+
@Slf4j
30+
public class CoreApplication {
31+
public static void main(String[] args) {
32+
SpringApplication.run(CoreApplication.class, args);
33+
}
34+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2018 The Feast Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
package feast.core.config;
19+
20+
import org.springframework.beans.factory.annotation.Value;
21+
import org.springframework.context.annotation.Bean;
22+
import org.springframework.context.annotation.Configuration;
23+
24+
/*
25+
* Application auto configuration
26+
*/
27+
@Configuration
28+
public class AppConfig {
29+
@Bean
30+
public ImportJobDefaults getImportJobDefaults(
31+
@Value("${feast.jobs.coreUri}") String coreApiUri,
32+
@Value("${feast.jobs.runner}") String runner,
33+
@Value("${feast.jobs.options}") String options,
34+
@Value("${feast.jobs.executable}") String executable,
35+
@Value("${feast.jobs.errorsStoreId}") String errorsStoreId) {
36+
return new ImportJobDefaults(coreApiUri, runner, options, executable, errorsStoreId);
37+
}
38+
}

0 commit comments

Comments
 (0)