You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ec...@apache.org on 2012/12/03 22:11:32 UTC

svn commit: r1416664 - in /hbase/trunk: ./ hbase-common/ hbase-server/ hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/

Author: eclark
Date: Mon Dec  3 21:11:31 2012
New Revision: 1416664

URL: http://svn.apache.org/viewvc?rev=1416664&view=rev
Log:
HBASE-7187 Create empty hbase-client module

Added:
    hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon
Modified:
    hbase/trunk/hbase-common/pom.xml
    hbase/trunk/hbase-server/pom.xml
    hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
    hbase/trunk/pom.xml

Modified: hbase/trunk/hbase-common/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/pom.xml?rev=1416664&r1=1416663&r2=1416664&view=diff
==============================================================================
--- hbase/trunk/hbase-common/pom.xml (original)
+++ hbase/trunk/hbase-common/pom.xml Mon Dec  3 21:11:31 2012
@@ -109,10 +109,6 @@
           <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-core</artifactId>
         </dependency>
-        <dependency>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-test</artifactId>
-        </dependency>
       </dependencies>
     </profile>
 
@@ -137,10 +133,6 @@
           <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-annotations</artifactId>
         </dependency>
-        <dependency>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-minicluster</artifactId>
-        </dependency>
       </dependencies>
       <build>
         <plugins>
@@ -191,10 +183,6 @@
           <groupId>org.apache.hadoop</groupId>
           <artifactId>hadoop-annotations</artifactId>
         </dependency>
-        <dependency>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-minicluster</artifactId>
-        </dependency>
       </dependencies>
       <build>
         <plugins>

Modified: hbase/trunk/hbase-server/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/pom.xml?rev=1416664&r1=1416663&r2=1416664&view=diff
==============================================================================
--- hbase/trunk/hbase-server/pom.xml (original)
+++ hbase/trunk/hbase-server/pom.xml Mon Dec  3 21:11:31 2012
@@ -276,6 +276,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-client</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
       <artifactId>hbase-common</artifactId>
       <type>test-jar</type>
     </dependency>
@@ -477,7 +481,6 @@
     <dependency>
       <groupId>org.cloudera.htrace</groupId>
       <artifactId>htrace</artifactId>
-      <version>1.49</version>
    </dependency>
   </dependencies>
   <profiles>

Added: hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon?rev=1416664&view=auto
==============================================================================
--- hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon (added)
+++ hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon Mon Dec  3 21:11:31 2012
@@ -0,0 +1,69 @@
+<%doc>
+Copyright The Apache Software Foundation
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ </%doc>
+
+<%args>
+HMaster master;
+</%args>
+
+<%import>
+        java.util.*;
+        org.apache.hadoop.util.StringUtils;
+        org.apache.hadoop.hbase.util.Bytes;
+        org.apache.hadoop.hbase.master.HMaster;
+        org.apache.hadoop.hbase.HConstants;
+        org.apache.hadoop.hbase.ServerName;
+        org.apache.hadoop.hbase.ClusterStatus;
+</%import>
+
+<%java>
+Collection<ServerName> backupMasters = null;
+if (master.isActiveMaster()) {
+    ClusterStatus status = master.getClusterStatus();
+    backupMasters = status.getBackupMasters();
+}
+</%java>
+
+<table class="table table-striped">
+<%if (backupMasters != null && backupMasters.size() > 0)%>
+<tr>
+    <th>ServerName</th>
+    <th>Port</th>
+    <th>Start time</th>
+</tr>
+<%java>
+    ServerName [] serverNames = backupMasters.toArray(new ServerName[backupMasters.size()]);
+    Arrays.sort(serverNames);
+    for (ServerName serverName: serverNames) {
+</%java>
+<tr>
+    <td><% serverName.getHostname() %></td>
+    <td><% serverName.getPort() %></td>
+    <td><% new Date(serverName.getStartcode()) %></td>
+</tr>
+<%java>
+    }
+</%java>
+</%if>
+<tr><td>Total:<% (backupMasters != null) ? backupMasters.size() : 0 %></td>
+</table>
+
+
+
+

Modified: hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon?rev=1416664&r1=1416663&r2=1416664&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon (original)
+++ hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon Mon Dec  3 21:11:31 2012
@@ -126,6 +126,8 @@ org.apache.hadoop.hbase.HBaseConfigurati
           </div>
         </%if>
 
+        <h2>Backup Masters</h2>
+        <& BackupMasterListTmpl; master = master &>
 
         <h2>Region Servers</h2>
         <& RegionServerListTmpl; master= master; servers = servers &>

Modified: hbase/trunk/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/pom.xml?rev=1416664&r1=1416663&r2=1416664&view=diff
==============================================================================
--- hbase/trunk/pom.xml (original)
+++ hbase/trunk/pom.xml Mon Dec  3 21:11:31 2012
@@ -51,6 +51,7 @@
   <modules>
     <module>hbase-server</module>
     <module>hbase-protocol</module>
+    <module>hbase-client</module>
     <module>hbase-hadoop2-compat</module>
     <module>hbase-hadoop1-compat</module>
     <module>hbase-hadoop-compat</module>
@@ -847,6 +848,7 @@
     <jersey.version>1.8</jersey.version>
     <jruby.version>1.6.8</jruby.version>
     <junit.version>4.10-HBASE-1</junit.version>
+    <htrace.version>1.49</htrace.version>
     <slf4j.version>1.4.3</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
     <mockito-all.version>1.9.0</mockito-all.version>
@@ -970,6 +972,11 @@
         <type>test-jar</type>
         <scope>test</scope>
       </dependency>
+      <dependency>
+        <artifactId>hbase-client</artifactId>
+        <groupId>org.apache.hbase</groupId>
+        <version>${project.version}</version>
+      </dependency>
       <!-- General dependencies -->
       <dependency>
         <groupId>io.netty</groupId>
@@ -1222,6 +1229,11 @@
         <optional>true</optional>
       </dependency>
       <dependency>
+        <groupId>org.cloudera.htrace</groupId>
+        <artifactId>htrace</artifactId>
+        <version>${htrace.version}</version>
+      </dependency>
+      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-all</artifactId>
         <version>${mockito-all.version}</version>