[
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)