-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fix HDTcat to work under Windows #128
Conversation
* Adds `close()` methods to LongArrayDisk and dependent classes. Also makes them closeable. Closing LongArrayDisk causes the underlying RandomAccessFile to be closed, which was never done, leading to exceptions being thrown when those files were to be removed. * removes the setLength() call in LongArrayDisk, which also causes an exception under Windows. Nowhere in the docs is it stated that this call is necessary, the file only grows upon writing to it. The effect (under Windows) is simply that the exception goes away. * Adds missing close() calls for some streams in FourSectionDictionaryCat * Replaces `Files.delete(Paths.get(...))` calls with `new File(...).delete()` calls, which inexplicably gets rid of the exceptions thrown under Windows when temporary files are deleted.
I overflew the code and I run the tests. For me we can accept this pull request. |
@fkleedorfer can you also remove this now ....
|
done |
Looks good. Anything else before I merge? |
For me it is fine! |
Thanks both! I asked some minor questions, mostly about changes made to the core code |
Basically there is no change to the core code. The code changes affect only hdtCat and the tests are passing. But it's good that you give a look too! |
Not sure where I can see these questions, @mielvds |
hdt-java-core/src/main/java/org/rdfhdt/hdt/compact/sequence/SequenceLog64BigDisk.java
Show resolved
Hide resolved
hdt-java-core/src/main/java/org/rdfhdt/hdt/hdt/impl/HDTImpl.java
Outdated
Show resolved
Hide resolved
hdt-java-core/src/main/java/org/rdfhdt/hdt/util/disk/LongArrayDisk.java
Outdated
Show resolved
Hide resolved
From my side, this PR is ready to merge. |
Thanks @fkleedorfer @D063520 ! |
…anager#indexedHDT(), remove many unhandled try/catch, remove unhandled try/catch added in rdfhdt#128 and fix LongArrayDisk if sizeBit % MAPPING_SIZE == 0
close()
methods to LongArrayDisk and dependent classes. Also makes them implement Closeable. Closing LongArrayDisk causes the underlying RandomAccessFile to be closed, which was never done, leading to exceptions being thrown when those files were to be removed.Files.delete(Paths.get(...))
calls withnew File(...).delete()
calls, which inexplicably gets rid of the exceptions thrown under Windows when temporary files are deleted.Fixes #127