carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1185: [CARBONDATA-1318]Fixed Concurrent table data ...
Date Thu, 20 Jul 2017 01:36:50 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1185#discussion_r128408050
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/memory/IntPointerBuffer.java ---
    @@ -67,24 +73,25 @@ public int get(int rowId) {
         return pointerBlock[rowId];
       }
     
    -  public void loadToUnsafe() throws MemoryException {
    -    pointerMemoryBlock = UnsafeMemoryManager.allocateMemoryWithRetry(pointerBlock.length
* 4);
    -    for (int i = 0; i < pointerBlock.length; i++) {
    -      CarbonUnsafe.unsafe
    -          .putInt(pointerMemoryBlock.getBaseObject(), pointerMemoryBlock.getBaseOffset()
+ i * 4,
    -              pointerBlock[i]);
    +  public void loadToUnsafe() {
    +    try {
    +      pointerMemoryBlock =
    +          UnsafeSortMemoryManager.allocateMemoryWithRetry(this.taskId, pointerBlock.length
* 4);
    +      for (int i = 0; i < pointerBlock.length; i++) {
    +        CarbonUnsafe.unsafe
    +            .putInt(pointerMemoryBlock.getBaseObject(), pointerMemoryBlock.getBaseOffset()
+ i * 4,
    +                pointerBlock[i]);
    +      }
    +      pointerBlock = null;
    +    } catch (MemoryException e) {
    +      LOGGER.error("Not enough memory for allocating pointer buffer, sorting in heap");
    --- End diff --
    
    change to `warn`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message