Skip to content

Commit

Permalink
Merge pull request #15 from VCNC/add-cache-blocks-option-in-get
Browse files Browse the repository at this point in the history
add cache blocks option in HaeinsaGet
  • Loading branch information
eincs committed Mar 10, 2014
2 parents 2fb6806 + 2179b5c commit 4079a63
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
Expand All @@ -27,7 +25,7 @@

<groupId>kr.co.vcnc.haeinsa</groupId>
<artifactId>haeinsa</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.0.2-SNAPSHOT</version>
<packaging>jar</packaging>

<name>haeinsa</name>
Expand Down Expand Up @@ -313,7 +311,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
Expand All @@ -326,7 +324,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
Expand Down
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 4079a63

Please sign in to comment.