mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-21 19:10:11 +08:00
Java: 1.5.8 additional fixes
This commit is contained in:
@@ -122,7 +122,7 @@ public class SeaweedRead {
|
|||||||
} else if (filerGrpcClient.isAccessVolumeServerByFilerProxy()) {
|
} else if (filerGrpcClient.isAccessVolumeServerByFilerProxy()) {
|
||||||
host = filerGrpcClient.getFilerAddress();
|
host = filerGrpcClient.getFilerAddress();
|
||||||
}
|
}
|
||||||
String url = String.format("http://%s/%s", location.getUrl(), chunkView.fileId);
|
String url = String.format("http://%s/%s", host, chunkView.fileId);
|
||||||
try {
|
try {
|
||||||
data = doFetchOneFullChunkData(chunkView, url);
|
data = doFetchOneFullChunkData(chunkView, url);
|
||||||
lastException = null;
|
lastException = null;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class SeaweedFileSystem extends FileSystem {
|
|||||||
public static final int FS_SEAWEED_DEFAULT_PORT = 8888;
|
public static final int FS_SEAWEED_DEFAULT_PORT = 8888;
|
||||||
public static final String FS_SEAWEED_BUFFER_SIZE = "fs.seaweed.buffer.size";
|
public static final String FS_SEAWEED_BUFFER_SIZE = "fs.seaweed.buffer.size";
|
||||||
public static final String FS_SEAWEED_REPLICATION = "fs.seaweed.replication";
|
public static final String FS_SEAWEED_REPLICATION = "fs.seaweed.replication";
|
||||||
|
public static final String FS_SEAWEED_VOLUME_SERVER_ACCESS = "fs.seaweed.volumeServerAccess";
|
||||||
public static final int FS_SEAWEED_DEFAULT_BUFFER_SIZE = 4 * 1024 * 1024;
|
public static final int FS_SEAWEED_DEFAULT_BUFFER_SIZE = 4 * 1024 * 1024;
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(SeaweedFileSystem.class);
|
private static final Logger LOG = LoggerFactory.getLogger(SeaweedFileSystem.class);
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static seaweed.hdfs.SeaweedFileSystem.FS_SEAWEED_BUFFER_SIZE;
|
import static seaweed.hdfs.SeaweedFileSystem.*;
|
||||||
import static seaweed.hdfs.SeaweedFileSystem.FS_SEAWEED_DEFAULT_BUFFER_SIZE;
|
|
||||||
|
|
||||||
public class SeaweedFileSystemStore {
|
public class SeaweedFileSystemStore {
|
||||||
|
|
||||||
@@ -34,6 +33,13 @@ public class SeaweedFileSystemStore {
|
|||||||
filerGrpcClient = new FilerGrpcClient(host, grpcPort);
|
filerGrpcClient = new FilerGrpcClient(host, grpcPort);
|
||||||
filerClient = new FilerClient(filerGrpcClient);
|
filerClient = new FilerClient(filerGrpcClient);
|
||||||
this.conf = conf;
|
this.conf = conf;
|
||||||
|
String volumeServerAccessMode = this.conf.get(FS_SEAWEED_VOLUME_SERVER_ACCESS, "direct");
|
||||||
|
if (volumeServerAccessMode.equals("publicUrl")) {
|
||||||
|
filerGrpcClient.setAccessVolumeServerByPublicUrl();
|
||||||
|
} else if (volumeServerAccessMode.equals("filerProxy")) {
|
||||||
|
filerGrpcClient.setAccessVolumeServerByFilerProxy();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
|
|||||||
Reference in New Issue
Block a user