mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Hadoop: remove unused variable bufferSize
This commit is contained in:
parent
9449100757
commit
912ef2bc53
|
@ -74,7 +74,7 @@ public class SeaweedFileSystem extends FileSystem {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE);
|
int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE);
|
||||||
FSInputStream inputStream = seaweedFileSystemStore.openFileForRead(path, statistics, seaweedBufferSize);
|
FSInputStream inputStream = seaweedFileSystemStore.openFileForRead(path, statistics);
|
||||||
return new FSDataInputStream(new BufferedFSInputStream(inputStream, 4 * seaweedBufferSize));
|
return new FSDataInputStream(new BufferedFSInputStream(inputStream, 4 * seaweedBufferSize));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOG.warn("open path: {} bufferSize:{}", path, bufferSize, ex);
|
LOG.warn("open path: {} bufferSize:{}", path, bufferSize, ex);
|
||||||
|
|
|
@ -205,10 +205,9 @@ public class SeaweedFileSystemStore {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FSInputStream openFileForRead(final Path path, FileSystem.Statistics statistics,
|
public FSInputStream openFileForRead(final Path path, FileSystem.Statistics statistics) throws IOException {
|
||||||
int bufferSize) throws IOException {
|
|
||||||
|
|
||||||
LOG.debug("openFileForRead path:{} bufferSize:{}", path, bufferSize);
|
LOG.debug("openFileForRead path:{}", path);
|
||||||
|
|
||||||
FilerProto.Entry entry = lookupEntry(path);
|
FilerProto.Entry entry = lookupEntry(path);
|
||||||
|
|
||||||
|
@ -219,8 +218,7 @@ public class SeaweedFileSystemStore {
|
||||||
return new SeaweedInputStream(filerGrpcClient,
|
return new SeaweedInputStream(filerGrpcClient,
|
||||||
statistics,
|
statistics,
|
||||||
path.toUri().getPath(),
|
path.toUri().getPath(),
|
||||||
entry,
|
entry);
|
||||||
bufferSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOwner(Path path, String owner, String group) {
|
public void setOwner(Path path, String owner, String group) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ public class SeaweedInputStream extends FSInputStream {
|
||||||
private final FilerProto.Entry entry;
|
private final FilerProto.Entry entry;
|
||||||
private final List<SeaweedRead.VisibleInterval> visibleIntervalList;
|
private final List<SeaweedRead.VisibleInterval> visibleIntervalList;
|
||||||
private final long contentLength;
|
private final long contentLength;
|
||||||
private final int bufferSize; // default buffer size
|
|
||||||
|
|
||||||
private long position = 0; // cursor of the file
|
private long position = 0; // cursor of the file
|
||||||
|
|
||||||
|
@ -35,14 +34,12 @@ public class SeaweedInputStream extends FSInputStream {
|
||||||
final FilerGrpcClient filerGrpcClient,
|
final FilerGrpcClient filerGrpcClient,
|
||||||
final Statistics statistics,
|
final Statistics statistics,
|
||||||
final String path,
|
final String path,
|
||||||
final FilerProto.Entry entry,
|
final FilerProto.Entry entry) throws IOException {
|
||||||
final int bufferSize) throws IOException {
|
|
||||||
this.filerGrpcClient = filerGrpcClient;
|
this.filerGrpcClient = filerGrpcClient;
|
||||||
this.statistics = statistics;
|
this.statistics = statistics;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.entry = entry;
|
this.entry = entry;
|
||||||
this.contentLength = SeaweedRead.fileSize(entry);
|
this.contentLength = SeaweedRead.fileSize(entry);
|
||||||
this.bufferSize = bufferSize;
|
|
||||||
|
|
||||||
this.visibleIntervalList = SeaweedRead.nonOverlappingVisibleIntervals(filerGrpcClient, entry.getChunksList());
|
this.visibleIntervalList = SeaweedRead.nonOverlappingVisibleIntervals(filerGrpcClient, entry.getChunksList());
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class SeaweedFileSystem extends FileSystem {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE);
|
int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE);
|
||||||
FSInputStream inputStream = seaweedFileSystemStore.openFileForRead(path, statistics, seaweedBufferSize);
|
FSInputStream inputStream = seaweedFileSystemStore.openFileForRead(path, statistics);
|
||||||
return new FSDataInputStream(new BufferedFSInputStream(inputStream, 4 * seaweedBufferSize));
|
return new FSDataInputStream(new BufferedFSInputStream(inputStream, 4 * seaweedBufferSize));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOG.warn("open path: {} bufferSize:{}", path, bufferSize, ex);
|
LOG.warn("open path: {} bufferSize:{}", path, bufferSize, ex);
|
||||||
|
|
|
@ -205,10 +205,9 @@ public class SeaweedFileSystemStore {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public FSInputStream openFileForRead(final Path path, FileSystem.Statistics statistics,
|
public FSInputStream openFileForRead(final Path path, FileSystem.Statistics statistics) throws IOException {
|
||||||
int bufferSize) throws IOException {
|
|
||||||
|
|
||||||
LOG.debug("openFileForRead path:{} bufferSize:{}", path, bufferSize);
|
LOG.debug("openFileForRead path:{}", path);
|
||||||
|
|
||||||
FilerProto.Entry entry = lookupEntry(path);
|
FilerProto.Entry entry = lookupEntry(path);
|
||||||
|
|
||||||
|
@ -219,8 +218,7 @@ public class SeaweedFileSystemStore {
|
||||||
return new SeaweedInputStream(filerGrpcClient,
|
return new SeaweedInputStream(filerGrpcClient,
|
||||||
statistics,
|
statistics,
|
||||||
path.toUri().getPath(),
|
path.toUri().getPath(),
|
||||||
entry,
|
entry);
|
||||||
bufferSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOwner(Path path, String owner, String group) {
|
public void setOwner(Path path, String owner, String group) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ public class SeaweedInputStream extends FSInputStream {
|
||||||
private final FilerProto.Entry entry;
|
private final FilerProto.Entry entry;
|
||||||
private final List<SeaweedRead.VisibleInterval> visibleIntervalList;
|
private final List<SeaweedRead.VisibleInterval> visibleIntervalList;
|
||||||
private final long contentLength;
|
private final long contentLength;
|
||||||
private final int bufferSize; // default buffer size
|
|
||||||
|
|
||||||
private long position = 0; // cursor of the file
|
private long position = 0; // cursor of the file
|
||||||
|
|
||||||
|
@ -35,14 +34,12 @@ public class SeaweedInputStream extends FSInputStream {
|
||||||
final FilerGrpcClient filerGrpcClient,
|
final FilerGrpcClient filerGrpcClient,
|
||||||
final Statistics statistics,
|
final Statistics statistics,
|
||||||
final String path,
|
final String path,
|
||||||
final FilerProto.Entry entry,
|
final FilerProto.Entry entry) throws IOException {
|
||||||
final int bufferSize) throws IOException {
|
|
||||||
this.filerGrpcClient = filerGrpcClient;
|
this.filerGrpcClient = filerGrpcClient;
|
||||||
this.statistics = statistics;
|
this.statistics = statistics;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.entry = entry;
|
this.entry = entry;
|
||||||
this.contentLength = SeaweedRead.fileSize(entry);
|
this.contentLength = SeaweedRead.fileSize(entry);
|
||||||
this.bufferSize = bufferSize;
|
|
||||||
|
|
||||||
this.visibleIntervalList = SeaweedRead.nonOverlappingVisibleIntervals(filerGrpcClient, entry.getChunksList());
|
this.visibleIntervalList = SeaweedRead.nonOverlappingVisibleIntervals(filerGrpcClient, entry.getChunksList());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue