Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2C5DE18CA6 for ; Thu, 17 Mar 2016 20:45:01 +0000 (UTC) Received: (qmail 32112 invoked by uid 500); 17 Mar 2016 20:44:53 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 32001 invoked by uid 500); 17 Mar 2016 20:44:53 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 30077 invoked by uid 99); 17 Mar 2016 20:44:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2016 20:44:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1E409DFBC9; Thu, 17 Mar 2016 20:44:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: misty@apache.org To: commits@hbase.apache.org Date: Thu, 17 Mar 2016 20:45:37 -0000 Message-Id: <32adc2ff34c64a01bf1368bd3b19bdbd@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [47/51] [partial] hbase-site git commit: Published site at a2c99b133f8ad2a02e8710a4e0f9a448539cc127. http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2264aeb1/apidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.html ---------------------------------------------------------------------- diff --git a/apidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.html b/apidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.html new file mode 100644 index 0000000..7090914 --- /dev/null +++ b/apidocs/src-html/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.html @@ -0,0 +1,259 @@ + + + +Source code + + + +
+
001/**
+002 * Copyright The Apache Software Foundation
+003 *
+004 * Licensed to the Apache Software Foundation (ASF) under one
+005 * or more contributor license agreements.  See the NOTICE file
+006 * distributed with this work for additional information
+007 * regarding copyright ownership.  The ASF licenses this file
+008 * to you under the Apache License, Version 2.0 (the
+009 * "License"); you may not use this file except in compliance
+010 * with the License.  You may obtain a copy of the License at
+011 *
+012 *     http://www.apache.org/licenses/LICENSE-2.0
+013 *
+014 * Unless required by applicable law or agreed to in writing, software
+015 * distributed under the License is distributed on an "AS IS" BASIS,
+016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+017 * See the License for the specific language governing permissions and
+018 * limitations under the License.
+019 */
+020
+021package org.apache.hadoop.hbase.rsgroup;
+022
+023import com.google.common.collect.Sets;
+024import com.google.common.net.HostAndPort;
+025
+026import java.util.Collection;
+027import java.util.NavigableSet;
+028import java.util.Set;
+029
+030import org.apache.hadoop.hbase.TableName;
+031import org.apache.hadoop.hbase.classification.InterfaceAudience;
+032import org.apache.hadoop.hbase.classification.InterfaceStability;
+033
+034/**
+035 * Stores the group information of region server groups.
+036 */
+037@InterfaceAudience.Public
+038@InterfaceStability.Evolving
+039public class RSGroupInfo {
+040
+041  public static final String DEFAULT_GROUP = "default";
+042  public static final String NAMESPACEDESC_PROP_GROUP = "hbase.rsgroup.name";
+043
+044  private String name;
+045  private Set<HostAndPort> servers;
+046  private NavigableSet<TableName> tables;
+047
+048  public RSGroupInfo(String name) {
+049    this(name, Sets.<HostAndPort>newHashSet(), Sets.<TableName>newTreeSet());
+050  }
+051
+052  RSGroupInfo(String name,
+053              Set<HostAndPort> servers,
+054              NavigableSet<TableName> tables) {
+055    this.name = name;
+056    this.servers = servers;
+057    this.tables = tables;
+058  }
+059
+060  public RSGroupInfo(RSGroupInfo src) {
+061    name = src.getName();
+062    servers = Sets.newHashSet(src.getServers());
+063    tables = Sets.newTreeSet(src.getTables());
+064  }
+065
+066  /**
+067   * Get group name.
+068   *
+069   * @return group name
+070   */
+071  public String getName() {
+072    return name;
+073  }
+074
+075  /**
+076   * Adds the server to the group.
+077   *
+078   * @param hostPort the server
+079   */
+080  public void addServer(HostAndPort hostPort){
+081    servers.add(hostPort);
+082  }
+083
+084  /**
+085   * Adds a group of servers.
+086   *
+087   * @param hostPort the servers
+088   */
+089  public void addAllServers(Collection<HostAndPort> hostPort){
+090    servers.addAll(hostPort);
+091  }
+092
+093  /**
+094   * @param hostPort hostPort of the server
+095   * @return true, if a server with hostPort is found
+096   */
+097  public boolean containsServer(HostAndPort hostPort) {
+098    return servers.contains(hostPort);
+099  }
+100
+101  /**
+102   * Get list of servers.
+103   *
+104   * @return set of servers
+105   */
+106  public Set<HostAndPort> getServers() {
+107    return servers;
+108  }
+109
+110  /**
+111   * Remove a server from this group.
+112   *
+113   * @param hostPort HostPort of the server to remove
+114   */
+115  public boolean removeServer(HostAndPort hostPort) {
+116    return servers.remove(hostPort);
+117  }
+118
+119  /**
+120   * Set of tables that are members of this group
+121   * @return set of tables
+122   */
+123  public NavigableSet<TableName> getTables() {
+124    return tables;
+125  }
+126
+127  public void addTable(TableName table) {
+128    tables.add(table);
+129  }
+130
+131  public void addAllTables(Collection<TableName> arg) {
+132    tables.addAll(arg);
+133  }
+134
+135  public boolean containsTable(TableName table) {
+136    return tables.contains(table);
+137  }
+138
+139  public boolean removeTable(TableName table) {
+140    return tables.remove(table);
+141  }
+142
+143  @Override
+144  public String toString() {
+145    StringBuffer sb = new StringBuffer();
+146    sb.append("Name:");
+147    sb.append(this.name);
+148    sb.append(", ");
+149    sb.append(" Servers:");
+150    sb.append(this.servers);
+151    return sb.toString();
+152
+153  }
+154
+155  @Override
+156  public boolean equals(Object o) {
+157    if (this == o) {
+158      return true;
+159    }
+160    if (o == null || getClass() != o.getClass()) {
+161      return false;
+162    }
+163
+164    RSGroupInfo RSGroupInfo = (RSGroupInfo) o;
+165
+166    if (!name.equals(RSGroupInfo.name)) {
+167      return false;
+168    }
+169    if (!servers.equals(RSGroupInfo.servers)) {
+170      return false;
+171    }
+172    if (!tables.equals(RSGroupInfo.tables)) {
+173      return false;
+174    }
+175
+176    return true;
+177  }
+178
+179  @Override
+180  public int hashCode() {
+181    int result = servers.hashCode();
+182    result = 31 * result + tables.hashCode();
+183    result = 31 * result + name.hashCode();
+184    return result;
+185  }
+186
+187}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2264aeb1/book.html ---------------------------------------------------------------------- diff --git a/book.html b/book.html index 70d6f0c..699ac60 100644 --- a/book.html +++ b/book.html @@ -33211,7 +33211,7 @@ The server will return cellblocks compressed using this same compressor as long http://git-wip-us.apache.org/repos/asf/hbase-site/blob/2264aeb1/bulk-loads.html ---------------------------------------------------------------------- diff --git a/bulk-loads.html b/bulk-loads.html index abc4627..2b6fd6d 100644 --- a/bulk-loads.html +++ b/bulk-loads.html @@ -7,7 +7,7 @@ - + Apache HBase – Bulk Loads in Apache HBase (TM) @@ -305,7 +305,7 @@ under the License. --> <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - <li id="publishDate" class="pull-right">Last Published: 2016-03-14</li> + <li id="publishDate" class="pull-right">Last Published: 2016-03-17</li> </p> </div>