HBASE-13305 Get(Get get) is not copying the row key

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Ashish Singhi 2015-03-21 20:38:59 +05:30 committed by stack
parent 8579c6dd49
commit b5c4d9a04f
2 changed files with 8 additions and 0 deletions

View File

@ -98,6 +98,7 @@ public class Get extends Query
* @param get
*/
public Get(Get get) {
this(get.getRow());
this.filter = get.getFilter();
this.cacheBlocks = get.getCacheBlocks();
this.maxVersions = get.getMaxVersions();

View File

@ -156,6 +156,13 @@ public class TestGet {
Assert.assertEquals(1, qualifiers.size());
}
@Test
public void TestGetRowFromGetCopyConstructor() throws Exception {
Get get = new Get(ROW);
Get copyGet = new Get(get);
assertEquals(0, Bytes.compareTo(get.getRow(), copyGet.getRow()));
}
@Test
public void testDynamicFilter() throws Exception {
Configuration conf = HBaseConfiguration.create();