diff options
Diffstat (limited to 'unsafe')
4 files changed, 11 insertions, 7 deletions
diff --git a/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSet.java b/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSet.java index 28e23da108..7c124173b0 100644 --- a/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSet.java +++ b/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSet.java @@ -90,7 +90,7 @@ public final class BitSet { * To iterate over the true bits in a BitSet, use the following loop: * <pre> * <code> - * for (long i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) { + * for (long i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) { * // operate on index i here * } * </code> diff --git a/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java b/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java index 0987191c1c..27462c7fa5 100644 --- a/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java +++ b/unsafe/src/main/java/org/apache/spark/unsafe/bitset/BitSetMethods.java @@ -87,7 +87,7 @@ public final class BitSetMethods { * To iterate over the true bits in a BitSet, use the following loop: * <pre> * <code> - * for (long i = bs.nextSetBit(0, sizeInWords); i >= 0; i = bs.nextSetBit(i + 1, sizeInWords)) { + * for (long i = bs.nextSetBit(0, sizeInWords); i >= 0; i = bs.nextSetBit(i + 1, sizeInWords)) { * // operate on index i here * } * </code> diff --git a/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java b/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java index 8d8c08de52..d0bde69cc1 100644 --- a/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java +++ b/unsafe/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java @@ -404,14 +404,17 @@ public final class BytesToBytesMap { * at the value address. * <p> * It is only valid to call this method immediately after calling `lookup()` using the same key. + * </p> * <p> * The key and value must be word-aligned (that is, their sizes must multiples of 8). + * </p> * <p> * After calling this method, calls to `get[Key|Value]Address()` and `get[Key|Value]Length` * will return information on the data stored by this `putNewKey` call. + * </p> * <p> * As an example usage, here's the proper way to store a new key: - * <p> + * </p> * <pre> * Location loc = map.lookup(keyBaseObject, keyBaseOffset, keyLengthInBytes); * if (!loc.isDefined()) { @@ -420,6 +423,7 @@ public final class BytesToBytesMap { * </pre> * <p> * Unspecified behavior if the key is not defined. + * </p> */ public void putNewKey( Object keyBaseObject, diff --git a/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java b/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java index 60d050b0a0..e7f9fbb2bc 100644 --- a/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java +++ b/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java @@ -330,8 +330,8 @@ public final class UTF8String implements Comparable<UTF8String>, Serializable { /** * Returns str, right-padded with pad to a length of len * For example: - * ('hi', 5, '??') => 'hi???' - * ('hi', 1, '??') => 'h' + * ('hi', 5, '??') => 'hi???' + * ('hi', 1, '??') => 'h' */ public UTF8String rpad(int len, UTF8String pad) { int spaces = len - this.numChars(); // number of char need to pad @@ -363,8 +363,8 @@ public final class UTF8String implements Comparable<UTF8String>, Serializable { /** * Returns str, left-padded with pad to a length of len. * For example: - * ('hi', 5, '??') => '???hi' - * ('hi', 1, '??') => 'h' + * ('hi', 5, '??') => '???hi' + * ('hi', 1, '??') => 'h' */ public UTF8String lpad(int len, UTF8String pad) { int spaces = len - this.numChars(); // number of char need to pad |