本文整理汇总了Java中org.apache.hadoop.hbase.HBaseTestCase.FlushCache类的典型用法代码示例。如果您正苦于以下问题:Java FlushCache类的具体用法?Java FlushCache怎么用?Java FlushCache使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FlushCache类属于org.apache.hadoop.hbase.HBaseTestCase包,在下文中一共展示了FlushCache类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testTimestamps
import org.apache.hadoop.hbase.HBaseTestCase.FlushCache; //导入依赖的package包/类
/**
* Tests user specifiable time stamps putting, getting and scanning. Also
* tests same in presence of deletes. Test cores are written so can be
* run against an HRegion and against an HTable: i.e. both local and remote.
*
* <p>Port of old TestTimestamp test to here so can better utilize the spun
* up cluster running more than a single test per spin up. Keep old tests'
* crazyness.
*/
@Test
public void testTimestamps() throws Exception {
HTableDescriptor desc = new HTableDescriptor("testTimestamps");
desc.addFamily(new HColumnDescriptor(TimestampTestBase.FAMILY_NAME));
this.admin.createTable(desc);
HTable table = new HTable(UTIL.getConfiguration(), desc.getName());
// TODO: Remove these deprecated classes or pull them in here if this is
// only test using them.
Incommon incommon = new HTableIncommon(table);
TimestampTestBase.doTestDelete(incommon, new FlushCache() {
public void flushcache() throws IOException {
UTIL.getHBaseCluster().flushcache();
}
});
// Perhaps drop and readd the table between tests so the former does
// not pollute this latter? Or put into separate tests.
TimestampTestBase.doTestTimestampScanning(incommon, new FlushCache() {
public void flushcache() throws IOException {
UTIL.getMiniHBaseCluster().flushcache();
}
});
table.close();
}
示例2: testTimestamps
import org.apache.hadoop.hbase.HBaseTestCase.FlushCache; //导入依赖的package包/类
/**
* Tests user specifiable time stamps putting, getting and scanning. Also
* tests same in presence of deletes. Test cores are written so can be
* run against an HRegion and against an HTable: i.e. both local and remote.
*
* <p>Port of old TestTimestamp test to here so can better utilize the spun
* up cluster running more than a single test per spin up. Keep old tests'
* crazyness.
*/
@Test
public void testTimestamps() throws Exception {
HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("testTimestamps"));
HColumnDescriptor hcd = new HColumnDescriptor(TimestampTestBase.FAMILY_NAME);
hcd.setMaxVersions(3);
desc.addFamily(hcd);
this.admin.createTable(desc);
Table table = new HTable(UTIL.getConfiguration(), desc.getTableName());
// TODO: Remove these deprecated classes or pull them in here if this is
// only test using them.
Incommon incommon = new HTableIncommon(table);
TimestampTestBase.doTestDelete(incommon, new FlushCache() {
public void flushcache() throws IOException {
UTIL.getHBaseCluster().flushcache();
}
});
// Perhaps drop and readd the table between tests so the former does
// not pollute this latter? Or put into separate tests.
TimestampTestBase.doTestTimestampScanning(incommon, new FlushCache() {
public void flushcache() throws IOException {
UTIL.getMiniHBaseCluster().flushcache();
}
});
table.close();
}
示例3: testTimestamps
import org.apache.hadoop.hbase.HBaseTestCase.FlushCache; //导入依赖的package包/类
/**
* Tests user specifiable time stamps putting, getting and scanning. Also
* tests same in presence of deletes. Test cores are written so can be
* run against an HRegion and against an HTable: i.e. both local and remote.
*
* <p>Port of old TestTimestamp test to here so can better utilize the spun
* up cluster running more than a single test per spin up. Keep old tests'
* crazyness.
*/
@Test
public void testTimestamps() throws Exception {
HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("testTimestamps"));
HColumnDescriptor hcd = new HColumnDescriptor(TimestampTestBase.FAMILY_NAME);
hcd.setMaxVersions(3);
desc.addFamily(hcd);
this.admin.createTable(desc);
HTable table = new HTable(UTIL.getConfiguration(), desc.getTableName());
// TODO: Remove these deprecated classes or pull them in here if this is
// only test using them.
Incommon incommon = new HTableIncommon(table);
TimestampTestBase.doTestDelete(incommon, new FlushCache() {
public void flushcache() throws IOException {
UTIL.getHBaseCluster().flushcache();
}
});
// Perhaps drop and readd the table between tests so the former does
// not pollute this latter? Or put into separate tests.
TimestampTestBase.doTestTimestampScanning(incommon, new FlushCache() {
public void flushcache() throws IOException {
UTIL.getMiniHBaseCluster().flushcache();
}
});
table.close();
}