hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1451625 - in /hbase/trunk: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/ hbase-server/src/main/resources/hbase-webapps/master/ hbase-server/src/main/ruby/hbase/ ...
Date Fri, 01 Mar 2013 15:58:57 GMT
Author: tedyu
Date: Fri Mar  1 15:58:57 2013
New Revision: 1451625

URL: http://svn.apache.org/r1451625
Log:
HBASE-7969 Rename HBaseAdmin#getCompletedSnapshots as HBaseAdmin#listSnapshots (Ted Yu)


Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
    hbase/trunk/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
    hbase/trunk/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
    hbase/trunk/hbase-server/src/main/ruby/hbase/admin.rb
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1451625&r1=1451624&r2=1451625&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Fri Mar  1 15:58:57 2013
@@ -2331,7 +2331,7 @@ public class HBaseAdmin implements Abort
     String rollbackSnapshot = snapshotName + "-" + EnvironmentEdgeManager.currentTimeMillis();
 
     String tableName = null;
-    for (SnapshotDescription snapshotInfo: getCompletedSnapshots()) {
+    for (SnapshotDescription snapshotInfo: listSnapshots()) {
       if (snapshotInfo.getName().equals(snapshotName)) {
         tableName = snapshotInfo.getTable();
         break;
@@ -2477,7 +2477,7 @@ public class HBaseAdmin implements Abort
    * @return a list of snapshot descriptors for completed snapshots
    * @throws IOException if a network error occurs
    */
-  public List<SnapshotDescription> getCompletedSnapshots() throws IOException {
+  public List<SnapshotDescription> listSnapshots() throws IOException {
     return execute(new MasterAdminCallable<List<SnapshotDescription>>() {
       @Override
       public List<SnapshotDescription> call() throws ServiceException {

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=1451625&r1=1451624&r2=1451625&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
Fri Mar  1 15:58:57 2013
@@ -319,7 +319,7 @@ org.apache.hadoop.hbase.protobuf.generat
 
 <%def userSnapshots>
 <%java>
-   List<SnapshotDescription> snapshots = admin.getCompletedSnapshots();
+   List<SnapshotDescription> snapshots = admin.listSnapshots();
 </%java>
 <%if (snapshots != null && snapshots.size() > 0)%>
 <table class="table table-striped">

Modified: hbase/trunk/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp?rev=1451625&r1=1451624&r2=1451625&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp (original)
+++ hbase/trunk/hbase-server/src/main/resources/hbase-webapps/master/snapshot.jsp Fri Mar
 1 15:58:57 2013
@@ -41,7 +41,7 @@
   boolean readOnly = conf.getBoolean("hbase.master.ui.readonly", false);
   String snapshotName = request.getParameter("name");
   SnapshotDescription snapshot = null;
-  for (SnapshotDescription snapshotDesc: hbadmin.getCompletedSnapshots()) {
+  for (SnapshotDescription snapshotDesc: hbadmin.listSnapshots()) {
     if (snapshotName.equals(snapshotDesc.getName())) {
       snapshot = snapshotDesc;
       break;

Modified: hbase/trunk/hbase-server/src/main/ruby/hbase/admin.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/ruby/hbase/admin.rb?rev=1451625&r1=1451624&r2=1451625&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/ruby/hbase/admin.rb (original)
+++ hbase/trunk/hbase-server/src/main/ruby/hbase/admin.rb Fri Mar  1 15:58:57 2013
@@ -688,7 +688,7 @@ module Hbase
     #----------------------------------------------------------------------------------------------
     # Returns a list of snapshots
     def list_snapshot
-      @admin.getCompletedSnapshots
+      @admin.listSnapshots
     end
 
     # Apply config specific to a table/column to its descriptor

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java?rev=1451625&r1=1451624&r2=1451625&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
Fri Mar  1 15:58:57 2013
@@ -194,7 +194,7 @@ public class TestSnapshotFromClient {
       admin, fs, false, new Path(rootDir, HConstants.HREGION_LOGDIR_NAME), snapshotServers);
 
     admin.deleteSnapshot(snapshot);
-    snapshots = admin.getCompletedSnapshots();
+    snapshots = admin.listSnapshots();
     SnapshotTestingUtils.assertNoSnapshots(admin);
   }
 

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java?rev=1451625&r1=1451624&r2=1451625&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java
Fri Mar  1 15:58:57 2013
@@ -68,7 +68,7 @@ public class SnapshotTestingUtils {
    *           if the admin operation fails
    */
   public static void assertNoSnapshots(HBaseAdmin admin) throws IOException {
-    assertEquals("Have some previous snapshots", 0, admin.getCompletedSnapshots()
+    assertEquals("Have some previous snapshots", 0, admin.listSnapshots()
         .size());
   }
 
@@ -80,7 +80,7 @@ public class SnapshotTestingUtils {
       HBaseAdmin admin, String snapshotName, String tableName)
       throws IOException {
     // list the snapshot
-    List<SnapshotDescription> snapshots = admin.getCompletedSnapshots();
+    List<SnapshotDescription> snapshots = admin.listSnapshots();
 
     List<SnapshotDescription> returnedSnapshots = new ArrayList<SnapshotDescription>();
     for (SnapshotDescription sd : snapshots) {
@@ -109,7 +109,7 @@ public class SnapshotTestingUtils {
       HBaseAdmin admin, String snapshotName, String tableName)
       throws IOException {
     // list the snapshot
-    List<SnapshotDescription> snapshots = admin.getCompletedSnapshots();
+    List<SnapshotDescription> snapshots = admin.listSnapshots();
 
     assertEquals("Should only have 1 snapshot", 1, snapshots.size());
     assertEquals(snapshotName, snapshots.get(0).getName());

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java?rev=1451625&r1=1451624&r2=1451625&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java
Fri Mar  1 15:58:57 2013
@@ -179,7 +179,7 @@ public class TestFlushSnapshotFromClient
       admin, fs, false, new Path(rootDir, HConstants.HREGION_LOGDIR_NAME), snapshotServers);
 
     admin.deleteSnapshot(snapshot);
-    snapshots = admin.getCompletedSnapshots();
+    snapshots = admin.listSnapshots();
     SnapshotTestingUtils.assertNoSnapshots(admin);
   }
 
@@ -385,7 +385,7 @@ public class TestFlushSnapshotFromClient
     // dump for debugging
     logFSTree(new Path(UTIL.getConfiguration().get(HConstants.HBASE_DIR)));
 
-    List<SnapshotDescription> taken = admin.getCompletedSnapshots();
+    List<SnapshotDescription> taken = admin.listSnapshots();
     int takenSize = taken.size();
     LOG.info("Taken " + takenSize + " snapshots:  " + taken);
     assertTrue("We expect at least 1 request to be rejected because of we concurrently" +
@@ -399,4 +399,4 @@ public class TestFlushSnapshotFromClient
   private void logFSTree(Path root) throws IOException {
     FSUtils.logFileSystemState(UTIL.getDFSCluster().getFileSystem(), root, LOG);
   }
-}
\ No newline at end of file
+}



Mime
View raw message