You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sh...@apache.org on 2019/03/28 19:18:09 UTC

[hadoop] branch ozone-0.4 updated: HDDS-1293. ExcludeList#getProtoBuf throws ArrayIndexOutOfBoundsException. Contributed by Shashikant Banerjee.

This is an automated email from the ASF dual-hosted git repository.

shashikant pushed a commit to branch ozone-0.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/ozone-0.4 by this push:
     new c53408c  HDDS-1293. ExcludeList#getProtoBuf throws ArrayIndexOutOfBoundsException. Contributed by Shashikant Banerjee.
c53408c is described below

commit c53408c3e35b0e34a97a8182f02e9e5bb02b54a9
Author: Shashikant Banerjee <sh...@apache.org>
AuthorDate: Fri Mar 29 00:43:28 2019 +0530

    HDDS-1293. ExcludeList#getProtoBuf throws ArrayIndexOutOfBoundsException. Contributed by Shashikant Banerjee.
    
    (cherry picked from commit ac4010bb22bd9e29dc5be74570fe3fda6c933032)
---
 .../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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org