[
https://issues.apache.org/jira/browse/JENA-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372332#comment-14372332
]
ASF GitHub Bot commented on JENA-901:
-------------------------------------
GitHub user stain opened a pull request:
https://github.com/apache/jena/pull/45
Guava as shaded dependency
(Pull request mainly for discussion)
Add Guava as a shaded dependency in a new module `jena-shadowed-ext`
that can then be used by `jena-core` for
[JENA-901](https://issues.apache.org/jira/browse/JENA-901).
As this means `jena-core` gets a new dependencies (even our own!), and we
have been shot down before for adding those in patch releases, this means a new
minor version on anything from `jena-core` and downstream.
I did not use this shaded jar within Elephas as it does not itself use
Guava - Elephas does however have conflicting version dependencies on Guava
11.0.2 (from provided hadoop-common 2.6.0), 16.0.1 (from curator-client) and
18.0 (from airline dependency in jena-elephas-stats). I therefore changed
`jena-elephas` outdated dependencyManagement on 11.0.2 to [18.0,) -- although
this could be reduced to 16 as jena-elephas-stats is a demo-app and it can
upgrade to 18 locally in its own pom (ideally airline etc. should themselves
use ranges)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/stain/jena guava
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/45.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #45
----
commit 623543a6c31a255d83be0bdb525c09a2f7fd0fac
Author: Stian Soiland-Reyes <[email protected]>
Date: 2015-03-20T23:13:49Z
jena-shadowed-ext containing guava 18.0
commit e8b53617dbb23eedb335a4f2ef3677e9607d1f00
Author: Stian Soiland-Reyes <[email protected]>
Date: 2015-03-20T23:24:22Z
Ignore dependency-reduced-pom.xml
Setting <dependencyReducedPomLocation>target/dependency-reduced-pom.xml
might also work,
but see
https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#dependencyReducedPomLocation
commit a0a75f46dbef59cf389cb1a53c5ed345ca63bd21
Author: Stian Soiland-Reyes <[email protected]>
Date: 2015-03-20T23:25:27Z
Bump minor versions as jena-core gains a dependency
commit 07b65e0f1e6024a0e9735e5ab497aae349d3f70b
Author: Stian Soiland-Reyes <[email protected]>
Date: 2015-03-20T23:27:41Z
typo
----
> Make the cache of LPBRuleEngine bounded to avoid out-of-memory
> --------------------------------------------------------------
>
> Key: JENA-901
> URL: https://issues.apache.org/jira/browse/JENA-901
> Project: Apache Jena
> Issue Type: Improvement
> Components: Reasoners
> Affects Versions: Jena 2.12.1
> Reporter: Jan De Beer
>
> The class "com.hp.hpl.jena.reasoner.rulesys.impl.LPBRuleEngine" uses an
> in-memory cache named "tabledGoals", which has no limit as to the size/number
> of entries stored.
> {noformat}
> /** Table mapping tabled goals to generators for those goals.
> * This is here so that partial goal state can be shared across multiple
> queries. */
> protected HashMap<TriplePattern, Generator> tabledGoals = new HashMap<>();
> {noformat}
> We have experienced out-of-memory issues because of the cache being filled
> with millions of entries in just a few days under normal query usage
> conditions and a heap memory set to 3GB.
> In our setup, we have a dataset containing multiple graphs, some of them are
> actual data graphs (backed by TDB), and then there are two which are ontology
> models using a "TransitiveReasoner" and an "OWLMicroFBRuleReasoner",
> respectively. A typical query may run over all the graphs in the dataset,
> including the ontology ones (see below for a query template). Eventhough the
> ontology graphs would not yield any additional results for data queries
> (which is fine), the above mentioned cache would still fill up with new
> entries.
> {noformat}
> SELECT ?p ?o
> WHERE {
> GRAPH ?g {
> <some resource of interest> ?p ?o .
> }
> }
> {noformat}
> As there is no upper bound to the cache, soon or later all available heap
> memory will be consumed by the cache, giving rise to an out-of-memory
> criticial error.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)