Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1627#discussion_r156275385
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/util/DeleteLoadFolders.java
---
@@ -122,26 +122,21 @@ private static boolean
checkIfLoadCanBeDeleted(LoadMetadataDetails oneLoad,
return false;
}
- public static boolean deleteLoadFoldersFromFileSystem(
+ public static void deleteLoadFoldersFromFileSystem(
AbsoluteTableIdentifier absoluteTableIdentifier, boolean
isForceDelete,
LoadMetadataDetails[] details) {
- boolean isDeleted = false;
if (details != null && details.length != 0) {
for (LoadMetadataDetails oneLoad : details) {
if (checkIfLoadCanBeDeleted(oneLoad, isForceDelete)) {
String path = getSegmentPath(absoluteTableIdentifier, 0,
oneLoad);
- boolean deletionStatus =
physicalFactAndMeasureMetadataDeletion(path);
- if (deletionStatus) {
- isDeleted = true;
- oneLoad.setVisibility("false");
- LOGGER.info("Info: Deleted the load " + oneLoad.getLoadName());
- }
+ physicalFactAndMeasureMetadataDeletion(path);
--- End diff --
While handling deletion in this method return true in case file does not
exist and add a warning logger. As we dont have any other mechanism for clean
up it will be good if we keep all the remaining code same and only set the
status as true in case of non existence of file
---