[
https://issues.apache.org/jira/browse/PHOENIX-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334517#comment-15334517
]
James Taylor commented on PHOENIX-3000:
---------------------------------------
+1 on the patch. That's pretty interesting, [~lhofhansl]. I thought that mantra
was always to *not copy*. I think we could use this same change elsewhere in
our other filters or server-side aggregation code. The memory management may
not be applicable here. The base interface is
org.apache.phoenix.memory.MemoryManager. For an example usage, see
GroupedAggregateRegionObserver.InMemoryGroupByCache where we cache the
aggregated rows and track the memory we're using. The configs that controls
this are {{phoenix.query.maxGlobalMemoryPercentage}},
{{phoenix.query.maxGlobalMemoryWaitMs}}, and
{{phoenix.query.maxTenantMemoryPercentage}}.
> Reduce memory consumption during DISTINCT aggregation
> -----------------------------------------------------
>
> Key: PHOENIX-3000
> URL: https://issues.apache.org/jira/browse/PHOENIX-3000
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Attachments: 3000.txt
>
>
> In {{DistinctValueWithCountServerAggregator.aggregate}} we hold on the ptr
> handed to us from HBase.
> Note that this pointer points into an HFile Block, and hence we hold onto the
> entire block for the duration of the aggregation.
> If the column has high cardinality we might attempt holding the entire table
> in memory in the extreme case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)