Index: CHANGES.txt =================================================================== --- CHANGES.txt (revision 1029105) +++ CHANGES.txt (revision 1029117) @@ -1063,6 +1063,8 @@ (Nicolas Spiegelberg via Stack) HBASE-3169 NPE when master joins running cluster if a RIT references a RS no longer present + HBASE-3174 Add ability for Get operations to enable/disable use of block + caching NEW FEATURES HBASE-1961 HBase EC2 scripts Index: src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java (revision 1029105) +++ src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPCProtocolVersion.java (revision 1029117) @@ -77,11 +77,8 @@ *
+ * This is true by default. When true, default settings of the table and
+ * family are used (this will never override caching blocks if the block
+ * cache is disabled for that family or entirely).
+ *
+ * @param cacheBlocks if false, default settings are overridden and blocks
+ * will not be cached
+ */
+ public void setCacheBlocks(boolean cacheBlocks) {
+ this.cacheBlocks = cacheBlocks;
+ }
+
+ /**
+ * Get whether blocks should be cached for this Get.
+ * @return true if default caching should be used, false if blocks should not
+ * be cached
+ */
+ public boolean getCacheBlocks() {
+ return cacheBlocks;
+ }
+
+ /**
* Method for retrieving the get's row
* @return row
*/
@@ -285,6 +309,8 @@
sb.append(Bytes.toString(this.row));
sb.append(", maxVersions=");
sb.append("").append(this.maxVersions);
+ sb.append(", cacheBlocks=");
+ sb.append(this.cacheBlocks);
sb.append(", timeRange=");
sb.append("[").append(this.tr.getMin()).append(",");
sb.append(this.tr.getMax()).append(")");
@@ -345,6 +371,7 @@
this.filter = (Filter)createForName(Bytes.toString(Bytes.readByteArray(in)));
this.filter.readFields(in);
}
+ this.cacheBlocks = in.readBoolean();
this.tr = new TimeRange();
tr.readFields(in);
int numFamilies = in.readInt();
@@ -379,6 +406,7 @@
Bytes.writeByteArray(out, Bytes.toBytes(filter.getClass().getName()));
filter.write(out);
}
+ out.writeBoolean(this.cacheBlocks);
tr.write(out);
out.writeInt(familyMap.size());
for(Map.Entry