diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java index c1f195f14c..b12ef51b9f 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java @@ -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 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); } diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java index a1fd17ccd6..463e42889a 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/ContainerTestHelper.java @@ -728,8 +728,9 @@ public static void waitForContainerClose(OzoneOutputStream outputStream, List 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]));