[GitHub] [carbondata] NamanRastogi commented on a change in pull request #3245: [CARBONDATA-3398] Handled show cache for index server and MV

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] NamanRastogi commented on a change in pull request #3245: [CARBONDATA-3398] Handled show cache for index server and MV

GitBox
NamanRastogi commented on a change in pull request #3245: [CARBONDATA-3398] Handled show cache for index server and MV
URL: https://github.com/apache/carbondata/pull/3245#discussion_r288526861
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
 ##########
 @@ -302,13 +302,14 @@ public synchronized void clear() {
     }
   }
 
-  @Override public String getCacheSize() throws IOException {
+  @Override public String getCacheSize() {
     long sum = 0L;
     int numOfIndexFiles = 0;
     for (Map.Entry<String, Set<TableBlockIndexUniqueIdentifier>> entry : segmentMap.entrySet()) {
       for (TableBlockIndexUniqueIdentifier tableBlockIndexUniqueIdentifier : entry.getValue()) {
-        sum += cache.get(new TableBlockIndexUniqueIdentifierWrapper(tableBlockIndexUniqueIdentifier,
-            getCarbonTable())).getMemorySize();
+        sum += cache.getIfPresent(
 
 Review comment:
   Put a null-check over `cache.getIfPresent(...)`

----------------------------------------------------------------
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