From f7ed0f18f5ca37295dce13296c68c38a76eb3d4c Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 23 Oct 2013 18:34:47 +0000 Subject: [PATCH] HBASE-9695 Some never used local variables cleanup git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1535112 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/hbase/filter/TestComparatorSerialization.java | 6 +++++- .../apache/hadoop/hbase/regionserver/TestQueryMatcher.java | 4 ---- .../java/org/apache/hadoop/hbase/regionserver/TestTags.java | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestComparatorSerialization.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestComparatorSerialization.java index 8a87af83d7b..c617cc0110a 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestComparatorSerialization.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestComparatorSerialization.java @@ -19,6 +19,7 @@ */ package org.apache.hadoop.hbase.filter; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.util.regex.Pattern; @@ -70,8 +71,11 @@ public class TestComparatorSerialization { ProtobufUtil.toComparator(ProtobufUtil.toComparator(regexStringComparator)))); // test with specifying flags - regexStringComparator = + try { new RegexStringComparator("regex", Pattern.CASE_INSENSITIVE | Pattern.DOTALL); + } catch (Throwable t) { + assertNull("Exception occured while created the RegexStringComparator object", t); + } } @Test diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java index aacebf65fbc..0e0d3b97a70 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java @@ -291,10 +291,6 @@ public class TestQueryMatcher extends HBaseTestCase { } public void testMatch_PartialRangeDropDeletes() throws Exception { - long now = EnvironmentEdgeManager.currentTimeMillis(); - ScanInfo scanInfo = new ScanInfo(fam2, 0, 1, ttl, false, 0, rowComparator); - NavigableSet cols = get.getFamilyMap().get(fam2); - // Some ranges. testDropDeletes( row2, row3, new byte[][] { row1, row2, row2, row3 }, INCLUDE, SKIP, SKIP, INCLUDE); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTags.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTags.java index eaf128fadf1..658289b645d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTags.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestTags.java @@ -453,10 +453,6 @@ public class TestTags { ((List) updatedCells).add(newKV); } } - // add new set of familymap to the put. Can we update the existing kvs - // itself - NavigableMap> familyMap = new TreeMap>( - Bytes.BYTES_COMPARATOR); put.getFamilyCellMap().remove(cf); // Update the family map put.getFamilyCellMap().put(cf, updatedCells);