From 2179b5cdc34737fd6ddeb23dbedd1d5e5cb6079b Mon Sep 17 00:00:00 2001 From: Brad Kim Date: Mon, 10 Mar 2014 18:08:01 +0900 Subject: [PATCH] add cache blocks option in HaeinsaGet --- src/main/java/kr/co/vcnc/haeinsa/HaeinsaGet.java | 9 +++++++++ src/main/java/kr/co/vcnc/haeinsa/HaeinsaTable.java | 1 + 2 files changed, 10 insertions(+) diff --git a/src/main/java/kr/co/vcnc/haeinsa/HaeinsaGet.java b/src/main/java/kr/co/vcnc/haeinsa/HaeinsaGet.java index a4811b4..650cd44 100644 --- a/src/main/java/kr/co/vcnc/haeinsa/HaeinsaGet.java +++ b/src/main/java/kr/co/vcnc/haeinsa/HaeinsaGet.java @@ -30,6 +30,7 @@ */ public class HaeinsaGet { private byte[] row; + private boolean cacheBlocks; private Map> familyMap = new TreeMap>(Bytes.BYTES_COMPARATOR); @@ -95,4 +96,12 @@ public byte[] getRow() { public Map> getFamilyMap() { return this.familyMap; } + + public void setCacheBlocks(boolean cacheBlocks) { + this.cacheBlocks = cacheBlocks; + } + + public boolean getCacheBlocks() { + return cacheBlocks; + } } diff --git a/src/main/java/kr/co/vcnc/haeinsa/HaeinsaTable.java b/src/main/java/kr/co/vcnc/haeinsa/HaeinsaTable.java index b41c1be..ca015a0 100644 --- a/src/main/java/kr/co/vcnc/haeinsa/HaeinsaTable.java +++ b/src/main/java/kr/co/vcnc/haeinsa/HaeinsaTable.java @@ -132,6 +132,7 @@ public HaeinsaResult get(@Nullable HaeinsaTransaction tx, HaeinsaGet get) throws HaeinsaRowTransaction rowState = tableState.getRowStates().get(row); boolean lockInclusive = false; Get hGet = new Get(get.getRow()); + hGet.setCacheBlocks(get.getCacheBlocks()); for (Entry> entry : get.getFamilyMap().entrySet()) { if (entry.getValue() == null) {