diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile index 62c603097eb..c654ded6ac5 100644 --- a/dev-support/docker/Dockerfile +++ b/dev-support/docker/Dockerfile @@ -87,7 +87,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \ # Fixing the Apache commons / Maven dependency problem under Ubuntu: # See http://wiki.apache.org/commons/VfsProblems -RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang3-3.6.jar . +RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar . ###### # Install findbugs diff --git a/hbase-backup/pom.xml b/hbase-backup/pom.xml index de620ba3d59..9b3aac66d4d 100644 --- a/hbase-backup/pom.xml +++ b/hbase-backup/pom.xml @@ -140,8 +140,8 @@ commons-io - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java index 432fd37be88..1765bf35684 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java @@ -29,7 +29,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.TableName; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java index 903ded129a3..82a1b563726 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/RestoreDriver.java @@ -36,7 +36,7 @@ import java.util.List; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java index 6cef0e31df7..99fb06c37be 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupAdminImpl.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java index 1ef104dc251..650ba2ed9c1 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java @@ -40,7 +40,7 @@ import java.util.List; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.fs.FileSystem; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java index 8dc9718e2ee..4dab046d524 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java @@ -31,7 +31,7 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java index 40649487413..6d48c32f121 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java @@ -29,7 +29,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FileSystem; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java index 82427e3a279..ea7a7b8b93b 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java @@ -29,7 +29,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java index 373f143bdac..00c5b839503 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupMergeJob.java @@ -25,7 +25,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreJob.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreJob.java index ba31a7d45ba..1209e7c31b1 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreJob.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreJob.java @@ -22,7 +22,7 @@ import static org.apache.hadoop.hbase.backup.util.BackupUtils.succeeded; import java.io.IOException; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupSet.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupSet.java index 098efa1a215..0da6fc4ea13 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupSet.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupSet.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.backup.util; import java.util.List; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java index 3ca79f6763b..48a553f5c75 100644 --- a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java +++ b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java @@ -17,7 +17,7 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.List; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.TableName; @@ -342,4 +342,4 @@ public class TestFullRestore extends TestBackupBase { int ret = ToolRunner.run(conf1, new RestoreDriver(), args); assertTrue(ret != 0); } -} +} \ No newline at end of file diff --git a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java index 011ddf29ad3..7011ed32a56 100644 --- a/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java +++ b/hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupMergeWithFailures.java @@ -26,7 +26,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml index d5219084507..23278bf369d 100644 --- a/hbase-client/pom.xml +++ b/hbase-client/pom.xml @@ -144,8 +144,8 @@ commons-io - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java index 5e2585a62ee..252243422a2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java @@ -29,7 +29,7 @@ import java.util.LinkedList; import java.util.Queue; import java.util.concurrent.ExecutorService; -import org.apache.commons.lang3.mutable.MutableBoolean; +import org.apache.commons.lang.mutable.MutableBoolean; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/FastFailInterceptorContext.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/FastFailInterceptorContext.java index c033828f392..3f4483637fe 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/FastFailInterceptorContext.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/FastFailInterceptorContext.java @@ -17,7 +17,7 @@ */ package org.apache.hadoop.hbase.client; -import org.apache.commons.lang3.mutable.MutableBoolean; +import org.apache.commons.lang.mutable.MutableBoolean; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.classification.InterfaceAudience; @@ -129,4 +129,4 @@ class FastFailInterceptorContext extends RetryingCallerInterceptorContext { this.tries = tries; return this; } -} +} \ No newline at end of file diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java index 99937428441..52ec9cdb982 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java @@ -26,7 +26,7 @@ import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import org.apache.commons.lang3.mutable.MutableBoolean; +import org.apache.commons.lang.mutable.MutableBoolean; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java index 531d8c07ed1..47b68e11f99 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ZKAsyncRegistry.java @@ -29,7 +29,7 @@ import static org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.removeMetaD import java.io.IOException; import java.util.concurrent.CompletableFuture; -import org.apache.commons.lang3.mutable.MutableInt; +import org.apache.commons.lang.mutable.MutableInt; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.curator.framework.CuratorFramework; @@ -248,4 +248,4 @@ class ZKAsyncRegistry implements AsyncRegistry { public void close() { zk.close(); } -} +} \ No newline at end of file diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationSerDeHelper.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationSerDeHelper.java index b4de870aa6d..19c504247e6 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationSerDeHelper.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/ReplicationSerDeHelper.java @@ -18,7 +18,7 @@ */ package org.apache.hadoop.hbase.client.replication; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString; import org.apache.hadoop.hbase.shaded.com.google.protobuf.UnsafeByteOperations; import org.apache.commons.logging.Log; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/TableCFs.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/TableCFs.java index fc27deb4a23..854517e0270 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/TableCFs.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/replication/TableCFs.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.client.replication; import java.util.Map; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClientConfigHelper.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClientConfigHelper.java index 9ebbc330728..726a9ef1d31 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClientConfigHelper.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcClientConfigHelper.java @@ -25,7 +25,7 @@ import org.apache.hadoop.hbase.shaded.io.netty.channel.EventLoopGroup; import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.util.Pair; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshot.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshot.java index f691d7a6933..18fe76a659f 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshot.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshot.java @@ -18,7 +18,7 @@ package org.apache.hadoop.hbase.quotas; import java.util.Objects; -import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos; diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java index de35fc54be2..1de3652d65c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java @@ -35,7 +35,7 @@ import java.util.Map; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java index 0925974af23..775365749e8 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientNoCluster.java @@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import org.apache.hadoop.hbase.CellComparator; import org.apache.hadoop.hbase.DoNotRetryIOException; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -461,7 +461,7 @@ public class TestClientNoCluster extends Configured implements Tool { @Override public MutateResponse mutate(RpcController controller, MutateRequest request) throws ServiceException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override @@ -476,14 +476,14 @@ public class TestClientNoCluster extends Configured implements Tool { public BulkLoadHFileResponse bulkLoadHFile( RpcController controller, BulkLoadHFileRequest request) throws ServiceException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public CoprocessorServiceResponse execService( RpcController controller, CoprocessorServiceRequest request) throws ServiceException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override @@ -505,19 +505,19 @@ public class TestClientNoCluster extends Configured implements Tool { @Override public CoprocessorServiceResponse execRegionServerService(RpcController controller, CoprocessorServiceRequest request) throws ServiceException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public PrepareBulkLoadResponse prepareBulkLoad(RpcController controller, PrepareBulkLoadRequest request) throws ServiceException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public CleanupBulkLoadResponse cleanupBulkLoad(RpcController controller, CleanupBulkLoadRequest request) throws ServiceException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } } diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestCellBlockBuilder.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestCellBlockBuilder.java index 164bc85e546..9addaa532b6 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestCellBlockBuilder.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestCellBlockBuilder.java @@ -23,7 +23,7 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; -import org.apache.commons.lang3.time.StopWatch; +import org.apache.commons.lang.time.StopWatch; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.impl.Log4JLogger; diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml index 12043b585c0..84e120b71ee 100644 --- a/hbase-common/pom.xml +++ b/hbase-common/pom.xml @@ -233,8 +233,8 @@ compile - org.apache.commons - commons-lang3 + commons-lang + commons-lang compile diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java index 70fe85e4325..54e0eb8c235 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.UUID; import java.util.regex.Pattern; -import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang.ArrayUtils; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.util.Bytes; @@ -1364,8 +1364,6 @@ public final class HConstants { public static final String DEFAULT_SNAPSHOT_RESTORE_FAILSAFE_NAME = "hbase-failsafe-{snapshot.name}-{restore.timestamp}"; - public static final String NOT_IMPLEMENTED = "Not implemented"; - private HConstants() { // Can't be instantiated with this ctor. } diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/EncodedDataBlock.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/EncodedDataBlock.java index 36be64e10a0..5ec91f795cc 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/EncodedDataBlock.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/EncodedDataBlock.java @@ -25,7 +25,7 @@ import java.io.OutputStream; import java.nio.ByteBuffer; import java.util.Iterator; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PairOfSameType.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PairOfSameType.java index 387c670e239..3d520a8e127 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PairOfSameType.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/PairOfSameType.java @@ -21,8 +21,7 @@ package org.apache.hadoop.hbase.util; import java.util.Iterator; -import org.apache.commons.lang3.NotImplementedException; -import org.apache.hadoop.hbase.HConstants; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.hbase.classification.InterfaceAudience; /** @@ -107,7 +106,7 @@ public class PairOfSameType implements Iterable { @Override public void remove() { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } }; } diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml index a28fe7362d0..735b27244a3 100644 --- a/hbase-hadoop2-compat/pom.xml +++ b/hbase-hadoop2-compat/pom.xml @@ -181,8 +181,8 @@ limitations under the License. ${hadoop-two.version} - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/metrics/impl/HBaseMetrics2HadoopMetricsAdapter.java b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/metrics/impl/HBaseMetrics2HadoopMetricsAdapter.java index 3a24b94de57..ec4a1a793aa 100644 --- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/metrics/impl/HBaseMetrics2HadoopMetricsAdapter.java +++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/metrics/impl/HBaseMetrics2HadoopMetricsAdapter.java @@ -34,7 +34,7 @@ package org.apache.hadoop.hbase.metrics.impl; import java.util.Map; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.metrics.Counter; diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MutableHistogram.java b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MutableHistogram.java index 604377d3a29..6a2f2039fc7 100644 --- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MutableHistogram.java +++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MutableHistogram.java @@ -18,7 +18,7 @@ package org.apache.hadoop.metrics2.lib; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.metrics.Histogram; import org.apache.hadoop.hbase.metrics.Interns; diff --git a/hbase-it/pom.xml b/hbase-it/pom.xml index e0da4bdd8bd..2a9cf753fc2 100644 --- a/hbase-it/pom.xml +++ b/hbase-it/pom.xml @@ -267,8 +267,8 @@ commons-math - org.apache.commons - commons-lang3 + commons-lang + commons-lang org.apache.htrace diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java index be25eaa3676..55c6e28b6a4 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/DistributedHBaseCluster.java @@ -286,13 +286,13 @@ public class DistributedHBaseCluster extends HBaseCluster { @Override public void waitUntilShutDown() { // Simply wait for a few seconds for now (after issuing serverManager.kill - throw new RuntimeException(HConstants.NOT_IMPLEMENTED); + throw new RuntimeException("Not implemented yet"); } @Override public void shutdown() throws IOException { // not sure we want this - throw new RuntimeException(HConstants.NOT_IMPLEMENTED); + throw new RuntimeException("Not implemented yet"); } @Override diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java index dbbcc4462f0..0f48e4f1878 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java @@ -23,7 +23,7 @@ import java.io.IOException; import java.util.Locale; import java.util.Map; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java index 2be1b2b2a00..46f049045be 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBase.java @@ -24,7 +24,7 @@ import java.util.Properties; import java.util.Set; import org.apache.commons.cli.CommandLine; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java index d1a760bdab5..e2804535e54 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestDDLMasterFailover.java @@ -25,8 +25,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.RandomStringUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -257,7 +257,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { return null; } ArrayList namespaceList = new ArrayList<>(namespaceMap.keySet()); - String randomKey = namespaceList.get(RandomUtils.nextInt(0, namespaceList.size())); + String randomKey = namespaceList.get(RandomUtils.nextInt(namespaceList.size())); NamespaceDescriptor randomNsd = namespaceMap.get(randomKey); // remove from namespaceMap namespaceMap.remove(randomKey); @@ -306,12 +306,12 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { private NamespaceDescriptor createNamespaceDesc() { String namespaceName = "itnamespace" + String.format("%010d", - RandomUtils.nextInt()); + RandomUtils.nextInt(Integer.MAX_VALUE)); NamespaceDescriptor nsd = NamespaceDescriptor.create(namespaceName).build(); nsd.setConfiguration( nsTestConfigKey, - String.format("%010d", RandomUtils.nextInt())); + String.format("%010d", RandomUtils.nextInt(Integer.MAX_VALUE))); return nsd; } } @@ -331,7 +331,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { NamespaceDescriptor modifiedNsd = NamespaceDescriptor.create(namespaceName).build(); String nsValueNew; do { - nsValueNew = String.format("%010d", RandomUtils.nextInt()); + nsValueNew = String.format("%010d", RandomUtils.nextInt(Integer.MAX_VALUE)); } while (selected.getConfigurationValue(nsTestConfigKey).equals(nsValueNew)); modifiedNsd.setConfiguration(nsTestConfigKey, nsValueNew); admin.modifyNamespace(modifiedNsd); @@ -397,7 +397,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { return null; } ArrayList tableList = new ArrayList<>(tableMap.keySet()); - TableName randomKey = tableList.get(RandomUtils.nextInt(0, tableList.size())); + TableName randomKey = tableList.get(RandomUtils.nextInt(tableList.size())); TableDescriptor randomTd = tableMap.remove(randomKey); return randomTd; } @@ -436,7 +436,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { } private TableDescriptor createTableDesc() { - String tableName = String.format("ittable-%010d", RandomUtils.nextInt()); + String tableName = String.format("ittable-%010d", RandomUtils.nextInt(Integer.MAX_VALUE)); String familyName = "cf-" + Math.abs(RandomUtils.nextInt()); return TableDescriptorBuilder.newBuilder(TableName.valueOf(tableName)) .addColumnFamily(ColumnFamilyDescriptorBuilder.of(familyName)) @@ -581,7 +581,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { LOG.info("No column families in table: " + td); return null; } - ColumnFamilyDescriptor randomCfd = families[RandomUtils.nextInt(0, families.length)]; + ColumnFamilyDescriptor randomCfd = families[RandomUtils.nextInt(families.length)]; return randomCfd; } } @@ -624,7 +624,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { } private ColumnFamilyDescriptor createFamilyDesc() { - String familyName = String.format("cf-%010d", RandomUtils.nextInt()); + String familyName = String.format("cf-%010d", RandomUtils.nextInt(Integer.MAX_VALUE)); return ColumnFamilyDescriptorBuilder.of(familyName); } } @@ -643,7 +643,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { } Admin admin = connection.getAdmin(); - int versions = RandomUtils.nextInt(0, 10) + 3; + int versions = RandomUtils.nextInt(10) + 3; try { TableName tableName = selected.getTableName(); LOG.info("Altering versions of column family: " + columnDesc + " to: " + versions + @@ -698,7 +698,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { TableName tableName = selected.getTableName(); // possible DataBlockEncoding ids int[] possibleIds = {0, 2, 3, 4, 6}; - short id = (short) possibleIds[RandomUtils.nextInt(0, possibleIds.length)]; + short id = (short) possibleIds[RandomUtils.nextInt(possibleIds.length)]; LOG.info("Altering encoding of column family: " + columnDesc + " to: " + id + " in table: " + tableName); @@ -789,13 +789,13 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { for (int i = 0; i < numRows; i++){ // nextInt(Integer.MAX_VALUE)) to return positive numbers only byte[] rowKey = Bytes.toBytes( - "row-" + String.format("%010d", RandomUtils.nextInt())); + "row-" + String.format("%010d", RandomUtils.nextInt(Integer.MAX_VALUE))); ColumnFamilyDescriptor cfd = selectFamily(selected); if (cfd == null){ return; } byte[] family = cfd.getName(); - byte[] qualifier = Bytes.toBytes("col-" + RandomUtils.nextInt() % 10); + byte[] qualifier = Bytes.toBytes("col-" + RandomUtils.nextInt(Integer.MAX_VALUE) % 10); byte[] value = Bytes.toBytes("val-" + RandomStringUtils.randomAlphanumeric(10)); Put put = new Put(rowKey); put.addColumn(family, qualifier, value); @@ -873,7 +873,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { break; case DELETE_TABLE: // reduce probability of deleting table to 20% - if (RandomUtils.nextInt(0, 100) < 20) { + if (RandomUtils.nextInt(100) < 20) { new DeleteTableAction().perform(); } break; @@ -882,7 +882,7 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase { break; case DELETE_COLUMNFAMILY: // reduce probability of deleting column family to 20% - if (RandomUtils.nextInt(0, 100) < 20) { + if (RandomUtils.nextInt(100) < 20) { new DeleteColumnFamilyAction().perform(); } break; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithACL.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithACL.java index 3865209254a..d1292790b8b 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithACL.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestIngestWithACL.java @@ -22,7 +22,7 @@ import java.util.Arrays; import java.util.List; import org.apache.commons.cli.CommandLine; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.io.hfile.HFile; import org.apache.hadoop.hbase.security.User; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/StripeCompactionsPerformanceEvaluation.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/StripeCompactionsPerformanceEvaluation.java index 150dec9a1b1..073de77413d 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/StripeCompactionsPerformanceEvaluation.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/StripeCompactionsPerformanceEvaluation.java @@ -23,7 +23,7 @@ import java.util.Locale; import java.util.Set; import org.apache.commons.cli.CommandLine; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java index 2f01afeaba2..5ec9cdbe4e2 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/Action.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.function.BiConsumer; import java.util.function.Consumer; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -208,7 +208,7 @@ public class Action { int victimRegionCount = (int)Math.ceil(fractionOfRegions * regions.size()); LOG.debug("Removing " + victimRegionCount + " regions from " + server.getServerName()); for (int i = 0; i < victimRegionCount; ++i) { - int victimIx = RandomUtils.nextInt(0, regions.size()); + int victimIx = RandomUtils.nextInt(regions.size()); String regionId = HRegionInfo.encodeRegionName(regions.remove(victimIx)); victimRegions.add(Bytes.toBytes(regionId)); } @@ -223,7 +223,7 @@ public class Action { if (context.isStopping()) { break; } - int targetIx = RandomUtils.nextInt(0, toServers.size()); + int targetIx = RandomUtils.nextInt(toServers.size()); admin.move(victimRegion, Bytes.toBytes(toServers.get(targetIx).getServerName())); } } diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java index 0ef8cfdf4d4..f3827473a3a 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/AddColumnAction.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.chaos.actions; import java.io.IOException; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang.RandomStringUtils; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactMobAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactMobAction.java index 7e812a8f553..bbb86a128a8 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactMobAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactMobAction.java @@ -18,7 +18,7 @@ package org.apache.hadoop.hbase.chaos.actions; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; @@ -47,7 +47,7 @@ public class CompactMobAction extends Action { public void perform() throws Exception { HBaseTestingUtility util = context.getHBaseIntegrationTestingUtility(); Admin admin = util.getAdmin(); - boolean major = RandomUtils.nextInt(0, 100) < majorRatio; + boolean major = RandomUtils.nextInt(100) < majorRatio; // Don't try the modify if we're stopping if (context.isStopping()) { diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactRandomRegionOfTableAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactRandomRegionOfTableAction.java index f3fe6ff7980..046415f9335 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactRandomRegionOfTableAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactRandomRegionOfTableAction.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.chaos.actions; import java.util.List; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.TableName; @@ -51,7 +51,7 @@ public class CompactRandomRegionOfTableAction extends Action { public void perform() throws Exception { HBaseTestingUtility util = context.getHBaseIntegrationTestingUtility(); Admin admin = util.getAdmin(); - boolean major = RandomUtils.nextInt(0, 100) < majorRatio; + boolean major = RandomUtils.nextInt(100) < majorRatio; LOG.info("Performing action: Compact random region of table " + tableName + ", major=" + major); diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactTableAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactTableAction.java index 521591c4673..3eab335b82d 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactTableAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/CompactTableAction.java @@ -18,7 +18,7 @@ package org.apache.hadoop.hbase.chaos.actions; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; @@ -46,7 +46,7 @@ public class CompactTableAction extends Action { public void perform() throws Exception { HBaseTestingUtility util = context.getHBaseIntegrationTestingUtility(); Admin admin = util.getAdmin(); - boolean major = RandomUtils.nextInt(0, 100) < majorRatio; + boolean major = RandomUtils.nextInt(100) < majorRatio; LOG.info("Performing action: Compact table " + tableName + ", major=" + major); try { diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MergeRandomAdjacentRegionsOfTableAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MergeRandomAdjacentRegionsOfTableAction.java index 686e622523e..aa796abab0b 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MergeRandomAdjacentRegionsOfTableAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MergeRandomAdjacentRegionsOfTableAction.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.chaos.actions; import java.util.List; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.TableName; @@ -54,7 +54,7 @@ public class MergeRandomAdjacentRegionsOfTableAction extends Action { return; } - int i = RandomUtils.nextInt(0, regions.size() - 1); + int i = RandomUtils.nextInt(regions.size() - 1); HRegionInfo a = regions.get(i++); HRegionInfo b = regions.get(i); LOG.debug("Merging " + a.getRegionNameAsString() + " and " + b.getRegionNameAsString()); diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MoveRegionsOfTableAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MoveRegionsOfTableAction.java index c3793d02ea2..146c63c61cc 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MoveRegionsOfTableAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/MoveRegionsOfTableAction.java @@ -22,7 +22,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; @@ -77,7 +77,7 @@ public class MoveRegionsOfTableAction extends Action { try { String destServerName = - servers[RandomUtils.nextInt(0, servers.length)].getServerName(); + servers[RandomUtils.nextInt(servers.length)].getServerName(); LOG.debug("Moving " + regionInfo.getRegionNameAsString() + " to " + destServerName); admin.move(regionInfo.getEncodedNameAsBytes(), Bytes.toBytes(destServerName)); } catch (Exception ex) { diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RestartRsHoldingTableAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RestartRsHoldingTableAction.java index 2c9a872cc7e..6eab85c1538 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RestartRsHoldingTableAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RestartRsHoldingTableAction.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.chaos.actions; import java.util.List; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.client.RegionLocator; @@ -41,6 +41,6 @@ public class RestartRsHoldingTableAction extends RestartActionBaseAction { LOG.info("Performing action: Restart random RS holding table " + this.locator.getName()); List locations = locator.getAllRegionLocations(); - restartRs(locations.get(RandomUtils.nextInt(0, locations.size())).getServerName(), sleepTime); + restartRs(locations.get(RandomUtils.nextInt(locations.size())).getServerName(), sleepTime); } } diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RollingBatchRestartRsAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RollingBatchRestartRsAction.java index 800a4455434..ba251987ef8 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RollingBatchRestartRsAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/RollingBatchRestartRsAction.java @@ -24,7 +24,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.ServerName; @@ -104,7 +104,7 @@ public class RollingBatchRestartRsAction extends BatchRestartRsAction { break; } - sleep(RandomUtils.nextInt(0, (int)sleepTime)); + sleep(RandomUtils.nextInt((int)sleepTime)); } } @@ -149,4 +149,4 @@ public class RollingBatchRestartRsAction extends BatchRestartRsAction { action.perform(); } -} +} \ No newline at end of file diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceKillAndRebalanceAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceKillAndRebalanceAction.java index 7b6f2925bc6..626953dfccf 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceKillAndRebalanceAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceKillAndRebalanceAction.java @@ -24,7 +24,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.ClusterStatus; import org.apache.hadoop.hbase.ServerName; import org.junit.Assert; @@ -65,7 +65,7 @@ public class UnbalanceKillAndRebalanceAction extends Action { liveCount + deadCount < victimServers.size()); List targetServers = new ArrayList<>(liveCount); for (int i = 0; i < liveCount + deadCount; ++i) { - int victimIx = RandomUtils.nextInt(0, victimServers.size()); + int victimIx = RandomUtils.nextInt(victimServers.size()); targetServers.add(victimServers.remove(victimIx)); } unbalanceRegions(status, victimServers, targetServers, HOARD_FRC_OF_REGIONS); diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceRegionsAction.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceRegionsAction.java index e5faf08967c..bdffdb18822 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceRegionsAction.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/UnbalanceRegionsAction.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.ClusterStatus; import org.apache.hadoop.hbase.ServerName; @@ -52,7 +52,7 @@ public class UnbalanceRegionsAction extends Action { int targetServerCount = (int)Math.ceil(fractionOfServers * victimServers.size()); List targetServers = new ArrayList<>(targetServerCount); for (int i = 0; i < targetServerCount; ++i) { - int victimIx = RandomUtils.nextInt(0, victimServers.size()); + int victimIx = RandomUtils.nextInt(victimServers.size()); targetServers.add(victimServers.remove(victimIx)); } unbalanceRegions(status, victimServers, targetServers, fractionOfRegions); diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java index 70452bb5568..951f8f8777f 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/monkies/PolicyBasedChaosMonkey.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.IntegrationTestingUtility; @@ -61,7 +61,7 @@ public class PolicyBasedChaosMonkey extends ChaosMonkey { /** Selects a random item from the given items */ public static T selectRandomItem(T[] items) { - return items[RandomUtils.nextInt(0, items.length)]; + return items[RandomUtils.nextInt(items.length)]; } /** Selects a random item from the given items with weights*/ @@ -71,7 +71,7 @@ public class PolicyBasedChaosMonkey extends ChaosMonkey { totalWeight += pair.getSecond(); } - int cutoff = RandomUtils.nextInt(0, totalWeight); + int cutoff = RandomUtils.nextInt(totalWeight); int cummulative = 0; T item = null; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/policies/PeriodicPolicy.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/policies/PeriodicPolicy.java index 3b6908daee5..b7b6109f4d9 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/policies/PeriodicPolicy.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/policies/PeriodicPolicy.java @@ -18,7 +18,7 @@ package org.apache.hadoop.hbase.chaos.policies; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.hbase.util.Threads; /** A policy which does stuff every time interval. */ @@ -32,7 +32,7 @@ public abstract class PeriodicPolicy extends Policy { @Override public void run() { // Add some jitter. - int jitter = RandomUtils.nextInt(0, (int) periodMs); + int jitter = RandomUtils.nextInt((int) periodMs); LOG.info("Sleeping for " + jitter + " to add jitter"); Threads.sleep(jitter); diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java index 591108599e9..f14232188ea 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/util/ChaosMonkeyRunner.java @@ -22,7 +22,7 @@ import java.util.Properties; import java.util.Set; import org.apache.commons.cli.CommandLine; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java index 64784fc63bc..52f1223e593 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java @@ -24,7 +24,7 @@ import org.apache.hadoop.hbase.shaded.com.google.common.base.Joiner; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Sets; import org.apache.commons.cli.CommandLine; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java index 97a06f46be0..272af96a9ea 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java @@ -29,7 +29,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.math.stat.descriptive.DescriptiveStatistics; diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java index 73374238602..5bd2c87330e 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java @@ -26,7 +26,7 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java index ca6b1e9932e..7fea2542728 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java @@ -34,7 +34,7 @@ import java.util.UUID; import java.util.function.Function; import java.util.stream.Collectors; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java index 44b856c6961..b64271efbc9 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/ImportTsv.java @@ -26,7 +26,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java index 6aedc56f3d6..2e0591e4c2d 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java index 6b058b0ac92..23a70a91300 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java @@ -43,7 +43,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml index 9e01b543c7c..325e563c311 100644 --- a/hbase-metrics-api/pom.xml +++ b/hbase-metrics-api/pom.xml @@ -93,8 +93,8 @@ commons-logging - org.apache.commons - commons-lang3 + commons-lang + commons-lang org.apache.hbase.thirdparty diff --git a/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistryInfo.java b/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistryInfo.java index 7da2c19299e..88ba232928d 100644 --- a/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistryInfo.java +++ b/hbase-metrics-api/src/main/java/org/apache/hadoop/hbase/metrics/MetricRegistryInfo.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.metrics; -import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.hadoop.hbase.classification.InterfaceAudience; /** diff --git a/hbase-replication/pom.xml b/hbase-replication/pom.xml index 8bfa4dfbe68..87664f8414c 100644 --- a/hbase-replication/pom.xml +++ b/hbase-replication/pom.xml @@ -143,8 +143,8 @@ commons-io - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java index 05757b9f9b5..8506cbb257d 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ReplicationFactory.java @@ -18,7 +18,7 @@ */ package org.apache.hadoop.hbase.replication; -import org.apache.commons.lang3.reflect.ConstructorUtils; +import org.apache.commons.lang.reflect.ConstructorUtils; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Abortable; diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesClientImpl.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesClientImpl.java index a16b368544c..35075473bdb 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesClientImpl.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesClientImpl.java @@ -18,10 +18,9 @@ */ package org.apache.hadoop.hbase.replication; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Abortable; -import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; @@ -96,18 +95,18 @@ public class TableBasedReplicationQueuesClientImpl extends ReplicationTableBase @Override public int getHFileRefsNodeChangeVersion() throws KeeperException { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public List getAllPeersFromHFileRefsQueue() throws KeeperException { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public List getReplicableHFiles(String peerId) throws KeeperException { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } } diff --git a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesImpl.java b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesImpl.java index e91f1ad906d..bf55e8cf615 100644 --- a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesImpl.java +++ b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/TableBasedReplicationQueuesImpl.java @@ -18,14 +18,13 @@ */ package org.apache.hadoop.hbase.replication; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Abortable; -import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.client.Delete; @@ -46,8 +45,11 @@ import org.apache.zookeeper.KeeperException; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; @@ -296,26 +298,26 @@ public class TableBasedReplicationQueuesImpl extends ReplicationTableBase @Override public void addPeerToHFileRefs(String peerId) throws ReplicationException { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public void removePeerFromHFileRefs(String peerId) { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public void addHFileRefs(String peerId, List> pairs) throws ReplicationException { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public void removeHFileRefs(String peerId, List files) { // TODO - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } private String buildQueueRowKey(String queueId) { diff --git a/hbase-resource-bundle/src/main/resources/META-INF/NOTICE.vm b/hbase-resource-bundle/src/main/resources/META-INF/NOTICE.vm index c0ff317e5d3..953b316ed40 100644 --- a/hbase-resource-bundle/src/main/resources/META-INF/NOTICE.vm +++ b/hbase-resource-bundle/src/main/resources/META-INF/NOTICE.vm @@ -198,13 +198,6 @@ JRuby's licence. ## Skip racc, json-generator, json-parser because it is under Ruby license ## jruby bundles jquery, but we already ref that above. -#end -#macro(commons_lang3_notice) --- -## commons-lang3 has following note in the NOTICE file -This product includes software from the Spring Framework, -under the Apache License 2.0 (see: StringUtils.containsWhitespace()) - #end ## first bundled source #if(${bundled-logo}) @@ -262,11 +255,6 @@ under the Apache License 2.0 (see: StringUtils.containsWhitespace()) #if(${dep.artifactId.equals("jruby-complete")}) #set($jruby=true) #end -#if(${dep.artifactId.equals("commons-lang3")}) -#if(${dep.groupId.equals("org.apache.commons")}) -#commons_lang3_notice() -#end -#end #if( ${dep.licenses.isEmpty()} ) ERROR: This product includes ${dep.name} which has no licenses! Revert the change if invalid or if intentional add license info to supplemental-models.xml diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml index 1660594f9b4..639c0c244da 100644 --- a/hbase-rest/pom.xml +++ b/hbase-rest/pom.xml @@ -268,8 +268,8 @@ httpcore - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java index 721e108a368..eb3fc26e7d1 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java @@ -32,7 +32,7 @@ import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.PosixParser; -import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang.ArrayUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java index d6a3e14efe8..ceb8bb24ae8 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java @@ -36,7 +36,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; import javax.ws.rs.core.UriInfo; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java index 91e19ab18fe..ddfa8bb60ee 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java @@ -31,7 +31,7 @@ import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.UriInfo; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.TableName; diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellModel.java index 07544a63a04..0b98816e239 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellModel.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/CellModel.java @@ -28,9 +28,9 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlValue; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.hadoop.hbase.util.ByteStringer; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.CellUtil; diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java index b14c40994b5..663c838345f 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/RowModel.java @@ -30,9 +30,9 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.rest.ProtobufMessageHandler; import org.codehaus.jackson.annotate.JsonProperty; diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java index 95d9432eca3..c5cc1217f8f 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/HBaseRESTTestingUtility.java @@ -18,7 +18,7 @@ */ package org.apache.hadoop.hbase.rest; -import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang.ArrayUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java index 96e10896419..d9e45df944a 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java @@ -19,9 +19,9 @@ package org.apache.hadoop.hbase.rest.model; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang.builder.ToStringStyle; import org.apache.hadoop.hbase.testclassification.RestTests; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.util.Bytes; diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java index 7ba61b893de..5c2b90c41f5 100644 --- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java +++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java @@ -23,9 +23,9 @@ import java.util.Iterator; import javax.xml.bind.JAXBContext; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang.builder.ToStringStyle; import org.apache.hadoop.hbase.testclassification.RestTests; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.util.Bytes; diff --git a/hbase-rsgroup/pom.xml b/hbase-rsgroup/pom.xml index 0bb9060c11c..91f6fc95f6f 100644 --- a/hbase-rsgroup/pom.xml +++ b/hbase-rsgroup/pom.xml @@ -148,8 +148,8 @@ commons-io - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java index 11c2403e5a4..b9c19227bbc 100644 --- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java +++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupAdminServer.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.HRegionInfo; diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java index fe62d161738..488afdf0e81 100644 --- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java +++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/master/balancer/TestRSGroupBasedLoadBalancer.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.master.balancer; import org.apache.hadoop.hbase.shaded.com.google.common.collect.ArrayListMultimap; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml index 0fbe622f78e..e1ef88234f0 100644 --- a/hbase-server/pom.xml +++ b/hbase-server/pom.xml @@ -503,8 +503,8 @@ commons-io - org.apache.commons - commons-lang3 + commons-lang + commons-lang commons-logging diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon index 285dbe64d1f..7088f60a700 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon @@ -22,7 +22,7 @@ <%import> java.util.*; - org.apache.commons.lang3.time.FastDateFormat; + org.apache.commons.lang.time.FastDateFormat; org.apache.hadoop.hbase.regionserver.HRegionServer; org.apache.hadoop.hbase.util.Bytes; org.apache.hadoop.hbase.HRegionInfo; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java index 354f58167c5..e4fffa1b857 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkSplitLogWorkerCoordination.java @@ -26,8 +26,8 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.apache.commons.lang3.RandomUtils; -import org.apache.commons.lang3.mutable.MutableInt; +import org.apache.commons.lang.math.RandomUtils; +import org.apache.commons.lang.mutable.MutableInt; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -269,7 +269,7 @@ public class ZkSplitLogWorkerCoordination extends ZooKeeperListener implements // after a successful submit, sleep a little bit to allow other RSs to grab the rest tasks try { - int sleepTime = RandomUtils.nextInt(0, 500) + 500; + int sleepTime = RandomUtils.nextInt(500) + 500; Thread.sleep(sleepTime); } catch (InterruptedException e) { LOG.warn("Interrupted while yielding for other region servers", e); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java index 54c5ddb2fdd..c0010106103 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java @@ -31,7 +31,7 @@ import java.util.Map.Entry; import java.util.Random; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java index f07ef7e364a..bc6ab3cc08e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java @@ -73,7 +73,7 @@ import javax.security.sasl.SaslClient; import javax.security.sasl.SaslException; import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java index f30ba5a034d..43b5c24a379 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java @@ -45,7 +45,7 @@ import org.apache.commons.cli.OptionGroup; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.cli.PosixParser; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java index 375db398013..7b4a353533a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java @@ -52,7 +52,7 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.commons.lang3.mutable.MutableInt; +import org.apache.commons.lang.mutable.MutableInt; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java index 6c43fc081c0..004f91d5e6b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterCoprocessorHost.java @@ -23,7 +23,7 @@ import java.io.IOException; import java.util.List; import java.util.Set; -import org.apache.commons.lang3.ClassUtils; +import org.apache.commons.lang.ClassUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapperImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapperImpl.java index eb5399d238a..518c7b4a41e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapperImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterWrapperImpl.java @@ -23,7 +23,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java index 2c8024ed3e7..ffc3e5b51f0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java @@ -36,7 +36,7 @@ import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java index 31e6300767f..d69b0c0d792 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.io.InterruptedIOException; import java.util.NavigableSet; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -360,4 +360,4 @@ public class TableNamespaceManager { } return maxRegions; } -} +} \ No newline at end of file diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java index 162ba92d49b..f7203b92b10 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java @@ -20,9 +20,11 @@ package org.apache.hadoop.hbase.master.balancer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -34,13 +36,12 @@ import java.util.TreeMap; import java.util.function.Predicate; import java.util.stream.Collectors; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.ClusterStatus; import org.apache.hadoop.hbase.HBaseIOException; -import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HDFSBlocksDistribution; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerLoad; @@ -52,12 +53,15 @@ import org.apache.hadoop.hbase.master.MasterServices; import org.apache.hadoop.hbase.master.RackManager; import org.apache.hadoop.hbase.master.RegionPlan; import org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type; +import org.apache.hadoop.hbase.security.access.AccessControlLists; +import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting; import org.apache.hadoop.hbase.shaded.com.google.common.base.Joiner; import org.apache.hadoop.hbase.shaded.com.google.common.collect.ArrayListMultimap; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Lists; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Sets; +import org.apache.zookeeper.KeeperException; /** * The base class for load balancers. It provides the the functions used to by @@ -630,7 +634,7 @@ public abstract class BaseLoadBalancer implements LoadBalancer { public Action undoAction() { // TODO implement this. This action is not being used by the StochasticLB for now // in case it uses it, we should implement this function. - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } @Override public String toString() { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java index 7c54c733ceb..3453b7a8905 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/MasterQuotaManager.java @@ -27,7 +27,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.ConcurrentHashMap; -import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.DoNotRetryIOException; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/SnapshotQuotaObserverChore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/SnapshotQuotaObserverChore.java index c04967b72c1..f16db1ef426 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/SnapshotQuotaObserverChore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/SnapshotQuotaObserverChore.java @@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit; import java.util.function.Predicate; import java.util.stream.Collectors; -import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CellSet.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CellSet.java index a3ab2e6d847..6da57d35cf9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CellSet.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CellSet.java @@ -18,7 +18,6 @@ */ package org.apache.hadoop.hbase.regionserver; -import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting; import java.util.Collection; import java.util.Comparator; @@ -62,7 +61,7 @@ public class CellSet implements NavigableSet { } public Cell ceiling(Cell e) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Iterator descendingIterator() { @@ -70,11 +69,11 @@ public class CellSet implements NavigableSet { } public NavigableSet descendingSet() { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Cell floor(Cell e) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public SortedSet headSet(final Cell toElement) { @@ -87,7 +86,7 @@ public class CellSet implements NavigableSet { } public Cell higher(Cell e) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Iterator iterator() { @@ -95,24 +94,24 @@ public class CellSet implements NavigableSet { } public Cell lower(Cell e) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Cell pollFirst() { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Cell pollLast() { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public SortedSet subSet(Cell fromElement, Cell toElement) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public NavigableSet subSet(Cell fromElement, boolean fromInclusive, Cell toElement, boolean toInclusive) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public SortedSet tailSet(Cell fromElement) { @@ -124,7 +123,7 @@ public class CellSet implements NavigableSet { } public Comparator comparator() { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Cell first() { @@ -140,7 +139,7 @@ public class CellSet implements NavigableSet { } public boolean addAll(Collection c) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public void clear() { @@ -153,7 +152,7 @@ public class CellSet implements NavigableSet { } public boolean containsAll(Collection c) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public boolean isEmpty() { @@ -165,11 +164,11 @@ public class CellSet implements NavigableSet { } public boolean removeAll(Collection c) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public boolean retainAll(Collection c) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public Cell get(Cell kv) { @@ -181,10 +180,10 @@ public class CellSet implements NavigableSet { } public Object[] toArray() { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } public T[] toArray(T[] a) { - throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED); + throw new UnsupportedOperationException("Not implemented"); } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index fb1bf6e0dcd..ae2f7ddc83a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -56,8 +56,8 @@ import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.servlet.http.HttpServlet; -import org.apache.commons.lang3.SystemUtils; -import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang.SystemUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -1824,7 +1824,7 @@ public class HRegionServer extends HasThread implements if (((HRegion)r).shouldFlush(whyFlush)) { FlushRequester requester = server.getFlushRequester(); if (requester != null) { - long randomDelay = RandomUtils.nextInt(0, RANGE_OF_DELAY) + MIN_DELAY_TIME; + long randomDelay = RandomUtils.nextInt(RANGE_OF_DELAY) + MIN_DELAY_TIME; LOG.info(getName() + " requesting flush of " + r.getRegionInfo().getRegionNameAsString() + " because " + whyFlush.toString() + @@ -3510,7 +3510,7 @@ public class HRegionServer extends HasThread implements private boolean isHealthCheckerConfigured() { String healthScriptLocation = this.conf.get(HConstants.HEALTH_SCRIPT_LOC); - return org.apache.commons.lang3.StringUtils.isNotBlank(healthScriptLocation); + return org.apache.commons.lang.StringUtils.isNotBlank(healthScriptLocation); } /** diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java index f2f6c79a80b..f43db93243d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.CompatibilitySingletonFactory; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonLazyKeyValueScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonLazyKeyValueScanner.java index c10aff963c5..8778f5d7058 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonLazyKeyValueScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonLazyKeyValueScanner.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.regionserver; import java.io.IOException; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonReversedNonLazyKeyValueScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonReversedNonLazyKeyValueScanner.java index 1f8e897660e..1eb05f0fbe3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonReversedNonLazyKeyValueScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/NonReversedNonLazyKeyValueScanner.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.regionserver; import java.io.IOException; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.Cell; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java index 4efa01cb0c0..707321d229e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java @@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.LongAdder; -import org.apache.commons.lang3.mutable.MutableObject; +import org.apache.commons.lang.mutable.MutableObject; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java index 17ee48c75ee..dfe22ba5453 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java @@ -31,7 +31,7 @@ import java.util.regex.Matcher; import org.apache.commons.collections.map.AbstractReferenceMap; import org.apache.commons.collections.map.ReferenceMap; -import org.apache.commons.lang3.ClassUtils; +import org.apache.commons.lang.ClassUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerCoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerCoprocessorHost.java index 9e9e29cb3d4..9bcf2012376 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerCoprocessorHost.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerCoprocessorHost.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.Comparator; import java.util.List; -import org.apache.commons.lang3.ClassUtils; +import org.apache.commons.lang.ClassUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ReversedKeyValueHeap.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ReversedKeyValueHeap.java index b0974dcc14d..2035902341f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ReversedKeyValueHeap.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ReversedKeyValueHeap.java @@ -21,8 +21,7 @@ package org.apache.hadoop.hbase.regionserver; import java.io.IOException; import java.util.List; -import org.apache.commons.lang3.NotImplementedException; -import org.apache.hadoop.hbase.HConstants; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellComparator; @@ -189,6 +188,6 @@ public class ReversedKeyValueHeap extends KeyValueHeap { @Override public boolean seekToLastRow() throws IOException { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException("Not implemented"); } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SegmentScanner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SegmentScanner.java index ffdf295c1d1..08ded8807e0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SegmentScanner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SegmentScanner.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.Iterator; import java.util.SortedSet; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java index 846c87d43a7..a79d4c83b6d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java @@ -42,7 +42,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReentrantLock; -import org.apache.commons.lang3.mutable.MutableLong; +import org.apache.commons.lang.mutable.MutableLong; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -366,7 +366,7 @@ public abstract class AbstractFSWAL implements WAL { } if (walFileSuffix.isEmpty()) { // in the case of the null suffix, we need to ensure the filename ends with a timestamp. - return org.apache.commons.lang3.StringUtils + return org.apache.commons.lang.StringUtils .isNumeric(fileNameString.substring(prefixPathStr.length())); } else if (!fileNameString.endsWith(walFileSuffix)) { return false; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java index 7a4f28f9f3f..6c795378faa 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java @@ -37,7 +37,7 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -446,4 +446,4 @@ public class HBaseInterClusterReplicationEndpoint extends HBaseReplicationEndpoi } } } -} +} \ No newline at end of file diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java index 80ef6e398a5..620b28bc9eb 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java @@ -30,7 +30,7 @@ import java.util.TreeMap; import java.util.UUID; import java.util.concurrent.atomic.AtomicLong; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index 1a17a2ed95b..f3a37ddc5d8 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicLong; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityUtils.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityUtils.java index c6fc186e609..a2a99b352fa 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityUtils.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityUtils.java @@ -31,7 +31,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java index 56517a4835c..3051ab4235e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java @@ -48,7 +48,7 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang3.time.StopWatch; +import org.apache.commons.lang.time.StopWatch; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -1572,4 +1572,4 @@ public final class Canary implements Tool { executor.shutdown(); System.exit(exitCode); } -} +} \ No newline at end of file diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java index c6b11a98dfb..7b745baf684 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java @@ -21,7 +21,7 @@ package org.apache.hadoop.hbase.util; import java.io.IOException; import java.util.Locale; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java index a76dd5da28b..a73883b0b2d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java @@ -29,7 +29,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import edu.umd.cs.findbugs.annotations.Nullable; -import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang.NotImplementedException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -372,7 +372,7 @@ public class FSTableDescriptors implements TableDescriptors { } TableName tableName = htd.getTableName(); if (TableName.META_TABLE_NAME.equals(tableName)) { - throw new NotImplementedException(HConstants.NOT_IMPLEMENTED); + throw new NotImplementedException(); } if (HConstants.HBASE_NON_USER_TABLE_DIRS.contains(tableName.getNameAsString())) { throw new NotImplementedException( diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java index 556ee9e7310..bc663e13267 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java @@ -69,8 +69,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.RandomStringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java index b3c711a047a..d487eb09e1e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionSplitter.java @@ -34,8 +34,8 @@ import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/OfflineMetaRepair.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/OfflineMetaRepair.java index 3c64d2e8730..8cda518ac86 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/OfflineMetaRepair.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/OfflineMetaRepair.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.util.hbck; import java.io.IOException; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/NettyAsyncFSWALConfigHelper.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/NettyAsyncFSWALConfigHelper.java index 34ef3f09040..08796bea823 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/NettyAsyncFSWALConfigHelper.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/NettyAsyncFSWALConfigHelper.java @@ -25,7 +25,7 @@ import org.apache.hadoop.hbase.shaded.io.netty.channel.EventLoopGroup; import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.util.Pair; diff --git a/hbase-server/src/main/resources/hbase-webapps/master/procedures.jsp b/hbase-server/src/main/resources/hbase-webapps/master/procedures.jsp index ce62fa1fa62..a3701fffe6e 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/procedures.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/procedures.jsp @@ -18,7 +18,7 @@ */ --%> <%@ page contentType="text/html;charset=UTF-8" - import="static org.apache.commons.lang3.StringEscapeUtils.escapeXml" + import="static org.apache.commons.lang.StringEscapeUtils.escapeXml" import="java.util.Collections" import="java.util.Comparator" import="java.util.ArrayList" diff --git a/hbase-server/src/main/resources/hbase-webapps/master/processMaster.jsp b/hbase-server/src/main/resources/hbase-webapps/master/processMaster.jsp index 6e87e72ac7c..d8e29ce577f 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/processMaster.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/processMaster.jsp @@ -21,7 +21,7 @@ import="java.util.Date" import="java.util.List" import="org.apache.hadoop.hbase.HBaseConfiguration" - import="static org.apache.commons.lang3.StringEscapeUtils.escapeXml" + import="static org.apache.commons.lang.StringEscapeUtils.escapeXml" import="javax.management.ObjectName" import="java.lang.management.ManagementFactory" import="java.lang.management.MemoryPoolMXBean" diff --git a/hbase-server/src/main/resources/hbase-webapps/master/processRS.jsp b/hbase-server/src/main/resources/hbase-webapps/master/processRS.jsp index cc18d5bb1f9..6abf8a1141c 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/processRS.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/processRS.jsp @@ -21,7 +21,7 @@ import="java.util.Date" import="java.util.List" import="org.apache.hadoop.hbase.HBaseConfiguration" - import="static org.apache.commons.lang3.StringEscapeUtils.escapeXml" + import="static org.apache.commons.lang.StringEscapeUtils.escapeXml" import="javax.management.ObjectName" import="java.lang.management.ManagementFactory" import="java.lang.management.MemoryPoolMXBean" diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp index 6c401a9d223..6f3baf06b7d 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -19,7 +19,7 @@ --%> <%@page import="org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionSpecifier.RegionSpecifierType"%> <%@ page contentType="text/html;charset=UTF-8" - import="static org.apache.commons.lang3.StringEscapeUtils.escapeXml" + import="static org.apache.commons.lang.StringEscapeUtils.escapeXml" import="org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString" import="java.net.URLEncoder" import="java.util.ArrayList" @@ -31,7 +31,7 @@ import="java.util.Collection" import="java.util.Collections" import="java.util.Comparator" - import="org.apache.commons.lang3.StringEscapeUtils" + import="org.apache.commons.lang.StringEscapeUtils" import="org.apache.hadoop.conf.Configuration" import="org.apache.hadoop.util.StringUtils" import="org.apache.hadoop.hbase.HRegionInfo" @@ -73,7 +73,7 @@ MetaTableLocator metaTableLocator = new MetaTableLocator(); String fqtn = request.getParameter("name"); - final String escaped_fqtn = StringEscapeUtils.escapeHtml4(fqtn); + final String escaped_fqtn = StringEscapeUtils.escapeHtml(fqtn); String sortKey = request.getParameter("sort"); String reverse = request.getParameter("reverse"); final boolean reverseOrder = (reverse==null||!reverse.equals("false")); @@ -122,7 +122,7 @@ <% if ( !readOnly && action != null ) { %> - HBase Master: <%= StringEscapeUtils.escapeHtml4(master.getServerName().toString()) %> + HBase Master: <%= StringEscapeUtils.escapeHtml(master.getServerName().toString()) %> <% } else { %> Table: <%= escaped_fqtn %> <% } %> @@ -276,7 +276,7 @@ if ( fqtn != null ) { %> <%= escapeXml(meta.getRegionNameAsString()) %> - <%= StringEscapeUtils.escapeHtml4(metaLocation.getHostname().toString()) + ":" + master.getRegionServerInfoPort(metaLocation) %> + <%= StringEscapeUtils.escapeHtml(metaLocation.getHostname().toString()) + ":" + master.getRegionServerInfoPort(metaLocation) %> <%= readReq%> <%= writeReq%> <%= fileSize%> @@ -317,7 +317,7 @@ if ( fqtn != null ) { } catch (Exception e) { // Nothing really to do here for(StackTraceElement element : e.getStackTrace()) { - %><%= StringEscapeUtils.escapeHtml4(element.toString()) %><% + %><%= StringEscapeUtils.escapeHtml(element.toString()) %><% } %> Unknown <% } @@ -398,7 +398,7 @@ if ( fqtn != null ) { for (HColumnDescriptor family: families) { %> - <%= StringEscapeUtils.escapeHtml4(family.getNameAsString()) %> + <%= StringEscapeUtils.escapeHtml(family.getNameAsString()) %> @@ -411,10 +411,10 @@ if ( fqtn != null ) { %> <% } %> @@ -708,7 +708,7 @@ ShowDetailName&Start/End Key"><%= StringEscapeUtils.escapeHtml4(addr.getHostname().toString()) + ":" + master.getRegionServerInfoPort(addr) %> + <%= StringEscapeUtils.escapeHtml(addr.getHostname().toString()) + ":" + master.getRegionServerInfoPort(addr) %> <% } else { @@ -761,7 +761,7 @@ if (withReplica) { String url = "//" + URLEncoder.encode(addr.getHostname()) + ":" + master.getRegionServerInfoPort(addr) + "/"; %> - + <% if (withReplica) { @@ -776,7 +776,7 @@ if (withReplica) { <% } } catch(Exception ex) { for(StackTraceElement element : ex.getStackTrace()) { - %><%= StringEscapeUtils.escapeHtml4(element.toString()) %><% + %><%= StringEscapeUtils.escapeHtml(element.toString()) %><% } } finally { admin.close(); @@ -894,7 +894,7 @@ Actions:
- <%= StringEscapeUtils.escapeHtml4(familyKey.toString()) %> + <%= StringEscapeUtils.escapeHtml(familyKey.toString()) %> - <%= StringEscapeUtils.escapeHtml4(familyValues.get(familyKey).toString()) %> + <%= StringEscapeUtils.escapeHtml(familyValues.get(familyKey).toString()) %>
<%= StringEscapeUtils.escapeHtml4(addr.getHostname().toString()) + ":" + master.getRegionServerInfoPort(addr) %><%= StringEscapeUtils.escapeHtml(addr.getHostname().toString()) + ":" + master.getRegionServerInfoPort(addr) %> <%= rdEntry.getValue()%>