MarvinLitt commented on a change in pull request #3855:
URL: https://github.com/apache/carbondata/pull/3855#discussion_r460346871
##########
File path:
core/src/main/java/org/apache/carbondata/core/datastore/filesystem/LocalCarbonFile.java
##########
@@ -485,4 +486,30 @@ public boolean equals(Object o) {
public int hashCode() {
return Objects.hash(file.getAbsolutePath());
}
+
+ @Override
+ public List<CarbonFile> listDirs() throws IOException {
+ if (!file.isDirectory()) {
+ return new ArrayList<CarbonFile>();
+ }
+ Collection<File> fileCollection = FileUtils.listFilesAndDirs(file,
+ DirectoryFileFilter.DIRECTORY, null);
+ if (fileCollection.isEmpty()) {
+ return new ArrayList<CarbonFile>();
+ }
+ List<CarbonFile> carbonFiles = new ArrayList<CarbonFile>();
+ for (File file : fileCollection) {
+ if (file.isDirectory()) {
+ File[] files = file.listFiles();
Review comment:
try to find all folders from /tmp/indexservertmp.
no list recursive, just find the direct directory under /tmp/indexservertmp.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]