Skip to content

Commit

Permalink
add cache blocks option in HaeinsaGet
Browse files Browse the repository at this point in the history
  • Loading branch information
0mok committed Mar 10, 2014
1 parent 6d3be9c commit 2179b5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/kr/co/vcnc/haeinsa/HaeinsaGet.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/
public class HaeinsaGet {
private byte[] row;
private boolean cacheBlocks;
private Map<byte[], NavigableSet<byte[]>> familyMap =
new TreeMap<byte[], NavigableSet<byte[]>>(Bytes.BYTES_COMPARATOR);

Expand Down Expand Up @@ -95,4 +96,12 @@ public byte[] getRow() {
public Map<byte[], NavigableSet<byte[]>> getFamilyMap() {
return this.familyMap;
}

public void setCacheBlocks(boolean cacheBlocks) {
this.cacheBlocks = cacheBlocks;
}

public boolean getCacheBlocks() {
return cacheBlocks;
}
}
1 change: 1 addition & 0 deletions src/main/java/kr/co/vcnc/haeinsa/HaeinsaTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<byte[], NavigableSet<byte[]>> entry : get.getFamilyMap().entrySet()) {
if (entry.getValue() == null) {
Expand Down

0 comments on commit 2179b5c

Please sign in to comment.