HDDS-1447. Fix CheckStyle warnings. Contributed by Wanqiang Ji.
This commit is contained in:
parent
8aea5e4cb6
commit
b979fdde99
@ -316,8 +316,8 @@ private void handleWrite(byte[] b, int off, long len, boolean retry)
|
||||
BlockOutputStreamEntry current = streamEntries.get(currentStreamIndex);
|
||||
|
||||
// length(len) will be in int range if the call is happening through
|
||||
// write API of blockOutputStream. Length can be in long range if it comes
|
||||
// via Exception path.
|
||||
// write API of blockOutputStream. Length can be in long range if it
|
||||
// comes via Exception path.
|
||||
int writeLen = Math.min((int) len, (int) current.getRemaining());
|
||||
long currentPos = current.getWrittenDataLength();
|
||||
try {
|
||||
@ -619,8 +619,8 @@ private void handleFlushOrClose(StreamAction op) throws IOException {
|
||||
try {
|
||||
Collection<DatanodeDetails> failedServers =
|
||||
entry.getFailedServers();
|
||||
// failed servers can be null in case there is no data written in the
|
||||
// stream
|
||||
// failed servers can be null in case there is no data written in
|
||||
// the stream
|
||||
if (failedServers != null && !failedServers.isEmpty()) {
|
||||
excludeList.addDatanodes(failedServers);
|
||||
}
|
||||
|
@ -728,8 +728,9 @@ public static void waitForContainerClose(OzoneOutputStream outputStream,
|
||||
List<Long> containerIdList = new ArrayList<>();
|
||||
for (OmKeyLocationInfo info : locationInfoList) {
|
||||
long id = info.getContainerID();
|
||||
if (!containerIdList.contains(id))
|
||||
containerIdList.add(id);
|
||||
if (!containerIdList.contains(id)) {
|
||||
containerIdList.add(id);
|
||||
}
|
||||
}
|
||||
Assert.assertTrue(!containerIdList.isEmpty());
|
||||
waitForContainerClose(cluster, containerIdList.toArray(new Long[0]));
|
||||
|
Loading…
Reference in New Issue
Block a user