Review Board 1.7.22


HBASE-5444: Add PB-based calls to HMasterRegionInterface

Review Request #4463 - Created March 23, 2012 and updated

Gregory Chanan
0.96
HBASE-5444
Reviewers
hbase
stack
hbase-git
Adds PB-based calls replacing HMasterRegionInterface.

There are some temporary hacks, e.g. converting PB-based ServerLoad to existing HServerLoad so I didn't need to convert ClusterStatus (which brings in a lot of other changes).  That will be cleaned up in HBASE-5445.
Ran jenkins job, all unit tests passed.

Diff revision 4

This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.

1 2 3 4 5
1 2 3 4 5

  1. src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon: Loading...
  2. src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon: Loading...
  3. src/main/java/org/apache/hadoop/hbase/ClusterStatus.java: Loading...
  4. src/main/java/org/apache/hadoop/hbase/HConstants.java: Loading...
  5. src/main/java/org/apache/hadoop/hbase/ipc/HBaseRpcMetrics.java: Loading...
  6. src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java: Loading...
  7. src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java: Loading...
  8. src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java: Loading...
  9. src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: Loading...
  10. src/main/java/org/apache/hadoop/hbase/master/HMaster.java: Loading...
  11. src/main/java/org/apache/hadoop/hbase/master/MXBean.java: Loading...
  12. src/main/java/org/apache/hadoop/hbase/master/MXBeanImpl.java: Loading...
  13. src/main/java/org/apache/hadoop/hbase/master/MasterDumpServlet.java: Loading...
  14. src/main/java/org/apache/hadoop/hbase/master/RegionServerStatusProtocol.java: Loading...
  15. src/main/java/org/apache/hadoop/hbase/master/ServerManager.java: Loading...
  16. src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java: Loading...
  17. src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java: Loading...
  18. src/main/java/org/apache/hadoop/hbase/protobuf/generated/RegionServerStatusProtos.java: Loading...
  19. src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: Loading...
  20. src/main/protobuf/RegionServerStatus.proto: Loading...
  21. src/main/protobuf/hbase.proto: Loading...
  22. src/main/resources/hbase-webapps/master/table.jsp: Loading...
  23. src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java: Loading...
  24. src/test/java/org/apache/hadoop/hbase/coprocessor/TestClassLoading.java: Loading...
  25. src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java: Loading...
  26. src/test/java/org/apache/hadoop/hbase/master/TestMXBean.java: Loading...
  27. src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java: Loading...
  28. src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java: Loading...
