You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kumarvishal09 <gi...@git.apache.org> on 2017/09/12 12:50:29 UTC
[GitHub] carbondata pull request #1346: [CARBONDATA-1472] Optimize memory and fix nos...
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1346#discussion_r138253487
--- Diff: core/src/main/java/org/apache/carbondata/core/datastore/chunk/store/impl/unsafe/UnsafeAbstractDimensionDataChunkStore.java ---
@@ -68,10 +72,9 @@
* @param numberOfRows total number of rows
*/
public UnsafeAbstractDimensionDataChunkStore(long totalSize, boolean isInvertedIdex,
- int numberOfRows) {
+ int numberOfRows) throws MemoryException {
// allocating the data page
- this.dataPageMemoryBlock =
- MemoryAllocatorFactory.INSATANCE.getMemoryAllocator().allocate(totalSize);
+ this.dataPageMemoryBlock = UnsafeMemoryManager.allocateMemoryWithRetry(taskId, totalSize);
--- End diff --
From this class it self we can throw runtime exception if Unsafesafe memory manager not able to allocate requested memory
---