diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-10-09 18:09:08 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-10-09 18:09:08 -0700 |
| commit | 15f968b0546cdf9d5ee6215ff967de0b3ea4b552 (patch) | |
| tree | 58ce34fed45ccbef90711de43b374fe7d6000aba /other/java/client | |
| parent | 87e5a02a99965812f309d9071720e8d4eaa059cd (diff) | |
| download | seaweedfs-15f968b0546cdf9d5ee6215ff967de0b3ea4b552.tar.xz seaweedfs-15f968b0546cdf9d5ee6215ff967de0b3ea4b552.zip | |
HCFS: avoid possible jar problem
Diffstat (limited to 'other/java/client')
| -rw-r--r-- | other/java/client/pom.xml | 2 | ||||
| -rw-r--r-- | other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/other/java/client/pom.xml b/other/java/client/pom.xml index be9470cb9..15921c4dd 100644 --- a/other/java/client/pom.xml +++ b/other/java/client/pom.xml @@ -4,7 +4,7 @@ <groupId>com.github.chrislusf</groupId> <artifactId>seaweedfs-client</artifactId> - <version>1.1.8</version> + <version>1.1.9</version> <parent> <groupId>org.sonatype.oss</groupId> diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java index a307983bb..de8da28d7 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java @@ -5,16 +5,12 @@ import org.apache.http.HttpHeaders; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.client.DefaultHttpClient; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.Map; +import java.util.*; public class SeaweedRead { @@ -59,7 +55,7 @@ public class SeaweedRead { } private static int readChunkView(long position, byte[] buffer, int startOffset, ChunkView chunkView, FilerProto.Locations locations) { - HttpClient client = HttpClientBuilder.create().build(); + HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet( String.format("http://%s/%s", locations.getLocations(0).getUrl(), chunkView.fileId)); |
