You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/08/25 00:28:45 UTC
[jira] [Commented] (DRILL-3703) TopLevelAllocator has a public
static mutable field set as a side effect of its Constructor
[ https://issues.apache.org/jira/browse/DRILL-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14710166#comment-14710166 ]
Jason Altekruse commented on DRILL-3703:
----------------------------------------
[~sudheeshkatkam] Can you try to refactor this? Julian has a good point about why this is not the right way to do this.
> TopLevelAllocator has a public static mutable field set as a side effect of its Constructor
> -------------------------------------------------------------------------------------------
>
> Key: DRILL-3703
> URL: https://issues.apache.org/jira/browse/DRILL-3703
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Flow
> Reporter: Julien Le Dem
> Assignee: Sudheesh Katkam
>
> https://github.com/apache/drill/blob/c5f1bbbb164351fc4b93ba2ef814ad7ab28a80e2/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java#L44
> {noformat} public static long MAXIMUM_DIRECT_MEMORY;{noformat}
> https://github.com/apache/drill/blob/c5f1bbbb164351fc4b93ba2ef814ad7ab28a80e2/exec/java-exec/src/main/java/org/apache/drill/exec/memory/TopLevelAllocator.java#L65
> {noformat}
> private TopLevelAllocator(DrillConfig config, long maximumAllocation, boolean errorOnLeak){
> MAXIMUM_DIRECT_MEMORY = maximumAllocation;
> ...
> }
> {noformat}
> It seems to be used only in MemoryIterator (memory system table):
> https://github.com/apache/drill/blob/c5f1bbbb164351fc4b93ba2ef814ad7ab28a80e2/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/MemoryIterator.java#L66
> Which should not need a static variable to access this information.
> https://github.com/apache/drill/search?utf8=%E2%9C%93&q=MAXIMUM_DIRECT_MEMORY
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)