Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Java: SeaweedOutputStream add replication option

Chris Luce416d765f42
diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java
index 925a56bdd5..94f34b2213 100644
--- a/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java
+++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java
@@ -34,6 +34,11 @@ public class SeaweedOutputStream extends OutputStream {
private boolean shouldSaveMetadata = false;
public SeaweedOutputStream(FilerGrpcClient filerGrpcClient, final String fullpath) {
+ this(filerGrpcClient, fullpath, "000");
+ }
+
+ public SeaweedOutputStream(FilerGrpcClient filerGrpcClient, final String fullpath, final String replication) {
+ this.replication = replication;
this.filerGrpcClient = filerGrpcClient;
this.path = fullpath;
this.position = 0;