aboutsummaryrefslogtreecommitdiff
path: root/other/java
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-03-01 09:22:46 +0800
committerGitHub <noreply@github.com>2021-03-01 09:22:46 +0800
commiteb65cbf0025e4bfbfe6359a5ba5bfbd094c3e81d (patch)
tree7aa6c966d0d36a6cd4d2c16735b6b265527af142 /other/java
parent0cfbe8f059c9f97f606e7c76f77aa8a8a8c97765 (diff)
parente52c94640e9898be5308a77867ecea5ef1567c5b (diff)
downloadseaweedfs-eb65cbf0025e4bfbfe6359a5ba5bfbd094c3e81d.tar.xz
seaweedfs-eb65cbf0025e4bfbfe6359a5ba5bfbd094c3e81d.zip
Merge pull request #5 from chrislusf/master
sync
Diffstat (limited to 'other/java')
-rw-r--r--other/java/client/pom.xml2
-rw-r--r--other/java/client/pom.xml.deploy2
-rw-r--r--other/java/client/pom_debug.xml2
-rw-r--r--other/java/client/src/main/java/seaweedfs/client/FilerClient.java33
-rw-r--r--other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java3
-rw-r--r--other/java/examples/pom.xml4
-rw-r--r--other/java/hdfs2/dependency-reduced-pom.xml2
-rw-r--r--other/java/hdfs2/pom.xml2
-rw-r--r--other/java/hdfs3/dependency-reduced-pom.xml2
-rw-r--r--other/java/hdfs3/pom.xml2
10 files changed, 27 insertions, 27 deletions
diff --git a/other/java/client/pom.xml b/other/java/client/pom.xml
index 056904ebe..a7da16a93 100644
--- a/other/java/client/pom.xml
+++ b/other/java/client/pom.xml
@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
- <version>1.6.1</version>
+ <version>1.6.2</version>
<parent>
<groupId>org.sonatype.oss</groupId>
diff --git a/other/java/client/pom.xml.deploy b/other/java/client/pom.xml.deploy
index 69b900017..b45c193ec 100644
--- a/other/java/client/pom.xml.deploy
+++ b/other/java/client/pom.xml.deploy
@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
- <version>1.6.1</version>
+ <version>1.6.2</version>
<parent>
<groupId>org.sonatype.oss</groupId>
diff --git a/other/java/client/pom_debug.xml b/other/java/client/pom_debug.xml
index 1447401b7..217f708e9 100644
--- a/other/java/client/pom_debug.xml
+++ b/other/java/client/pom_debug.xml
@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
- <version>1.6.1</version>
+ <version>1.6.2</version>
<parent>
<groupId>org.sonatype.oss</groupId>
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 58269d41f..c2ffe0ac6 100644
--- a/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
+++ b/other/java/client/src/main/java/seaweedfs/client/FilerClient.java
@@ -4,8 +4,7 @@ import com.google.common.base.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.nio.file.Path;
-import java.nio.file.Paths;
+import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -94,9 +93,9 @@ public class FilerClient extends FilerGrpcClient {
if ("/".equals(path)) {
return true;
}
- Path pathObject = Paths.get(path);
- String parent = pathObject.getParent().toString();
- String name = pathObject.getFileName().toString();
+ File pathFile = new File(path);
+ String parent = pathFile.getParent();
+ String name = pathFile.getName();
mkdirs(parent, mode, uid, gid, userName, groupNames);
@@ -115,13 +114,13 @@ public class FilerClient extends FilerGrpcClient {
public boolean mv(String oldPath, String newPath) {
- Path oldPathObject = Paths.get(oldPath);
- String oldParent = oldPathObject.getParent().toString();
- String oldName = oldPathObject.getFileName().toString();
+ File oldPathFile = new File(oldPath);
+ String oldParent = oldPathFile.getParent();
+ String oldName = oldPathFile.getName();
- Path newPathObject = Paths.get(newPath);
- String newParent = newPathObject.getParent().toString();
- String newName = newPathObject.getFileName().toString();
+ File newPathFile = new File(newPath);
+ String newParent = newPathFile.getParent();
+ String newName = newPathFile.getName();
return atomicRenameEntry(oldParent, oldName, newParent, newName);
@@ -129,9 +128,9 @@ public class FilerClient extends FilerGrpcClient {
public boolean rm(String path, boolean isRecursive, boolean ignoreRecusiveError) {
- Path pathObject = Paths.get(path);
- String parent = pathObject.getParent().toString();
- String name = pathObject.getFileName().toString();
+ File pathFile = new File(path);
+ String parent = pathFile.getParent();
+ String name = pathFile.getName();
return deleteEntry(
parent,
@@ -148,9 +147,9 @@ public class FilerClient extends FilerGrpcClient {
public boolean touch(String path, int mode, int uid, int gid, String userName, String[] groupNames) {
- Path pathObject = Paths.get(path);
- String parent = pathObject.getParent().toString();
- String name = pathObject.getFileName().toString();
+ File pathFile = new File(path);
+ String parent = pathFile.getParent();
+ String name = pathFile.getName();
FilerProto.Entry entry = lookupEntry(parent, name);
if (entry == null) {
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 b73e99e69..ba298a713 100644
--- a/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java
+++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedOutputStream.java
@@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.OutputStream;
+import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.concurrent.*;
@@ -217,7 +218,7 @@ public class SeaweedOutputStream extends OutputStream {
private synchronized int submitWriteBufferToService(final ByteBuffer bufferToWrite, final long writePosition) throws IOException {
- bufferToWrite.flip();
+ ((Buffer)bufferToWrite).flip();
int bytesLength = bufferToWrite.limit() - bufferToWrite.position();
if (threadExecutor.getQueue().size() >= maxConcurrentRequestCount) {
diff --git a/other/java/examples/pom.xml b/other/java/examples/pom.xml
index 2456113d0..d0f22a44d 100644
--- a/other/java/examples/pom.xml
+++ b/other/java/examples/pom.xml
@@ -11,13 +11,13 @@
<dependency>
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
- <version>1.6.1</version>
+ <version>1.6.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-hadoop2-client</artifactId>
- <version>1.6.1</version>
+ <version>1.6.2</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/other/java/hdfs2/dependency-reduced-pom.xml b/other/java/hdfs2/dependency-reduced-pom.xml
index 0680d86bb..64fb4da75 100644
--- a/other/java/hdfs2/dependency-reduced-pom.xml
+++ b/other/java/hdfs2/dependency-reduced-pom.xml
@@ -301,7 +301,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
- <seaweedfs.client.version>1.6.1</seaweedfs.client.version>
+ <seaweedfs.client.version>1.6.2</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>
</project>
diff --git a/other/java/hdfs2/pom.xml b/other/java/hdfs2/pom.xml
index 897477066..3bc9709a7 100644
--- a/other/java/hdfs2/pom.xml
+++ b/other/java/hdfs2/pom.xml
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
- <seaweedfs.client.version>1.6.1</seaweedfs.client.version>
+ <seaweedfs.client.version>1.6.2</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>
diff --git a/other/java/hdfs3/dependency-reduced-pom.xml b/other/java/hdfs3/dependency-reduced-pom.xml
index 2b4a1a494..ea7c08c17 100644
--- a/other/java/hdfs3/dependency-reduced-pom.xml
+++ b/other/java/hdfs3/dependency-reduced-pom.xml
@@ -309,7 +309,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
- <seaweedfs.client.version>1.6.1</seaweedfs.client.version>
+ <seaweedfs.client.version>1.6.2</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>
</project>
diff --git a/other/java/hdfs3/pom.xml b/other/java/hdfs3/pom.xml
index 49ff8f926..3e0f373f7 100644
--- a/other/java/hdfs3/pom.xml
+++ b/other/java/hdfs3/pom.xml
@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
- <seaweedfs.client.version>1.6.1</seaweedfs.client.version>
+ <seaweedfs.client.version>1.6.2</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>