Merge pull request #25 from chrislusf/master

sync
This commit is contained in:
hilimd
2020-10-12 11:01:13 +08:00
committed by GitHub
18 changed files with 98 additions and 37 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
<version>1.4.8</version>
<version>1.4.9</version>
<parent>
<groupId>org.sonatype.oss</groupId>

View File

@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
<version>1.4.8</version>
<version>1.4.9</version>
<parent>
<groupId>org.sonatype.oss</groupId>

View File

@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
<version>1.4.8</version>
<version>1.4.9</version>
<parent>
<groupId>org.sonatype.oss</groupId>

View File

@@ -1,5 +1,6 @@
package seaweedfs.client;
import com.google.common.base.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -272,15 +273,20 @@ public class FilerClient {
public boolean createEntry(String parent, FilerProto.Entry entry) {
try {
filerGrpcClient.getBlockingStub().createEntry(FilerProto.CreateEntryRequest.newBuilder()
FilerProto.CreateEntryResponse createEntryResponse =
filerGrpcClient.getBlockingStub().createEntry(FilerProto.CreateEntryRequest.newBuilder()
.setDirectory(parent)
.setEntry(entry)
.build());
if (Strings.isNullOrEmpty(createEntryResponse.getError())) {
return true;
}
LOG.warn("createEntry {}/{} error: {}", parent, entry.getName(), createEntryResponse.getError());
return false;
} catch (Exception e) {
LOG.warn("createEntry {}/{}: {}", parent, entry.getName(), e);
return false;
}
return true;
}
public boolean updateEntry(String parent, FilerProto.Entry entry) {
@@ -290,7 +296,7 @@ public class FilerClient {
.setEntry(entry)
.build());
} catch (Exception e) {
LOG.warn("createEntry {}/{}: {}", parent, entry.getName(), e);
LOG.warn("updateEntry {}/{}: {}", parent, entry.getName(), e);
return false;
}
return true;

View File

@@ -301,7 +301,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<seaweedfs.client.version>1.4.8</seaweedfs.client.version>
<seaweedfs.client.version>1.4.9</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>
</project>

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<seaweedfs.client.version>1.4.8</seaweedfs.client.version>
<seaweedfs.client.version>1.4.9</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>

View File

@@ -309,7 +309,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<seaweedfs.client.version>1.4.8</seaweedfs.client.version>
<seaweedfs.client.version>1.4.9</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>
</project>

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
<seaweedfs.client.version>1.4.8</seaweedfs.client.version>
<seaweedfs.client.version>1.4.9</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>