Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/src/main/java/feast/core/model/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import feast.proto.core.StoreProto.Store.BigQueryConfig;
import feast.proto.core.StoreProto.Store.Builder;
import feast.proto.core.StoreProto.Store.CassandraConfig;
import feast.proto.core.StoreProto.Store.DeltaConfig;
import feast.proto.core.StoreProto.Store.RedisClusterConfig;
import feast.proto.core.StoreProto.Store.RedisConfig;
import feast.proto.core.StoreProto.Store.StoreType;
Expand Down Expand Up @@ -90,6 +91,9 @@ public static Store fromProto(StoreProto.Store storeProto) throws IllegalArgumen
case REDIS_CLUSTER:
config = storeProto.getRedisClusterConfig().toByteArray();
break;
case DELTA:
config = storeProto.getDeltaConfig().toByteArray();
break;
default:
throw new IllegalArgumentException("Invalid store provided");
}
Expand Down Expand Up @@ -117,6 +121,9 @@ public StoreProto.Store toProto() throws InvalidProtocolBufferException {
case REDIS_CLUSTER:
RedisClusterConfig redisClusterConfig = RedisClusterConfig.parseFrom(config);
return storeProtoBuilder.setRedisClusterConfig(redisClusterConfig).build();
case DELTA:
DeltaConfig deltaConfig = DeltaConfig.parseFrom(config);
return storeProtoBuilder.setDeltaConfig(deltaConfig).build();
default:
throw new InvalidProtocolBufferException("Invalid store set");
}
Expand Down
106 changes: 106 additions & 0 deletions databricks/databricks-emulator/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<name>Databricks emulator</name>
<description>REST API emulating Databricks API and running local Spark jobs, for integration testing</description>
<artifactId>databricks-emulator</artifactId>

<parent>
<groupId>dev.feast</groupId>
<artifactId>feast-parent</artifactId>
<version>${revision}</version>
<relativePath>../..</relativePath>
</parent>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>feast.databricks.emulator.DatabricksEmulator</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>dev.feast</groupId>
<artifactId>databricks-types</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.9.1</version>
</dependency>

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-launcher_${scala.compat.version}</artifactId>
<version>${spark.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading