Skip to content

Commit 91995aa

Browse files
committed
[MINOR][BUILD] Fix CheckStyle Error
1 parent 9ac68db commit 91995aa

File tree

8 files changed

+27
-21
lines changed

8 files changed

+27
-21
lines changed

common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ public void operationComplete(ChannelFuture future) throws Exception {
150150
if (future.isSuccess()) {
151151
long timeTaken = System.currentTimeMillis() - startTime;
152152
if (logger.isTraceEnabled()) {
153-
logger.trace("Sending request {} to {} took {} ms", streamChunkId, getRemoteAddress(channel),
154-
timeTaken);
153+
logger.trace("Sending request {} to {} took {} ms", streamChunkId,
154+
getRemoteAddress(channel), timeTaken);
155155
}
156156
} else {
157157
String errorMsg = String.format("Failed to send request %s to %s: %s", streamChunkId,
@@ -193,8 +193,8 @@ public void operationComplete(ChannelFuture future) throws Exception {
193193
if (future.isSuccess()) {
194194
long timeTaken = System.currentTimeMillis() - startTime;
195195
if (logger.isTraceEnabled()) {
196-
logger.trace("Sending request for {} to {} took {} ms", streamId, getRemoteAddress(channel),
197-
timeTaken);
196+
logger.trace("Sending request for {} to {} took {} ms", streamId,
197+
getRemoteAddress(channel), timeTaken);
198198
}
199199
} else {
200200
String errorMsg = String.format("Failed to send request for %s to %s: %s", streamId,
@@ -236,7 +236,8 @@ public void operationComplete(ChannelFuture future) throws Exception {
236236
if (future.isSuccess()) {
237237
long timeTaken = System.currentTimeMillis() - startTime;
238238
if (logger.isTraceEnabled()) {
239-
logger.trace("Sending request {} to {} took {} ms", requestId, getRemoteAddress(channel), timeTaken);
239+
logger.trace("Sending request {} to {} took {} ms", requestId,
240+
getRemoteAddress(channel), timeTaken);
240241
}
241242
} else {
242243
String errorMsg = String.format("Failed to send RPC %s to %s: %s", requestId,

common/network-common/src/main/java/org/apache/spark/network/server/TransportRequestHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public void handle(RequestMessage request) {
116116

117117
private void processFetchRequest(final ChunkFetchRequest req) {
118118
if (logger.isTraceEnabled()) {
119-
logger.trace("Received req from {} to fetch block {}", getRemoteAddress(channel), req.streamChunkId);
119+
logger.trace("Received req from {} to fetch block {}", getRemoteAddress(channel),
120+
req.streamChunkId);
120121
}
121122

122123
ManagedBuffer buf;
@@ -125,8 +126,8 @@ private void processFetchRequest(final ChunkFetchRequest req) {
125126
streamManager.registerChannel(channel, req.streamChunkId.streamId);
126127
buf = streamManager.getChunk(req.streamChunkId.streamId, req.streamChunkId.chunkIndex);
127128
} catch (Exception e) {
128-
logger.error(String.format(
129-
"Error opening block %s for request from %s", req.streamChunkId, getRemoteAddress(channel)), e);
129+
logger.error(String.format("Error opening block %s for request from %s",
130+
req.streamChunkId, getRemoteAddress(channel)), e);
130131
respond(new ChunkFetchFailure(req.streamChunkId, Throwables.getStackTraceAsString(e)));
131132
return;
132133
}

common/network-common/src/main/java/org/apache/spark/network/util/LevelDBProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static void storeVersion(DB db, StoreVersion version, ObjectMapper mapper
121121

122122
public static class StoreVersion {
123123

124-
final static byte[] KEY = "StoreVersion".getBytes(StandardCharsets.UTF_8);
124+
static final byte[] KEY = "StoreVersion".getBytes(StandardCharsets.UTF_8);
125125

126126
public final int major;
127127
public final int minor;

common/network-common/src/main/java/org/apache/spark/network/util/TransportConf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* A central location that tracks all the settings we expose to users.
2424
*/
2525
public class TransportConf {
26-
26+
2727
static {
2828
// Set this due to Netty PR #5661 for Netty 4.0.37+ to work
2929
System.setProperty("io.netty.maxDirectMemory", "0");

common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected void serviceInit(Configuration conf) throws Exception {
197197
private void createSecretManager() throws IOException {
198198
secretManager = new ShuffleSecretManager();
199199
secretsFile = initRecoveryDb(SECRETS_RECOVERY_FILE_NAME);
200-
200+
201201
// Make sure this is protected in case its not in the NM recovery dir
202202
FileSystem fs = FileSystem.getLocal(_conf);
203203
fs.mkdirs(new Path(secretsFile.getPath()), new FsPermission((short)0700));
@@ -306,7 +306,7 @@ protected void serviceStop() {
306306
}
307307
if (db != null) {
308308
db.close();
309-
}
309+
}
310310
} catch (Exception e) {
311311
logger.error("Exception when stopping service", e);
312312
}
@@ -329,7 +329,7 @@ public void setRecoveryPath(Path recoveryPath) {
329329

330330
/**
331331
* Get the path specific to this auxiliary service to use for recovery.
332-
*/
332+
*/
333333
protected Path getRecoveryPath(String fileName) {
334334
return _recoveryPath;
335335
}
@@ -345,7 +345,7 @@ protected File initRecoveryDb(String dbFileName) {
345345
if (recoveryFile.exists()) {
346346
return recoveryFile;
347347
}
348-
}
348+
}
349349
// db doesn't exist in recovery path go check local dirs for it
350350
String[] localDirs = _conf.getTrimmedStrings("yarn.nodemanager.local-dirs");
351351
for (String dir : localDirs) {

core/src/main/java/org/apache/spark/util/collection/unsafe/sort/PrefixComparators.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,26 @@ private PrefixComparators() {}
3030
public static final PrefixComparator STRING = new UnsignedPrefixComparator();
3131
public static final PrefixComparator STRING_DESC = new UnsignedPrefixComparatorDesc();
3232
public static final PrefixComparator STRING_NULLS_LAST = new UnsignedPrefixComparatorNullsLast();
33-
public static final PrefixComparator STRING_DESC_NULLS_FIRST = new UnsignedPrefixComparatorDescNullsFirst();
33+
public static final PrefixComparator STRING_DESC_NULLS_FIRST =
34+
new UnsignedPrefixComparatorDescNullsFirst();
3435

3536
public static final PrefixComparator BINARY = new UnsignedPrefixComparator();
3637
public static final PrefixComparator BINARY_DESC = new UnsignedPrefixComparatorDesc();
3738
public static final PrefixComparator BINARY_NULLS_LAST = new UnsignedPrefixComparatorNullsLast();
38-
public static final PrefixComparator BINARY_DESC_NULLS_FIRST = new UnsignedPrefixComparatorDescNullsFirst();
39+
public static final PrefixComparator BINARY_DESC_NULLS_FIRST =
40+
new UnsignedPrefixComparatorDescNullsFirst();
3941

4042
public static final PrefixComparator LONG = new SignedPrefixComparator();
4143
public static final PrefixComparator LONG_DESC = new SignedPrefixComparatorDesc();
4244
public static final PrefixComparator LONG_NULLS_LAST = new SignedPrefixComparatorNullsLast();
43-
public static final PrefixComparator LONG_DESC_NULLS_FIRST = new SignedPrefixComparatorDescNullsFirst();
45+
public static final PrefixComparator LONG_DESC_NULLS_FIRST =
46+
new SignedPrefixComparatorDescNullsFirst();
4447

4548
public static final PrefixComparator DOUBLE = new UnsignedPrefixComparator();
4649
public static final PrefixComparator DOUBLE_DESC = new UnsignedPrefixComparatorDesc();
4750
public static final PrefixComparator DOUBLE_NULLS_LAST = new UnsignedPrefixComparatorNullsLast();
48-
public static final PrefixComparator DOUBLE_DESC_NULLS_FIRST = new UnsignedPrefixComparatorDescNullsFirst();
51+
public static final PrefixComparator DOUBLE_DESC_NULLS_FIRST =
52+
new UnsignedPrefixComparatorDescNullsFirst();
4953

5054
public static final class StringPrefixComparator {
5155
public static long computePrefix(UTF8String value) {

core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,4 @@ public UnsafeSorterIterator getSortedIterator() {
347347
return new SortedIterator(pos / 2, offset);
348348
}
349349
}
350-
}
350+
}

core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeSorterSpillReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public UnsafeSorterSpillReader(
6464
if (bufferSizeBytes > MAX_BUFFER_SIZE_BYTES || bufferSizeBytes < DEFAULT_BUFFER_SIZE_BYTES) {
6565
// fall back to a sane default value
6666
logger.warn("Value of config \"spark.unsafe.sorter.spill.reader.buffer.size\" = {} not in " +
67-
"allowed range [{}, {}). Falling back to default value : {} bytes", bufferSizeBytes,
68-
DEFAULT_BUFFER_SIZE_BYTES, MAX_BUFFER_SIZE_BYTES, DEFAULT_BUFFER_SIZE_BYTES);
67+
"allowed range [{}, {}). Falling back to default value : {} bytes", bufferSizeBytes,
68+
DEFAULT_BUFFER_SIZE_BYTES, MAX_BUFFER_SIZE_BYTES, DEFAULT_BUFFER_SIZE_BYTES);
6969
bufferSizeBytes = DEFAULT_BUFFER_SIZE_BYTES;
7070
}
7171

0 commit comments

Comments
 (0)