This commit is contained in:
Chris Lu 2020-07-15 13:49:06 -07:00
parent 22f8aae028
commit 86c8137546
9 changed files with 10 additions and 9 deletions

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ import java.util.concurrent.TimeUnit;
public class ChunkCache {
private final Cache<String, byte[]> cache;
private Cache<String, byte[]> cache = null;
public ChunkCache(int maxEntries) {
if (maxEntries == 0) {

View File

@ -127,7 +127,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<seaweedfs.client.version>1.3.3</seaweedfs.client.version>
<seaweedfs.client.version>1.3.4</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.3.3</seaweedfs.client.version>
<seaweedfs.client.version>1.3.4</seaweedfs.client.version>
<hadoop.version>2.9.2</hadoop.version>
</properties>

View File

@ -127,7 +127,7 @@
</snapshotRepository>
</distributionManagement>
<properties>
<seaweedfs.client.version>1.3.3</seaweedfs.client.version>
<seaweedfs.client.version>1.3.4</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.3.3</seaweedfs.client.version>
<seaweedfs.client.version>1.3.4</seaweedfs.client.version>
<hadoop.version>3.1.1</hadoop.version>
</properties>

View File

@ -17,6 +17,7 @@ import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Locale;
import java.util.concurrent.*;
import static seaweed.hdfs.SeaweedFileSystemStore.getParentDirectory;
@ -108,7 +109,7 @@ public class SeaweedOutputStream extends OutputStream implements Syncable, Strea
// ensureCapacity
if (numberOfBytesToWrite > buffer.length - bufferIndex) {
int capacity = buffer.length;
while(capacity-bufferIndex<numberOfBytesToWrite){
while (capacity - bufferIndex < numberOfBytesToWrite) {
capacity = capacity << 1;
}
if (capacity < 0) {