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


Java DaemonThreadFactory类代码示例

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


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

示例1: FlushTableSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
FlushTableSubprocedurePool(String name, Configuration conf, Abortable abortable) {
  this.abortable = abortable;
  // configure the executor service
  long keepAlive = conf.getLong(
    RegionServerFlushTableProcedureManager.FLUSH_TIMEOUT_MILLIS_KEY,
    RegionServerFlushTableProcedureManager.FLUSH_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_FLUSH_TASKS_KEY, DEFAULT_CONCURRENT_FLUSH_TASKS);
  this.name = name;
  executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory("rs("
          + name + ")-flush-proc-pool"));
  taskPool = new ExecutorCompletionService<Void>(executor);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:14,代码来源:RegionServerFlushTableProcedureManager.java

示例2: SnapshotSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
SnapshotSubprocedurePool(String name, Configuration conf, Abortable abortable) {
  this.abortable = abortable;
  // configure the executor service
  long keepAlive = conf.getLong(
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY,
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_SNAPSHOT_TASKS_KEY, DEFAULT_CONCURRENT_SNAPSHOT_TASKS);
  this.name = name;
  executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory("rs("
          + name + ")-snapshot-pool"));
  taskPool = new ExecutorCompletionService<Void>(executor);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:14,代码来源:RegionServerSnapshotManager.java

