Java 类org.apache.hadoop.hbase.executor.ExecutorService.ExecutorType 实例源码

项目:LCIndex-HBase-0.94.16    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:IRIndex    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:HBase-Research    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:hbase-0.94.8-qod    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:hbase-0.94.8-qod    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:DominoHBase    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:hindex    文件:TestAssignmentManager.java   
/**
 * Create and startup executor pools. Start same set as master does (just
 * run a few less).
 * @param name Name to give our executor
 * @return Created executor (be sure to call shutdown when done).
 */
private ExecutorService startupMasterExecutor(final String name) {
  // TODO: Move up into HBaseTestingUtility?  Generally useful.
  ExecutorService executor = new ExecutorService(name);
  executor.startExecutorService(ExecutorType.MASTER_OPEN_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_CLOSE_REGION, 3);
  executor.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS, 3);
  executor.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS, 3);
  return executor;
}
项目:LCIndex-HBase-0.94.16    文件:HMaster.java   
private void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }

  }
项目:LCIndex-HBase-0.94.16    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
    uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
    uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n + ".compactionChecker",
    uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.periodicFlusher.getThread(), n + ".periodicFlusher",
    uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
    Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker",
      uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui. Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler
      && this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else {
    if (this.replicationSourceHandler != null) {
      this.replicationSourceHandler.startReplicationService();
    }
    if (this.replicationSinkHandler != null) {
      this.replicationSinkHandler.startReplicationService();
    }
  }

  // Start Server. This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker =
      new SplitLogWorker(this.zooKeeper, this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();

}
项目:IRIndex    文件:HMaster.java   
private void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }

  }
项目:IRIndex    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.periodicFlusher.getThread(), n +
      ".periodicFlusher", uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
    Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker",
        uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler &&
      this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else {
    if (this.replicationSourceHandler != null) {
      this.replicationSourceHandler.startReplicationService();
    }
    if (this.replicationSinkHandler != null) {
      this.replicationSinkHandler.startReplicationService();
    }
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();

}
项目:RStore    文件:HMaster.java   
private void startServiceThreads() throws IOException{

  // Start the executor service pools
  this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
     conf.getInt("hbase.master.executor.openregion.threads", 5));
  this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
     conf.getInt("hbase.master.executor.closeregion.threads", 5));
  this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
     conf.getInt("hbase.master.executor.serverops.threads", 3));
  this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
     conf.getInt("hbase.master.executor.serverops.threads", 5));

  // We depend on there being only one instance of this executor running
  // at a time.  To do concurrency, would need fencing of enable/disable of
  // tables.
  this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

  // Start log cleaner thread
  String n = Thread.currentThread().getName();
  this.logCleaner =
     new LogCleaner(conf.getInt("hbase.master.cleaner.interval", 60 * 1000),
        this, conf, getMasterFileSystem().getFileSystem(),
        getMasterFileSystem().getOldLogDir());
        Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

  // Put up info server.
  int port = this.conf.getInt("hbase.master.info.port", 60010);
  if (port >= 0) {
    String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
    this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
    this.infoServer.addServlet("status", "/master-status", MasterStatusServlet.class);
    this.infoServer.addServlet("dump", "/dump", MasterDumpServlet.class);
    this.infoServer.setAttribute(MASTER, this);
    this.infoServer.start();
   }

   // Start allowing requests to happen.
   this.rpcServer.openServer();
   if (LOG.isDebugEnabled()) {
     LOG.debug("Started service threads");
   }

 }
项目:RStore    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  UncaughtExceptionHandler handler = new UncaughtExceptionHandler() {
    public void uncaughtException(Thread t, Throwable e) {
      abort("Uncaught exception in service thread " + t.getName(), e);
    }
  };

  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller", handler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
    handler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", handler);

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationHandler != null) {
    this.replicationHandler.startReplicationServices();
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();
}
项目:HBase-Research    文件:HMaster.java   
private void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Put up info server.
   int port = this.conf.getInt("hbase.master.info.port", 60010);
   if (port >= 0) {
     String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
     this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
     this.infoServer.addServlet("status", "/master-status", MasterStatusServlet.class);
     this.infoServer.addServlet("dump", "/dump", MasterDumpServlet.class);
     this.infoServer.setAttribute(MASTER, this);
     this.infoServer.start();
    }

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }

  }
