This is an automated email from the ASF dual-hosted git repository. shashikant pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new ac4010b HDDS-1293. ExcludeList#getProtoBuf throws ArrayIndexOutOfBoundsException. Contributed by Shashikant Banerjee. ac4010b is described below commit ac4010bb22bd9e29dc5be74570fe3fda6c933032 Author: Shashikant Banerjee <shashik...@apache.org> AuthorDate: Fri Mar 29 00:43:28 2019 +0530 HDDS-1293. ExcludeList#getProtoBuf throws ArrayIndexOutOfBoundsException. Contributed by Shashikant Banerjee. --- .../hdds/scm/container/common/helpers/ExcludeList.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java index ed4ac54..94a4b94 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ExcludeList.java @@ -23,7 +23,9 @@ import org.apache.hadoop.hdds.protocol.proto.HddsProtos; import org.apache.hadoop.hdds.scm.container.ContainerID; import org.apache.hadoop.hdds.scm.pipeline.PipelineID; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Collection; /** * This class contains set of dns and containers which ozone client provides @@ -73,12 +75,12 @@ public class ExcludeList { public HddsProtos.ExcludeListProto getProtoBuf() { HddsProtos.ExcludeListProto.Builder builder = HddsProtos.ExcludeListProto.newBuilder(); - containerIds.parallelStream() + containerIds .forEach(id -> builder.addContainerIds(id.getId())); - datanodes.parallelStream().forEach(dn -> { + datanodes.forEach(dn -> { builder.addDatanodes(dn.getUuidString()); }); - pipelineIds.parallelStream().forEach(pipelineID -> { + pipelineIds.forEach(pipelineID -> { builder.addPipelineIds(pipelineID.getProtobuf()); }); return builder.build(); @@ -87,7 +89,7 @@ public class ExcludeList { public static ExcludeList getFromProtoBuf( HddsProtos.ExcludeListProto excludeListProto) { ExcludeList excludeList = new ExcludeList(); - excludeListProto.getContainerIdsList().parallelStream().forEach(id -> { + excludeListProto.getContainerIdsList().forEach(id -> { excludeList.addConatinerId(ContainerID.valueof(id)); }); DatanodeDetails.Builder builder = DatanodeDetails.newBuilder(); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org