Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2387#discussion_r197010690
--- Diff:
core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java ---
@@ -1530,6 +1531,22 @@ public String getSystemFolderLocation() {
if (systemLocation == null) {
systemLocation = getStorePath();
}
+ // append the HDFS uri to the system folder if not already added.
+ systemLocation =
CarbonUtil.checkAndAppendFileSystemURIScheme(systemLocation);
+ FileFactory.FileType fileType =
FileFactory.getFileType(systemLocation);
+ switch (fileType) {
+ case HDFS:
+ case VIEWFS:
+ case ALLUXIO:
+ break;
+ case LOCAL:
+ // for local fs remove the URI scheme and unify the path
representation
+ systemLocation = FileFactory.getUpdatedFilePath(systemLocation);
+ break;
+ default:
+ // for local fs remove the URI scheme and unify the path
representation
+ systemLocation = FileFactory.getUpdatedFilePath(systemLocation);
+ }
--- End diff --
switch case is not required here as only one operation is performed...you
can directly write
systemLocation =
FileFactory.getUpdatedFilePath(CarbonUtil.checkAndAppendFileSystemURIScheme(systemLocation));
getUpdatedFilePath will internally handle to make the required modification
only for Local file system
---