项目:HBase-Research    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.periodicFlusher.getThread(), n +
      ".periodicFlusher", uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
    Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker",
        uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler &&
      this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSinkHandler != null) {
    this.replicationSinkHandler.startReplicationService();
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();

}
项目:hbase-0.94.8-qod    文件:HMaster.java   
private void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Put up info server.
   int port = this.conf.getInt("hbase.master.info.port", 60010);
   if (port >= 0) {
     String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
     this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
     this.infoServer.addServlet("status", "/master-status", MasterStatusServlet.class);
     this.infoServer.addServlet("dump", "/dump", MasterDumpServlet.class);
     this.infoServer.setAttribute(MASTER, this);
     this.infoServer.start();
    }

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }

  }
项目:hbase-0.94.8-qod    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.periodicFlusher.getThread(), n +
      ".periodicFlusher", uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
    Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker",
        uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler &&
      this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSinkHandler != null) {
    this.replicationSinkHandler.startReplicationService();
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();

}
项目:hbase-0.94.8-qod    文件:HMaster.java   
private void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Put up info server.
   int port = this.conf.getInt("hbase.master.info.port", 60010);
   if (port >= 0) {
     String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
     this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
     this.infoServer.addServlet("status", "/master-status", MasterStatusServlet.class);
     this.infoServer.addServlet("dump", "/dump", MasterDumpServlet.class);
     this.infoServer.setAttribute(MASTER, this);
     this.infoServer.start();
    }

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }

  }
项目:hbase-0.94.8-qod    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.periodicFlusher.getThread(), n +
      ".periodicFlusher", uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
    Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker",
        uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler &&
      this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSinkHandler != null) {
    this.replicationSinkHandler.startReplicationService();
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();

}
项目:DominoHBase    文件:HMaster.java   
void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Put up info server.
   int port = this.conf.getInt(HConstants.MASTER_INFO_PORT, 60010);
   if (port >= 0) {
     String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
     this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
     this.infoServer.addServlet("status", "/master-status", MasterStatusServlet.class);
     this.infoServer.addServlet("dump", "/dump", MasterDumpServlet.class);
     this.infoServer.setAttribute(MASTER, this);
     this.infoServer.start();
    }

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    this.rpcServerOpen = true;
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }
  }
项目:DominoHBase    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
    uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
  Threads
      .setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker", 
          uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler &&
      this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSinkHandler != null) {
    this.replicationSinkHandler.startReplicationService();
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName(), this);
  splitLogWorker.start();
}
项目:DominoHBase    文件:EventHandler.java   
/**
 * Constructor
 */
