added array of arrays implementation of dictionary #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@luda171 updated java-hdt to be able to process bigger files with 64 bit address space.
The problems with java-hdt were related to the fact that java's native array types use 32-bit int for length and indexing.
This means the maximum length of each array is (2 power of 31 -1) ~ 2 billion elements.
Also other java classes like ByteArrayOutputStream etc depend on arrays in the internal implementation, so they are fast becoming out of capacity.
All changes are in the hdt-java-core .
The patch consists of update of PFCDictionarySectionBig.java where I implemented 2 missed methods : load and save. I used the same array of array approach here as in the other methods already was present in this class..
Also I added SequenceLog64Jarray.java where I ported code from SequenceLog64.java with LongLargeArray class from pl.edu.icm.jlargearrays library.
Right now the default dictionary is still the FourSectionDictionary.java I added FourSectionDictionaryBig.java which is based on two classes discussed above.
The FourSectionDictionaryBig.java can be invoked with dictionary.type = dictionaryFourBig
I made example config file hdt.cfg in hdt-java-core . After changing
hdt-java/hdt-java-core/src/main/java/org/rdfhdt/hdt/example/ExampleGenerate.java to your local parameters you can test it with maven /usr/bin/mvn -e exec:java
Also, just for reference to set java heap for maven
export MAVEN_OPTS=" -Xmx100G "