-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds a reasoner.dispose() call to the batch handler's cleanup code. - Adds DebugTools.logMemory() to print a message and the current free memory. - Adds a version of ParserWrapper that uses the catalog.xml to find local OWL models.
- Loading branch information
dkeith
committed
Dec 14, 2015
1 parent
601d693
commit b336545
Showing
6 changed files
with
197 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
minerva-core/src/main/java/org/geneontology/minerva/util/DebugTools.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.geneontology.minerva.util; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.Collections; | ||
import java.util.HashMap; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; | ||
import java.util.Stack; | ||
import java.util.UUID; | ||
|
||
import org.apache.log4j.Level; | ||
import org.apache.log4j.Logger; | ||
|
||
/** | ||
* | ||
* | ||
* @author dbk | ||
* | ||
*/ | ||
public class DebugTools { | ||
private static Logger LOG = Logger.getLogger(DebugTools.class); | ||
private static Runtime runtime = Runtime.getRuntime(); | ||
|
||
public static void logMemory( | ||
String title) | ||
{ | ||
double bytesToMB = 1.0 / (double)(1024L*1024L); | ||
String statusText = "DebugTools[memory] " + title; | ||
|
||
runtime.gc(); | ||
statusText += " freeMemory: " + (int) (runtime.freeMemory() * bytesToMB); | ||
LOG.info(statusText); | ||
} | ||
} | ||
|
14 changes: 14 additions & 0 deletions
14
minerva-core/src/main/java/org/geneontology/minerva/util/ParserWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.geneontology.minerva.util; | ||
|
||
import java.io.IOException; | ||
import owltools.io.CatalogXmlIRIMapper; | ||
|
||
public class ParserWrapper extends owltools.io.ParserWrapper { | ||
public ParserWrapper() throws IOException | ||
{ | ||
super(); | ||
|
||
addIRIMapper(new CatalogXmlIRIMapper("../cache/catalog-v001.xml")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
mvn package -am -pl minerva-server -Dmaven.javadoc.skip=true -Dsource.skip=true -DskipTests | ||
|
||
echo "------------------" | ||
echo "------------------" | ||
echo "------------------" | ||
|
||
export MINERVA_MEMORY=2G | ||
export MINERVA_PORT=6800 | ||
export GO_ROOT=./cache | ||
export NOCTUA_MODELS=../noctua-models/models | ||
export MINERVA_SERVER=./minerva-server/bin/minerva-server.jar | ||
|
||
java \ | ||
-Xmx${MINERVA_MEMORY} \ | ||
-jar ${MINERVA_SERVER} \ | ||
-g ${GO_ROOT}/merged.owl \ | ||
-f ${NOCTUA_MODELS} \ | ||
--port ${MINERVA_PORT} \ | ||
-c ${GO_ROOT}/catalog-v001.xml \ | ||
--use-golr-url-logging \ | ||
--slme-elk \ | ||
--use-golr-url-logging \ | ||
--use-golr-url-logging \ | ||
exit | ||
|
||
|
||
# gulp.task('run-minerva', shell.task(_run_cmd( | ||
# ['java', | ||
# '-Xmx' + minerva_max_mem + 'G', | ||
# '-cp', './java/lib/minerva-cli.jar', | ||
# 'org.geneontology.minerva.server.StartUpTool', | ||
# '--use-golr-url-logging', | ||
# '--use-request-logging', | ||
# '--slme-elk', | ||
# '-g', 'http://purl.obolibrary.org/obo/go/extensions/go-lego.owl', | ||
# '--set-important-relation-parent', 'http://purl.obolibrary.org/obo/LEGOREL_0000000', | ||
# '--golr-labels', golr_neo_lookup_url, | ||
# '--golr-seed', golr_lookup_url, | ||
# '-c', geneontology_catalog, | ||
# '-f', noctua_models, | ||
# '--port', minerva_port | ||
# ] | ||
# ))); | ||
|
||
|
||
# java \ | ||
# -Xmx${MINERVA_MEMORY} \ | ||
# -jar ${MINERVA_SERVER} \ | ||
# -c ${GO_SVN}/ontology/extensions/catalog-v001.xml \ | ||
# -g http://purl.obolibrary.org/obo/go/extensions/go-lego.owl \ | ||
# --obsolete-import http://purl.obolibrary.org/obo/go.owl \ | ||
# --obsolete-import http://purl.obolibrary.org/obo/go/extensions/x-disjoint.owl \ | ||
# --obsolete-import http://purl.obolibrary.org/obo/ro.owl \ | ||
# --obsolete-import http://purl.obolibrary.org/obo/go/extensions/ro_pending.owl \ | ||
# --obsolete-import http://purl.obolibrary.org/obo/eco.owl \ | ||
# --set-important-relation-parent http://purl.obolibrary.org/obo/LEGOREL_0000000 \ | ||
# -f ${GO_SVN}/experimental/lego/server/owl-models \ | ||
# --gaf-folder ${GO_SVN}/gene-associations \ | ||
# -p ${GO_SVN}/experimental/lego/server/protein/subset \ | ||
# --port ${MINERVA_PORT} |