Revert "HBASE-18674 upgrading to commons-lang3"
Premature push
This reverts commit 5dacc85122
.
This commit is contained in:
parent
ea1620ff42
commit
47a5614edd
|
@ -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
|
||||
|
|
|
@ -140,8 +140,8 @@
|
|||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -144,8 +144,8 @@
|
|||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -233,8 +233,8 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<T> implements Iterable<T> {
|
|||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new NotImplementedException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -181,8 +181,8 @@ limitations under the License.
|
|||
<version>${hadoop-two.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -267,8 +267,8 @@
|
|||
<artifactId>commons-math</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.htrace</groupId>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<String> 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<TableName> 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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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<HRegionLocation> locations = locator.getAllRegionLocations();
|
||||
restartRs(locations.get(RandomUtils.nextInt(0, locations.size())).getServerName(), sleepTime);
|
||||
restartRs(locations.get(RandomUtils.nextInt(locations.size())).getServerName(), sleepTime);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<ServerName> 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);
|
||||
|
|
|
@ -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<ServerName> 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);
|
||||
|
|
|
@ -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> 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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -93,8 +93,8 @@
|
|||
<artifactId>commons-logging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase.thirdparty</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -143,8 +143,8 @@
|
|||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<String> getAllPeersFromHFileRefsQueue() throws KeeperException {
|
||||
// TODO
|
||||
throw new NotImplementedException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getReplicableHFiles(String peerId) throws KeeperException {
|
||||
// TODO
|
||||
throw new NotImplementedException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Pair<Path, Path>> pairs)
|
||||
throws ReplicationException {
|
||||
// TODO
|
||||
throw new NotImplementedException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeHFileRefs(String peerId, List<String> files) {
|
||||
// TODO
|
||||
throw new NotImplementedException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private String buildQueueRowKey(String queueId) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -268,8 +268,8 @@
|
|||
<artifactId>httpcore</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -503,8 +503,8 @@
|
|||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</%args>
|
||||
<%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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<Cell> {
|
|||
}
|
||||
|
||||
public Cell ceiling(Cell e) {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public Iterator<Cell> descendingIterator() {
|
||||
|
@ -70,11 +69,11 @@ public class CellSet implements NavigableSet<Cell> {
|
|||
}
|
||||
|
||||
public NavigableSet<Cell> 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<Cell> headSet(final Cell toElement) {
|
||||
|
@ -87,7 +86,7 @@ public class CellSet implements NavigableSet<Cell> {
|
|||
}
|
||||
|
||||
public Cell higher(Cell e) {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public Iterator<Cell> iterator() {
|
||||
|
@ -95,24 +94,24 @@ public class CellSet implements NavigableSet<Cell> {
|
|||
}
|
||||
|
||||
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<Cell> subSet(Cell fromElement, Cell toElement) {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public NavigableSet<Cell> subSet(Cell fromElement,
|
||||
boolean fromInclusive, Cell toElement, boolean toInclusive) {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public SortedSet<Cell> tailSet(Cell fromElement) {
|
||||
|
@ -124,7 +123,7 @@ public class CellSet implements NavigableSet<Cell> {
|
|||
}
|
||||
|
||||
public Comparator<? super Cell> comparator() {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public Cell first() {
|
||||
|
@ -140,7 +139,7 @@ public class CellSet implements NavigableSet<Cell> {
|
|||
}
|
||||
|
||||
public boolean addAll(Collection<? extends Cell> c) {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
|
@ -153,7 +152,7 @@ public class CellSet implements NavigableSet<Cell> {
|
|||
}
|
||||
|
||||
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<Cell> {
|
|||
}
|
||||
|
||||
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<Cell> {
|
|||
}
|
||||
|
||||
public Object[] toArray() {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
public <T> T[] toArray(T[] a) {
|
||||
throw new UnsupportedOperationException(HConstants.NOT_IMPLEMENTED);
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue