OPENDJ-2016 Implement new on disk merge import strategy based on storage engine
Trying to use concurrent data structures for the Buffer class has not given performance improvements.
I think this was due to the overhead of these concurrent data structures and locking / unlocking.
Consequently, I removed all uses of concurrent data structures.
Implemented SecondPhaseProgressTask to display progress for the second phase of import.
Also fixed a bug in ImportIDSetsMerger.buildEntryIDSet().
OnDiskMergeStorageImporter.java:
Removed all concurrent related code, including ConcurrentHashSet, replaced with single threaded data structures.
In Buffer:
- added treeName, and indexFile fields + renamed file field to indexFile
- added MapMode as a parameter of the constructor + getMode()
- moved readBufferPositions() and getCursors() (renamed to openCursor()) to this class
Implemented SecondPhaseProgressTask to display progress for the second phase.
Added ProgressCursor inner class.
In CompositeCursor constructor, Iterator now operates on a copy of the provided cursors.
Added ByteBufferCusor.getBytesRead().
In importPhaseOne() and importPhaseTwo(), added a final run of the progress task to display the end state.
In copyTo(), added a SecondPhaseProgressTask parameter.
In ImportIDSetsMerger.buildEntryIDSet(), fixed a bug.