Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hbase-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,9 @@ private HBaseInterfaceAudience(){}
* Denotes classes that can be used to build custom authentication solutions.
*/
public static final String AUTHENTICATION = "Authentication";

/**
* Denotes classes that are being used to build Custom Chaos Monkey.
*/
public static final String CHAOS = "ChaosMonkey";
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
package org.apache.hadoop.hbase.test;

import org.apache.hadoop.hbase.metrics.BaseSource;
import org.apache.yetus.audience.InterfaceAudience;

/** Interface of a class to make assertions about metrics values. */
@InterfaceAudience.Private
public interface MetricsAssertHelper {

/**
Expand Down
5 changes: 5 additions & 0 deletions hbase-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@
<artifactId>bcprov-jdk15on</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<scope>compile</scope>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you combine both compile and test scope with single dependency tag?

</dependency>
<dependency>
<groupId>org.apache.kerby</groupId>
<artifactId>kerb-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
import org.apache.hadoop.security.ssl.FileBasedKeyStoresFactory;
import org.apache.hadoop.security.ssl.SSLFactory;
import org.apache.yetus.audience.InterfaceAudience;
import org.bouncycastle.x509.X509V1CertificateGenerator;

@InterfaceAudience.Private
public final class KeyStoreTestUtil {
private KeyStoreTestUtil() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@

import org.apache.hadoop.conf.Configurable;
import org.apache.yetus.audience.InterfaceAudience;

import org.apache.yetus.audience.InterfaceStability;

/**
* ClusterManager is an api to manage servers in a distributed environment. It provides services
* for starting / stopping / killing Hadoop/HBase daemons. Concrete implementations provide actual
* functionality for carrying out deployment-specific tasks.
*/
@InterfaceAudience.Private
interface ClusterManager extends Configurable {
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public interface ClusterManager extends Configurable {
/**
* Type of the service daemon
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Threads;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;

/**
* Manages the interactions with an already deployed distributed cluster (as opposed to
* a pseudo-distributed, or mini/local cluster). This is used by integration and system tests.
*/
@InterfaceAudience.Private
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class DistributedHBaseCluster extends HBaseCluster {
private Admin admin;
private final Connection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.hadoop.hbase.util.RetryCounterFactory;
import org.apache.hadoop.util.Shell;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -43,7 +44,8 @@
* servers on the remote machines (for example, the test user could be the same user as the
* user the daemon is running as)
*/
@InterfaceAudience.Private
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class HBaseClusterManager extends Configured implements ClusterManager {
private static final String SIGKILL = "SIGKILL";
private static final String SIGSTOP = "SIGSTOP";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.apache.hadoop.hbase.chaos.factories.MonkeyFactory;
import org.apache.hadoop.hbase.chaos.monkies.ChaosMonkey;
import org.apache.hadoop.hbase.util.AbstractHBaseTool;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.junit.After;
import org.junit.Before;
import org.slf4j.Logger;
Expand All @@ -44,6 +46,8 @@
* -monkeyProps &lt;arg> The properties file for specifying chaos monkey properties.
* -ncc Option to not clean up the cluster at the end.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public abstract class IntegrationTestBase extends AbstractHBaseTool {

public static final String NO_CLUSTER_CLEANUP_LONG_OPT = "noClusterCleanUp";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.ReflectionUtils;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;

/**
* Facility for <strong>integration/system</strong> tests. This extends {@link HBaseTestingUtility}
Expand All @@ -39,6 +41,8 @@
* via {@link #initializeCluster(int)}. Individual tests should not directly call
* {@link #setUseDistributedCluster(Configuration)}.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class IntegrationTestingUtility extends HBaseTestingUtility {

public IntegrationTestingUtility() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.ClusterMetrics;
import org.apache.hadoop.hbase.HBaseCluster;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.IntegrationTestBase;
Expand All @@ -49,12 +50,16 @@
import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A (possibly mischievous) action that the ChaosMonkey can perform.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class Action {

public static final String KILL_MASTER_TIMEOUT_KEY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@

import java.io.IOException;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.chaos.monkies.PolicyBasedChaosMonkey;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Action that adds high cpu load to a random regionserver for a given duration
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class AddCPULoadAction extends SudoCommandAction {
protected static final Logger LOG = LoggerFactory.getLogger(AddCPULoadAction.class);
private static final String CPU_LOAD_COMMAND =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,23 @@
import java.io.IOException;

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;
import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Action the adds a column family to a table.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class AddColumnAction extends Action {
private final TableName tableName;
private Admin admin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@
import java.util.List;
import java.util.Set;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.chaos.monkies.PolicyBasedChaosMonkey;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Restarts a ratio of the running regionservers at the same time
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class BatchRestartRsAction extends RestartActionBaseAction {
float ratio; //ratio of regionservers to restart
private static final Logger LOG =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@

import java.util.Random;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.regionserver.BloomType;
import org.apache.hadoop.hbase.util.BloomFilterUtil;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Action that tries to adjust the bloom filter setting on all the columns of a
* table
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class ChangeBloomFilterAction extends Action {
private final long sleepTime;
private final TableName tableName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@
import java.io.IOException;
import java.util.Random;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.io.compress.Compression.Algorithm;
import org.apache.hadoop.io.compress.Compressor;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Action that changes the compression algorithm on a column family from a list of tables.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class ChangeCompressionAction extends Action {
private final TableName tableName;
private final Random random;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
import java.io.IOException;
import java.util.Random;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Action that changes the encoding on a column family from a list of tables.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class ChangeEncodingAction extends Action {
private final TableName tableName;
private final Random random;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.util.Random;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
Expand All @@ -27,9 +28,13 @@
import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy;
import org.apache.hadoop.hbase.regionserver.DisabledRegionSplitPolicy;
import org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class ChangeSplitPolicyAction extends Action {
private static final Logger LOG = LoggerFactory.getLogger(ChangeSplitPolicyAction.class);
private final TableName tableName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
import java.io.IOException;
import java.util.Random;

import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.TableName;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -30,6 +33,8 @@
*
* Always keeps at least 1 as the number of versions.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class ChangeVersionsAction extends Action {
private final TableName tableName;
private static final Logger LOG = LoggerFactory.getLogger(ChangeVersionsAction.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@
package org.apache.hadoop.hbase.chaos.actions;

import org.apache.commons.lang3.RandomUtils;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.CompactType;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Action that queues a table compaction.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class CompactMobAction extends Action {
private final TableName tableName;
private final int majorRatio;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,22 @@
import java.util.List;

import org.apache.commons.lang3.RandomUtils;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.chaos.monkies.PolicyBasedChaosMonkey;
import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.yetus.audience.InterfaceStability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Region that queues a compaction of a random region from the table.
*/
@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CHAOS)
@InterfaceStability.Evolving
public class CompactRandomRegionOfTableAction extends Action {
private final int majorRatio;
private final long sleepTime;
Expand Down
Loading