示例3: start

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
@Override
public void start() {
  this.executor = new ThreadPoolExecutor(
      handlerCount,
      handlerCount,
      60,
      TimeUnit.SECONDS,
      new ArrayBlockingQueue<Runnable>(maxQueueLength),
      new DaemonThreadFactory("FifoRpcScheduler.handler"),
      new ThreadPoolExecutor.CallerRunsPolicy());
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:12,代码来源:FifoRpcScheduler.java

示例4: SimpleSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
public SimpleSubprocedurePool(String name, Configuration conf) {
  this.name = name;
  executor = new ThreadPoolExecutor(1, 1, 500, TimeUnit.SECONDS,
      new LinkedBlockingQueue<Runnable>(),
      new DaemonThreadFactory("rs(" + name + ")-procedure-pool"));
  taskPool = new ExecutorCompletionService<Void>(executor);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:SimpleRSProcedureManager.java

示例5: TwoConcurrentActionPolicy

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
public TwoConcurrentActionPolicy(long sleepTime, Action[] actionsOne, Action[] actionsTwo) {
  super(sleepTime);
  this.actionsOne = actionsOne;
  this.actionsTwo = actionsTwo;
  executor = Executors.newFixedThreadPool(2,
      new DaemonThreadFactory("TwoConcurrentAction-"));
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:TwoConcurrentActionPolicy.java

示例6: SnapshotSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
SnapshotSubprocedurePool(String name, Configuration conf) {
  // configure the executor service
  long keepAlive = conf.getLong(
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY,
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_SNAPSHOT_TASKS_KEY, DEFAULT_CONCURRENT_SNAPSHOT_TASKS);
  this.name = name;
  executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory("rs("
          + name + ")-snapshot-pool"));
  taskPool = new ExecutorCompletionService<Void>(executor);
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:13,代码来源:RegionServerSnapshotManager.java

示例7: FlushTableSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
FlushTableSubprocedurePool(String name, Configuration conf) {
  // configure the executor service
  long keepAlive = conf.getLong(
    RegionServerFlushTableProcedureManager.FLUSH_TIMEOUT_MILLIS_KEY,
    RegionServerFlushTableProcedureManager.FLUSH_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_FLUSH_TASKS_KEY, DEFAULT_CONCURRENT_FLUSH_TASKS);
  this.name = name;
  executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory("rs("
          + name + ")-flush-proc-pool"));
  taskPool = new ExecutorCompletionService<Void>(executor);
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:13,代码来源:RegionServerFlushTableProcedureManager.java

示例8: LogRollBackupSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
public LogRollBackupSubprocedurePool(String name, Configuration conf) {
  // configure the executor service
  long keepAlive =
      conf.getLong(LogRollRegionServerProcedureManager.BACKUP_TIMEOUT_MILLIS_KEY,
        LogRollRegionServerProcedureManager.BACKUP_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_BACKUP_TASKS_KEY, DEFAULT_CONCURRENT_BACKUP_TASKS);
  this.name = name;
  executor =
      new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.SECONDS,
          new LinkedBlockingQueue<>(), new DaemonThreadFactory("rs(" + name
              + ")-backup-pool"));
  taskPool = new ExecutorCompletionService<>(executor);
}
 
开发者ID:apache,项目名称:hbase,代码行数:14,代码来源:LogRollBackupSubprocedurePool.java

示例9: ZKPermissionWatcher

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
public ZKPermissionWatcher(ZKWatcher watcher,
    TableAuthManager authManager, Configuration conf) {
  super(watcher);
  this.authManager = authManager;
  String aclZnodeParent = conf.get("zookeeper.znode.acl.parent", ACL_NODE);
  this.aclZNode = ZNodePaths.joinZNode(watcher.znodePaths.baseZNode, aclZnodeParent);
  executor = Executors.newSingleThreadExecutor(
    new DaemonThreadFactory("zk-permission-watcher"));
}
 
开发者ID:apache,项目名称:hbase,代码行数:10,代码来源:ZKPermissionWatcher.java

示例10: FlushTableSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
FlushTableSubprocedurePool(String name, Configuration conf, Abortable abortable) {
  this.abortable = abortable;
  // configure the executor service
  long keepAlive = conf.getLong(
    RegionServerFlushTableProcedureManager.FLUSH_TIMEOUT_MILLIS_KEY,
    RegionServerFlushTableProcedureManager.FLUSH_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_FLUSH_TASKS_KEY, DEFAULT_CONCURRENT_FLUSH_TASKS);
  this.name = name;
  executor = new ThreadPoolExecutor(threads, threads, keepAlive, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<>(), new DaemonThreadFactory("rs("
          + name + ")-flush-proc-pool"));
  executor.allowCoreThreadTimeOut(true);
  taskPool = new ExecutorCompletionService<>(executor);
}
 
开发者ID:apache,项目名称:hbase,代码行数:15,代码来源:RegionServerFlushTableProcedureManager.java

示例11: SnapshotSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
SnapshotSubprocedurePool(String name, Configuration conf, Abortable abortable) {
  this.abortable = abortable;
  // configure the executor service
  long keepAlive = conf.getLong(
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY,
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT);
  int threads = conf.getInt(CONCURENT_SNAPSHOT_TASKS_KEY, DEFAULT_CONCURRENT_SNAPSHOT_TASKS);
  this.name = name;
  executor = new ThreadPoolExecutor(threads, threads, keepAlive, TimeUnit.MILLISECONDS,
      new LinkedBlockingQueue<>(), new DaemonThreadFactory("rs("
          + name + ")-snapshot-pool"));
  executor.allowCoreThreadTimeOut(true);
  taskPool = new ExecutorCompletionService<>(executor);
}
 
开发者ID:apache,项目名称:hbase,代码行数:15,代码来源:RegionServerSnapshotManager.java

示例12: start

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
@Override
public void start() {
  this.executor = new ThreadPoolExecutor(
      handlerCount,
      handlerCount,
      60,
      TimeUnit.SECONDS,
      new ArrayBlockingQueue<>(maxQueueLength),
      new DaemonThreadFactory("FifoRpcScheduler.handler"),
      new ThreadPoolExecutor.CallerRunsPolicy());
}
 
开发者ID:apache,项目名称:hbase,代码行数:12,代码来源:FifoRpcScheduler.java

示例13: SimpleSubprocedurePool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
public SimpleSubprocedurePool(String name, Configuration conf) {
  this.name = name;
  executor = new ThreadPoolExecutor(1, 1, 500, TimeUnit.SECONDS,
      new LinkedBlockingQueue<>(),
      new DaemonThreadFactory("rs(" + name + ")-procedure-pool"));
  taskPool = new ExecutorCompletionService<>(executor);
}
 
开发者ID:apache,项目名称:hbase,代码行数:8,代码来源:SimpleRSProcedureManager.java

示例14: defaultPool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
/**
 * Default thread pool for the procedure
 */
public static ThreadPoolExecutor defaultPool(String coordName, long keepAliveTime, int opThreads,
    long wakeFrequency) {
  return new ThreadPoolExecutor(1, opThreads, keepAliveTime, TimeUnit.SECONDS,
      new SynchronousQueue<Runnable>(),
      new DaemonThreadFactory("(" + coordName + ")-proc-coordinator-pool"));
}
 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:10,代码来源:ProcedureCoordinator.java

示例15: defaultPool

import org.apache.hadoop.hbase.DaemonThreadFactory; //导入依赖的package包/类
public static ThreadPoolExecutor defaultPool(long wakeFrequency, long keepAlive,
    int procThreads, String memberName) {
  return new ThreadPoolExecutor(1, procThreads, keepAlive, TimeUnit.SECONDS,
      new SynchronousQueue<Runnable>(),
      new DaemonThreadFactory("member: '" + memberName + "' subprocedure-pool"));
}
 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:7,代码来源:ProcedureMember.java


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