Index: src/java/org/apache/hadoop/hbase/client/Put.java =================================================================== --- src/java/org/apache/hadoop/hbase/client/Put.java (revision 785830) +++ src/java/org/apache/hadoop/hbase/client/Put.java (working copy) @@ -46,6 +46,7 @@ private byte [] row = null; private long timestamp = HConstants.LATEST_TIMESTAMP; private long lockId = -1L; + private boolean writeToWAL = true; private Map> familyMap = new TreeMap>(Bytes.BYTES_COMPARATOR); @@ -207,6 +208,21 @@ } /** + * @return true if edits should be applied to WAL, false if not + */ + public boolean writeToWAL() { + return this.writeToWAL; + } + + /** + * Set whether this Put should be written to the WAL or not. + * @param writeToWAL true if edits should be written to WAL, false if not + */ + public void writeToWAL(boolean writeToWAL) { + this.writeToWAL = writeToWAL; + } + + /** * @return String */ @Override @@ -261,6 +277,7 @@ this.row = Bytes.readByteArray(in); this.timestamp = in.readLong(); this.lockId = in.readLong(); + this.writeToWAL = in.readBoolean(); int numFamilies = in.readInt(); this.familyMap = new TreeMap>(Bytes.BYTES_COMPARATOR); @@ -286,6 +303,7 @@ Bytes.writeByteArray(out, this.row); out.writeLong(this.timestamp); out.writeLong(this.lockId); + out.writeBoolean(this.writeToWAL); out.writeInt(familyMap.size()); for(Map.Entry> entry : familyMap.entrySet()) { Bytes.writeByteArray(out, entry.getKey()); Index: src/java/org/apache/hadoop/hbase/regionserver/HRegion.java =================================================================== --- src/java/org/apache/hadoop/hbase/regionserver/HRegion.java (revision 785830) +++ src/java/org/apache/hadoop/hbase/regionserver/HRegion.java (working copy) @@ -1176,7 +1176,7 @@ * @throws IOException */ public void put(Put put) throws IOException { - this.put(put, null, true); + this.put(put, null, put.writeToWAL()); } /** @@ -1194,7 +1194,7 @@ * @throws IOException */ public void put(Put put, Integer lockid) throws IOException { - this.put(put, lockid, true); + this.put(put, lockid, put.writeToWAL()); } /**