hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1170025 - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase: HConstants.java client/Mutation.java
Date Tue, 13 Sep 2011 03:56:48 GMT
Author: tedyu
Date: Tue Sep 13 03:56:48 2011
New Revision: 1170025

URL: http://svn.apache.org/viewvc?rev=1170025&view=rev
Log:
HBASE-4347 addendum that moves CLUSTER_ID_ATTR to Mutation

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Mutation.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1170025&r1=1170024&r2=1170025&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/HConstants.java Tue Sep 13 03:56:48
2011
@@ -204,12 +204,6 @@ public final class HConstants {
   /** Configuration key storing the cluster ID */
   public static final String CLUSTER_ID = "hbase.cluster.id";
 
-  /**
-   * Attribute used in Puts and Gets to indicate the originating
-   * cluster.
-   */
-  public static final String CLUSTER_ID_ATTR = "_c.id_";
-
   // Always store the location of the root table's HRegion.
   // This HRegion is never split.
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Mutation.java?rev=1170025&r1=1170024&r2=1170025&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Mutation.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Mutation.java Tue Sep 13 03:56:48
2011
@@ -32,6 +32,9 @@ import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.util.Bytes;
 
 public abstract class Mutation extends OperationWithAttributes {
+  // Attribute used in Mutations to indicate the originating cluster.
+  private static final String CLUSTER_ID_ATTR = "_c.id_";
+
   protected byte [] row = null;
   protected long ts = HConstants.LATEST_TIMESTAMP;
   protected long lockId = -1L;
@@ -179,14 +182,14 @@ public abstract class Mutation extends O
     byte[] val = new byte[2*Bytes.SIZEOF_LONG];
     Bytes.putLong(val, 0, clusterId.getMostSignificantBits());
     Bytes.putLong(val, Bytes.SIZEOF_LONG, clusterId.getLeastSignificantBits());
-    setAttribute(HConstants.CLUSTER_ID_ATTR, val);
+    setAttribute(CLUSTER_ID_ATTR, val);
   }
 
   /**
    * @return The replication cluster id.
    */
   public UUID getClusterId() {
-    byte[] attr = getAttribute(HConstants.CLUSTER_ID_ATTR);
+    byte[] attr = getAttribute(CLUSTER_ID_ATTR);
     if (attr == null) {
       return HConstants.DEFAULT_CLUSTER_ID;
     }



Mime
View raw message