|
|
@ -473,7 +473,11 @@ public class HdfsStorageOperator implements Closeable, StorageOperate { |
|
|
|
// TODO: add hdfs prefix getFile
|
|
|
|
// TODO: add hdfs prefix getFile
|
|
|
|
List<StorageEntity> storageEntityList = new ArrayList<>(); |
|
|
|
List<StorageEntity> storageEntityList = new ArrayList<>(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
FileStatus[] fileStatuses = fs.listStatus(new Path(path)); |
|
|
|
Path filePath = new Path(path); |
|
|
|
|
|
|
|
if (!fs.exists(filePath)) { |
|
|
|
|
|
|
|
return storageEntityList; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FileStatus[] fileStatuses = fs.listStatus(filePath); |
|
|
|
|
|
|
|
|
|
|
|
// transform FileStatusArray into the StorageEntity List
|
|
|
|
// transform FileStatusArray into the StorageEntity List
|
|
|
|
for (FileStatus fileStatus : fileStatuses) { |
|
|
|
for (FileStatus fileStatus : fileStatuses) { |
|
|
@ -757,6 +761,7 @@ public class HdfsStorageOperator implements Closeable, StorageOperate { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* get active resourcemanager node |
|
|
|
* get active resourcemanager node |
|
|
|
|
|
|
|
* |
|
|
|
* @param protocol http protocol |
|
|
|
* @param protocol http protocol |
|
|
|
* @param rmIds yarn ha ids |
|
|
|
* @param rmIds yarn ha ids |
|
|
|
* @return yarn active node |
|
|
|
* @return yarn active node |
|
|
|