HBASE-6234 Move simple KeyValue tests to hbase-common module
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1379287 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f61e806141
commit
844f27c8f8
|
@ -14,7 +14,7 @@
|
||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase.util;
|
package org.apache.hadoop.hbase.util.test;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
|
@ -34,9 +34,7 @@ import org.apache.hadoop.hbase.KeyValue.MetaComparator;
|
||||||
import org.apache.hadoop.hbase.KeyValue.Type;
|
import org.apache.hadoop.hbase.KeyValue.Type;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.io.WritableUtils;
|
import org.apache.hadoop.io.WritableUtils;
|
||||||
import org.junit.experimental.categories.Category;
|
|
||||||
|
|
||||||
@Category(SmallTests.class)
|
|
||||||
public class TestKeyValue extends TestCase {
|
public class TestKeyValue extends TestCase {
|
||||||
private final Log LOG = LogFactory.getLog(this.getClass().getName());
|
private final Log LOG = LogFactory.getLog(this.getClass().getName());
|
||||||
|
|
||||||
|
@ -518,9 +516,5 @@ public class TestKeyValue extends TestCase {
|
||||||
assertEquals(HConstants.LATEST_TIMESTAMP, time1);
|
assertEquals(HConstants.LATEST_TIMESTAMP, time1);
|
||||||
assertEquals(12345L, time2);
|
assertEquals(12345L, time2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.Rule
|
|
||||||
public org.apache.hadoop.hbase.ResourceCheckerJUnitRule cu =
|
|
||||||
new org.apache.hadoop.hbase.ResourceCheckerJUnitRule();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,9 @@ import java.util.HashSet;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.SmallTests;
|
import org.apache.hadoop.hbase.util.test.LoadTestKVGenerator;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
|
||||||
|
|
||||||
@Category(SmallTests.class)
|
|
||||||
public class TestLoadTestKVGenerator {
|
public class TestLoadTestKVGenerator {
|
||||||
|
|
||||||
private static final int MIN_LEN = 10;
|
private static final int MIN_LEN = 10;
|
|
@ -39,8 +39,8 @@ import org.apache.hadoop.hbase.io.hfile.LruBlockCache;
|
||||||
import org.apache.hadoop.hbase.regionserver.HRegion;
|
import org.apache.hadoop.hbase.regionserver.HRegion;
|
||||||
import org.apache.hadoop.hbase.regionserver.StoreFile.BloomType;
|
import org.apache.hadoop.hbase.regionserver.StoreFile.BloomType;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.hbase.util.LoadTestKVGenerator;
|
|
||||||
import org.apache.hadoop.hbase.util.MultiThreadedWriter;
|
import org.apache.hadoop.hbase.util.MultiThreadedWriter;
|
||||||
|
import org.apache.hadoop.hbase.util.test.LoadTestKVGenerator;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.KeyValue;
|
||||||
import org.apache.hadoop.hbase.client.Get;
|
import org.apache.hadoop.hbase.client.Get;
|
||||||
import org.apache.hadoop.hbase.client.HTable;
|
import org.apache.hadoop.hbase.client.HTable;
|
||||||
import org.apache.hadoop.hbase.client.Result;
|
import org.apache.hadoop.hbase.client.Result;
|
||||||
|
import org.apache.hadoop.hbase.util.test.LoadTestKVGenerator;
|
||||||
|
|
||||||
/** Creates multiple threads that read and verify previously written data */
|
/** Creates multiple threads that read and verify previously written data */
|
||||||
public class MultiThreadedReader extends MultiThreadedAction
|
public class MultiThreadedReader extends MultiThreadedAction
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hbase.client.HTable;
|
import org.apache.hadoop.hbase.client.HTable;
|
||||||
import org.apache.hadoop.hbase.client.Put;
|
import org.apache.hadoop.hbase.client.Put;
|
||||||
|
import org.apache.hadoop.hbase.util.test.LoadTestKVGenerator;
|
||||||
|
|
||||||
/** Creates multiple threads that write key/values into the */
|
/** Creates multiple threads that write key/values into the */
|
||||||
public class MultiThreadedWriter extends MultiThreadedAction {
|
public class MultiThreadedWriter extends MultiThreadedAction {
|
||||||
|
|
Loading…
Reference in New Issue