hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1558993 - /hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
Date Fri, 17 Jan 2014 02:21:32 GMT
Author: enis
Date: Fri Jan 17 02:21:32 2014
New Revision: 1558993

URL: http://svn.apache.org/r1558993
Log:
HBASE-10368 Add Mutation.setWriteToWAL() back to 0.98

Modified:
    hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java

Modified: hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java?rev=1558993&r1=1558992&r2=1558993&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
(original)
+++ hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
Fri Jan 17 02:21:32 2014
@@ -81,7 +81,7 @@ public abstract class Mutation extends O
   protected byte [] row = null;
   protected long ts = HConstants.LATEST_TIMESTAMP;
   protected Durability durability = Durability.USE_DEFAULT;
-  
+
   // A Map sorted by column family.
   protected NavigableMap<byte [], List<Cell>> familyMap =
     new TreeMap<byte [], List<Cell>>(Bytes.BYTES_COMPARATOR);
@@ -210,6 +210,27 @@ public abstract class Mutation extends O
   }
 
   /**
+   * @deprecated Use {@link #getDurability()} instead.
+   * @return true if edits should be applied to WAL, false if not
+   */
+  @Deprecated
+  public boolean getWriteToWAL() {
+    return this.durability == Durability.SKIP_WAL;
+  }
+
+  /**
+   * Set whether this Delete should be written to the WAL or not.
+   * Not writing the WAL means you may lose edits on server crash.
+   * This method will reset any changes made via {@link #setDurability(Durability)}
+   * @param write true if edits should be written to WAL, false if not
+   * @deprecated Use {@link #setDurability(Durability)} instead.
+   */
+  @Deprecated
+  public void setWriteToWAL(boolean write) {
+    setDurability(write ? Durability.USE_DEFAULT : Durability.SKIP_WAL);
+  }
+
+  /**
    * Set the durability for this mutation
    * @param d
    */
@@ -288,6 +309,7 @@ public abstract class Mutation extends O
     return this.row;
   }
 
+  @Override
   public int compareTo(final Row d) {
     return Bytes.compareTo(this.getRow(), d.getRow());
   }



Mime
View raw message