diff options
Diffstat (limited to 'core/src')
14 files changed, 29 insertions, 30 deletions
diff --git a/core/src/main/java/org/apache/spark/api/java/function/package-info.java b/core/src/main/java/org/apache/spark/api/java/function/package-info.java index 463a42f233..eefb29aca9 100644 --- a/core/src/main/java/org/apache/spark/api/java/function/package-info.java +++ b/core/src/main/java/org/apache/spark/api/java/function/package-info.java @@ -20,4 +20,4 @@ * these interfaces to pass functions to various Java API methods for Spark. Please visit Spark's * Java programming guide for more details. */ -package org.apache.spark.api.java.function;
\ No newline at end of file +package org.apache.spark.api.java.function; diff --git a/core/src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java b/core/src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java index c4041a97e8..2be5a16b2d 100644 --- a/core/src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java +++ b/core/src/main/java/org/apache/spark/shuffle/sort/ShuffleExternalSorter.java @@ -256,8 +256,8 @@ final class ShuffleExternalSorter extends MemoryConsumer { final long spillSize = freeMemory(); inMemSorter.reset(); // Reset the in-memory sorter's pointer array only after freeing up the memory pages holding the - // records. Otherwise, if the task is over allocated memory, then without freeing the memory pages, - // we might not be able to get memory for the pointer array. + // records. Otherwise, if the task is over allocated memory, then without freeing the memory + // pages, we might not be able to get memory for the pointer array. taskContext.taskMetrics().incMemoryBytesSpilled(spillSize); return spillSize; } diff --git a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java index 21f2fde79d..c44630fbbc 100644 --- a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java +++ b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java @@ -22,7 +22,6 @@ import com.google.common.primitives.UnsignedLongs; import org.apache.spark.annotation.Private; import org.apache.spark.unsafe.types.ByteArray; import org.apache.spark.unsafe.types.UTF8String; -import org.apache.spark.util.Utils; @Private public class PrefixComparators { @@ -69,7 +68,7 @@ public class PrefixComparators { * Provides radix sort parameters. Comparators implementing this also are indicating that the * ordering they define is compatible with radix sort. */ - public static abstract class RadixSortSupport extends PrefixComparator { + public abstract static class RadixSortSupport extends PrefixComparator { /** @return Whether the sort should be descending in binary sort order. */ public abstract boolean sortDescending(); @@ -82,37 +81,37 @@ public class PrefixComparators { // public static final class UnsignedPrefixComparator extends RadixSortSupport { - @Override public final boolean sortDescending() { return false; } - @Override public final boolean sortSigned() { return false; } + @Override public boolean sortDescending() { return false; } + @Override public boolean sortSigned() { return false; } @Override - public final int compare(long aPrefix, long bPrefix) { + public int compare(long aPrefix, long bPrefix) { return UnsignedLongs.compare(aPrefix, bPrefix); } } public static final class UnsignedPrefixComparatorDesc extends RadixSortSupport { - @Override public final boolean sortDescending() { return true; } - @Override public final boolean sortSigned() { return false; } + @Override public boolean sortDescending() { return true; } + @Override public boolean sortSigned() { return false; } @Override - public final int compare(long bPrefix, long aPrefix) { + public int compare(long bPrefix, long aPrefix) { return UnsignedLongs.compare(aPrefix, bPrefix); } } public static final class SignedPrefixComparator extends RadixSortSupport { - @Override public final boolean sortDescending() { return false; } - @Override public final boolean sortSigned() { return true; } + @Override public boolean sortDescending() { return false; } + @Override public boolean sortSigned() { return true; } @Override - public final int compare(long a, long b) { + public int compare(long a, long b) { return (a < b) ? -1 : (a > b) ? 1 : 0; } } public static final class SignedPrefixComparatorDesc extends RadixSortSupport { - @Override public final boolean sortDescending() { return true; } - @Override public final boolean sortSigned() { return true; } + @Override public boolean sortDescending() { return true; } + @Override public boolean sortSigned() { return true; } @Override - public final int compare(long b, long a) { + public int compare(long b, long a) { return (a < b) ? -1 : (a > b) ? 1 : 0; } } diff --git a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java index 3357b8e474..4f3f0de7b8 100644 --- a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java +++ b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/RadixSort.java @@ -16,7 +16,7 @@ */ package org.apache.spark.util.collection.unsafe.sort; - + import org.apache.spark.unsafe.Platform; import org.apache.spark.unsafe.array.LongArray; @@ -227,7 +227,7 @@ public class RadixSort { } return counts; } - + /** * Specialization of sortAtByte() for key-prefix arrays. */ diff --git a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java index 3c1cd39dc2..8b6c96a4c4 100644 --- a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java +++ b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java @@ -212,8 +212,8 @@ public final class UnsafeExternalSorter extends MemoryConsumer { // written to disk. This also counts the space needed to store the sorter's pointer array. inMemSorter.reset(); // Reset the in-memory sorter's pointer array only after freeing up the memory pages holding the - // records. Otherwise, if the task is over allocated memory, then without freeing the memory pages, - // we might not be able to get memory for the pointer array. + // records. Otherwise, if the task is over allocated memory, then without freeing the memory + // pages, we might not be able to get memory for the pointer array. taskContext.taskMetrics().incMemoryBytesSpilled(spillSize); totalSpillBytes += spillSize; diff --git a/core/src/main/scala/org/apache/spark/annotation/package-info.java b/core/src/main/scala/org/apache/spark/annotation/package-info.java index 12c7afe6f1..9efdccf6b0 100644 --- a/core/src/main/scala/org/apache/spark/annotation/package-info.java +++ b/core/src/main/scala/org/apache/spark/annotation/package-info.java @@ -20,4 +20,4 @@ * This package consist of these annotations, which are used project wide and are reflected in * Scala and Java docs. */ -package org.apache.spark.annotation;
\ No newline at end of file +package org.apache.spark.annotation; diff --git a/core/src/main/scala/org/apache/spark/api/java/package-info.java b/core/src/main/scala/org/apache/spark/api/java/package-info.java index 10a480fc78..699181cafa 100644 --- a/core/src/main/scala/org/apache/spark/api/java/package-info.java +++ b/core/src/main/scala/org/apache/spark/api/java/package-info.java @@ -18,4 +18,4 @@ /** * Spark Java programming APIs. */ -package org.apache.spark.api.java;
\ No newline at end of file +package org.apache.spark.api.java; diff --git a/core/src/main/scala/org/apache/spark/broadcast/package-info.java b/core/src/main/scala/org/apache/spark/broadcast/package-info.java index 1510e6e84c..bbf4a684a1 100644 --- a/core/src/main/scala/org/apache/spark/broadcast/package-info.java +++ b/core/src/main/scala/org/apache/spark/broadcast/package-info.java @@ -18,4 +18,4 @@ /** * Spark's broadcast variables, used to broadcast immutable datasets to all nodes. */ -package org.apache.spark.broadcast;
\ No newline at end of file +package org.apache.spark.broadcast; diff --git a/core/src/main/scala/org/apache/spark/executor/package-info.java b/core/src/main/scala/org/apache/spark/executor/package-info.java index dd3b6815fb..fb280964c4 100644 --- a/core/src/main/scala/org/apache/spark/executor/package-info.java +++ b/core/src/main/scala/org/apache/spark/executor/package-info.java @@ -18,4 +18,4 @@ /** * Package for executor components used with various cluster managers. */ -package org.apache.spark.executor;
\ No newline at end of file +package org.apache.spark.executor; diff --git a/core/src/main/scala/org/apache/spark/io/package-info.java b/core/src/main/scala/org/apache/spark/io/package-info.java index bea1bfdb63..1a46660280 100644 --- a/core/src/main/scala/org/apache/spark/io/package-info.java +++ b/core/src/main/scala/org/apache/spark/io/package-info.java @@ -18,4 +18,4 @@ /** * IO codecs used for compression. */ -package org.apache.spark.io;
\ No newline at end of file +package org.apache.spark.io; diff --git a/core/src/main/scala/org/apache/spark/rdd/package-info.java b/core/src/main/scala/org/apache/spark/rdd/package-info.java index 176cc58179..d9aa9bebe5 100644 --- a/core/src/main/scala/org/apache/spark/rdd/package-info.java +++ b/core/src/main/scala/org/apache/spark/rdd/package-info.java @@ -18,4 +18,4 @@ /** * Provides implementation's of various RDDs. */ -package org.apache.spark.rdd;
\ No newline at end of file +package org.apache.spark.rdd; diff --git a/core/src/main/scala/org/apache/spark/scheduler/package-info.java b/core/src/main/scala/org/apache/spark/scheduler/package-info.java index 5b4a628d3c..90fc65251e 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/package-info.java +++ b/core/src/main/scala/org/apache/spark/scheduler/package-info.java @@ -18,4 +18,4 @@ /** * Spark's DAG scheduler. */ -package org.apache.spark.scheduler;
\ No newline at end of file +package org.apache.spark.scheduler; diff --git a/core/src/main/scala/org/apache/spark/util/package-info.java b/core/src/main/scala/org/apache/spark/util/package-info.java index 819f54ee41..4c5d33d88d 100644 --- a/core/src/main/scala/org/apache/spark/util/package-info.java +++ b/core/src/main/scala/org/apache/spark/util/package-info.java @@ -18,4 +18,4 @@ /** * Spark utilities. */ -package org.apache.spark.util;
\ No newline at end of file +package org.apache.spark.util; diff --git a/core/src/main/scala/org/apache/spark/util/random/package-info.java b/core/src/main/scala/org/apache/spark/util/random/package-info.java index 62c3762dd1..e4f0c0febb 100644 --- a/core/src/main/scala/org/apache/spark/util/random/package-info.java +++ b/core/src/main/scala/org/apache/spark/util/random/package-info.java @@ -18,4 +18,4 @@ /** * Utilities for random number generation. */ -package org.apache.spark.util.random;
\ No newline at end of file +package org.apache.spark.util.random; |