本文整理汇总了Java中org.apache.hadoop.hbase.client.ScannerCallable类的典型用法代码示例。如果您正苦于以下问题:Java ScannerCallable类的具体用法?Java ScannerCallable怎么用?Java ScannerCallable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ScannerCallable类属于org.apache.hadoop.hbase.client包,在下文中一共展示了ScannerCallable类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpBeforeClass
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
((Log4JLogger) ScannerCallable.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger) HeartbeatRPCServices.LOG).getLogger().setLevel(Level.ALL);
Configuration conf = TEST_UTIL.getConfiguration();
conf.setStrings(HConstants.REGION_IMPL, HeartbeatHRegion.class.getName());
conf.setStrings(HConstants.REGION_SERVER_IMPL, HeartbeatHRegionServer.class.getName());
conf.setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, CLIENT_TIMEOUT);
conf.setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, CLIENT_TIMEOUT);
conf.setInt(HConstants.HBASE_CLIENT_PAUSE, 1);
// Check the timeout condition after every cell
conf.setLong(StoreScanner.HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK, 1);
TEST_UTIL.startMiniCluster(1);
TABLE = createTestTable(TABLE_NAME, ROWS, FAMILIES, QUALIFIERS, VALUE);
}
示例2: setUp
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
LOG.info("HBase minicluster: Starting");
((Log4JLogger) RpcServer.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger) AbstractRpcClient.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger) ScannerCallable.LOG).getLogger().setLevel(Level.ALL);
TEST_UTIL.startMiniCluster(1);
// https://issues.apache.org/jira/browse/HBASE-11711
TEST_UTIL.getConfiguration().setInt("hbase.master.info.port", -1);
// Make sure the zookeeper quorum value contains the right port number (varies per run).
TEST_UTIL.getConfiguration().set("hbase.zookeeper.quorum", "localhost:" + TEST_UTIL.getZkCluster().getClientPort());
conf = initialize(TEST_UTIL.getConfiguration());
LOG.info("HBase minicluster: Running");
}
示例3: setUp
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
LOG.info("HBase minicluster: Starting");
((Log4JLogger) RpcServer.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger) AbstractRpcClient.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger) ScannerCallable.LOG).getLogger().setLevel(Level.ALL);
TEST_UTIL.startMiniCluster(1);
// https://issues.apache.org/jira/browse/HBASE-11711
TEST_UTIL.getConfiguration().setInt("hbase.master.info.port", -1);
// Make sure the zookeeper quorum value contains the right port number (varies per run).
TEST_UTIL.getConfiguration().set("hbase.zookeeper.quorum", "localhost:" + TEST_UTIL.getZkCluster().getClientPort());
initialize(TEST_UTIL.getConfiguration());
LOG.info("HBase minicluster: Running");
}
示例4: setHTable
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
/**
* @param htable the {@link org.apache.hadoop.hbase.HTableDescriptor} to scan.
*/
public void setHTable(Table htable) {
Configuration conf = htable.getConfiguration();
logScannerActivity = conf.getBoolean(
ScannerCallable.LOG_SCANNER_ACTIVITY, false);
logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100);
this.htable = htable;
}
示例5: setHTable
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
/**
* Sets the HBase table.
*
* @param htable The {@link org.apache.hadoop.hbase.HTableDescriptor} to scan.
*/
public void setHTable(Table htable) {
Configuration conf = htable.getConfiguration();
logScannerActivity = conf.getBoolean(
ScannerCallable.LOG_SCANNER_ACTIVITY, false);
logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100);
this.htable = htable;
}
示例6: setUp
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
((Log4JLogger)RpcServer.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger)AbstractRpcClient.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger)ScannerCallable.LOG).getLogger().setLevel(Level.ALL);
TEST_UTIL.startMiniCluster(1);
initialize(TEST_UTIL.getConfiguration());
}
示例7: setHTable
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
/**
* @param htable the {@link HTable} to scan.
*/
public void setHTable(HTable htable) {
Configuration conf = htable.getConfiguration();
logScannerActivity = conf.getBoolean(
ScannerCallable.LOG_SCANNER_ACTIVITY, false);
logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100);
this.htable = htable;
}
示例8: setHTable
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
/**
* Sets the HBase table.
*
* @param htable The {@link HTable} to scan.
*/
public void setHTable(HTable htable) {
Configuration conf = htable.getConfiguration();
logScannerActivity = conf.getBoolean(
ScannerCallable.LOG_SCANNER_ACTIVITY, false);
logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100);
this.htable = htable;
}
示例9: setupCluster
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
/**
* Setup the config for the cluster
* @throws Exception on failure
*/
@BeforeClass
public static void setupCluster() throws Exception {
((Log4JLogger)RpcServer.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger)RpcClient.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger)ScannerCallable.LOG).getLogger().setLevel(Level.ALL);
setupConf(UTIL.getConfiguration());
UTIL.startMiniCluster(NUM_RS);
}
示例10: setUp
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
@BeforeClass
public static void setUp() throws Exception {
((Log4JLogger)RpcServer.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger)RpcClient.LOG).getLogger().setLevel(Level.ALL);
((Log4JLogger)ScannerCallable.LOG).getLogger().setLevel(Level.ALL);
TEST_UTIL.startMiniCluster(1);
initialize(TEST_UTIL.getConfiguration());
}
示例11: setHTable
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
/**
* @param htable
* the {@link org.apache.hadoop.hbase.client.HTable} to scan.
*/
public void setHTable(HTable htable) {
Configuration conf = htable.getConfiguration();
logScannerActivity = conf.getBoolean(ScannerCallable.LOG_SCANNER_ACTIVITY,
false);
logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100);
this.htable = htable;
}
示例12: getScannerCallable
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
@Override
protected ScannerCallable getScannerCallable(final byte[] localStartKey, final int caching) {
getScan().setStartRow(localStartKey);
TransactionScannerCallable t = new TransactionScannerCallable(transactionState, getConnection(),
getTableName(), getScan());
t.setCaching(caching);
return t;
}
示例13: setJobScannerConf
import org.apache.hadoop.hbase.client.ScannerCallable; //导入依赖的package包/类
private static void setJobScannerConf(Job job) {
job.getConfiguration().setBoolean(ScannerCallable.LOG_SCANNER_ACTIVITY, true);
long lpr = job.getConfiguration().getLong(NUM_TO_WRITE_KEY, NUM_TO_WRITE_DEFAULT) / 100;
job.getConfiguration().setInt(TableRecordReaderImpl.LOG_PER_ROW_COUNT, (int) lpr);
}