hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1090520 - in /hbase/branches/0.90: ./ src/main/java/org/apache/hadoop/hbase/master/ src/main/ruby/ src/main/ruby/hbase/ src/main/ruby/shell/commands/
Date Sat, 09 Apr 2011 04:00:05 GMT
Author: stack
Date: Sat Apr  9 04:00:04 2011
New Revision: 1090520

URL: http://svn.apache.org/viewvc?rev=1090520&view=rev
Log:
HBASE-3744  createTable blocks until all regions are out of transition

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/BulkAssigner.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
    hbase/branches/0.90/src/main/ruby/hbase.rb
    hbase/branches/0.90/src/main/ruby/hbase/table.rb
    hbase/branches/0.90/src/main/ruby/shell/commands/get.rb

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Sat Apr  9 04:00:04 2011
@@ -10,6 +10,8 @@ Release 0.90.3 - Unreleased
    HBASE-3734  HBaseAdmin creates new configurations in getCatalogTracker
    HBASE-3756  Can't move META or ROOT from shell
    HBASE-3740  hbck doesn't reset the number of errors when retrying
+   HBASE-3744  createTable blocks until all regions are out of transition
+               (Ted Yu via Stack)
 
   IMPROVEMENT
    HBASE-3717  deprecate HTable isTableEnabled() methods in favor of HBaseAdmin

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Sat Apr  9 04:00:04 2011
@@ -21,11 +21,13 @@ package org.apache.hadoop.hbase.master;
 
 import java.io.DataInput;
 import java.io.DataOutput;
-import java.io.EOFException;
 import java.io.IOException;
+import java.io.EOFException;
 import java.net.ConnectException;
+import java.lang.Thread.UncaughtExceptionHandler;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -741,8 +743,7 @@ public class AssignmentManager extends Z
   }
 
   /**
-   * Bulk assign regions to <code>destination</code>.  If we fail in any way,
-   * we'll abort the server.
+   * Bulk assign regions to <code>destination</code>.
    * @param destination
    * @param regions Regions to assign.
    */
@@ -779,14 +780,10 @@ public class AssignmentManager extends Z
       if (count == total) break;
       Threads.sleep(1);
     }
-    // Move on to open regions.
     try {
-      // Send OPEN RPC. This can fail if the server on other end is is not up.
-      // If we fail, fail the startup by aborting the server.  There is one
-      // exception we will tolerate: ServerNotRunningException.  This is thrown
-      // between report of regionserver being up and 
       long maxWaitTime = System.currentTimeMillis() +
-        this.master.getConfiguration().getLong("hbase.regionserver.rpc.startup.waittime",
60000);
+        this.master.getConfiguration().
+          getLong("hbase.regionserver.rpc.startup.waittime", 60000);
       while (!this.master.isStopped()) {
         try {
           this.serverManager.sendRegionOpen(destination, regions);
@@ -801,10 +798,10 @@ public class AssignmentManager extends Z
           Thread.sleep(1000);
         }
       }
-    } catch (Throwable t) {
-      this.master.abort("Failed assignment of regions to " + destination +
-        "; bulk assign FAILED", t);
-      return;
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    } catch (InterruptedException e) {
+      throw new RuntimeException(e);
     }
     LOG.debug("Bulk assigning done for " + destination.getServerName());
   }
