[hbase-operator-tools] branch master updated: HBASE-21210 Add bypassProcedure() API to HBCK2

2018-09-19 Thread stack
This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git


The following commit(s) were added to refs/heads/master by this push:
 new b40fc51  HBASE-21210 Add bypassProcedure() API to HBCK2
b40fc51 is described below

commit b40fc51b932b8c1c3c29eeaa04dc63975e277805
Author: Michael Stack 
AuthorDate: Wed Sep 19 17:37:39 2018 -0700

HBASE-21210 Add bypassProcedure() API to HBCK2

Addendum. Fix parse errors.
---
 hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java 
b/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
index 83d8def..3dbb594 100644
--- a/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
+++ b/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
@@ -166,11 +166,11 @@ public class HBCK2 extends Configured implements Tool {
 writer.println();
 writer.println(" " + BYPASS + " [OPTIONS] ...");
 writer.println("   Pass one (or more) procedure 'pid's to skip to the 
procedure finish.");
-writer.println("   Parent procedures will also skip to their finish. 
Entities will be");
-writer.println("   left in an inconsistent state and will require manual 
fixup.");
+writer.println("   Parent of this procedures will also skip to its finish. 
Entities will");
+writer.println("   be left in an inconsistent state and will require 
manual fixup.");
 writer.println("   Pass --force to break any outstanding locks.");
 writer.println("   Pass --waitTime= to wait on entity lock before 
giving up.");
-writer.println("   Default: force=false and waitTime=0.");
+writer.println("   Default: force=false and waitTime=0. Returns true if 
succeeded.");
 writer.println();
 writer.println(" " + UNASSIGNS + " ...");
 writer.println("   A 'raw' unassign that can be used even during Master 
initialization.");
@@ -278,7 +278,7 @@ public class HBCK2 extends Configured implements Tool {
   return EXIT_FAILURE;
 }
 System.out.println(
-
toString(bypass(Arrays.stream(commands).skip(1).collect(Collectors.toList();
+
toString(assigns(Arrays.stream(commands).skip(1).collect(Collectors.toList();
 break;
 
   case BYPASS:
@@ -326,4 +326,4 @@ public class HBCK2 extends Configured implements Tool {
 }
 return;
   }
-}
\ No newline at end of file
+}



hbase git commit: HBASE-21023 Added bypassProcedure() API to HbckService

2018-09-19 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master 3a0fcd56c -> dc767c06d


HBASE-21023 Added bypassProcedure() API to HbckService


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/dc767c06
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/dc767c06
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/dc767c06

Branch: refs/heads/master
Commit: dc767c06d27c57e02d8963515317d54e89ddc718
Parents: 3a0fcd5
Author: Umesh Agashe 
Authored: Wed Sep 5 14:13:45 2018 -0700
Committer: Michael Stack 
Committed: Wed Sep 19 15:18:16 2018 -0700

--
 .../apache/hadoop/hbase/client/HBaseHbck.java   | 23 ++
 .../org/apache/hadoop/hbase/client/Hbck.java| 27 ++-
 .../hbase/procedure2/ProcedureExecutor.java | 19 ++--
 .../src/main/protobuf/Master.proto  | 14 ++
 .../hadoop/hbase/master/MasterRpcServices.java  | 24 ++
 .../apache/hadoop/hbase/client/TestHbck.java| 48 
 6 files changed, 138 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/dc767c06/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
index af9e7b7..a8daa7b 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
@@ -19,10 +19,12 @@ package org.apache.hadoop.hbase.client;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.concurrent.Callable;
 import java.util.stream.Collectors;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
@@ -128,4 +130,25 @@ public class HBaseHbck implements Hbck {
   private static String toCommaDelimitedString(List list) {
 return list.stream().collect(Collectors.joining(", "));
   }
+
+  @Override
+  public List bypassProcedure(List pids, long waitTime, boolean 
force)
+  throws IOException {
+MasterProtos.BypassProcedureResponse response = ProtobufUtil.call(
+new Callable() {
+  @Override
+  public MasterProtos.BypassProcedureResponse call() throws Exception {
+try {
+  return hbck.bypassProcedure(rpcControllerFactory.newController(),
+  
MasterProtos.BypassProcedureRequest.newBuilder().addAllProcId(pids).
+  setWaitTime(waitTime).setForce(force).build());
+} catch (Throwable t) {
+  LOG.error(pids.stream().map(i -> i.toString()).
+  collect(Collectors.joining(", ")), t);
+  throw t;
+}
+  }
+});
+return response.getBypassedList();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/dc767c06/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
index c6a3caa..5c9a862 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
@@ -26,15 +26,9 @@ import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
- * Hbck APIs for HBase. Obtain an instance from {@link 
ClusterConnection#getHbck()} and call
+ * Hbck fixup tool APIs. Obtain an instance from {@link 
ClusterConnection#getHbck()} and call
  * {@link #close()} when done.
- * Hbck client APIs will be mostly used by hbck tool which in turn can be 
used by operators to
- * fix HBase and bringing it to consistent state.
- *
- * NOTE: The methods in here can do damage to a cluster if applied in the 
wrong sequence or at
- * the wrong time. Use with caution. For experts only. These methods are only 
for the
- * extreme case where the cluster has been damaged or has achieved an 
inconsistent state because
- * of some unforeseen circumstance or bug and requires manual intervention.
+ * WARNING: the below methods can damage the cluster. For experienced users 
only.
  *
  * @see ConnectionFactory
  * @see ClusterConnection
@@ -45,10 +39,6 @@ public interface Hbck extends Abortable, Clo

hbase git commit: HBASE-21023 Added bypassProcedure() API to HbckService

2018-09-19 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2 8876f12c0 -> 899fddb4e


HBASE-21023 Added bypassProcedure() API to HbckService


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/899fddb4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/899fddb4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/899fddb4

Branch: refs/heads/branch-2
Commit: 899fddb4e783fb0417c763fd00bfee462cb4edd0
Parents: 8876f12
Author: Umesh Agashe 
Authored: Wed Sep 5 14:13:45 2018 -0700
Committer: Michael Stack 
Committed: Wed Sep 19 15:17:52 2018 -0700

--
 .../apache/hadoop/hbase/client/HBaseHbck.java   | 23 ++
 .../org/apache/hadoop/hbase/client/Hbck.java| 27 ++-
 .../hbase/procedure2/ProcedureExecutor.java | 19 ++--
 .../src/main/protobuf/Master.proto  | 14 ++
 .../hadoop/hbase/master/MasterRpcServices.java  | 24 ++
 .../apache/hadoop/hbase/client/TestHbck.java| 48 
 6 files changed, 138 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/899fddb4/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
index af9e7b7..a8daa7b 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
@@ -19,10 +19,12 @@ package org.apache.hadoop.hbase.client;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.concurrent.Callable;
 import java.util.stream.Collectors;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
@@ -128,4 +130,25 @@ public class HBaseHbck implements Hbck {
   private static String toCommaDelimitedString(List list) {
 return list.stream().collect(Collectors.joining(", "));
   }
+
+  @Override
+  public List bypassProcedure(List pids, long waitTime, boolean 
force)
+  throws IOException {
+MasterProtos.BypassProcedureResponse response = ProtobufUtil.call(
+new Callable() {
+  @Override
+  public MasterProtos.BypassProcedureResponse call() throws Exception {
+try {
+  return hbck.bypassProcedure(rpcControllerFactory.newController(),
+  
MasterProtos.BypassProcedureRequest.newBuilder().addAllProcId(pids).
+  setWaitTime(waitTime).setForce(force).build());
+} catch (Throwable t) {
+  LOG.error(pids.stream().map(i -> i.toString()).
+  collect(Collectors.joining(", ")), t);
+  throw t;
+}
+  }
+});
+return response.getBypassedList();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/899fddb4/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
index c6a3caa..5c9a862 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
@@ -26,15 +26,9 @@ import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
- * Hbck APIs for HBase. Obtain an instance from {@link 
ClusterConnection#getHbck()} and call
+ * Hbck fixup tool APIs. Obtain an instance from {@link 
ClusterConnection#getHbck()} and call
  * {@link #close()} when done.
- * Hbck client APIs will be mostly used by hbck tool which in turn can be 
used by operators to
- * fix HBase and bringing it to consistent state.
- *
- * NOTE: The methods in here can do damage to a cluster if applied in the 
wrong sequence or at
- * the wrong time. Use with caution. For experts only. These methods are only 
for the
- * extreme case where the cluster has been damaged or has achieved an 
inconsistent state because
- * of some unforeseen circumstance or bug and requires manual intervention.
+ * WARNING: the below methods can damage the cluster. For experienced users 
only.
  *
  * @see ConnectionFactory
  * @see ClusterConnection
@@ -45,10 +39,6 @@ public interface Hbck extends Abortable,

hbase git commit: HBASE-21023 Added bypassProcedure() API to HbckService

2018-09-19 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2.1 37cc07a77 -> e6c7ed34e


HBASE-21023 Added bypassProcedure() API to HbckService


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e6c7ed34
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e6c7ed34
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e6c7ed34

Branch: refs/heads/branch-2.1
Commit: e6c7ed34e05476733dea0e7f1b84af513963195c
Parents: 37cc07a
Author: Umesh Agashe 
Authored: Wed Sep 5 14:13:45 2018 -0700
Committer: Michael Stack 
Committed: Wed Sep 19 15:01:29 2018 -0700

--
 .../apache/hadoop/hbase/client/HBaseHbck.java   | 23 ++
 .../org/apache/hadoop/hbase/client/Hbck.java| 27 ++-
 .../hbase/procedure2/ProcedureExecutor.java | 19 ++--
 .../src/main/protobuf/Master.proto  | 14 ++
 .../hadoop/hbase/master/MasterRpcServices.java  | 24 ++
 .../apache/hadoop/hbase/client/TestHbck.java| 48 
 6 files changed, 138 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6c7ed34/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
index af9e7b7..a8daa7b 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
@@ -19,10 +19,12 @@ package org.apache.hadoop.hbase.client;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.concurrent.Callable;
 import java.util.stream.Collectors;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
+import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
@@ -128,4 +130,25 @@ public class HBaseHbck implements Hbck {
   private static String toCommaDelimitedString(List list) {
 return list.stream().collect(Collectors.joining(", "));
   }
+
+  @Override
+  public List bypassProcedure(List pids, long waitTime, boolean 
force)
+  throws IOException {
+MasterProtos.BypassProcedureResponse response = ProtobufUtil.call(
+new Callable() {
+  @Override
+  public MasterProtos.BypassProcedureResponse call() throws Exception {
+try {
+  return hbck.bypassProcedure(rpcControllerFactory.newController(),
+  
MasterProtos.BypassProcedureRequest.newBuilder().addAllProcId(pids).
+  setWaitTime(waitTime).setForce(force).build());
+} catch (Throwable t) {
+  LOG.error(pids.stream().map(i -> i.toString()).
+  collect(Collectors.joining(", ")), t);
+  throw t;
+}
+  }
+});
+return response.getBypassedList();
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/e6c7ed34/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
index c6a3caa..5c9a862 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Hbck.java
@@ -26,15 +26,9 @@ import org.apache.hadoop.hbase.HBaseInterfaceAudience;
 import org.apache.yetus.audience.InterfaceAudience;
 
 /**
- * Hbck APIs for HBase. Obtain an instance from {@link 
ClusterConnection#getHbck()} and call
+ * Hbck fixup tool APIs. Obtain an instance from {@link 
ClusterConnection#getHbck()} and call
  * {@link #close()} when done.
- * Hbck client APIs will be mostly used by hbck tool which in turn can be 
used by operators to
- * fix HBase and bringing it to consistent state.
- *
- * NOTE: The methods in here can do damage to a cluster if applied in the 
wrong sequence or at
- * the wrong time. Use with caution. For experts only. These methods are only 
for the
- * extreme case where the cluster has been damaged or has achieved an 
inconsistent state because
- * of some unforeseen circumstance or bug and requires manual intervention.
+ * WARNING: the below methods can damage the cluster. For experienced users 
only.
  *
  * @see ConnectionFactory
  * @see ClusterConnection
@@ -45,10 +39,6 @@ public interface Hbck extends Aborta

[hbase-operator-tools] branch master updated: HBASE-21210 Add bypassProcedure() API to HBCK2

2018-09-19 Thread stack
This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git


The following commit(s) were added to refs/heads/master by this push:
 new bf22da3  HBASE-21210 Add bypassProcedure() API to HBCK2
bf22da3 is described below

commit bf22da3e92ad9cf06ab7211af4dd3209ad12b47a
Author: Michael Stack 
AuthorDate: Wed Sep 19 14:56:53 2018 -0700

HBASE-21210 Add bypassProcedure() API to HBCK2

Adds a 'bypass' command that takes --force and
--waitTime options. First command that itself
has options.
---
 hbase-hbck2/pom.xml|  5 +-
 .../src/main/java/org/apache/hbase/HBCK2.java  | 83 +++---
 .../src/test/java/org/apache/hbase/TestHBCK2.java  | 20 ++
 .../apache/hbase/TestHBCKCommandLineParsing.java   | 76 
 pom.xml|  1 +
 5 files changed, 156 insertions(+), 29 deletions(-)

diff --git a/hbase-hbck2/pom.xml b/hbase-hbck2/pom.xml
index cff8873..91d147c 100644
--- a/hbase-hbck2/pom.xml
+++ b/hbase-hbck2/pom.xml
@@ -121,9 +121,8 @@
 2.11.1
 
 
+HBASE-15666 is about how shaded-client and hbase-server won't work 
together.
+TODO: Fix.-->
   
 org.apache.hbase
 hbase-server
diff --git a/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java 
b/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
index 5c945b0..83d8def 100644
--- a/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
+++ b/hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
@@ -66,6 +66,7 @@ public class HBCK2 extends Configured implements Tool {
   private static final String SET_TABLE_STATE = "setTableState";
   private static final String ASSIGNS = "assigns";
   private static final String UNASSIGNS = "unassigns";
+  private static final String BYPASS = "bypass";
   private Configuration conf;
 
   TableState setTableState(TableName tableName, TableState.State state)
@@ -98,6 +99,47 @@ public class HBCK2 extends Configured implements Tool {
 }
   }
 
+  /**
+   * @return List of results OR null if failed to run.
+   */
+  List bypass(List args)
+  throws IOException {
+// Bypass has two options
+Options options =  new Options();
+Option force = Option.builder("f").longOpt("force").
+desc("'force' the procedure finish").build();
+options.addOption(force);
+Option wait = Option.builder("w").longOpt("waitTime").hasArg().
+desc("time to wait on entity lock before giving 
up").type(Integer.class).build();
+options.addOption(wait);
+// Parse command-line.
+CommandLineParser parser = new DefaultParser();
+CommandLine commandLine = null;
+try {
+  commandLine = parser.parse(options, args.toArray(new String [] {}), 
false);
+} catch (ParseException e) {
+  usage(options, e.getMessage());
+  return null;
+}
+boolean b = commandLine.hasOption(force.getOpt());
+long waitTime = 0;
+if (commandLine.hasOption(wait.getOpt())) {
+  waitTime = Integer.valueOf(commandLine.getOptionValue(wait.getOpt()));
+  waitTime *= 1000; // Because time is in seconds.
+}
+String [] pidStrs = commandLine.getArgs();
+if (pidStrs == null || pidStrs.length <= 0) {
+  usage(options, "No pids supplied.");
+  return null;
+}
+List pids = Arrays.stream(pidStrs).map(i -> 
Long.valueOf(i)).collect(Collectors.toList());
+try (ClusterConnection c = 
(ClusterConnection)ConnectionFactory.createConnection(getConf())) {
+  try (Hbck hbck = c.getHbck()) {
+return hbck.bypassProcedure(pids, waitTime, b);
+  }
+}
+  }
+
   private static final String getCommandUsage() {
 StringWriter sw = new StringWriter();
 PrintWriter writer = new PrintWriter(sw);
@@ -113,7 +155,7 @@ public class HBCK2 extends Configured implements Tool {
 writer.println(" $ HBCK2 setTableState users ENABLED");
 writer.println("   Returns whatever the previous table state was.");
 writer.println();
-writer.println(" " + ASSIGNS + "  ...");
+writer.println(" " + ASSIGNS + " ...");
 writer.println("   A 'raw' assign that can be used even during Master 
initialization.");
 writer.println("   Skirts Coprocessors. Pass one or more encoded 
RegionNames:");
 writer.println("   e.g. 1588230740 is hard-coded encoding for hbase:meta 
region and");
@@ -122,7 +164,15 @@ public class HBCK2 extends Configured implements Tool {
 writer.println(" $ HBCK2 assign 1588230740 
de00010733901a05f5a2a3a382e27dd4");
 writer.println("   Returns the pid of the created AssignProcedure or -1 if 
none.");
 writer.println();
-writer.println(" " + UNASSIGNS + "  ...");
+writer.println(" " + BYPASS + " [OPTIONS] ...");
+writer.println("   Pass one (or more) procedure 'pid's to skip to the 
procedure finish.");
+writer.println

hbase git commit: HBASE-21156 [hbck2] Queue an assign of hbase:meta and bulk assign/unassign

2018-09-19 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/master 69431c75c -> 3a0fcd56c


HBASE-21156 [hbck2] Queue an assign of hbase:meta and bulk assign/unassign

Adds 'raw' assigns and unassigns methods to Hbck Service.

Fixes HbckService so it works when cluster is Kerberized.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3a0fcd56
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3a0fcd56
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3a0fcd56

Branch: refs/heads/master
Commit: 3a0fcd56cf9ac0769eca74c23f0690740d1bbcfa
Parents: 69431c7
Author: Michael Stack 
Authored: Wed Sep 12 21:28:52 2018 -0700
Committer: Michael Stack 
Committed: Wed Sep 19 10:06:16 2018 -0700

--
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |  1 -
 .../apache/hadoop/hbase/client/HBaseHbck.java   | 60 +++---
 .../org/apache/hadoop/hbase/client/Hbck.java| 38 +++--
 .../hadoop/hbase/security/SecurityInfo.java | 15 +++-
 .../hbase/shaded/protobuf/RequestConverter.java | 22 +
 .../src/main/protobuf/Master.proto  | 61 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |  4 +-
 .../hadoop/hbase/master/MasterRpcServices.java  | 86 +++
 .../master/assignment/AssignmentManager.java| 11 ++-
 .../hbase/security/HBasePolicyProvider.java | 14 ++--
 .../apache/hadoop/hbase/client/TestHbck.java| 87 +---
 11 files changed, 334 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/3a0fcd56/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index c54ff17..178e6f9 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -230,7 +230,6 @@ import 
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos;
  * @see Admin
  */
 @InterfaceAudience.Private
-@InterfaceStability.Evolving
 public class HBaseAdmin implements Admin {
   private static final Logger LOG = LoggerFactory.getLogger(HBaseAdmin.class);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/3a0fcd56/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
index 03a6f69..af9e7b7 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
@@ -18,25 +18,36 @@
 package org.apache.hadoop.hbase.client;
 
 import java.io.IOException;
+import java.util.List;
+import java.util.stream.Collectors;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
+import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.HbckService.BlockingInterface;
 
+import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * Use {@link ClusterConnection#getHbck()} to obtain an instance of {@link 
Hbck} instead of
- * constructing
- * an HBaseHbck directly. This will be mostly used by hbck tool.
+ * constructing an HBaseHbck directly.
  *
  * Connection should be an unmanaged connection obtained via
  * {@link ConnectionFactory#createConnection(Configuration)}.
  *
+ * NOTE: The methods in here can do damage to a cluster if applied in the 
wrong sequence or at
+ * the wrong time. Use with caution. For experts only. These methods are only 
for the
+ * extreme case where the cluster has been damaged or has achieved an 
inconsistent state because
+ * of some unforeseen circumstance or bug and requires manual intervention.
+ *
  * An instance of this class is lightweight and not-thread safe. A new 
instance should be created
  * by each thread. Pooling or caching of the instance is not recommended.
  *
@@ -75,10 +86,6 @@ public class HBaseHbck implements 

hbase git commit: HBASE-21156 [hbck2] Queue an assign of hbase:meta and bulk assign/unassign

2018-09-19 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2 84896deb1 -> 8876f12c0


HBASE-21156 [hbck2] Queue an assign of hbase:meta and bulk assign/unassign

Adds 'raw' assigns and unassigns methods to Hbck Service.

Fixes HbckService so it works when cluster is Kerberized.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8876f12c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8876f12c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8876f12c

Branch: refs/heads/branch-2
Commit: 8876f12c0c8c06da9b21ed79e66721c094751013
Parents: 84896de
Author: Michael Stack 
Authored: Wed Sep 12 21:28:52 2018 -0700
Committer: Michael Stack 
Committed: Wed Sep 19 09:47:32 2018 -0700

--
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |  1 -
 .../apache/hadoop/hbase/client/HBaseHbck.java   | 60 +++---
 .../org/apache/hadoop/hbase/client/Hbck.java| 38 +++--
 .../hadoop/hbase/security/SecurityInfo.java | 15 +++-
 .../hbase/shaded/protobuf/RequestConverter.java | 22 +
 .../src/main/protobuf/Master.proto  | 61 +-
 .../org/apache/hadoop/hbase/master/HMaster.java |  4 +-
 .../hadoop/hbase/master/MasterRpcServices.java  | 86 +++
 .../master/assignment/AssignmentManager.java| 11 ++-
 .../hbase/security/HBasePolicyProvider.java | 14 ++--
 .../apache/hadoop/hbase/client/TestHbck.java| 87 +---
 11 files changed, 334 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/8876f12c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index b451c5a..4f588bd 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -228,7 +228,6 @@ import 
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos;
  * @see Admin
  */
 @InterfaceAudience.Private
-@InterfaceStability.Evolving
 public class HBaseAdmin implements Admin {
   private static final Logger LOG = LoggerFactory.getLogger(HBaseAdmin.class);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/8876f12c/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
index 03a6f69..af9e7b7 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
@@ -18,25 +18,36 @@
 package org.apache.hadoop.hbase.client;
 
 import java.io.IOException;
+import java.util.List;
+import java.util.stream.Collectors;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
+import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.HbckService.BlockingInterface;
 
+import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * Use {@link ClusterConnection#getHbck()} to obtain an instance of {@link 
Hbck} instead of
- * constructing
- * an HBaseHbck directly. This will be mostly used by hbck tool.
+ * constructing an HBaseHbck directly.
  *
  * Connection should be an unmanaged connection obtained via
  * {@link ConnectionFactory#createConnection(Configuration)}.
  *
+ * NOTE: The methods in here can do damage to a cluster if applied in the 
wrong sequence or at
+ * the wrong time. Use with caution. For experts only. These methods are only 
for the
+ * extreme case where the cluster has been damaged or has achieved an 
inconsistent state because
+ * of some unforeseen circumstance or bug and requires manual intervention.
+ *
  * An instance of this class is lightweight and not-thread safe. A new 
instance should be created
  * by each thread. Pooling or caching of the instance is not recommended.
  *
@@ -75,10 +86,6 @@ public class HBaseHbck impleme

hbase git commit: HBASE-21156 [hbck2] Queue an assign of hbase:meta and bulk assign/unassign

2018-09-19 Thread stack
Repository: hbase
Updated Branches:
  refs/heads/branch-2.1 27b772ddc -> 37cc07a77


HBASE-21156 [hbck2] Queue an assign of hbase:meta and bulk assign/unassign

Adds 'raw' assigns and unassigns methods to Hbck Service.

Fixes HbckService so it works when cluster is Kerberized.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/37cc07a7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/37cc07a7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/37cc07a7

Branch: refs/heads/branch-2.1
Commit: 37cc07a7723d8e87c42240faa87cb43eab29d6dc
Parents: 27b772d
Author: Michael Stack 
Authored: Wed Sep 12 21:28:52 2018 -0700
Committer: Michael Stack 
Committed: Wed Sep 19 09:02:43 2018 -0700

--
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |  1 -
 .../apache/hadoop/hbase/client/HBaseHbck.java   | 60 ++---
 .../org/apache/hadoop/hbase/client/Hbck.java| 38 ++--
 .../hadoop/hbase/security/SecurityInfo.java | 15 +++-
 .../hbase/shaded/protobuf/RequestConverter.java | 22 +
 .../src/main/protobuf/Master.proto  | 61 -
 .../org/apache/hadoop/hbase/master/HMaster.java |  4 +-
 .../hadoop/hbase/master/MasterRpcServices.java  | 92 
 .../master/assignment/AssignmentManager.java|  5 ++
 .../hbase/security/HBasePolicyProvider.java | 14 +--
 .../apache/hadoop/hbase/client/TestHbck.java| 87 --
 11 files changed, 338 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/37cc07a7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
index 7f3abea..a160204 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
@@ -226,7 +226,6 @@ import 
org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos;
  * @see Admin
  */
 @InterfaceAudience.Private
-@InterfaceStability.Evolving
 public class HBaseAdmin implements Admin {
   private static final Logger LOG = LoggerFactory.getLogger(HBaseAdmin.class);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/37cc07a7/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
index 03a6f69..af9e7b7 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseHbck.java
@@ -18,25 +18,36 @@
 package org.apache.hadoop.hbase.client;
 
 import java.io.IOException;
+import java.util.List;
+import java.util.stream.Collectors;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
 import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
+import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableStateResponse;
 import 
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.HbckService.BlockingInterface;
 
+import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;
+
+import org.apache.yetus.audience.InterfaceAudience;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * Use {@link ClusterConnection#getHbck()} to obtain an instance of {@link 
Hbck} instead of
- * constructing
- * an HBaseHbck directly. This will be mostly used by hbck tool.
+ * constructing an HBaseHbck directly.
  *
  * Connection should be an unmanaged connection obtained via
  * {@link ConnectionFactory#createConnection(Configuration)}.
  *
+ * NOTE: The methods in here can do damage to a cluster if applied in the 
wrong sequence or at
+ * the wrong time. Use with caution. For experts only. These methods are only 
for the
+ * extreme case where the cluster has been damaged or has achieved an 
inconsistent state because
+ * of some unforeseen circumstance or bug and requires manual intervention.
+ *
  * An instance of this class is lightweight and not-thread safe. A new 
instance should be created
  * by each thread. Pooling or caching of the instance is not recommended.
  *
@@ -75,10 +86,6 @@ public class HBaseHbck implement

hbase-site git commit: INFRA-10751 Empty commit

2018-09-19 Thread git-site-role
Repository: hbase-site
Updated Branches:
  refs/heads/asf-site 007d5b635 -> a5dc1229e


INFRA-10751 Empty commit


Project: http://git-wip-us.apache.org/repos/asf/hbase-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase-site/commit/a5dc1229
Tree: http://git-wip-us.apache.org/repos/asf/hbase-site/tree/a5dc1229
Diff: http://git-wip-us.apache.org/repos/asf/hbase-site/diff/a5dc1229

Branch: refs/heads/asf-site
Commit: a5dc1229e92b17c8cc48ace0e6ab4c0b6595a474
Parents: 007d5b6
Author: jenkins 
Authored: Wed Sep 19 14:53:12 2018 +
Committer: jenkins 
Committed: Wed Sep 19 14:53:12 2018 +

--

--




[02/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions by primary region index
-145int[][] primariesOfRegionsPerHost;   
//hostIndex -> sorted list of regions by primary region 

[06/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.MoveRegionAction.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.MoveRegionAction.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.MoveRegionAction.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.MoveRegionAction.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.MoveRegionAction.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions b

[13/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
Published site at 69431c75c16d8d863932815f0460322153a25dbb.


Project: http://git-wip-us.apache.org/repos/asf/hbase-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase-site/commit/007d5b63
Tree: http://git-wip-us.apache.org/repos/asf/hbase-site/tree/007d5b63
Diff: http://git-wip-us.apache.org/repos/asf/hbase-site/diff/007d5b63

Branch: refs/heads/asf-site
Commit: 007d5b635fd21a84f9a81e47c4950e6f8ba3a2e8
Parents: 29bf9a7
Author: jenkins 
Authored: Wed Sep 19 14:52:59 2018 +
Committer: jenkins 
Committed: Wed Sep 19 14:52:59 2018 +

--
 acid-semantics.html |4 +-
 apache_hbase_reference_guide.pdf|4 +-
 book.html   |2 +-
 bulk-loads.html |4 +-
 checkstyle-aggregate.html   |  126 +-
 coc.html|4 +-
 dependencies.html   |4 +-
 dependency-convergence.html |4 +-
 dependency-info.html|4 +-
 dependency-management.html  |4 +-
 devapidocs/constant-values.html |6 +-
 .../BaseLoadBalancer.Cluster.Action.Type.html   |   14 +-
 .../BaseLoadBalancer.Cluster.Action.html|   10 +-
 ...LoadBalancer.Cluster.AssignRegionAction.html |   12 +-
 .../BaseLoadBalancer.Cluster.LocalityType.html  |   10 +-
 ...seLoadBalancer.Cluster.MoveRegionAction.html |   14 +-
 ...eLoadBalancer.Cluster.SwapRegionsAction.html |   16 +-
 .../balancer/BaseLoadBalancer.Cluster.html  |  148 +-
 .../BaseLoadBalancer.DefaultRackManager.html|6 +-
 .../hbase/master/balancer/BaseLoadBalancer.html |   98 +-
 .../org/apache/hadoop/hbase/Version.html|6 +-
 .../BaseLoadBalancer.Cluster.Action.Type.html   | 3168 +-
 .../BaseLoadBalancer.Cluster.Action.html| 3168 +-
 ...LoadBalancer.Cluster.AssignRegionAction.html | 3168 +-
 .../BaseLoadBalancer.Cluster.LocalityType.html  | 3168 +-
 ...seLoadBalancer.Cluster.MoveRegionAction.html | 3168 +-
 ...eLoadBalancer.Cluster.SwapRegionsAction.html | 3168 +-
 .../balancer/BaseLoadBalancer.Cluster.html  | 3168 +-
 .../BaseLoadBalancer.DefaultRackManager.html| 3168 +-
 .../hbase/master/balancer/BaseLoadBalancer.html | 3168 +-
 downloads.html  |4 +-
 export_control.html |4 +-
 index.html  |4 +-
 integration.html|4 +-
 issue-tracking.html |4 +-
 license.html|4 +-
 mail-lists.html |4 +-
 metrics.html|4 +-
 old_news.html   |4 +-
 plugin-management.html  |4 +-
 plugins.html|4 +-
 poweredbyhbase.html |4 +-
 project-info.html   |4 +-
 project-reports.html|4 +-
 project-summary.html|4 +-
 pseudo-distributed.html |4 +-
 replication.html|4 +-
 resources.html  |4 +-
 source-repository.html  |4 +-
 sponsors.html   |4 +-
 supportingprojects.html |4 +-
 team-list.html  |4 +-
 52 files changed, 14559 insertions(+), 14541 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/acid-semantics.html
--
diff --git a/acid-semantics.html b/acid-semantics.html
index d261920..fcd2f88 100644
--- a/acid-semantics.html
+++ b/acid-semantics.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase –  
   Apache HBase (TM) ACID Properties
@@ -601,7 +601,7 @@ under the License. -->
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/apache_hbase_reference_guide.pdf
--
diff --git a/apache_hbase_reference_guide.pdf b/apache_hbase_reference_guide.pdf
index a2451f8..0d6d4e7 100644
--- a/apache_hbase_referen

[12/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
--
diff --git 
a/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
 
b/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
index 566bf6b..b61939f 100644
--- 
a/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
+++ 
b/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
@@ -113,7 +113,7 @@ var activeTableTab = "activeTableTab";
 
 
 
-protected static class BaseLoadBalancer.Cluster
+protected static class BaseLoadBalancer.Cluster
 extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true";
 title="class or interface in java.lang">Object
 An efficient array based implementation similar to 
ClusterState for keeping
  the status of the cluster in terms of region assignment and distribution.
@@ -579,7 +579,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 servers
-ServerName[] servers
+ServerName[] servers
 
 
 
@@ -588,7 +588,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 hosts
-https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true";
 title="class or interface in java.lang">String[] hosts
+https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true";
 title="class or interface in java.lang">String[] hosts
 
 
 
@@ -597,7 +597,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 racks
-https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true";
 title="class or interface in java.lang">String[] racks
+https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true";
 title="class or interface in java.lang">String[] racks
 
 
 
@@ -606,7 +606,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 multiServersPerHost
-boolean multiServersPerHost
+boolean multiServersPerHost
 
 
 
@@ -615,7 +615,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 tables
-https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true";
 title="class or interface in java.util">ArrayListString> tables
+https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true";
 title="class or interface in java.util">ArrayListString> tables
 
 
 
@@ -624,7 +624,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regions
-RegionInfo[] regions
+RegionInfo[] regions
 
 
 
@@ -633,7 +633,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regionLoads
-https://docs.oracle.com/javase/8/docs/api/java/util/Deque.html?is-external=true";
 title="class or interface in java.util">Deque[] regionLoads
+https://docs.oracle.com/javase/8/docs/api/java/util/Deque.html?is-external=true";
 title="class or interface in java.util">Deque[] regionLoads
 
 
 
@@ -642,7 +642,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regionFinder
-private RegionLocationFinder regionFinder
+private RegionLocationFinder regionFinder
 
 
 
@@ -651,7 +651,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regionLocations
-int[][] regionLocations
+int[][] regionLocations
 
 
 
@@ -660,7 +660,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 serverIndexToHostIndex
-int[] serverIndexToHostIndex
+int[] serverIndexToHostIndex
 
 
 
@@ -669,7 +669,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 serverIndexToRackIndex
-int[] serverIndexToRackIndex
+int[] serverIndexToRackIndex
 
 
 
@@ -678,7 +678,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regionsPerServer
-int[][] regionsPerServer
+int[][] regionsPerServer
 
 
 
@@ -687,7 +687,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regionsPerHost
-int[][] regionsPerHost
+int[][] regionsPerHost
 
 
 
@@ -696,7 +696,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 regionsPerRack
-int[][] regionsPerRack
+int[][] regionsPerRack
 
 
 
@@ -705,7 +705,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 primariesOfRegionsPerServer
-int[][] primariesOfRegionsPerServer
+int[][] primariesOfRegionsPerServer
 
 
 
@@ -714,7 +714,7 @@ extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 
 
 primariesOfRegi

[10/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.Type.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.Type.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.Type.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.Type.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.Type.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions by primary region index
-1

[09/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.Action.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions by primary region index
-145int[][] primariesOf

[05/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.SwapRegionsAction.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.SwapRegionsAction.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.SwapRegionsAction.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.SwapRegionsAction.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.SwapRegionsAction.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regi

[11/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
--
diff --git 
a/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html 
b/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
index d72fb0f..fb1162f 100644
--- a/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
+++ b/devapidocs/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.html
@@ -118,7 +118,7 @@ var activeTableTab = "activeTableTab";
 
 
 @InterfaceAudience.Private
-public abstract class BaseLoadBalancer
+public abstract class BaseLoadBalancer
 extends https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true";
 title="class or interface in java.lang">Object
 implements LoadBalancer
 The base class for load balancers. It provides the the 
functions used to by
@@ -494,7 +494,7 @@ implements 
 
 MIN_SERVER_BALANCE
-protected static final int MIN_SERVER_BALANCE
+protected static final int MIN_SERVER_BALANCE
 
 See Also:
 Constant
 Field Values
@@ -507,7 +507,7 @@ implements 
 
 stopped
-private volatile boolean stopped
+private volatile boolean stopped
 
 
 
@@ -516,7 +516,7 @@ implements 
 
 EMPTY_REGION_LIST
-private static final https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true";
 title="class or interface in java.util">List EMPTY_REGION_LIST
+private static final https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true";
 title="class or interface in java.util">List EMPTY_REGION_LIST
 
 
 
@@ -525,7 +525,7 @@ implements 
 
 IDLE_SERVER_PREDICATOR
-static final https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true";
 title="class or interface in java.util.function">Predicate IDLE_SERVER_PREDICATOR
+static final https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?is-external=true";
 title="class or interface in java.util.function">Predicate IDLE_SERVER_PREDICATOR
 
 
 
@@ -534,7 +534,7 @@ implements 
 
 regionFinder
-protected RegionLocationFinder regionFinder
+protected RegionLocationFinder regionFinder
 
 
 
@@ -543,7 +543,7 @@ implements 
 
 useRegionFinder
-protected boolean useRegionFinder
+protected boolean useRegionFinder
 
 
 
@@ -552,7 +552,7 @@ implements 
 
 slop
-protected float slop
+protected float slop
 
 
 
@@ -561,7 +561,7 @@ implements 
 
 overallSlop
-protected float overallSlop
+protected float overallSlop
 
 
 
@@ -570,7 +570,7 @@ implements 
 
 config
-protected org.apache.hadoop.conf.Configuration config
+protected org.apache.hadoop.conf.Configuration config
 
 
 
@@ -579,7 +579,7 @@ implements 
 
 rackManager
-protected RackManager rackManager
+protected RackManager rackManager
 
 
 
@@ -588,7 +588,7 @@ implements 
 
 RANDOM
-private static final https://docs.oracle.com/javase/8/docs/api/java/util/Random.html?is-external=true";
 title="class or interface in java.util">Random RANDOM
+private static final https://docs.oracle.com/javase/8/docs/api/java/util/Random.html?is-external=true";
 title="class or interface in java.util">Random RANDOM
 
 
 
@@ -597,7 +597,7 @@ implements 
 
 LOG
-private static final org.slf4j.Logger LOG
+private static final org.slf4j.Logger LOG
 
 
 
@@ -606,7 +606,7 @@ implements 
 
 metricsBalancer
-protected MetricsBalancer 
metricsBalancer
+protected MetricsBalancer 
metricsBalancer
 
 
 
@@ -615,7 +615,7 @@ implements 
 
 clusterStatus
-protected ClusterMetrics clusterStatus
+protected ClusterMetrics clusterStatus
 
 
 
@@ -624,7 +624,7 @@ implements 
 
 masterServerName
-protected ServerName masterServerName
+protected ServerName masterServerName
 
 
 
@@ -633,7 +633,7 @@ implements 
 
 services
-protected MasterServices services
+protected MasterServices services
 
 
 
@@ -642,7 +642,7 @@ implements 
 
 tablesOnMaster
-protected boolean tablesOnMaster
+protected boolean tablesOnMaster
 
 
 
@@ -651,7 +651,7 @@ implements 
 
 onlySystemTablesOnMaster
-protected boolean onlySystemTablesOnMaster
+protected boolean onlySystemTablesOnMaster
 
 
 
@@ -668,7 +668,7 @@ implements 
 
 BaseLoadBalancer
-protected BaseLoadBalancer()
+protected BaseLoadBalancer()
 The constructor that uses the basic MetricsBalancer
 
 
@@ -678,7 +678,7 @@ implements 
 
 BaseLoadBalancer
-protected BaseLoadBalancer(MetricsBalancer metricsBalancer)
+protected BaseLoadBalancer(MetricsBalancer metricsBalancer)
 This Constructor accepts an instance of MetricsBalancer,
  which will be used instead of creating a new one
 
@@ -697,7 +697,7 @@ implements 
 
 createRegionFinder
-private void createRegionFinder()
+private void createRegionFinder()
 
 
 
@@ -706,7 +706,7 @@ implements 
 
 setConf
-public void setConf(org.apache.hadoop.conf.Configuration conf)
+public void setConf(org.apache.hadoop.conf.Configuration conf)
 
 Speci

[03/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.DefaultRackManager.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.DefaultRackManager.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.DefaultRackManager.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.DefaultRackManager.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.DefaultRackManager.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions by primary region index
-145   

[01/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
Repository: hbase-site
Updated Branches:
  refs/heads/asf-site 29bf9a744 -> 007d5b635


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/downloads.html
--
diff --git a/downloads.html b/downloads.html
index ee8e15f..4aa7de9 100644
--- a/downloads.html
+++ b/downloads.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – Apache HBase Downloads
 
@@ -423,7 +423,7 @@ under the License. -->
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/export_control.html
--
diff --git a/export_control.html b/export_control.html
index 5cd8d08..de35a89 100644
--- a/export_control.html
+++ b/export_control.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – 
   Export Control
@@ -331,7 +331,7 @@ for more details.
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/index.html
--
diff --git a/index.html b/index.html
index 2f92a6b..1b3f1fb 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – Apache HBase™ Home
 
@@ -411,7 +411,7 @@ Apache HBase is an open-source, distributed, versioned, 
non-relational database
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/integration.html
--
diff --git a/integration.html b/integration.html
index edbb0e5..a561548 100644
--- a/integration.html
+++ b/integration.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – CI Management
 
@@ -291,7 +291,7 @@
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/issue-tracking.html
--
diff --git a/issue-tracking.html b/issue-tracking.html
index 4ba6462..08d51f4 100644
--- a/issue-tracking.html
+++ b/issue-tracking.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – Issue Management
 
@@ -288,7 +288,7 @@
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/license.html
--
diff --git a/license.html b/license.html
index 5a19f75..eb9c011 100644
--- a/license.html
+++ b/license.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – Project Licenses
 
@@ -491,7 +491,7 @@
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/mail-lists.html
--
diff --git a/mail-lists.html b/mail-lists.html
index 164781b..b5dca72 100644
--- a/mail-lists.html
+++ b/mail-lists.html
@@ -7,7 +7,7 @@
   
 
 
-
+
 
 Apache HBase – Project Mailing Lists
 
@@ -341,7 +341,7 @@
 https://www.apache.org/";>The Apache Software 
Foundation.
 All rights reserved.  
 
-  Last Published: 
2018-09-18
+  Last Published: 
2018-09-19
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/metrics.html
--
diff --gi

[04/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions by primary region index
-145int[][] primariesOfRegionsPerHost;   
//hostIndex -> s

[07/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.LocalityType.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.LocalityType.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.LocalityType.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.LocalityType.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.LocalityType.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of regions by primary region ind

[08/13] hbase-site git commit: Published site at 69431c75c16d8d863932815f0460322153a25dbb.

2018-09-19 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/007d5b63/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.AssignRegionAction.html
--
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.AssignRegionAction.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.AssignRegionAction.html
index e478f39..dee066e 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.AssignRegionAction.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.Cluster.AssignRegionAction.html
@@ -59,1589 +59,1591 @@
 051import 
org.apache.hadoop.hbase.master.MasterServices;
 052import 
org.apache.hadoop.hbase.master.RackManager;
 053import 
org.apache.hadoop.hbase.master.RegionPlan;
-054import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
-055import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
-056import 
org.apache.hbase.thirdparty.com.google.common.base.Joiner;
-057import 
org.apache.hbase.thirdparty.com.google.common.collect.ArrayListMultimap;
-058import 
org.apache.hbase.thirdparty.com.google.common.collect.Lists;
-059import 
org.apache.hbase.thirdparty.com.google.common.collect.Sets;
-060import 
org.apache.yetus.audience.InterfaceAudience;
-061import org.slf4j.Logger;
-062import org.slf4j.LoggerFactory;
-063
-064/**
-065 * The base class for load balancers. It 
provides the the functions used to by
-066 * {@link 
org.apache.hadoop.hbase.master.assignment.AssignmentManager} to assign 
regions
-067 * in the edge cases. It doesn't provide 
an implementation of the
-068 * actual balancing algorithm.
-069 *
-070 */
-071@InterfaceAudience.Private
-072public abstract class BaseLoadBalancer 
implements LoadBalancer {
-073  protected static final int 
MIN_SERVER_BALANCE = 2;
-074  private volatile boolean stopped = 
false;
-075
-076  private static final 
List EMPTY_REGION_LIST = new ArrayList<>(0);
-077
-078  static final 
Predicate IDLE_SERVER_PREDICATOR
-079= load -> 
load.getRegionMetrics().isEmpty();
-080
-081  protected RegionLocationFinder 
regionFinder;
-082  protected boolean useRegionFinder;
-083
-084  private static class DefaultRackManager 
extends RackManager {
-085@Override
-086public String getRack(ServerName 
server) {
-087  return UNKNOWN_RACK;
-088}
-089  }
-090
-091  /**
-092   * The constructor that uses the basic 
MetricsBalancer
-093   */
-094  protected BaseLoadBalancer() {
-095metricsBalancer = new 
MetricsBalancer();
-096createRegionFinder();
-097  }
-098
-099  /**
-100   * This Constructor accepts an instance 
of MetricsBalancer,
-101   * which will be used instead of 
creating a new one
-102   */
-103  protected 
BaseLoadBalancer(MetricsBalancer metricsBalancer) {
-104this.metricsBalancer = 
(metricsBalancer != null) ? metricsBalancer : new MetricsBalancer();
-105createRegionFinder();
-106  }
-107
-108  private void createRegionFinder() {
-109useRegionFinder = 
config.getBoolean("hbase.master.balancer.uselocality", true);
-110if (useRegionFinder) {
-111  regionFinder = new 
RegionLocationFinder();
-112}
-113  }
-114
-115  /**
-116   * An efficient array based 
implementation similar to ClusterState for keeping
-117   * the status of the cluster in terms 
of region assignment and distribution.
-118   * LoadBalancers, such as 
StochasticLoadBalancer uses this Cluster object because of
-119   * hundreds of thousands of hashmap 
manipulations are very costly, which is why this
-120   * class uses mostly indexes and 
arrays.
-121   *
-122   * Cluster tracks a list of unassigned 
regions, region assignments, and the server
-123   * topology in terms of server names, 
hostnames and racks.
-124   */
-125  protected static class Cluster {
-126ServerName[] servers;
-127String[] hosts; // ServerName 
uniquely identifies a region server. multiple RS can run on the same host
-128String[] racks;
-129boolean multiServersPerHost = false; 
// whether or not any host has more than one server
-130
-131ArrayList tables;
-132RegionInfo[] regions;
-133Deque[] 
regionLoads;
-134private RegionLocationFinder 
regionFinder;
-135
-136int[][] regionLocations; 
//regionIndex -> list of serverIndex sorted by locality
-137
-138int[]   serverIndexToHostIndex;  
//serverIndex -> host index
-139int[]   serverIndexToRackIndex;  
//serverIndex -> rack index
-140
-141int[][] regionsPerServer;
//serverIndex -> region list
-142int[][] regionsPerHost;  
//hostIndex -> list of regions
-143int[][] regionsPerRack;  
//rackIndex -> region list
-144int[][] primariesOfRegionsPerServer; 
//serverIndex -> sorted list of

hbase git commit: HBASE-21102 ServerCrashProcedure should select target server where no other replicas exist for the current region - addendum fixes NPE

2018-09-19 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/branch-2 13581e527 -> 84896deb1


HBASE-21102 ServerCrashProcedure should select target server where no other 
replicas exist for the current region - addendum fixes NPE


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/84896deb
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/84896deb
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/84896deb

Branch: refs/heads/branch-2
Commit: 84896deb1c750ce02e3290bad0edca2310f62add
Parents: 13581e5
Author: tedyu 
Authored: Wed Sep 19 07:17:55 2018 -0700
Committer: tedyu 
Committed: Wed Sep 19 07:17:55 2018 -0700

--
 .../apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java  | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/84896deb/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
index 114aee4..6cca59f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
@@ -51,6 +51,7 @@ import org.apache.hadoop.hbase.master.LoadBalancer;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.RackManager;
 import org.apache.hadoop.hbase.master.RegionPlan;
+import org.apache.hadoop.hbase.master.assignment.RegionStates;
 import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
 import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.hbase.thirdparty.com.google.common.base.Joiner;
@@ -1457,8 +1458,9 @@ public abstract class BaseLoadBalancer implements 
LoadBalancer {
   // In the current set of regions even if one has region replica let us 
go with
   // getting the entire snapshot
   if (this.services != null && this.services.getAssignmentManager() != 
null) { // for tests
-if (!hasRegionReplica && 
this.services.getAssignmentManager().getRegionStates()
-.isReplicaAvailableForRegion(region)) {
+RegionStates states = 
this.services.getAssignmentManager().getRegionStates();
+if (!hasRegionReplica && states != null &&
+states.isReplicaAvailableForRegion(region)) {
   hasRegionReplica = true;
 }
   }



hbase git commit: HBASE-21102 ServerCrashProcedure should select target server where no other replicas exist for the current region - addendum fixes NPE

2018-09-19 Thread tedyu
Repository: hbase
Updated Branches:
  refs/heads/master cebb725a9 -> 69431c75c


HBASE-21102 ServerCrashProcedure should select target server where no other 
replicas exist for the current region - addendum fixes NPE


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/69431c75
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/69431c75
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/69431c75

Branch: refs/heads/master
Commit: 69431c75c16d8d863932815f0460322153a25dbb
Parents: cebb725
Author: tedyu 
Authored: Wed Sep 19 07:17:13 2018 -0700
Committer: tedyu 
Committed: Wed Sep 19 07:17:13 2018 -0700

--
 .../apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java  | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/69431c75/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
--
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
index 114aee4..6cca59f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
@@ -51,6 +51,7 @@ import org.apache.hadoop.hbase.master.LoadBalancer;
 import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.RackManager;
 import org.apache.hadoop.hbase.master.RegionPlan;
+import org.apache.hadoop.hbase.master.assignment.RegionStates;
 import 
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer.Cluster.Action.Type;
 import 
org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.hbase.thirdparty.com.google.common.base.Joiner;
@@ -1457,8 +1458,9 @@ public abstract class BaseLoadBalancer implements 
LoadBalancer {
   // In the current set of regions even if one has region replica let us 
go with
   // getting the entire snapshot
   if (this.services != null && this.services.getAssignmentManager() != 
null) { // for tests
-if (!hasRegionReplica && 
this.services.getAssignmentManager().getRegionStates()
-.isReplicaAvailableForRegion(region)) {
+RegionStates states = 
this.services.getAssignmentManager().getRegionStates();
+if (!hasRegionReplica && states != null &&
+states.isReplicaAvailableForRegion(region)) {
   hasRegionReplica = true;
 }
   }