diff --git a/bin/hbase b/bin/hbase index e19fd1d7aea..ab4913d1e9b 100755 --- a/bin/hbase +++ b/bin/hbase @@ -645,7 +645,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 831ee18e70a..4d68d79db70 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 c7093ddd9d4..78adf7cce00 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 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 508cf829bc9..d546070db71 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 92fdfda1e07..16585014224 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 or Left commits,") .endOfLine(); printer.print("'d' or toggles display, 's' sets sort. Use 'q' or 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 e4cd3867004..b22aee0356c 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 @@ -234,8 +234,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 096bbfc6dca..da0d917a826 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 e7095698566..9dec51e0ce8 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 bad2a00aec4..905e4c8fd7a 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 @@ -232,7 +232,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)); @@ -255,7 +255,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 3cb11076141..beb0ee8075d 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/ClientModeTest.java b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestClientMode.java similarity index 95% rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/ClientModeTest.java rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestClientMode.java index 82dbe45e822..106cfe4af47 100644 --- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/ClientModeTest.java +++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestClientMode.java @@ -32,10 +32,10 @@ import org.junit.ClassRule; import org.junit.experimental.categories.Category; @Category(SmallTests.class) -public class ClientModeTest extends ModeTestBase { +public class TestClientMode extends TestModeBase { @ClassRule public static final HBaseClassTestRule CLASS_RULE = - HBaseClassTestRule.forClass(ClientModeTest.class); + HBaseClassTestRule.forClass(TestClientMode.class); @Override protected Mode getMode() { return Mode.CLIENT; 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 2b6db84e047..a52b332265b 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 ace29b3f234..04fd03d1663 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 36ad3473eb9..ed397f6adc6 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 93fa5c463b0..ec29fd38f0a 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 716ce260e9f..722aa2db03a 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 11265715c01..6889639f458 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/mode/UserModeTest.java b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestUserMode.java similarity index 95% rename from hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/UserModeTest.java rename to hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestUserMode.java index 32e111c78d9..92ca7767936 100644 --- a/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/UserModeTest.java +++ b/hbase-hbtop/src/test/java/org/apache/hadoop/hbase/hbtop/mode/TestUserMode.java @@ -32,11 +32,11 @@ import org.junit.ClassRule; import org.junit.experimental.categories.Category; @Category(SmallTests.class) -public class UserModeTest extends ModeTestBase { +public class TestUserMode extends TestModeBase { @ClassRule public static final HBaseClassTestRule CLASS_RULE = - HBaseClassTestRule.forClass(UserModeTest.class); + HBaseClassTestRule.forClass(TestUserMode.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 944e54841f3..2e2931fd1c1 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 7c920edf086..0f7b4e3d063 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 f1343a02d58..e6c75b5737d 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 f3c4a24b0ef..99c29c92d13 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 cfe08e0d75d..a5357cc303e 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 836caf905db..d4507597579 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 cf9606b0851..7cba9f6aef3 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 ae09ada098e..08a399c5620 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 5f42767e6dd..6bd214afef0 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 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 bf3b01942ff..304c92b8497 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 { +public final class TestCursor { - private CursorTest() { + 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 3c53e8db725..ebfe56981c4 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 { +public final class TestKeyPress { - private KeyPressTest() { + 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 2054d80bb23..212395fecaf 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 { +public final class TestTerminalPrinter { - private TerminalPrinterTest() { + private TestTerminalPrinter() { } public static void main(String[] args) throws Exception {