HBASE-14780 Integration Test that run with chaos monkey must specify cfs
This commit is contained in:
parent
867a5ea188
commit
0207da8cee
|
@ -203,7 +203,15 @@ public abstract class IntegrationTestBase extends AbstractHBaseTool {
|
||||||
|
|
||||||
public abstract int runTestFromCommandLine() throws Exception;
|
public abstract int runTestFromCommandLine() throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides the name of the table that is protected from random Chaos monkey activity
|
||||||
|
* @return table to not delete.
|
||||||
|
*/
|
||||||
public abstract TableName getTablename();
|
public abstract TableName getTablename();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides the name of the CFs that are protected from random Chaos monkey activity (alter)
|
||||||
|
* @return set of cf names to protect.
|
||||||
|
*/
|
||||||
protected abstract Set<String> getColumnFamilies();
|
protected abstract Set<String> getColumnFamilies();
|
||||||
}
|
}
|
||||||
|
|
|
@ -954,12 +954,12 @@ public class IntegrationTestDDLMasterFailover extends IntegrationTestBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableName getTablename() {
|
public TableName getTablename() {
|
||||||
return null;
|
return null; // This test is not inteded to run with stock Chaos Monkey
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Set<String> getColumnFamilies() {
|
protected Set<String> getColumnFamilies() {
|
||||||
return null;
|
return null; // This test is not inteded to run with stock Chaos Monkey
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.hbase;
|
package org.apache.hadoop.hbase;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import com.yammer.metrics.core.Histogram;
|
import com.yammer.metrics.core.Histogram;
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
@ -33,6 +34,7 @@ import org.apache.hadoop.hbase.client.Admin;
|
||||||
import org.apache.hadoop.hbase.ipc.RpcClient;
|
import org.apache.hadoop.hbase.ipc.RpcClient;
|
||||||
import org.apache.hadoop.hbase.regionserver.DisabledRegionSplitPolicy;
|
import org.apache.hadoop.hbase.regionserver.DisabledRegionSplitPolicy;
|
||||||
import org.apache.hadoop.hbase.testclassification.IntegrationTests;
|
import org.apache.hadoop.hbase.testclassification.IntegrationTests;
|
||||||
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.hbase.util.YammerHistogramUtils;
|
import org.apache.hadoop.hbase.util.YammerHistogramUtils;
|
||||||
import org.apache.hadoop.mapreduce.Counters;
|
import org.apache.hadoop.mapreduce.Counters;
|
||||||
import org.apache.hadoop.mapreduce.Job;
|
import org.apache.hadoop.mapreduce.Job;
|
||||||
|
@ -234,7 +236,7 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Set<String> getColumnFamilies() {
|
protected Set<String> getColumnFamilies() {
|
||||||
return null;
|
return Sets.newHashSet(Bytes.toString(PerformanceEvaluation.FAMILY_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Compute the mean of the given {@code stat} from a timing results. */
|
/** Compute the mean of the given {@code stat} from a timing results. */
|
||||||
|
|
|
@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
|
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
import org.apache.commons.lang.RandomStringUtils;
|
import org.apache.commons.lang.RandomStringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
@ -79,6 +80,7 @@ import java.io.DataInput;
|
||||||
import java.io.DataOutput;
|
import java.io.DataOutput;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
@ -778,7 +780,8 @@ public class IntegrationTestBulkLoad extends IntegrationTestBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Set<String> getColumnFamilies() {
|
protected Set<String> getColumnFamilies() {
|
||||||
return null;
|
return Sets.newHashSet(Bytes.toString(CHAIN_FAM) , Bytes.toString(DATA_FAM),
|
||||||
|
Bytes.toString(SORT_FAM));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
|
@ -174,15 +174,13 @@ public class IntegrationTestTableSnapshotInputFormat extends IntegrationTestBase
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override // CM is not intended to be run with this test
|
@Override // Chaos Monkey is not intended to be run with this test
|
||||||
public TableName getTablename() {
|
public TableName getTablename() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override // Chaos Monkey is not inteded to be run with this test
|
||||||
protected Set<String> getColumnFamilies() {
|
protected Set<String> getColumnFamilies() { return null; }
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
Configuration conf = HBaseConfiguration.create();
|
Configuration conf = HBaseConfiguration.create();
|
||||||
|
|
Loading…
Reference in New Issue