jackylk commented on a change in pull request #3571: [CARBONDATA-3659] Fix 
issues with alluxio without host and port.
URL: https://github.com/apache/carbondata/pull/3571#discussion_r365520617
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockDataMap.java
 ##########
 @@ -137,12 +137,14 @@ public void init(DataMapModel dataMapModel)
         // if the segment data is written in tablepath then no need to store 
whole path of file.
         !blockletDataMapInfo.getFilePath().startsWith(
             blockletDataMapInfo.getCarbonTable().getTablePath())) {
-      filePath = 
path.getParent().toString().getBytes(CarbonCommonConstants.DEFAULT_CHARSET);
+      filePath =
+          path.substring(0, 
path.lastIndexOf("/")).getBytes(CarbonCommonConstants.DEFAULT_CHARSET);
 
 Review comment:
   I found that you can use `FilenameUtils.getFullPathNoEndSeparator(file)` 
from Apache Commons
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to