hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brfrn...@apache.org
Subject [hbase] branch branch-2.1 updated: HBASE-23165 [hbtop] Some modifications from HBASE-22988 (#987)
Date Sat, 11 Jan 2020 12:40:19 GMT
This is an automated email from the ASF dual-hosted git repository.

brfrn169 pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 5598d26  HBASE-23165 [hbtop] Some modifications from HBASE-22988 (#987)
5598d26 is described below

commit 5598d26a4c8aa9db4989eebcc314fd5285228672
Author: Toshihiro Suzuki <brfrn169@gmail.com>
AuthorDate: Sat Jan 11 21:06:07 2020 +0900

    HBASE-23165 [hbtop] Some modifications from HBASE-22988 (#987)
    
    Signed-off-by: stack <stack@apache.org>
---
 bin/hbase                                                   |  5 ++++-
 conf/log4j-hbtop.properties                                 |  2 +-
 .../java/org/apache/hadoop/hbase/hbtop/RecordFilter.java    |  3 +++
 .../hadoop/hbase/hbtop/mode/RequestCountPerSecond.java      | 13 +++++++------
 .../hadoop/hbase/hbtop/screen/field/FieldScreenView.java    |  4 ++--
 .../hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java   |  4 ++--
 .../hadoop/hbase/hbtop/{RecordTest.java => TestRecord.java} |  4 ++--
 .../hbtop/{RecordFilterTest.java => TestRecordFilter.java}  |  4 ++--
 .../test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java  |  4 ++--
 .../field/{FieldValueTest.java => TestFieldValue.java}      |  4 ++--
 .../hbtop/mode/{ModeTestBase.java => TestModeBase.java}     |  2 +-
 .../mode/{NamespaceModeTest.java => TestNamespaceMode.java} |  4 ++--
 .../hbtop/mode/{RegionModeTest.java => TestRegionMode.java} |  4 ++--
 ...{RegionServerModeTest.java => TestRegionServerMode.java} |  4 ++--
 ...untPerSecondTest.java => TestRequestCountPerSecond.java} |  4 ++--
 .../hbtop/mode/{TableModeTest.java => TestTableMode.java}   |  4 ++--
 ...reenPresenterTest.java => TestFieldScreenPresenter.java} |  4 ++--
 ...creenPresenterTest.java => TestHelpScreenPresenter.java} |  4 ++--
 ...creenPresenterTest.java => TestModeScreenPresenter.java} |  4 ++--
 ...rTest.java => TestFilterDisplayModeScreenPresenter.java} |  4 ++--
 ...PresenterTest.java => TestInputModeScreenPresenter.java} |  4 ++--
 ...esenterTest.java => TestMessageModeScreenPresenter.java} |  4 ++--
 .../hbtop/screen/top/{PagingTest.java => TestPaging.java}   |  4 ++--
 .../{TopScreenModelTest.java => TestTopScreenModel.java}    |  4 ++--
 ...ScreenPresenterTest.java => TestTopScreenPresenter.java} |  4 ++--
 .../terminal/{CursorTest.java => impl/TestCursor.java}      | 10 ++++++----
 .../terminal/{KeyPressTest.java => impl/TestKeyPress.java}  | 10 ++++++----
 .../TestTerminalPrinter.java}                               | 11 +++++++----
 28 files changed, 75 insertions(+), 61 deletions(-)

diff --git a/bin/hbase b/bin/hbase
index d16d3f4..b962fc2 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -637,7 +637,10 @@ elif [ "$COMMAND" = "hbtop" ] ; then
     done
   fi
 
-  HBASE_OPTS="${HBASE_OPTS} -Dlog4j.configuration=file:${HBASE_HOME}/conf/log4j-hbtop.properties"
+  if [ -f "${HBASE_HOME}/conf/log4j-hbtop.properties" ] ; then
+    HBASE_HBTOP_OPTS="${HBASE_HBTOP_OPTS} -Dlog4j.configuration=file:${HBASE_HOME}/conf/log4j-hbtop.properties"
+  fi
+  HBASE_OPTS="${HBASE_OPTS} ${HBASE_HBTOP_OPTS}"
 else
   CLASS=$COMMAND
 fi
