Skip to content

Commit 1d42e20

Browse files
authored
HDDS-13629. Upgrade commons-collections to commons-collections4. (apache#8983)
1 parent 023d57e commit 1d42e20

File tree

30 files changed

+72
-60
lines changed

30 files changed

+72
-60
lines changed

hadoop-hdds/common/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555
<groupId>com.google.protobuf</groupId>
5656
<artifactId>protobuf-java</artifactId>
5757
</dependency>
58-
<dependency>
59-
<groupId>commons-collections</groupId>
60-
<artifactId>commons-collections</artifactId>
61-
</dependency>
6258
<dependency>
6359
<groupId>commons-io</groupId>
6460
<artifactId>commons-io</artifactId>
@@ -92,6 +88,10 @@
9288
<groupId>jakarta.xml.bind</groupId>
9389
<artifactId>jakarta.xml.bind-api</artifactId>
9490
</dependency>
91+
<dependency>
92+
<groupId>org.apache.commons</groupId>
93+
<artifactId>commons-collections4</artifactId>
94+
</dependency>
9595
<dependency>
9696
<groupId>org.apache.commons</groupId>
9797
<artifactId>commons-lang3</artifactId>

hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.Collection;
2222
import java.util.Iterator;
2323
import java.util.List;
24-
import org.apache.commons.collections.CollectionUtils;
24+
import org.apache.commons.collections4.CollectionUtils;
2525
import org.apache.commons.lang3.StringUtils;
2626
import org.slf4j.Logger;
2727
import org.slf4j.LoggerFactory;

hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.util.concurrent.locks.ReadWriteLock;
3737
import java.util.concurrent.locks.ReentrantReadWriteLock;
3838
import java.util.function.Consumer;
39-
import org.apache.commons.collections.CollectionUtils;
39+
import org.apache.commons.collections4.CollectionUtils;
4040
import org.apache.hadoop.hdds.conf.ConfigurationSource;
4141
import org.slf4j.Logger;
4242
import org.slf4j.LoggerFactory;

hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NodeSchemaLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.hadoop.hdds.scm.net;
1919

20-
import static org.apache.commons.collections.EnumerationUtils.toList;
20+
import static org.apache.commons.collections4.EnumerationUtils.toList;
2121

2222
import java.io.File;
2323
import java.io.FileNotFoundException;

hadoop-hdds/common/src/test/java/org/apache/hadoop/ozone/common/TestStateMachine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
import java.util.HashSet;
3131
import java.util.Set;
32-
import org.apache.commons.collections.SetUtils;
32+
import org.apache.commons.collections4.SetUtils;
3333
import org.apache.hadoop.ozone.common.statemachine.InvalidStateTransitionException;
3434
import org.apache.hadoop.ozone.common.statemachine.StateMachine;
3535
import org.junit.jupiter.api.Test;

hadoop-hdds/container-service/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
<groupId>commons-codec</groupId>
5151
<artifactId>commons-codec</artifactId>
5252
</dependency>
53-
<dependency>
54-
<groupId>commons-collections</groupId>
55-
<artifactId>commons-collections</artifactId>
56-
</dependency>
5753
<dependency>
5854
<groupId>commons-io</groupId>
5955
<artifactId>commons-io</artifactId>
@@ -94,6 +90,10 @@
9490
<groupId>jakarta.annotation</groupId>
9591
<artifactId>jakarta.annotation-api</artifactId>
9692
</dependency>
93+
<dependency>
94+
<groupId>org.apache.commons</groupId>
95+
<artifactId>commons-collections4</artifactId>
96+
</dependency>
9797
<dependency>
9898
<groupId>org.apache.commons</groupId>
9999
<artifactId>commons-compress</artifactId>

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import java.util.List;
2727
import java.util.Map;
2828
import java.util.UUID;
29-
import org.apache.commons.collections.CollectionUtils;
30-
import org.apache.commons.collections.MapUtils;
29+
import org.apache.commons.collections4.CollectionUtils;
30+
import org.apache.commons.collections4.MapUtils;
3131
import org.apache.hadoop.hdds.conf.ConfigurationSource;
3232
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
3333
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
import java.util.concurrent.locks.ReentrantLock;
5858
import java.util.function.Consumer;
5959
import java.util.stream.Collectors;
60-
import org.apache.commons.collections.CollectionUtils;
60+
import org.apache.commons.collections4.CollectionUtils;
6161
import org.apache.hadoop.hdds.conf.ConfigurationSource;
6262
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
6363
import org.apache.hadoop.hdds.protocol.proto.StorageContainerDatanodeProtocolProtos.CommandStatus.Status;

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/ContainerCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import java.io.IOException;
2424
import java.util.concurrent.locks.Lock;
2525
import java.util.concurrent.locks.ReentrantLock;
26-
import org.apache.commons.collections.MapIterator;
27-
import org.apache.commons.collections.map.LRUMap;
26+
import org.apache.commons.collections4.MapIterator;
27+
import org.apache.commons.collections4.map.LRUMap;
2828
import org.apache.hadoop.hdds.conf.ConfigurationSource;
2929
import org.apache.hadoop.ozone.OzoneConfigKeys;
3030
import org.apache.hadoop.ozone.container.keyvalue.helpers.BlockUtils;

hadoop-hdds/rocksdb-checkpoint-differ/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
<groupId>com.google.protobuf</groupId>
3636
<artifactId>protobuf-java</artifactId>
3737
</dependency>
38-
<dependency>
39-
<groupId>commons-collections</groupId>
40-
<artifactId>commons-collections</artifactId>
41-
</dependency>
4238
<dependency>
4339
<groupId>commons-io</groupId>
4440
<artifactId>commons-io</artifactId>
4541
</dependency>
42+
<dependency>
43+
<groupId>org.apache.commons</groupId>
44+
<artifactId>commons-collections4</artifactId>
45+
</dependency>
4646
<dependency>
4747
<groupId>org.apache.commons</groupId>
4848
<artifactId>commons-lang3</artifactId>

0 commit comments

Comments
 (0)