diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-10-25 15:32:43 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-10-25 15:32:43 -0700 |
| commit | f375b93aefd8d7358df7ff5232d522a31bd15afb (patch) | |
| tree | 63d4196b2c881fd808ec7cedf4414806b685dc21 /other | |
| parent | 596d476e3d858d2cb0520231f1da44804e7f2be1 (diff) | |
| download | seaweedfs-f375b93aefd8d7358df7ff5232d522a31bd15afb.tar.xz seaweedfs-f375b93aefd8d7358df7ff5232d522a31bd15afb.zip | |
renaming
Diffstat (limited to 'other')
4 files changed, 7 insertions, 7 deletions
diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedWrite.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedWrite.java index 121a0fbee..b8fd3e299 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedWrite.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedWrite.java @@ -27,9 +27,9 @@ public class SeaweedWrite { final long offset, final byte[] bytes, final long bytesOffset, final long bytesLength, - final String parentPath) throws IOException { + final String path) throws IOException { FilerProto.FileChunk.Builder chunkBuilder = writeChunk( - replication, filerGrpcClient, offset, bytes, bytesOffset, bytesLength, parentPath); + replication, filerGrpcClient, offset, bytes, bytesOffset, bytesLength, path); synchronized (entry) { entry.addChunks(chunkBuilder); } @@ -41,14 +41,14 @@ public class SeaweedWrite { final byte[] bytes, final long bytesOffset, final long bytesLength, - final String parentPath) throws IOException { + final String path) throws IOException { FilerProto.AssignVolumeResponse response = filerGrpcClient.getBlockingStub().assignVolume( FilerProto.AssignVolumeRequest.newBuilder() .setCollection(filerGrpcClient.getCollection()) .setReplication(replication == null ? filerGrpcClient.getReplication() : replication) .setDataCenter("") .setTtlSec(0) - .setParentPath(parentPath) + .setPath(path) .build()); String fileId = response.getFileId(); String url = response.getUrl(); diff --git a/other/java/client/src/main/proto/filer.proto b/other/java/client/src/main/proto/filer.proto index 40a46b33f..11c29e6ec 100644 --- a/other/java/client/src/main/proto/filer.proto +++ b/other/java/client/src/main/proto/filer.proto @@ -217,7 +217,7 @@ message AssignVolumeRequest { string replication = 3; int32 ttl_sec = 4; string data_center = 5; - string parent_path = 6; + string path = 6; string rack = 7; } diff --git a/other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedOutputStream.java b/other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedOutputStream.java index dbcae6423..26290c46c 100644 --- a/other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedOutputStream.java +++ b/other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedOutputStream.java @@ -185,7 +185,7 @@ public class SeaweedOutputStream extends OutputStream { } final Future<Void> job = completionService.submit(() -> { // System.out.println(path + " is going to save [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")"); - SeaweedWrite.writeData(entry, replication, filerGrpcClient, writePosition, bufferToWrite.array(), bufferToWrite.position(), bufferToWrite.limit(), getParentDirectory(path)); + SeaweedWrite.writeData(entry, replication, filerGrpcClient, writePosition, bufferToWrite.array(), bufferToWrite.position(), bufferToWrite.limit(), path.toUri().getPath()); // System.out.println(path + " saved [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")"); ByteBufferPool.release(bufferToWrite); return null; diff --git a/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedOutputStream.java b/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedOutputStream.java index 4058ec1ac..d4c967a06 100644 --- a/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedOutputStream.java +++ b/other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedOutputStream.java @@ -231,7 +231,7 @@ public class SeaweedOutputStream extends OutputStream implements Syncable, Strea } final Future<Void> job = completionService.submit(() -> { // System.out.println(path + " is going to save [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")"); - SeaweedWrite.writeData(entry, replication, filerGrpcClient, writePosition, bufferToWrite.array(), bufferToWrite.position(), bufferToWrite.limit(), getParentDirectory(path)); + SeaweedWrite.writeData(entry, replication, filerGrpcClient, writePosition, bufferToWrite.array(), bufferToWrite.position(), bufferToWrite.limit(), path.toUri().getPath()); // System.out.println(path + " saved [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")"); ByteBufferPool.release(bufferToWrite); return null; |
