ajantha-bhat commented on a change in pull request #3496: [CARBONDATA-3601] Show Segments displays wrong Index size for Partition table with Merge Index Enabled
URL:
https://github.com/apache/carbondata/pull/3496#discussion_r356934181
##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
##########
@@ -2714,6 +2714,21 @@ public static long getSizeOfSegment(String tablePath, Segment segment) throws IO
return size;
}
+ public static long getIndexSize(String tablePath, Segment segment) throws IOException {
+ if (segment.getSegmentFileName() != null) {
+ SegmentFileStore fileStore = new SegmentFileStore(tablePath, segment.getSegmentFileName());
+ if (fileStore.getLocationMap() != null) {
+ fileStore.readIndexFiles(FileFactory.getConfiguration());
+ return getCarbonIndexSize(fileStore, fileStore.getLocationMap());
+ }
+ } else {
+ HashMap<String, Long> dataSizeAndIndexSize = getDataSizeAndIndexSize(
Review comment:
can get the index file name and pass here ? again doing list files on S3a can be costly operation
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services