当前位置: 首页>>代码示例>>Java>>正文


Java Incommon类代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.HBaseTestCase.Incommon的典型用法代码示例。如果您正苦于以下问题:Java Incommon类的具体用法?Java Incommon怎么用?Java Incommon使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Incommon类属于org.apache.hadoop.hbase.HBaseTestCase包,在下文中一共展示了Incommon类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testTimestamps

import org.apache.hadoop.hbase.HBaseTestCase.Incommon; //导入依赖的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();
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:35,代码来源:TestMultiVersions.java

示例2: testTimestamps

import org.apache.hadoop.hbase.HBaseTestCase.Incommon; //导入依赖的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();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:37,代码来源:TestMultiVersions.java

示例3: testTimestamps

import org.apache.hadoop.hbase.HBaseTestCase.Incommon; //导入依赖的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();
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:37,代码来源:TestMultiVersions.java


注:本文中的org.apache.hadoop.hbase.HBaseTestCase.Incommon类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。