diff --git a/conf/log4j-hbtop.properties b/conf/log4j-hbtop.properties
index 831ee18..4d68d79 100644
--- a/conf/log4j-hbtop.properties
+++ b/conf/log4j-hbtop.properties
@@ -24,4 +24,4 @@ log4j.appender.console.layout=org.apache.log4j.PatternLayout
 log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n
 
 # ZooKeeper will still put stuff at WARN
-log4j.logger.org.apache.zookeeper=ERROR
\ No newline at end of file
+log4j.logger.org.apache.zookeeper=ERROR
diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/RecordFilter.java b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/RecordFilter.java
index aaef965..dfe01d7 100644
--- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/RecordFilter.java
+++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/RecordFilter.java
@@ -55,6 +55,9 @@ public final class RecordFilter {
     return parse(filterString, Arrays.asList(Field.values()), ignoreCase);
   }
 
+  /*
+   * Parse a filter string and build a RecordFilter instance.
+   */
   public static RecordFilter parse(String filterString, List<Field> fields, boolean
ignoreCase) {
     int index = 0;
 
diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecond.java
b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecond.java
index 508cf82..d546070 100644
--- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecond.java
+++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecond.java
@@ -41,13 +41,14 @@ public class RequestCountPerSecond {
       previousFilteredReadRequestCount = filteredReadRequestCount;
       previousWriteRequestCount = writeRequestCount;
     } else if (previousLastReportTimestamp != lastReportTimestamp) {
-      readRequestCountPerSecond = (readRequestCount - previousReadRequestCount) /
-        ((lastReportTimestamp - previousLastReportTimestamp) / 1000);
+      long delta = (lastReportTimestamp - previousLastReportTimestamp) / 1000;
+      if (delta < 1) {
+        delta = 1;
+      }
+      readRequestCountPerSecond = (readRequestCount - previousReadRequestCount) / delta;
       filteredReadRequestCountPerSecond =
-        (filteredReadRequestCount - previousFilteredReadRequestCount) /
-        ((lastReportTimestamp - previousLastReportTimestamp) / 1000);
-      writeRequestCountPerSecond = (writeRequestCount - previousWriteRequestCount) /
-        ((lastReportTimestamp - previousLastReportTimestamp) / 1000);
+        (filteredReadRequestCount - previousFilteredReadRequestCount) / delta;
+      writeRequestCountPerSecond = (writeRequestCount - previousWriteRequestCount) / delta;
 
       previousLastReportTimestamp = lastReportTimestamp;
       previousReadRequestCount = readRequestCount;
diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenView.java
b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenView.java
index 92fdfda..1658501 100644
--- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenView.java
+++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenView.java
@@ -129,10 +129,10 @@ public class FieldScreenView extends AbstractScreenView {
     }
   }
 
-  public void showScreenDescription(String sortKeyHeader) {
+  public void showScreenDescription(String sortFieldHeader) {
     TerminalPrinter printer = getTerminalPrinter(SCREEN_DESCRIPTION_START_ROW);
     printer.startBold().print("Fields Management").stopBold().endOfLine();
-    printer.print("Current Sort Field: ").startBold().print(sortKeyHeader).stopBold().endOfLine();
+    printer.print("Current Sort Field: ").startBold().print(sortFieldHeader).stopBold().endOfLine();
     printer.print("Navigate with up/down, Right selects for move then <Enter> or Left
commits,")
       .endOfLine();
     printer.print("'d' or <Space> toggles display, 's' sets sort. Use 'q' or <Esc>
to end!")
diff --git a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java
b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java
index d435f5c..b53c037 100644
--- a/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java
+++ b/hbase-hbtop/src/main/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenter.java
@@ -233,8 +233,8 @@ public class TopScreenPresenter {
     return new FieldScreenView(screen, terminal,
       topScreenModel.getCurrentSortField(), topScreenModel.getFields(),
       fieldDisplayMap,
-      (sortKey, fields, fieldDisplayMap) -> {
-        topScreenModel.setSortFieldAndFields(sortKey, fields);
+      (sortField, fields, fieldDisplayMap) -> {
+        topScreenModel.setSortFieldAndFields(sortField, fields);
         this.fieldDisplayMap.clear();
         this.fieldDisplayMap.putAll(fieldDisplayMap);
       }, topScreenView);
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/RecordTest.java b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestRecord.java
similarity index 97%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/RecordTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestRecord.java
index 096bbfc..da0d917 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/RecordTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestRecord.java
@@ -30,11 +30,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class RecordTest {
+public class TestRecord {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(RecordTest.class);
+    HBaseClassTestRule.forClass(TestRecord.class);
 
   @Test
   public void testBuilder() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/RecordFilterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestRecordFilter.java
similarity index 98%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/RecordFilterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestRecordFilter.java
index e709569..9dec51e 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/RecordFilterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestRecordFilter.java
@@ -38,11 +38,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class RecordFilterTest {
+public class TestRecordFilter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(RecordFilterTest.class);
+    HBaseClassTestRule.forClass(TestRecordFilter.class);
 
   @Test
   public void testParseAndBuilder() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java
index 43a8447..4191a0a 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/TestUtils.java
@@ -213,7 +213,7 @@ public final class TestUtils {
     long requestCountPerSecond, long readRequestCountPerSecond,
     long filteredReadRequestCountPerSecond, long writeCountRequestPerSecond,
     Size storeFileSize, Size uncompressedStoreFileSize, int numStoreFiles,
-    Size memStoreSize, float Locality, String startKey, long compactingCellCount,
+    Size memStoreSize, float locality, String startKey, long compactingCellCount,
     long compactedCellCount, float compactionProgress, String lastMajorCompactionTime) {
     assertThat(record.size(), is(22));
     assertThat(record.get(Field.NAMESPACE).asString(), is(namespace));
@@ -236,7 +236,7 @@ public final class TestUtils {
       is(uncompressedStoreFileSize));
     assertThat(record.get(Field.NUM_STORE_FILES).asInt(), is(numStoreFiles));
     assertThat(record.get(Field.MEM_STORE_SIZE).asSize(), is(memStoreSize));
-    assertThat(record.get(Field.LOCALITY).asFloat(), is(Locality));
+    assertThat(record.get(Field.LOCALITY).asFloat(), is(locality));
     assertThat(record.get(Field.START_KEY).asString(), is(startKey));
     assertThat(record.get(Field.COMPACTING_CELL_COUNT).asLong(), is(compactingCellCount));
     assertThat(record.get(Field.COMPACTED_CELL_COUNT).asLong(), is(compactedCellCount));
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/field/FieldValueTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/field/TestFieldValue.java
similarity index 99%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/field/FieldValueTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/field/TestFieldValue.java
index 3cb1107..beb0ee8 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/field/FieldValueTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/field/TestFieldValue.java
@@ -30,11 +30,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class FieldValueTest {
+public class TestFieldValue {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(FieldValueTest.class);
+    HBaseClassTestRule.forClass(TestFieldValue.class);
 
   @Test
   public void testParseAndAsSomethingMethod() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/ModeTestBase.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestModeBase.java
similarity index 97%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/ModeTestBase.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestModeBase.java
index 7ad1a3a..efc11b0 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/ModeTestBase.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestModeBase.java
@@ -23,7 +23,7 @@ import org.apache.hadoop.hbase.hbtop.TestUtils;
 import org.junit.Test;
 
 
-public abstract class ModeTestBase {
+public abstract class TestModeBase {
 
   @Test
   public void testGetRecords() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/NamespaceModeTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestNamespaceMode.java
similarity index 95%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/NamespaceModeTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestNamespaceMode.java
index ace29b3..04fd03d 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/NamespaceModeTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestNamespaceMode.java
@@ -32,11 +32,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class NamespaceModeTest extends ModeTestBase {
+public class TestNamespaceMode extends TestModeBase {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(NamespaceModeTest.class);
+    HBaseClassTestRule.forClass(TestNamespaceMode.class);
 
   @Override
   protected Mode getMode() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RegionModeTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRegionMode.java
similarity index 94%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RegionModeTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRegionMode.java
index 36ad347..ed397f6 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RegionModeTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRegionMode.java
@@ -31,11 +31,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class RegionModeTest extends ModeTestBase {
+public class TestRegionMode extends TestModeBase {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(RegionModeTest.class);
+    HBaseClassTestRule.forClass(TestRegionMode.class);
 
   @Override
   protected Mode getMode() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RegionServerModeTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRegionServerMode.java
similarity index 95%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RegionServerModeTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRegionServerMode.java
index 93fa5c4..ec29fd3 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RegionServerModeTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRegionServerMode.java
@@ -32,11 +32,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class RegionServerModeTest extends ModeTestBase {
+public class TestRegionServerMode extends TestModeBase {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(RegionServerModeTest.class);
+    HBaseClassTestRule.forClass(TestRegionServerMode.class);
 
   @Override
   protected Mode getMode() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecondTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRequestCountPerSecond.java
similarity index 96%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecondTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRequestCountPerSecond.java
index 716ce26..722aa2d 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/RequestCountPerSecondTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestRequestCountPerSecond.java
@@ -28,11 +28,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class RequestCountPerSecondTest {
+public class TestRequestCountPerSecond {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(RequestCountPerSecondTest.class);
+    HBaseClassTestRule.forClass(TestRequestCountPerSecond.class);
 
   @Test
   public void test() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TableModeTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestTableMode.java
similarity index 96%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TableModeTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestTableMode.java
index 1126571..6889639 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TableModeTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestTableMode.java
@@ -32,11 +32,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class TableModeTest extends ModeTestBase {
+public class TestTableMode extends TestModeBase {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(TableModeTest.class);
+    HBaseClassTestRule.forClass(TestTableMode.class);
 
   @Override
   protected Mode getMode() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/field/TestFieldScreenPresenter.java
similarity index 98%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/field/TestFieldScreenPresenter.java
index 944e548..2e2931f 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/field/FieldScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/field/TestFieldScreenPresenter.java
@@ -47,11 +47,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class FieldScreenPresenterTest {
+public class TestFieldScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(FieldScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestFieldScreenPresenter.class);
 
   @Mock
   private FieldScreenView fieldScreenView;
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/help/HelpScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/help/TestHelpScreenPresenter.java
similarity index 95%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/help/HelpScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/help/TestHelpScreenPresenter.java
index 7c920ed..0f7b4e3 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/help/HelpScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/help/TestHelpScreenPresenter.java
@@ -37,11 +37,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class HelpScreenPresenterTest {
+public class TestHelpScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(HelpScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestHelpScreenPresenter.class);
 
   private static final long TEST_REFRESH_DELAY = 5;
 
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/mode/ModeScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/mode/TestModeScreenPresenter.java
similarity index 97%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/mode/ModeScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/mode/TestModeScreenPresenter.java
index f1343a0..e6c75b5 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/mode/ModeScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/mode/TestModeScreenPresenter.java
@@ -40,11 +40,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class ModeScreenPresenterTest {
+public class TestModeScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(ModeScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestModeScreenPresenter.class);
 
   @Mock
   private ModeScreenView modeScreenView;
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/FilterDisplayModeScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestFilterDisplayModeScreenPresenter.java
similarity index 95%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/FilterDisplayModeScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestFilterDisplayModeScreenPresenter.java
index f3c4a24..99c29c9 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/FilterDisplayModeScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestFilterDisplayModeScreenPresenter.java
@@ -42,11 +42,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class FilterDisplayModeScreenPresenterTest {
+public class TestFilterDisplayModeScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(FilterDisplayModeScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestFilterDisplayModeScreenPresenter.class);
 
   @Mock
   private FilterDisplayModeScreenView filterDisplayModeScreenView;
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/InputModeScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestInputModeScreenPresenter.java
similarity index 98%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/InputModeScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestInputModeScreenPresenter.java
index cfe08e0..a5357cc 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/InputModeScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestInputModeScreenPresenter.java
@@ -43,11 +43,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class InputModeScreenPresenterTest {
+public class TestInputModeScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(InputModeScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestInputModeScreenPresenter.class);
 
   private static final String TEST_INPUT_MESSAGE = "test input message";
 
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/MessageModeScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestMessageModeScreenPresenter.java
similarity index 95%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/MessageModeScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestMessageModeScreenPresenter.java
index 836caf9..d450759 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/MessageModeScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestMessageModeScreenPresenter.java
@@ -35,11 +35,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class MessageModeScreenPresenterTest {
+public class TestMessageModeScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(MessageModeScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestMessageModeScreenPresenter.class);
 
   private static final String TEST_MESSAGE = "test message";
 
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/PagingTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestPaging.java
similarity index 98%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/PagingTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestPaging.java
index cf9606b..7cba9f6 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/PagingTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestPaging.java
@@ -28,11 +28,11 @@ import org.junit.experimental.categories.Category;
 
 
 @Category(SmallTests.class)
-public class PagingTest {
+public class TestPaging {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(PagingTest.class);
+    HBaseClassTestRule.forClass(TestPaging.class);
 
   @Test
   public void testArrowUpAndArrowDown() {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenModelTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestTopScreenModel.java
similarity index 98%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenModelTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestTopScreenModel.java
index ae09ada..08a399c 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenModelTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestTopScreenModel.java
@@ -47,11 +47,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class TopScreenModelTest {
+public class TestTopScreenModel {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(TopScreenModelTest.class);
+    HBaseClassTestRule.forClass(TestTopScreenModel.class);
 
   @Mock
   private Admin admin;
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestTopScreenPresenter.java
similarity index 98%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestTopScreenPresenter.java
index 5f42767..6bd214a 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TopScreenPresenterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/screen/top/TestTopScreenPresenter.java
@@ -45,11 +45,11 @@ import org.mockito.runners.MockitoJUnitRunner;
 
 @Category(SmallTests.class)
 @RunWith(MockitoJUnitRunner.class)
-public class TopScreenPresenterTest {
+public class TestTopScreenPresenter {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-    HBaseClassTestRule.forClass(TopScreenPresenterTest.class);
+    HBaseClassTestRule.forClass(TestTopScreenPresenter.class);
 
   private static final List<FieldInfo> TEST_FIELD_INFOS = Arrays.asList(
     new FieldInfo(Field.REGION, 10, true),
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/CursorTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestCursor.java
similarity index 90%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/CursorTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestCursor.java
index bf3b019..304c92b 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/CursorTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestCursor.java
@@ -15,15 +15,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.hadoop.hbase.hbtop.terminal;
+package org.apache.hadoop.hbase.hbtop.terminal.impl;
 
 import java.util.concurrent.TimeUnit;
-import org.apache.hadoop.hbase.hbtop.terminal.impl.TerminalImpl;
 
+import org.apache.hadoop.hbase.hbtop.terminal.KeyPress;
+import org.apache.hadoop.hbase.hbtop.terminal.Terminal;
 
-public final class CursorTest {
 
-  private CursorTest() {
+public final class TestCursor {
+
+  private TestCursor() {
   }
 
   public static void main(String[] args) throws Exception {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/KeyPressTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestKeyPress.java
similarity index 86%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/KeyPressTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestKeyPress.java
index 3c53e8d..ebfe569 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/KeyPressTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestKeyPress.java
@@ -15,15 +15,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.hadoop.hbase.hbtop.terminal;
+package org.apache.hadoop.hbase.hbtop.terminal.impl;
 
 import java.util.concurrent.TimeUnit;
-import org.apache.hadoop.hbase.hbtop.terminal.impl.TerminalImpl;
 
+import org.apache.hadoop.hbase.hbtop.terminal.KeyPress;
+import org.apache.hadoop.hbase.hbtop.terminal.Terminal;
 
-public final class KeyPressTest {
 
-  private KeyPressTest() {
+public final class TestKeyPress {
+
+  private TestKeyPress() {
   }
 
   public static void main(String[] args) throws Exception {
diff --git a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/TerminalPrinterTest.java
b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestTerminalPrinter.java
similarity index 85%
rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/TerminalPrinterTest.java
rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestTerminalPrinter.java
index 2054d80..212395f 100644
--- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/TerminalPrinterTest.java
+++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/terminal/impl/TestTerminalPrinter.java
@@ -15,15 +15,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.hadoop.hbase.hbtop.terminal;
+package org.apache.hadoop.hbase.hbtop.terminal.impl;
 
 import java.util.concurrent.TimeUnit;
-import org.apache.hadoop.hbase.hbtop.terminal.impl.TerminalImpl;
 
+import org.apache.hadoop.hbase.hbtop.terminal.KeyPress;
+import org.apache.hadoop.hbase.hbtop.terminal.Terminal;
+import org.apache.hadoop.hbase.hbtop.terminal.TerminalPrinter;
 
-public final class TerminalPrinterTest {
 
-  private TerminalPrinterTest() {
+public final class TestTerminalPrinter {
+
+  private TestTerminalPrinter() {
   }
 
   public static void main(String[] args) throws Exception {


Mime
View raw message