mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-26 14:45:31 +08:00
HCFS: 1.2.8 fix hbase related bugs
1. SeaweedFileSystem.listStatus need to work with file also 2. SeaweedRead readChunkView has wrong len
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.7</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.8</seaweedfs.client.version>
|
||||
<hadoop.version>2.9.2</hadoop.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.7</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.8</seaweedfs.client.version>
|
||||
<hadoop.version>2.9.2</hadoop.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -64,6 +64,16 @@ public class SeaweedFileSystemStore {
|
||||
public FileStatus[] listEntries(final Path path) {
|
||||
LOG.debug("listEntries path: {}", path);
|
||||
|
||||
FileStatus pathStatus = getFileStatus(path);
|
||||
|
||||
if (pathStatus == null) {
|
||||
return new FileStatus[0];
|
||||
}
|
||||
|
||||
if (!pathStatus.isDirectory()) {
|
||||
return new FileStatus[]{pathStatus};
|
||||
}
|
||||
|
||||
List<FileStatus> fileStatuses = new ArrayList<FileStatus>();
|
||||
|
||||
List<FilerProto.Entry> entries = filerClient.listEntries(path.toUri().getPath());
|
||||
@@ -74,7 +84,9 @@ public class SeaweedFileSystemStore {
|
||||
|
||||
fileStatuses.add(fileStatus);
|
||||
}
|
||||
LOG.debug("listEntries path: {} size {}", fileStatuses, fileStatuses.size());
|
||||
return fileStatuses.toArray(new FileStatus[0]);
|
||||
|
||||
}
|
||||
|
||||
public FileStatus getFileStatus(final Path path) {
|
||||
|
||||
Reference in New Issue
Block a user