@@ -1212,29 +1209,7 @@ public class AssignmentManager extends Z
   }
 
   /**
-   * Assigns list of user regions in round-robin fashion, if any exist.
-   * <p>
-   * This is a synchronous call and will return once every region has been
-   * assigned.  If anything fails, an exception is thrown
-   * @throws InterruptedException
-   * @throws IOException
-   */
-  public void assignUserRegions(List<HRegionInfo> regions, List<HServerInfo>
servers) throws IOException, InterruptedException {
-    if (regions == null)
-      return;
-    Map<HServerInfo, List<HRegionInfo>> bulkPlan = null;
-    // Generate a round-robin bulk assignment plan
-    bulkPlan = LoadBalancer.roundRobinAssignment(regions, servers);
-    LOG.info("Bulk assigning " + regions.size() + " region(s) round-robin across " +
-               servers.size() + " server(s)");
-    // Use fixed count thread pool assigning.
-    BulkAssigner ba = new BulkStartupAssigner(this.master, bulkPlan, this);
-    ba.bulkAssign();
-    LOG.info("Bulk assigning done");
-  }
-
-  /**
-   * Assigns all user regions, if any exist.  Used during cluster startup.
+   * Assigns all user regions, if any.  Used during cluster startup.
    * <p>
    * This is a synchronous call and will return once every region has been
    * assigned.  If anything fails, an exception is thrown and the cluster
@@ -1261,26 +1236,28 @@ public class AssignmentManager extends Z
       bulkPlan = LoadBalancer.retainAssignment(allRegions, servers);
     } else {
       // assign regions in round-robin fashion
-      assignUserRegions(new ArrayList<HRegionInfo>(allRegions.keySet()), servers);
-      return;
+      bulkPlan = LoadBalancer.roundRobinAssignment(new ArrayList<HRegionInfo>(allRegions.keySet()),
servers);
     }
     LOG.info("Bulk assigning " + allRegions.size() + " region(s) across " +
       servers.size() + " server(s), retainAssignment=" + retainAssignment);
 
     // Use fixed count thread pool assigning.
-    BulkAssigner ba = new BulkStartupAssigner(this.master, bulkPlan, this);
+    BulkAssigner ba = new StartupBulkAssigner(this.master, bulkPlan, this);
     ba.bulkAssign();
     LOG.info("Bulk assigning done");
   }
 
   /**
-   * Run bulk assign on startup.
-   */
-  static class BulkStartupAssigner extends BulkAssigner {
-    private final Map<HServerInfo, List<HRegionInfo>> bulkPlan;
-    private final AssignmentManager assignmentManager;
+   * Run bulk assign on startup.  Does one RCP per regionserver passing a
+   * batch of reginons using {@link SingleServerBulkAssigner}.
+   * Uses default {@link #getUncaughtExceptionHandler()}
+   * which will abort the Server if exception.
+   */
+  static class StartupBulkAssigner extends BulkAssigner {
+    final Map<HServerInfo, List<HRegionInfo>> bulkPlan;
+    final AssignmentManager assignmentManager;
 
-    BulkStartupAssigner(final Server server,
+    StartupBulkAssigner(final Server server,
         final Map<HServerInfo, List<HRegionInfo>> bulkPlan,
         final AssignmentManager am) {
       super(server);
@@ -1289,11 +1266,11 @@ public class AssignmentManager extends Z
     }
 
     @Override
-    public boolean bulkAssign() throws InterruptedException {
+    public boolean bulkAssign(boolean sync) throws InterruptedException {
       // Disable timing out regions in transition up in zk while bulk assigning.
       this.assignmentManager.timeoutMonitor.bulkAssign(true);
       try {
-        return super.bulkAssign();
+        return super.bulkAssign(sync);
       } finally {
         // Reenable timing out regions in transition up in zi.
         this.assignmentManager.timeoutMonitor.bulkAssign(false);
@@ -1301,21 +1278,60 @@ public class AssignmentManager extends Z
     }
 
     @Override
-   protected String getThreadNamePrefix() {
-    return super.getThreadNamePrefix() + "-startup";
-   }
+    protected String getThreadNamePrefix() {
+      return this.server.getServerName() + "-StartupBulkAssigner";
+    }
 
     @Override
     protected void populatePool(java.util.concurrent.ExecutorService pool) {
       for (Map.Entry<HServerInfo, List<HRegionInfo>> e: this.bulkPlan.entrySet())
{
         pool.execute(new SingleServerBulkAssigner(e.getKey(), e.getValue(),
-          this.assignmentManager));
+          this.assignmentManager, true));
       }
     }
 
     protected boolean waitUntilDone(final long timeout)
     throws InterruptedException {
-      return this.assignmentManager.waitUntilNoRegionsInTransition(timeout);
+      Set<HRegionInfo> regionSet = new HashSet<HRegionInfo>();
+      for (List<HRegionInfo> regionList : bulkPlan.values()) {
+        regionSet.addAll(regionList);
+      }
+      return this.assignmentManager.waitUntilNoRegionsInTransition(timeout, regionSet);
+    }
+
+    @Override
+    protected long getTimeoutOnRIT() {
+      // Guess timeout.  Multiply the number of regions on a random server
+      // by how long we thing one region takes opening.
+      long perRegionOpenTimeGuesstimate =
+        this.server.getConfiguration().getLong("hbase.bulk.assignment.perregion.open.time",
1000);
+      int regionsPerServer =
+        this.bulkPlan.entrySet().iterator().next().getValue().size();
+      long timeout = perRegionOpenTimeGuesstimate * regionsPerServer;
+      LOG.debug("Timeout-on-RIT=" + timeout);
+      return timeout;
+    }
+  }
+
+  /**
+   * Bulk user region assigner.
+   * If failed assign, lets timeout in RIT do cleanup.
+   */
+  static class GeneralBulkAssigner extends StartupBulkAssigner {
+    GeneralBulkAssigner(final Server server,
+        final Map<HServerInfo, List<HRegionInfo>> bulkPlan,
+        final AssignmentManager am) {
+      super(server, bulkPlan, am);
+    }
+
+    @Override
+    protected UncaughtExceptionHandler getUncaughtExceptionHandler() {
+      return new UncaughtExceptionHandler() {
+        @Override
+        public void uncaughtException(Thread t, Throwable e) {
+          LOG.warn("Assigning regions in " + t.getName(), e);
+        }
+      };
     }
   }
 
@@ -1328,7 +1344,8 @@ public class AssignmentManager extends Z
     private final AssignmentManager assignmentManager;
 
     SingleServerBulkAssigner(final HServerInfo regionserver,
-        final List<HRegionInfo> regions, final AssignmentManager am) {
+        final List<HRegionInfo> regions, final AssignmentManager am,
+        final boolean startUp) {
       this.regionserver = regionserver;
       this.regions = regions;
       this.assignmentManager = am;
@@ -1366,6 +1383,40 @@ public class AssignmentManager extends Z
   }
 
   /**
+   * Wait until no regions from set regions are in transition.
+   * @param timeout How long to wait.
+   * @param regions set of regions to wait for
+   * @return True if nothing in regions in transition.
+   * @throws InterruptedException
+   */
+  boolean waitUntilNoRegionsInTransition(final long timeout, Set<HRegionInfo> regions)
+  throws InterruptedException {
+    // Blocks until there are no regions in transition.
+    long startTime = System.currentTimeMillis();
+    long remaining = timeout;
+    boolean stillInTransition = true;
+    synchronized (regionsInTransition) {
+      while (regionsInTransition.size() > 0 && !this.master.isStopped() &&
+          remaining > 0 && stillInTransition) {
+        int count = 0;
+        for (RegionState rs : regionsInTransition.values()) {
+          if (regions.contains(rs.getRegion())) {
+            count++;
+            break;
+          }
+        }
+        if (count == 0) {
+          stillInTransition = false;
+          break;
+        }
+        regionsInTransition.wait(remaining);
+        remaining = timeout - (System.currentTimeMillis() - startTime);
+      }
+    }
+    return stillInTransition;
+  }
+
+  /**
    * Rebuild the list of user regions and assignment information.
    * <p>
    * Returns a map of servers that are not found to be online and the regions
@@ -1875,6 +1926,30 @@ public class AssignmentManager extends Z
   }
 
   /**
+   * Assigns list of user regions in round-robin fashion, if any.
+   * @param sync True if we are to wait on all assigns.
+   * @param startup True if this is server startup time.
+   * @throws InterruptedException
+   * @throws IOException
+   */
+  void bulkAssignUserRegions(final HRegionInfo [] regions,
+      final List<HServerInfo> servers, final boolean sync)
+  throws IOException {
+    Map<HServerInfo, List<HRegionInfo>> bulkPlan =
+      LoadBalancer.roundRobinAssignment(java.util.Arrays.asList(regions), servers);
+    LOG.info("Bulk assigning " + regions.length + " region(s) " +
+      "round-robin across " + servers.size() + " server(s)");
+    // Use fixed count thread pool assigning.
+    BulkAssigner ba = new GeneralBulkAssigner(this.master, bulkPlan, this);
+    try {
+      ba.bulkAssign(sync);
+    } catch (InterruptedException e) {
+      throw new IOException("InterruptedException bulk assigning", e);
+    }
+    LOG.info("Bulk assigning done");
+  }
+
+  /**
    * State of a Region while undergoing transitions.
    */
   public static class RegionState implements Writable {

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/BulkAssigner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/BulkAssigner.java?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/BulkAssigner.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/BulkAssigner.java Sat
Apr  9 04:00:04 2011
@@ -30,7 +30,9 @@ import com.google.common.util.concurrent
  * Base class used bulk assigning and unassigning regions.
  * Encapsulates a fixed size thread pool of executors to run assignment/unassignment.
  * Implement {@link #populatePool(java.util.concurrent.ExecutorService)} and
- * {@link #waitUntilDone(long)}.
+ * {@link #waitUntilDone(long)}.  The default implementation of
+ * the {@link #getUncaughtExceptionHandler()} is to abort the hosting
+ * Server.
  */
 public abstract class BulkAssigner {
   final Server server;
@@ -42,8 +44,11 @@ public abstract class BulkAssigner {
     this.server = server;
   }
 
+  /**
+   * @return What to use for a thread prefix when executor runs.
+   */
   protected String getThreadNamePrefix() {
-    return this.server.getServerName() + "-BulkAssigner";
+    return this.server.getServerName() + "-" + this.getClass().getName(); 
   }
 
   protected UncaughtExceptionHandler getUncaughtExceptionHandler() {
@@ -63,17 +68,22 @@ public abstract class BulkAssigner {
 
   protected long getTimeoutOnRIT() {
     return this.server.getConfiguration().
-      getLong("hbase.bulk.assignment.waiton.empty.rit", 10 * 60 * 1000);
+      getLong("hbase.bulk.assignment.waiton.empty.rit", 5 * 60 * 1000);
   }
 
   protected abstract void populatePool(final java.util.concurrent.ExecutorService pool);
 
+  public boolean bulkAssign() throws InterruptedException {
+    return bulkAssign(true);
+  }
+
   /**
    * Run the bulk assign.
+   * @param sync Whether to assign synchronously.
    * @throws InterruptedException
    * @return True if done.
    */
-  public boolean bulkAssign() throws InterruptedException {
+  public boolean bulkAssign(boolean sync) throws InterruptedException {
     boolean result = false;
     ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
     builder.setDaemon(true);
@@ -86,7 +96,7 @@ public abstract class BulkAssigner {
       populatePool(pool);
       // How long to wait on empty regions-in-transition.  If we timeout, the
       // RIT monitor should do fixup.
-      result = waitUntilDone(getTimeoutOnRIT());
+      if (sync) result = waitUntilDone(getTimeoutOnRIT());
     } finally {
       // We're done with the pool.  It'll exit when its done all in queue.
       pool.shutdown();
@@ -102,4 +112,4 @@ public abstract class BulkAssigner {
    */
   protected abstract boolean waitUntilDone(final long timeout)
   throws InterruptedException;
-}
+}
\ No newline at end of file

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Sat Apr
 9 04:00:04 2011
@@ -781,25 +781,24 @@ implements HMasterInterface, HMasterRegi
   }
 
   private synchronized void createTable(final HRegionInfo [] newRegions,
-      boolean sync)
+      final boolean sync)
   throws IOException {
     String tableName = newRegions[0].getTableDesc().getNameAsString();
     if(MetaReader.tableExists(catalogTracker, tableName)) {
       throw new TableExistsException(tableName);
     }
-    for(HRegionInfo newRegion : newRegions) {
-
+    for (HRegionInfo newRegion : newRegions) {
       // 1. Set table enabling flag up in zk.
       try {
         assignmentManager.getZKTable().setEnabledTable(tableName);
       } catch (KeeperException e) {
         throw new IOException("Unable to ensure that the table will be" +
-            " enabled because of a ZooKeeper issue", e);
+          " enabled because of a ZooKeeper issue", e);
       }
 
       // 2. Create HRegion
       HRegion region = HRegion.createHRegion(newRegion,
-          fileSystemManager.getRootDir(), conf);
+        fileSystemManager.getRootDir(), conf);
 
       // 3. Insert into META
       MetaEditor.addRegionToMeta(catalogTracker, region.getRegionInfo());
@@ -811,23 +810,18 @@ implements HMasterInterface, HMasterRegi
 
     // 5. Trigger immediate assignment of the regions in round-robin fashion
     List<HServerInfo> servers = serverManager.getOnlineServersList();
-    try {
-      this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers);
-    } catch (InterruptedException ie) {
-      LOG.error("Caught " + ie + " during round-robin assignment");
-      throw new IOException(ie);
-    }
+    this.assignmentManager.bulkAssignUserRegions(newRegions, servers, sync);
 
-    // 5. If sync, wait for assignment of regions
-    if(sync) {
-      LOG.debug("Waiting for " + newRegions.length + " region(s) to be " +
-          "assigned before returning");
-      for(HRegionInfo regionInfo : newRegions) {
+    // 6. If sync, wait for assignment of regions
+    if (sync) {
+      LOG.debug("Waiting for " + newRegions.length + " region(s) to be assigned");
+      for (HRegionInfo regionInfo : newRegions) {
         try {
-          assignmentManager.waitForAssignment(regionInfo);
+          this.assignmentManager.waitForAssignment(regionInfo);
         } catch (InterruptedException e) {
           LOG.info("Interrupted waiting for region to be assigned during " +
-              "create table call");
+              "create table call", e);
+          Thread.currentThread().interrupt();
           return;
         }
       }

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java Sat
Apr  9 04:00:04 2011
@@ -403,7 +403,7 @@ public class LoadBalancer {
    * @return map of server to the regions it should take, or null if no
    *         assignment is possible (ie. no regions or no servers)
    */
-  public static Map<HServerInfo,List<HRegionInfo>> roundRobinAssignment(
+  public static Map<HServerInfo, List<HRegionInfo>> roundRobinAssignment(
       List<HRegionInfo> regions, List<HServerInfo> servers) {
     if(regions.size() == 0 || servers.size() == 0) {
       return null;

Modified: hbase/branches/0.90/src/main/ruby/hbase.rb
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/ruby/hbase.rb?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/ruby/hbase.rb (original)
+++ hbase/branches/0.90/src/main/ruby/hbase.rb Sat Apr  9 04:00:04 2011
@@ -36,6 +36,7 @@ module HBaseConstants
   COLUMN = "COLUMN"
   COLUMNS = "COLUMNS"
   TIMESTAMP = "TIMESTAMP"
+  TIMERANGE = "TIMERANGE"
   NAME = org.apache.hadoop.hbase.HConstants::NAME
   VERSIONS = org.apache.hadoop.hbase.HConstants::VERSIONS
   IN_MEMORY = org.apache.hadoop.hbase.HConstants::IN_MEMORY

Modified: hbase/branches/0.90/src/main/ruby/hbase/table.rb
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/ruby/hbase/table.rb?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/ruby/hbase/table.rb (original)
+++ hbase/branches/0.90/src/main/ruby/hbase/table.rb Sat Apr  9 04:00:04 2011
@@ -120,6 +120,11 @@ module Hbase
 
       unless args.empty?
         columns = args[COLUMN] || args[COLUMNS]
+        if args[VERSIONS]
+          vers = args[VERSIONS]
+        else
+          vers = 1
+        end
         if columns
           # Normalize types, convert string to an array of strings
           columns = [ columns ] if columns.is_a?(String)
@@ -140,16 +145,19 @@ module Hbase
           end
 
           # Additional params
-          get.setMaxVersions(args[VERSIONS] || 1)
+          get.setMaxVersions(vers)
           get.setTimeStamp(args[TIMESTAMP]) if args[TIMESTAMP]
+          get.setTimeRange(args[TIMERANGE][0], args[TIMERANGE][1]) if args[TIMERANGE]
         else
           # May have passed TIMESTAMP and row only; wants all columns from ts.
-          unless ts = args[TIMESTAMP]
+          unless ts = args[TIMESTAMP] || tr = args[TIMERANGE]
             raise ArgumentError, "Failed parse of #{args.inspect}, #{args.class}"
           end
 
-          # Set the timestamp
-          get.setTimeStamp(ts.to_i)
+          get.setMaxVersions(vers)
+          # Set the timestamp/timerange
+          get.setTimeStamp(ts.to_i) if args[TIMESTAMP]
+          get.setTimeRange(args[TIMERANGE][0], args[TIMERANGE][1]) if args[TIMERANGE]
         end
       end
 

Modified: hbase/branches/0.90/src/main/ruby/shell/commands/get.rb
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/ruby/shell/commands/get.rb?rev=1090520&r1=1090519&r2=1090520&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/ruby/shell/commands/get.rb (original)
+++ hbase/branches/0.90/src/main/ruby/shell/commands/get.rb Sat Apr  9 04:00:04 2011
@@ -27,9 +27,11 @@ Get row or cell contents; pass table nam
 a dictionary of column(s), timestamp and versions. Examples:
 
   hbase> get 't1', 'r1'
+  hbase> get 't1', 'r1', {TIMERANGE => [ts1, ts2]}
   hbase> get 't1', 'r1', {COLUMN => 'c1'}
   hbase> get 't1', 'r1', {COLUMN => ['c1', 'c2', 'c3']}
   hbase> get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1}
+  hbase> get 't1', 'r1', {COLUMN => 'c1', TIMERANGE => [ts1, ts2], VERSIONS =>
4}
   hbase> get 't1', 'r1', {COLUMN => 'c1', TIMESTAMP => ts1, VERSIONS => 4}
   hbase> get 't1', 'r1', 'c1'
   hbase> get 't1', 'r1', 'c1', 'c2'



Mime
View raw message