Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDTCatTree + HDTGenDisk #179

Merged
merged 9 commits into from
Nov 21, 2022
Prev Previous commit
Next Next commit
add multithread logs
  • Loading branch information
ate47 committed Nov 4, 2022
commit 549865ffca84363088a817684e3c4723ffa45618
8 changes: 7 additions & 1 deletion hdt-java-cli/src/main/java/org/rdfhdt/hdt/tools/RDF2HDT.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ private static long getMaxTreeCatChunkSize() {
@Parameter(names = "-cattreelocation", description = "Only with -cattree, set the tree building location")
public String catTreeLocation;

@Parameter(names = "-multithread", description = "Use multithread logger")
public boolean multiThreadLog;

private static long findBestMemoryChunkDiskMapTreeCat() {
Runtime runtime = Runtime.getRuntime();
long maxRam = (long) ((runtime.maxMemory() - (runtime.totalMemory() - runtime.freeMemory())) * 0.85) / 3;
Expand Down Expand Up @@ -228,7 +231,10 @@ public void execute() throws ParserException, IOException {
listenerConsole.notifyProgress(100, "done");
}
} else {
hdt = HDTManager.generateHDT(rdfInput, baseURI, notation, spec, this);
ProgressListener listenerConsole =
!quiet ? (multiThreadLog ? new MultiThreadListenerConsole() : this)
: null;
hdt = HDTManager.generateHDT(rdfInput, baseURI, notation, spec, listenerConsole);
}
System.out.println("File converted in: "+sw.stopAndShow());

Expand Down