src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
Revision 69434f7 New Change
[20] 34 lines
[+20]
35
org.apache.hadoop.hbase.util.Bytes;
35
org.apache.hadoop.hbase.util.Bytes;
36
org.apache.hadoop.hbase.util.JvmVersion;
36
org.apache.hadoop.hbase.util.JvmVersion;
37
org.apache.hadoop.hbase.util.FSUtils;
37
org.apache.hadoop.hbase.util.FSUtils;
38
org.apache.hadoop.hbase.master.HMaster;
38
org.apache.hadoop.hbase.master.HMaster;
39
org.apache.hadoop.hbase.HConstants;
39
org.apache.hadoop.hbase.HConstants;
40
org.apache.hadoop.hbase.HServerLoad;
40
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerLoad;
41
org.apache.hadoop.hbase.ServerName;
41
org.apache.hadoop.hbase.ServerName;
42
org.apache.hadoop.hbase.client.HBaseAdmin;
42
org.apache.hadoop.hbase.client.HBaseAdmin;
43
org.apache.hadoop.hbase.client.HConnectionManager;
43
org.apache.hadoop.hbase.client.HConnectionManager;
44
org.apache.hadoop.hbase.HTableDescriptor;
44
org.apache.hadoop.hbase.HTableDescriptor;
45
org.apache.hadoop.hbase.HBaseConfiguration;
45
org.apache.hadoop.hbase.HBaseConfiguration;
[+20] [20] 165 lines
[+20]
211
     for (ServerName serverName: serverNames) {
211
     for (ServerName serverName: serverNames) {
212
       // TODO: this is incorrect since this conf might differ from RS to RS
212
       // TODO: this is incorrect since this conf might differ from RS to RS
213
       // or be set to 0 to get ephemeral ports
213
       // or be set to 0 to get ephemeral ports
214
       int infoPort = master.getConfiguration().getInt("hbase.regionserver.info.port", 60030);
214
       int infoPort = master.getConfiguration().getInt("hbase.regionserver.info.port", 60030);
215
       String url = "http://" + serverName.getHostname() + ":" + infoPort + "/";
215
       String url = "http://" + serverName.getHostname() + ":" + infoPort + "/";
216
       HServerLoad hsl = master.getServerManager().getLoad(serverName);
216
       ServerLoad sl = master.getServerManager().getLoad(serverName);
217
       String loadStr = hsl == null? "-": hsl.toString();
217
       String loadStr = sl == null? "-": sl.toString();
218
       if (hsl != null) {
218
       if (sl != null) {
219
         totalRegions += hsl.getNumberOfRegions();
219
         totalRegions += sl.getRegionLoadsCount();
220
         totalRequests += hsl.getNumberOfRequests();
220
         // Is this correct?  Adding a rate to a measure.

    
   
221
         totalRequests += sl.getRequestsPerSecond();
221
       }
222
       }
222
       long startcode = serverName.getStartcode();
223
       long startcode = serverName.getStartcode();
223
</%java>
224
</%java>
224
<tr><td><a href="<% url %>"><% serverName %></a></td><td><% new Date(startcode) %></td><td><% loadStr %></td></tr>
225
<tr><td><a href="<% url %>"><% serverName %></a></td><td><% new Date(startcode) %></td><td><% loadStr %></td></tr>
225
<%java>
226
<%java>
[+20] [20] 29 lines
src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
Revision 3c7c091 New Change
 
src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
Revision 5d7f07b New Change
 
src/main/java/org/apache/hadoop/hbase/HConstants.java
Revision a9d80a0 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/HBaseRpcMetrics.java
Revision 0db2760 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Revision 973c7cb New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java
Revision fd97830 New Change
 
src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java
Revision bb6ab3b New Change
 
src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Revision f56127d New Change
 
src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Revision 81e9023 New Change
 
src/main/java/org/apache/hadoop/hbase/master/MXBean.java
Revision 7f44dc2 New Change
 
src/main/java/org/apache/hadoop/hbase/master/MXBeanImpl.java
Revision 45b8fe7 New Change
 
src/main/java/org/apache/hadoop/hbase/master/MasterDumpServlet.java
Revision be63838 New Change
 
src/main/java/org/apache/hadoop/hbase/master/RegionServerStatusProtocol.java
New File
 
src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
Revision 80271b1 New Change
 
src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
Revision 994cb76 New Change
 
src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java
Revision efcf74d New Change
 
src/main/java/org/apache/hadoop/hbase/protobuf/generated/RegionServerStatusProtos.java
New File
 
src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Revision ebffad6 New Change
 
src/main/protobuf/RegionServerStatus.proto
New File
 
src/main/protobuf/hbase.proto
Revision 12e6053 New Change
 
src/main/resources/hbase-webapps/master/table.jsp
Revision 3ef1190 New Change
 
src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
Revision 72554cb New Change
 
src/test/java/org/apache/hadoop/hbase/coprocessor/TestClassLoading.java
Revision d039be3 New Change
 
src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java
Revision 36046f8 New Change
 
src/test/java/org/apache/hadoop/hbase/master/TestMXBean.java
Revision bd5fa90 New Change
 
src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java
Revision f8029ba New Change
 
src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java
Revision e99d251 New Change
 
  1. src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon: Loading...
  2. src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon: Loading...
  3. src/main/java/org/apache/hadoop/hbase/ClusterStatus.java: Loading...
  4. src/main/java/org/apache/hadoop/hbase/HConstants.java: Loading...
  5. src/main/java/org/apache/hadoop/hbase/ipc/HBaseRpcMetrics.java: Loading...
  6. src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java: Loading...
  7. src/main/java/org/apache/hadoop/hbase/ipc/HMasterRegionInterface.java: Loading...
  8. src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java: Loading...
  9. src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java: Loading...
  10. src/main/java/org/apache/hadoop/hbase/master/HMaster.java: Loading...
  11. src/main/java/org/apache/hadoop/hbase/master/MXBean.java: Loading...
  12. src/main/java/org/apache/hadoop/hbase/master/MXBeanImpl.java: Loading...
  13. src/main/java/org/apache/hadoop/hbase/master/MasterDumpServlet.java: Loading...
  14. src/main/java/org/apache/hadoop/hbase/master/RegionServerStatusProtocol.java: Loading...
  15. src/main/java/org/apache/hadoop/hbase/master/ServerManager.java: Loading...
  16. src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java: Loading...
  17. src/main/java/org/apache/hadoop/hbase/protobuf/generated/HBaseProtos.java: Loading...
  18. src/main/java/org/apache/hadoop/hbase/protobuf/generated/RegionServerStatusProtos.java: Loading...
  19. src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: Loading...
  20. src/main/protobuf/RegionServerStatus.proto: Loading...
  21. src/main/protobuf/hbase.proto: Loading...
  22. src/main/resources/hbase-webapps/master/table.jsp: Loading...
  23. src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java: Loading...
  24. src/test/java/org/apache/hadoop/hbase/coprocessor/TestClassLoading.java: Loading...
  25. src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManager.java: Loading...
  26. src/test/java/org/apache/hadoop/hbase/master/TestMXBean.java: Loading...
  27. src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java: Loading...
  28. src/test/java/org/apache/hadoop/hbase/regionserver/TestServerCustomProtocol.java: Loading...