carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [35/50] [abbrv] carbondata git commit: [CARBONDATA-2812] Implement freeMemory for complex pages
Date Tue, 07 Aug 2018 13:09:59 GMT
[CARBONDATA-2812] Implement freeMemory for complex pages

Problem:
The memory used by the ColumnPageWrapper (for complex data types) is not
cleared and so it requires more memory to Load and Query.

Solution:
Clear the used memory in the freeMemory method.

This closes #2599


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/f2e898ac
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/f2e898ac
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/f2e898ac

Branch: refs/heads/external-format
Commit: f2e898ac585458b6c99e08c8fac0e47bec93fee0
Parents: a2928e3
Author: dhatchayani <dhatcha.official@gmail.com>
Authored: Thu Aug 2 08:30:32 2018 +0530
Committer: kunal642 <kunalkapoor642@gmail.com>
Committed: Thu Aug 2 17:49:26 2018 +0530

----------------------------------------------------------------------
 .../core/datastore/chunk/store/ColumnPageWrapper.java           | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/f2e898ac/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java
b/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java
index 180b3a2..a5d5917 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/ColumnPageWrapper.java
@@ -163,7 +163,10 @@ public class ColumnPageWrapper implements DimensionColumnPage {
 
   @Override
   public void freeMemory() {
-
+    if (null != columnPage) {
+      columnPage.freeMemory();
+      columnPage = null;
+    }
   }
 
   public boolean isAdaptiveComplexPrimitive() {


Mime
View raw message