This file contains hidden or 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
| import java.io.RandomAccessFile; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.Method; | |
| import java.nio.channels.FileChannel; | |
| import sun.nio.ch.FileChannelImpl; | |
| import sun.misc.Unsafe; | |
| @SuppressWarnings("restriction") | |
| public class MMapper { |
This file contains hidden or 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
| <plugin> | |
| <!-- uberjar via "mvn package shade:shade" --> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-shade-plugin</artifactId> | |
| <version>2.3</version> | |
| <executions> | |
| <execution> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>shade</goal> |
This file contains hidden or 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
| public class TombstoneBinarySearch { | |
| public static int binarySearch(long[] a, int fromIndex, int toIndex, long key, long tombstone) { | |
| int low = fromIndex; | |
| int high = toIndex - 1; | |
| while (low <= high) { | |
| int mid = (low + high) >>> 1; | |
| final int origMid = mid; | |
| long midVal = a[mid]; | |
This file contains hidden or 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
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.security.InvalidAlgorithmParameterException; | |
| import java.security.InvalidKeyException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.SecureRandom; | |
| import java.security.spec.InvalidKeySpecException; | |
| import java.security.spec.KeySpec; |
OlderNewer