diff options
author | Reynold Xin <rxin@databricks.com> | 2016-01-14 23:33:45 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-01-14 23:33:45 -0800 |
commit | fe7246fea67e1d71fba679dee3eb2c7386b4f4e2 (patch) | |
tree | 87eab49f413675d52523c1148d5bb8522c67c38b /network/common | |
parent | 591c88c9e2a6c2e2ca84f1b66c635f198a16d112 (diff) | |
download | spark-fe7246fea67e1d71fba679dee3eb2c7386b4f4e2.tar.gz spark-fe7246fea67e1d71fba679dee3eb2c7386b4f4e2.tar.bz2 spark-fe7246fea67e1d71fba679dee3eb2c7386b4f4e2.zip |
[SPARK-12830] Java style: disallow trailing whitespaces.
Author: Reynold Xin <rxin@databricks.com>
Closes #10764 from rxin/SPARK-12830.
Diffstat (limited to 'network/common')
-rw-r--r-- | network/common/src/main/java/org/apache/spark/network/buffer/LazyFileRegion.java | 2 | ||||
-rw-r--r-- | network/common/src/main/java/org/apache/spark/network/util/ByteUnit.java | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/network/common/src/main/java/org/apache/spark/network/buffer/LazyFileRegion.java b/network/common/src/main/java/org/apache/spark/network/buffer/LazyFileRegion.java index 81bc8ec40f..162cf6da0d 100644 --- a/network/common/src/main/java/org/apache/spark/network/buffer/LazyFileRegion.java +++ b/network/common/src/main/java/org/apache/spark/network/buffer/LazyFileRegion.java @@ -32,7 +32,7 @@ import org.apache.spark.network.util.JavaUtils; /** * A FileRegion implementation that only creates the file descriptor when the region is being * transferred. This cannot be used with Epoll because there is no native support for it. - * + * * This is mostly copied from DefaultFileRegion implementation in Netty. In the future, we * should push this into Netty so the native Epoll transport can support this feature. */ diff --git a/network/common/src/main/java/org/apache/spark/network/util/ByteUnit.java b/network/common/src/main/java/org/apache/spark/network/util/ByteUnit.java index 36d655017f..a2f018373f 100644 --- a/network/common/src/main/java/org/apache/spark/network/util/ByteUnit.java +++ b/network/common/src/main/java/org/apache/spark/network/util/ByteUnit.java @@ -33,8 +33,8 @@ public enum ByteUnit { public long convertFrom(long d, ByteUnit u) { return u.convertTo(d, this); } - - // Convert the provided number (d) interpreted as this unit type to unit type (u). + + // Convert the provided number (d) interpreted as this unit type to unit type (u). public long convertTo(long d, ByteUnit u) { if (multiplier > u.multiplier) { long ratio = multiplier / u.multiplier; @@ -44,7 +44,7 @@ public enum ByteUnit { } return d * ratio; } else { - // Perform operations in this order to avoid potential overflow + // Perform operations in this order to avoid potential overflow // when computing d * multiplier return d / (u.multiplier / multiplier); } @@ -54,14 +54,14 @@ public enum ByteUnit { if (d < 0) { throw new IllegalArgumentException("Negative size value. Size must be positive: " + d); } - return d * multiplier; + return d * multiplier; } - + public long toKiB(long d) { return convertTo(d, KiB); } public long toMiB(long d) { return convertTo(d, MiB); } public long toGiB(long d) { return convertTo(d, GiB); } public long toTiB(long d) { return convertTo(d, TiB); } public long toPiB(long d) { return convertTo(d, PiB); } - + private final long multiplier; } |