Package com.alibaba.wasp

Examples of com.alibaba.wasp.ServerName


        GetAction action = plan.getGetAction();
        EntityGroupLocation entityGroupLocation = action
            .getEntityGroupLocation();
        EntityGroupInfo entityGroupInfo = entityGroupLocation
            .getEntityGroupInfo();
        ServerName serverName = new ServerName(
            entityGroupLocation.getHostname(), entityGroupLocation.getPort(),
            ServerName.NON_STARTCODE);
        ClientProtos.GetResponse response = null;
        // local
        boolean localGet = workingOnLocalServer(server, serverName);
        if (localGet) {// if the target entityGroup's server is current
                       // server, run it in local.
          response = server.get(entityGroupInfo.getEntityGroupName(), action);
        } else {// rpc
          ClientProtocol clientProtocol = connection.getClient(
              serverName.getHostname(), serverName.getPort());
          response = clientProtocol.get(null,
              RequestConverter.buildGetRequest(action));
        }
        if (response.getExists()) {
          queryResultProtos.add(response.getResult());
View Full Code Here


        ScanAction action = plan.getScanAction();
        EntityGroupLocation entityGroupLocation = action
            .getEntityGroupLocation();
        EntityGroupInfo entityGroupInfo = entityGroupLocation
            .getEntityGroupInfo();
        serverName = new ServerName(entityGroupLocation.getHostname(),
            entityGroupLocation.getPort(), ServerName.NON_STARTCODE);
        ClientProtos.ScanResponse response = null;
        // local
        localScan = workingOnLocalServer(server, serverName);
        do {
View Full Code Here

  /**
   * @param serverName Server name
   * @return true if server is dead
   */
  public boolean isDeadServer(final String serverName) {
    return isDeadServer(new ServerName(serverName));
  }
View Full Code Here

   * @param newServerName Servername as either <code>host:port</code> or
   * <code>host,port,startcode</code>.
   * @return true if this server was dead before and coming back alive again
   */
  public boolean cleanPreviousInstance(final ServerName newServerName) {
    ServerName sn =
      ServerName.findServerWithSameHostnamePort(this.deadServers, newServerName);
    if (sn == null) return false;
    return this.deadServers.remove(sn);
  }
View Full Code Here

  public void nodeDeleted(String path) {
    if (path.startsWith(watcher.fsZNode)) {
      String serverName = ZKUtil.getNodeName(path);
      LOG.info("FServer ephemeral node deleted, processing expiration ["
          + serverName + "]");
      ServerName sn = ServerName.parseServerName(serverName);
      remove(sn);
    }
  }
View Full Code Here

    return serverManager.getDeadServers().size();
  }

  @Override
  public String getServerName() {
    ServerName serverName = master.getServerName();
    if (serverName == null) {
      return "";
    }
    return serverName.getServerName();
  }
View Full Code Here

    // 38, 7
    jamonWriter.write("\n");
    // 39, 1
   
  ServerInfo serverInfo = ProtobufUtil.getServerInfo(fserver);
  ServerName serverName = ProtobufUtil.toServerName(serverInfo.getServerName());
  List<EntityGroupInfo> onlineEntityGroups = ProtobufUtil.getOnlineEntityGroups(fserver);
  int masterInfoPort = fserver.getConfiguration().getInt("wasp.master.info.port", 60080);
  String masterHost = fserver.getMaster().getHostname();

    // 46, 1
    jamonWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>Wasp FServer: ");
    // 50, 26
    org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
    // 50, 56
    jamonWriter.write("</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"\">\n\n    <link href=\"/static/css/bootstrap.css\" rel=\"stylesheet\">\n    <link href=\"/static/css/wasp.css\" rel=\"stylesheet\">\n    <link href=\"/static/css/bootstrap-responsive.css\" rel=\"stylesheet\">\n    <!--[if lt IE 9]>\n      <script src=\"/static/js/html5shiv.js\"></script>\n    <![endif]-->\n  </head>\n\n  <body>\n\n    <div class=\"navbar navbar-fixed-top\">\n      <div class=\"navbar-inner\">\n        <div class=\"container\">\n          <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\">\n            <span class=\"icon-bar\"></span>\n            <span class=\"icon-bar\"></span>\n            <span class=\"icon-bar\"></span>\n          </a>\n          <a class=\"brand\" href=\"/fs-status\"><img src=\"/static/wasp_logo_small.jpg\" alt=\"HBase Logo\"/></a>\n          <div class=\"nav-collapse\">\n            <ul class=\"nav\">\n                <li class=\"active\"><a href=\"/\">Home</a></li>\n                <li><a href=\"/logs/\">Local logs</a></li>\n                <li><a href=\"/logLevel\">Log Level</a></li>\n                <li><a href=\"/dump\">Debug dump</a></li>\n                <li><a href=\"/jmx\">Metrics Dump</a></li>\n                ");
    // 80, 17
    if (WaspConfiguration.isShowConfInServlet())
    {
      // 80, 63
      jamonWriter.write("\n                <li><a href=\"/conf\">Wasp Configuration</a></li>\n                ");
    }
    // 82, 23
    jamonWriter.write("\n            </ul>\n          </div><!--/.nav-collapse -->\n        </div>\n      </div>\n    </div>\n\n<div class=\"container\">\n    <div class=\"row inner_header\">\n        <div class=\"page-header\">\n            <h1>fserver <small>");
    // 92, 32
    org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(serverName.getHostname()), jamonWriter);
    // 92, 62
    jamonWriter.write("</small></h1>\n        </div>\n    </div>\n    <div class=\"row\">\n\n    <section>\n    <h2>Server Metrics</h2>\n    ");
    // 99, 5
    {
      com.alibaba.wasp.tmpl.fserver.ServerMetricsTmpl __jamon__var_1 = new com.alibaba.wasp.tmpl.fserver.ServerMetricsTmpl(this.getTemplateManager());
View Full Code Here

    MetaScannerVisitor visitor = new TableMetaScannerVisitor(conf,
        parentTableName) {
      @Override
      public boolean processRowInternal(Result rowResult) throws IOException {
        EntityGroupInfo entityGroupInfo = getEntityGroupInfo(rowResult);
        ServerName sn = ServerName.getServerName(rowResult);

        if (!(entityGroupInfo.isOffline() || entityGroupInfo.isSplit())) {
          entityGroups.put(entityGroupInfo, sn);
        }
        return true;
View Full Code Here

  protected void add(final List<String> servers) throws IOException {
    synchronized (this.fservers) {
      this.fservers.clear();
      for (String n : servers) {
        ServerName sn = ServerName.parseServerName(ZKUtil.getNodeName(n));
        this.fservers.add(sn);
      }
    }
  }
View Full Code Here

  public void nodeDeleted(String path) {
    if (path.startsWith(watcher.fsZNode)) {
      String serverName = ZKUtil.getNodeName(path);
      LOG.info("FServer ephemeral node deleted, processing expiration ["
          + serverName + "]");
      ServerName sn = ServerName.parseServerName(serverName);
      if (!serverManager.isServerOnline(sn)) {
        LOG.warn(serverName.toString()
            + " is not online or isn't known to the master."
            + "The latter could be caused by a DNS misconfiguration.");
        return;
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.ServerName

Copyright © 2018 www.massapicom. 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.