From 20c1434a8dbb25b98f6b434b158ae88e44ce3057 Mon Sep 17 00:00:00 2001
From: Joseph Gonzalez
* Use this class to start Spark applications programmatically. The class uses a builder pattern
* to allow clients to configure the Spark application and launch it as a child process.
+ *
* This library allows applications to launch Spark programmatically. There's only one entry
* point to the library - the {@link org.apache.spark.launcher.SparkLauncher} class.
- *
* To launch a Spark application, just instantiate a {@link org.apache.spark.launcher.SparkLauncher} * and configure the application to run. For example: - * + *
+ * ** {@code * import org.apache.spark.launcher.SparkLauncher; 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: **- * 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 * } *
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: **- * 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 * } *
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. ** It is only valid to call this method immediately after calling `lookup()` using the same key. + *
** The key and value must be word-aligned (that is, their sizes must multiples of 8). + *
** 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. + *
** As an example usage, here's the proper way to store a new key: - *
+ *
** Location loc = map.lookup(keyBaseObject, keyBaseOffset, keyLengthInBytes); * if (!loc.isDefined()) { @@ -420,6 +423,7 @@ public final class BytesToBytesMap { *** Unspecified behavior if the key is not defined. + *
*/ 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, 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 , 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 -- cgit v1.2.3