You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/15 07:15:24 UTC

[GitHub] [arrow] zhztheplayer opened a new pull request #7768: [ARROW-9475] Clean up usages of BaseAllocator, use BufferAllocator in…

zhztheplayer opened a new pull request #7768:
URL: https://github.com/apache/arrow/pull/7768


   …stead
   
   Issue link: https://issues.apache.org/jira/browse/ARROW-9475.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] zhztheplayer commented on a change in pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
zhztheplayer commented on a change in pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#discussion_r456764886



##########
File path: java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferAllocator.java
##########
@@ -126,6 +134,30 @@ BufferAllocator newChildAllocator(
    */
   long getHeadroom();
 
+  /**
+   * Forcibly allocate bytes. Returns whether the allocation fit within limits.
+   *
+   * @param size to increase
+   * @return Whether the allocation fit within limits.
+   */
+  boolean forceAllocate(long size);

Review comment:
       Hi @rymurr,
   
   E.g. Please see the changes such as 
   
   https://github.com/apache/arrow/pull/7768/files#diff-68d17bac8aafb7004e2fb310f131df5fR159-R163
   
   The uses of BufferAllocator requires for having the relevant methods extracted up to interface.
   
   




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] zhztheplayer commented on a change in pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
zhztheplayer commented on a change in pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#discussion_r456764886



##########
File path: java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferAllocator.java
##########
@@ -126,6 +134,30 @@ BufferAllocator newChildAllocator(
    */
   long getHeadroom();
 
+  /**
+   * Forcibly allocate bytes. Returns whether the allocation fit within limits.
+   *
+   * @param size to increase
+   * @return Whether the allocation fit within limits.
+   */
+  boolean forceAllocate(long size);

Review comment:
       Hi @rymurr,
   
   E.g. In AllocationMangager code, we were calling BaseAllocator#releaseBytes:
   
   https://github.com/apache/arrow/blob/d9525f1b19c00e440b3af83a68d1f2bba89a0a24/java/memory/memory-core/src/main/java/org/apache/arrow/memory/AllocationManager.java#L155
   
   After changes in this PR, we are now trying to call BufferAllocator#releaseBytes:
   
   https://github.com/apache/arrow/pull/7768/files#diff-68d17bac8aafb7004e2fb310f131df5fR160
   
   That's why the method is added to BufferAllocator.
   
   




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] zhztheplayer commented on pull request #7768: [ARROW-9475] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
zhztheplayer commented on pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#issuecomment-658597394


   This patch is also supposed to be a dependency of #7030 ([ARROW-7808](https://issues.apache.org/jira/browse/ARROW-7808)).


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] zhztheplayer commented on pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
zhztheplayer commented on pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#issuecomment-671056505


   @jacques-n Could you please talk a look? Thanks. 
   
   For ARROW-7808, having this one solved we could be able to leave customized AllocationManager implementation out of the package `org.apache.arrow.memory`.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] emkornfield commented on pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
emkornfield commented on pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#issuecomment-709793177


   +1 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] rymurr commented on a change in pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
rymurr commented on a change in pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#discussion_r468539432



##########
File path: java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferAllocator.java
##########
@@ -126,6 +134,30 @@ BufferAllocator newChildAllocator(
    */
   long getHeadroom();
 
+  /**
+   * Forcibly allocate bytes. Returns whether the allocation fit within limits.
+   *
+   * @param size to increase
+   * @return Whether the allocation fit within limits.
+   */
+  boolean forceAllocate(long size);

Review comment:
       :+1:  sorry, missed that




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#issuecomment-658605133


   https://issues.apache.org/jira/browse/ARROW-9475


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] emkornfield closed pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
emkornfield closed pull request #7768:
URL: https://github.com/apache/arrow/pull/7768


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7768: [ARROW-9475] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#issuecomment-658592176


   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   Could you open an issue for this pull request on JIRA?
   https://issues.apache.org/jira/browse/ARROW
   
   Then could you also rename pull request title in the following format?
   
       ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [arrow] rymurr commented on a change in pull request #7768: ARROW-9475: [Java] Clean up usages of BaseAllocator, use BufferAllocator in…

Posted by GitBox <gi...@apache.org>.
rymurr commented on a change in pull request #7768:
URL: https://github.com/apache/arrow/pull/7768#discussion_r454964570



##########
File path: java/memory/memory-core/src/main/java/org/apache/arrow/memory/BufferAllocator.java
##########
@@ -126,6 +134,30 @@ BufferAllocator newChildAllocator(
    */
   long getHeadroom();
 
+  /**
+   * Forcibly allocate bytes. Returns whether the allocation fit within limits.
+   *
+   * @param size to increase
+   * @return Whether the allocation fit within limits.
+   */
+  boolean forceAllocate(long size);

Review comment:
       I didn't see where this or releaseBytes are used in code. What is the purpose of releaseBytes and of makign forceAllocate public




----------------------------------------------------------------
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:
users@infra.apache.org