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_r356930422
##########
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:
still getting both data and index size !!
can get only index size here.
----------------------------------------------------------------
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