Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Storage Engine Choice #53

Merged
merged 3 commits into from
Mar 3, 2022
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
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ grpcVersion=1.40.1
protobufVersion=3.17.3
micronautVersion=3.2.3
okHttpVersion=4.9.3
gsonVersion=2.8.9
gsonVersion=2.8.9
amazonVersion=2.17.140
3 changes: 3 additions & 0 deletions zulia-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ val luceneVersion: String by project
val mongoDriverVersion: String by project
val protobufVersion: String by project
val micronautVersion: String by project
val amazonVersion: String by project

defaultTasks("build", "installDist")

Expand All @@ -30,6 +31,8 @@ dependencies {
api("org.mongodb:mongodb-driver-sync:$mongoDriverVersion")

api("org.apache.commons:commons-compress:1.20")
implementation(platform("software.amazon.awssdk:bom:$amazonVersion"))
implementation("software.amazon.awssdk:s3")

annotationProcessor(platform("io.micronaut:micronaut-bom:$micronautVersion"))
annotationProcessor("io.micronaut:micronaut-inject-java")
Expand Down
19 changes: 19 additions & 0 deletions zulia-server/src/main/java/io/zulia/server/config/ZuliaConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.zulia.server.config.cluster.MongoAuth;
import io.zulia.server.config.cluster.MongoServer;
import io.zulia.server.config.cluster.S3Config;
import jakarta.inject.Singleton;

import java.util.Collections;
Expand All @@ -13,6 +14,8 @@ public class ZuliaConfig {
private String dataPath = "data";
private boolean cluster = false;
private String clusterName = "zulia";
private String clusterStorageEngine = "gridfs";
private S3Config s3;
private List<MongoServer> mongoServers = Collections.singletonList(new MongoServer());
private MongoAuth mongoAuth;
private String serverAddress = null; //null means autodetect
Expand Down Expand Up @@ -85,4 +88,20 @@ public MongoAuth getMongoAuth() {
public void setMongoAuth(MongoAuth mongoAuth) {
this.mongoAuth = mongoAuth;
}

public String getClusterStorageEngine() {
return clusterStorageEngine;
}

public void setClusterStorageEngine(String clusterStorageEngine) {
this.clusterStorageEngine = clusterStorageEngine;
}

public S3Config getS3() {
return s3;
}

public void setS3(S3Config s3) {
this.s3 = s3;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.zulia.server.config.cluster;

public class S3Config {
private String s3BucketName;
private String region;

public String getS3BucketName() {
return s3BucketName;
}

public void setS3BucketName(String s3BucketName) {
this.s3BucketName = s3BucketName;
}

public String getRegion() {
return region;
}

public void setRegion(String region) {
this.region = region;
}
}
Loading