EventType(final int code, final ExecutorType executor) {
  this.code = code;
  this.executor = executor;
}
项目:DominoHBase    文件:EventHandler.java   
ExecutorType getExecutorServiceType() {
  return this.executor;
}
项目:hindex    文件:HMaster.java   
private void startServiceThreads() throws IOException{

   // Start the executor service pools
   this.executorService.startExecutorService(ExecutorType.MASTER_OPEN_REGION,
      conf.getInt("hbase.master.executor.openregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_CLOSE_REGION,
      conf.getInt("hbase.master.executor.closeregion.threads", 5));
   this.executorService.startExecutorService(ExecutorType.MASTER_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 3));
   this.executorService.startExecutorService(ExecutorType.MASTER_META_SERVER_OPERATIONS,
      conf.getInt("hbase.master.executor.serverops.threads", 5));

   // We depend on there being only one instance of this executor running
   // at a time.  To do concurrency, would need fencing of enable/disable of
   // tables.
   this.executorService.startExecutorService(ExecutorType.MASTER_TABLE_OPERATIONS, 1);

   // Start log cleaner thread
   String n = Thread.currentThread().getName();
   int cleanerInterval = conf.getInt("hbase.master.cleaner.interval", 60 * 1000);
   this.logCleaner =
      new LogCleaner(cleanerInterval,
         this, conf, getMasterFileSystem().getFileSystem(),
         getMasterFileSystem().getOldLogDir());
         Threads.setDaemonThreadRunning(logCleaner.getThread(), n + ".oldLogCleaner");

   //start the hfile archive cleaner thread
    Path archiveDir = HFileArchiveUtil.getArchivePath(conf);
    this.hfileCleaner = new HFileCleaner(cleanerInterval, this, conf, getMasterFileSystem()
        .getFileSystem(), archiveDir);
    Threads.setDaemonThreadRunning(hfileCleaner.getThread(), n + ".archivedHFileCleaner");

   // Put up info server.
   int port = this.conf.getInt("hbase.master.info.port", 60010);
   if (port >= 0) {
     String a = this.conf.get("hbase.master.info.bindAddress", "0.0.0.0");
     this.infoServer = new InfoServer(MASTER, a, port, false, this.conf);
     this.infoServer.addServlet("status", "/master-status", MasterStatusServlet.class);
     this.infoServer.addServlet("dump", "/dump", MasterDumpServlet.class);
     this.infoServer.setAttribute(MASTER, this);
     this.infoServer.start();
    }

   // Start the health checker
   if (this.healthCheckChore != null) {
     Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker");
   }

    // Start allowing requests to happen.
    this.rpcServer.openServer();
    if (LOG.isDebugEnabled()) {
      LOG.debug("Started service threads");
    }

  }
项目:hindex    文件:HRegionServer.java   
private void startServiceThreads() throws IOException {
  String n = Thread.currentThread().getName();
  // Start executor services
  this.service = new ExecutorService(getServerName().toString());
  this.service.startExecutorService(ExecutorType.RS_OPEN_REGION,
    conf.getInt("hbase.regionserver.executor.openregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_OPEN_ROOT,
    conf.getInt("hbase.regionserver.executor.openroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_OPEN_META,
    conf.getInt("hbase.regionserver.executor.openmeta.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_REGION,
    conf.getInt("hbase.regionserver.executor.closeregion.threads", 3));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_ROOT,
    conf.getInt("hbase.regionserver.executor.closeroot.threads", 1));
  this.service.startExecutorService(ExecutorType.RS_CLOSE_META,
    conf.getInt("hbase.regionserver.executor.closemeta.threads", 1));

  Threads.setDaemonThreadRunning(this.hlogRoller.getThread(), n + ".logRoller",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.cacheFlusher.getThread(), n + ".cacheFlusher",
      uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.compactionChecker.getThread(), n +
    ".compactionChecker", uncaughtExceptionHandler);
  Threads.setDaemonThreadRunning(this.periodicFlusher.getThread(), n +
      ".periodicFlusher", uncaughtExceptionHandler);
  if (this.healthCheckChore != null) {
    Threads.setDaemonThreadRunning(this.healthCheckChore.getThread(), n + ".healthChecker",
        uncaughtExceptionHandler);
  }

  // Leases is not a Thread. Internally it runs a daemon thread. If it gets
  // an unhandled exception, it will just exit.
  this.leases.setName(n + ".leaseChecker");
  this.leases.start();

  // Put up the webui.  Webui may come up on port other than configured if
  // that port is occupied. Adjust serverInfo if this is the case.
  this.webuiport = putUpWebUI();

  if (this.replicationSourceHandler == this.replicationSinkHandler &&
      this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSourceHandler != null) {
    this.replicationSourceHandler.startReplicationService();
  } else if (this.replicationSinkHandler != null) {
    this.replicationSinkHandler.startReplicationService();
  }

  // Start Server.  This service is like leases in that it internally runs
  // a thread.
  this.rpcServer.start();

  // Create the log splitting worker and start it
  this.splitLogWorker = new SplitLogWorker(this.zooKeeper,
      this.getConfiguration(), this.getServerName().toString());
  splitLogWorker.start();

}