aboutsummaryrefslogtreecommitdiff
path: root/other/java
diff options
context:
space:
mode:
Diffstat (limited to 'other/java')
-rw-r--r--other/java/client/src/main/java/seaweedfs/client/FilerClient.java1
-rw-r--r--other/java/client/src/main/java/seaweedfs/client/FilerGrpcClient.java3
-rw-r--r--other/java/client/src/main/proto/filer.proto1
3 files changed, 5 insertions, 0 deletions
diff --git a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
index 84ee66e7d..10d263968 100644
--- a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
+++ b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
@@ -368,6 +368,7 @@ public class FilerClient extends FilerGrpcClient {
.setPathPrefix(prefix)
.setClientName(clientName)
.setSinceNs(sinceNs)
+ .setClientId(this.randomClientId)
.build()
);
}
diff --git a/other/java/client/src/main/java/seaweedfs/client/FilerGrpcClient.java b/other/java/client/src/main/java/seaweedfs/client/FilerGrpcClient.java
index 54e7ccb68..0a2e6332e 100644
--- a/other/java/client/src/main/java/seaweedfs/client/FilerGrpcClient.java
+++ b/other/java/client/src/main/java/seaweedfs/client/FilerGrpcClient.java
@@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
import javax.net.ssl.SSLException;
import java.util.HashMap;
import java.util.Map;
+import java.util.Random;
import java.util.concurrent.TimeUnit;
public class FilerGrpcClient {
@@ -30,6 +31,7 @@ public class FilerGrpcClient {
public final int VOLUME_SERVER_ACCESS_PUBLIC_URL = 1;
public final int VOLUME_SERVER_ACCESS_FILER_PROXY = 2;
public final Map<String, FilerProto.Locations> vidLocations = new HashMap<>();
+ protected int randomClientId;
private final ManagedChannel channel;
private final SeaweedFilerGrpc.SeaweedFilerBlockingStub blockingStub;
private final SeaweedFilerGrpc.SeaweedFilerStub asyncStub;
@@ -62,6 +64,7 @@ public class FilerGrpcClient {
cipher = filerConfigurationResponse.getCipher();
collection = filerConfigurationResponse.getCollection();
replication = filerConfigurationResponse.getReplication();
+ randomClientId = new Random().nextInt();
}
diff --git a/other/java/client/src/main/proto/filer.proto b/other/java/client/src/main/proto/filer.proto
index ba5c1c694..3303dc444 100644
--- a/other/java/client/src/main/proto/filer.proto
+++ b/other/java/client/src/main/proto/filer.proto
@@ -329,6 +329,7 @@ message SubscribeMetadataRequest {
int64 since_ns = 3;
int32 signature = 4;
repeated string path_prefixes = 6;
+ int32 client_id = 7;
}
message SubscribeMetadataResponse {
string directory = 1;