コード例 #1
0
  public void init(Configuration conf) {
    LOG.info("QueryMaster init");
    try {
      this.systemConf = (TajoConf) conf;
      this.connPool = RpcConnectionPool.getPool(systemConf);

      querySessionTimeout = systemConf.getIntVar(TajoConf.ConfVars.QUERY_SESSION_TIMEOUT);
      queryMasterContext = new QueryMasterContext(systemConf);

      clock = new SystemClock();

      this.dispatcher = new TajoAsyncDispatcher("querymaster_" + System.currentTimeMillis());
      addIfService(dispatcher);

      this.storageManager = StorageManagerFactory.getStorageManager(systemConf);

      globalPlanner = new GlobalPlanner(systemConf, workerContext);

      dispatcher.register(QueryStartEvent.EventType.class, new QueryStartEventHandler());

    } catch (Throwable t) {
      LOG.error(t.getMessage(), t);
      throw new RuntimeException(t);
    }
    super.init(conf);
  }
コード例 #2
0
ファイル: LlapDaemon.java プロジェクト: Leolh/hive
 @Override
 public void serviceStart() throws Exception {
   // Start the Shuffle service before the listener - until it's a service as well.
   ShuffleHandler.initializeAndStart(shuffleHandlerConf);
   LOG.info("Setting shuffle port to: " + ShuffleHandler.get().getPort());
   this.shufflePort.set(ShuffleHandler.get().getPort());
   super.serviceStart();
   LOG.info("LlapDaemon serviceStart complete");
 }
コード例 #3
0
  @Override
  public void start() {
    LOG.info("QueryMaster start");

    queryHeartbeatThread = new QueryHeartbeatThread();
    queryHeartbeatThread.start();

    clientSessionTimeoutCheckThread = new ClientSessionTimeoutCheckThread();
    clientSessionTimeoutCheckThread.start();

    finishedQueryMasterTaskCleanThread = new FinishedQueryMasterTaskCleanThread();
    finishedQueryMasterTaskCleanThread.start();

    super.start();
  }
コード例 #4
0
ファイル: AdminService.java プロジェクト: imace/hops
  @Override
  public synchronized void serviceInit(Configuration conf) throws Exception {
    if (rmContext.isHAEnabled()) {
      autoFailoverEnabled = HAUtil.isAutomaticFailoverEnabled(conf);
    }

    masterServiceAddress =
        conf.getSocketAddr(
            YarnConfiguration.RM_ADMIN_ADDRESS,
            YarnConfiguration.DEFAULT_RM_ADMIN_ADDRESS,
            YarnConfiguration.DEFAULT_RM_ADMIN_PORT);
    adminAcl =
        new AccessControlList(
            conf.get(YarnConfiguration.YARN_ADMIN_ACL, YarnConfiguration.DEFAULT_YARN_ADMIN_ACL));
    rmId = conf.get(YarnConfiguration.RM_HA_ID);
    super.serviceInit(conf);
  }
コード例 #5
0
  @Override
  public void stop() {
    if (queryMasterStop.getAndSet(true)) {
      return;
    }

    if (queryHeartbeatThread != null) {
      queryHeartbeatThread.interrupt();
    }

    if (clientSessionTimeoutCheckThread != null) {
      clientSessionTimeoutCheckThread.interrupt();
    }

    if (finishedQueryMasterTaskCleanThread != null) {
      finishedQueryMasterTaskCleanThread.interrupt();
    }
    super.stop();

    LOG.info("QueryMaster stop");
    if (queryMasterContext.getWorkerContext().isYarnContainerMode()) {
      queryMasterContext.getWorkerContext().stopWorker(true);
    }
  }
コード例 #6
0
ファイル: AdminService.java プロジェクト: imace/hops
 @Override
 protected synchronized void serviceStop() throws Exception {
   stopServer();
   super.serviceStop();
 }
コード例 #7
0
ファイル: LlapDaemon.java プロジェクト: Leolh/hive
 public void serviceStop() throws Exception {
   super.serviceStop();
   ShuffleHandler.shutdown();
   shutdown();
   LOG.info("LlapDaemon shutdown complete");
 }
コード例 #8
0
ファイル: LlapDaemon.java プロジェクト: Leolh/hive
 @Override
 public void serviceInit(Configuration conf) throws Exception {
   super.serviceInit(conf);
   LlapIoProxy.setDaemon(true);
   LlapIoProxy.initializeLlapIo(conf);
 }