Browse Source

HCFS recursively delete files

pull/800/head
Chris Lu 6 years ago
parent
commit
09383860e9
  1. 7
      other/java/hdfs/src/main/java/seaweed/hdfs/SeaweedFileSystemStore.java

7
other/java/hdfs/src/main/java/seaweed/hdfs/SeaweedFileSystemStore.java

@ -116,6 +116,13 @@ public class SeaweedFileSystemStore {
return true;
}
if (recursive && isDirectroy) {
List<FilerProto.Entry> entries = lookupEntries(path);
for (FilerProto.Entry entry : entries) {
deleteEntries(new Path(path, entry.getName()), entry.getIsDirectory(), recursive);
}
}
FilerProto.DeleteEntryResponse response =
filerGrpcClient.getBlockingStub().deleteEntry(FilerProto.DeleteEntryRequest.newBuilder()
.setDirectory(getParentDirectory(path))

Loading…
Cancel
Save