Examples of LogHandler


Examples of org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler

  }

  @Override
  protected LogHandler createLogHandler(Configuration conf,
      Context context, DeletionService deletionService) {
    return new LogHandler() {
     
      @Override
      public void handle(LogHandlerEvent event) {
        switch (event.getType()) {
          case APPLICATION_STARTED:
View Full Code Here

Examples of org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler

    addService(dispatcher);
  }

  @Override
  public void init(Configuration conf) {
    LogHandler logHandler =
      createLogHandler(conf, this.context, this.deletionService);
    addIfService(logHandler);
    dispatcher.register(LogHandlerEventType.class, logHandler);
   
    super.init(conf);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler

  }

  @Override
  protected LogHandler createLogHandler(Configuration conf,
      Context context, DeletionService deletionService) {
    return new LogHandler() {
     
      @Override
      public void handle(LogHandlerEvent event) {
        switch (event.getType()) {
          case APPLICATION_STARTED:
View Full Code Here

Examples of org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler

    this.writeLock = lock.writeLock();
  }

  @Override
  public void serviceInit(Configuration conf) throws Exception {
    LogHandler logHandler =
      createLogHandler(conf, this.context, this.deletionService);
    addIfService(logHandler);
    dispatcher.register(LogHandlerEventType.class, logHandler);
   
    waitForContainersOnShutdownMillis =
View Full Code Here

Examples of org.apache.hadoop.yarn.server.nodemanager.containermanager.loghandler.LogHandler

    addService(dispatcher);
  }

  @Override
  public void init(Configuration conf) {
    LogHandler logHandler =
      createLogHandler(conf, this.context, this.deletionService);
    addIfService(logHandler);
    dispatcher.register(LogHandlerEventType.class, logHandler);
   
    super.init(conf);
View Full Code Here

Examples of org.apache.twill.api.logging.LogHandler

  @Test
  public void testLogHandler() throws ExecutionException, InterruptedException {
    final CountDownLatch latch = new CountDownLatch(3);
    final Queue<LogThrowable> throwables = new ConcurrentLinkedQueue<LogThrowable>();

    LogHandler logHandler = new LogHandler() {
      @Override
      public void onLog(LogEntry logEntry) {
        // Would expect logs from AM and the runnable.
        if (logEntry.getMessage().startsWith("Starting runnable " + LogRunnable.class.getSimpleName())) {
          latch.countDown();
View Full Code Here

Examples of org.apache.twill.api.logging.LogHandler

  @Test
  public void testLogHandler() throws ExecutionException, InterruptedException {
    final CountDownLatch latch = new CountDownLatch(3);
    final Queue<LogThrowable> throwables = new ConcurrentLinkedQueue<LogThrowable>();

    LogHandler logHandler = new LogHandler() {
      @Override
      public void onLog(LogEntry logEntry) {
        // Would expect logs from AM and the runnable.
        if (logEntry.getMessage().startsWith("Starting runnable " + LogRunnable.class.getSimpleName())) {
          latch.countDown();
View Full Code Here

Examples of org.apdplat.platform.log.handler.LogHandler

                return;
            }
            LOG.info("handlerstr:"+handlerstr);
            String[] handlers = handlerstr.trim().split(";");
            for(String handler : handlers){
                LogHandler logHandler = SpringContextUtils.getBean(handler.trim());
                if(logHandler != null){
                    logHandlers.add(logHandler);
                    LOG.info("找到LogHandler:"+handler);
                }else{
                    LOG.info("未找到LogHandler:"+handler);
View Full Code Here

Examples of org.jolokia.util.LogHandler

     *
     * @param pLocation location to lookup the restrictor
     * @return the restrictor to use.
     */
    protected Restrictor createRestrictor(String pLocation) {
        LogHandler log = getLogHandler();
        try {
            Restrictor newRestrictor = RestrictorFactory.lookupPolicyRestrictor(pLocation);
            if (newRestrictor != null) {
                log.info("Using access restrictor " + pLocation);
                return newRestrictor;
            } else {
                log.info("No access restrictor found at " + pLocation + ", access to all MBeans is allowed");
                return new AllowAllRestrictor();
            }
        } catch (IOException e) {
            log.error("Error while accessing access restrictor at " + pLocation +
                              ". Denying all access to MBeans for security reasons. Exception: " + e, e);
            return new DenyAllRestrictor();
        }
    }
View Full Code Here

Examples of org.jolokia.util.LogHandler

     *
     * @return a default log handlera
     * @param pServletConfig
     */
    protected LogHandler createLogHandler(ServletConfig pServletConfig) {
        return new LogHandler() {
            public void debug(String message) {
                log(message);
            }

            public void info(String message) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.