예제 #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
  @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
 @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);
 }