Examples of TServerUsesLoggers


Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = ServerConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = ServerConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = AccumuloConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = ServerConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = ServerConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = ServerConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = ServerConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
View Full Code Here

Examples of org.apache.accumulo.server.master.balancer.TServerUsesLoggers

    }
   
    private void balanceLoggers() {
      List<LoggerUser> logUsers = new ArrayList<LoggerUser>();
      for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
        logUsers.add(new TServerUsesLoggers(entry.getKey(), entry.getValue()));
      }
      List<String> logNames = new ArrayList<String>(loggers.getLoggersFromZooKeeper().values());
      Map<LoggerUser,List<String>> assignmentsOut = new HashMap<LoggerUser,List<String>>();
      int loggersPerServer = AccumuloConfiguration.getSystemConfiguration().getCount(Property.TSERV_LOGGER_COUNT);
      loggerBalancer.balance(logUsers, logNames, assignmentsOut, loggersPerServer);
      for (Entry<LoggerUser,List<String>> entry : assignmentsOut.entrySet()) {
        TServerUsesLoggers tserver = (TServerUsesLoggers) entry.getKey();
        try {
          log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
          TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
          if (connection != null)
            connection.useLoggers(new HashSet<String>(entry.getValue()));
        } catch (Exception ex) {
          log.warn("Unable to talk to " + tserver.getInstance(), ex);
        }
      }
    }
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.