hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject svn commit: r1550294 - in /hbase/trunk: hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/ hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/ hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/ hbase-server/...
Date Wed, 11 Dec 2013 22:20:00 GMT
Author: eclark
Date: Wed Dec 11 22:20:00 2013
New Revision: 1550294

URL: http://svn.apache.org/r1550294
Log:
HBASE-10124 Make Sub Classes Static When Possible

Modified:
    hbase/trunk/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
    hbase/trunk/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
    hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormat.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ServerNonceManager.java

Modified: hbase/trunk/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java?rev=1550294&r1=1550293&r2=1550294&view=diff
==============================================================================
--- hbase/trunk/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
(original)
+++ hbase/trunk/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
Wed Dec 11 22:20:00 2013
@@ -48,7 +48,7 @@ public class TestMetricsRegionSourceImpl
     CompatibilitySingletonFactory.getInstance(MetricsRegionSource.class);
   }
 
-  class RegionWrapperStub implements MetricsRegionWrapper {
+  static class RegionWrapperStub implements MetricsRegionWrapper {
 
     private String regionName;
 

Modified: hbase/trunk/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java?rev=1550294&r1=1550293&r2=1550294&view=diff
==============================================================================
--- hbase/trunk/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
(original)
+++ hbase/trunk/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
Wed Dec 11 22:20:00 2013
@@ -48,7 +48,7 @@ public class TestMetricsRegionSourceImpl
     CompatibilitySingletonFactory.getInstance(MetricsRegionSource.class);
   }
 
-  class RegionWrapperStub implements MetricsRegionWrapper {
+  static class RegionWrapperStub implements MetricsRegionWrapper {
 
     private String regionName;
 

Modified: hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java?rev=1550294&r1=1550293&r2=1550294&view=diff
==============================================================================
--- hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
(original)
+++ hbase/trunk/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
Wed Dec 11 22:20:00 2013
@@ -328,7 +328,7 @@ public class IntegrationTestMTTR {
    *
    * Stores times and trace id.
    */
-  private class TimingResult {
+  private static class TimingResult {
     DescriptiveStatistics stats = new DescriptiveStatistics();
     ArrayList<Long> traces = new ArrayList<Long>(10);
 
@@ -366,7 +366,7 @@ public class IntegrationTestMTTR {
   /**
    * Base class for actions that need to record the time needed to recover from a failure.
    */
-  public abstract class TimingCallable implements Callable<TimingResult> {
+  static abstract class TimingCallable implements Callable<TimingResult> {
     protected final Future<?> future;
 
     public TimingCallable(Future<?> f) {
@@ -456,7 +456,7 @@ public class IntegrationTestMTTR {
    * Callable that will keep putting small amounts of data into a table
    * until  the future supplied returns.  It keeps track of the max time.
    */
-  public class PutCallable extends TimingCallable {
+  static class PutCallable extends TimingCallable {
 
     private final HTable table;
 
@@ -484,7 +484,7 @@ public class IntegrationTestMTTR {
    * Callable that will keep scanning for small amounts of data until the
    * supplied future returns.  Returns the max time taken to scan.
    */
-  public class ScanCallable extends TimingCallable {
+  static class ScanCallable extends TimingCallable {
     private final HTable table;
 
     public ScanCallable(Future<?> f) throws IOException {
@@ -520,7 +520,7 @@ public class IntegrationTestMTTR {
   /**
    * Callable that will keep going to the master for cluster status.  Returns the max time
taken.
    */
-  public class AdminCallable extends TimingCallable {
+  static class AdminCallable extends TimingCallable {
 
     public AdminCallable(Future<?> f) throws IOException {
       super(f);
@@ -547,7 +547,7 @@ public class IntegrationTestMTTR {
   }
 
 
-  public class ActionCallable implements Callable<Boolean> {
+  static class ActionCallable implements Callable<Boolean> {
     private final Action action;
 
     public ActionCallable(Action action) {
@@ -565,7 +565,7 @@ public class IntegrationTestMTTR {
    * Callable used to make sure the cluster has some load on it.
    * This callable uses LoadTest tool to
    */
-  public class LoadCallable implements Callable<Boolean> {
+  public static class LoadCallable implements Callable<Boolean> {
 
     private final Future<?> future;
 

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormat.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormat.java?rev=1550294&r1=1550293&r2=1550294&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormat.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormat.java
Wed Dec 11 22:20:00 2013
@@ -185,7 +185,7 @@ public class TableSnapshotInputFormat ex
   }
 
   @VisibleForTesting
-  class TableSnapshotRegionRecordReader extends RecordReader<ImmutableBytesWritable, Result>
{
+  static class TableSnapshotRegionRecordReader extends RecordReader<ImmutableBytesWritable,
Result> {
     private TableSnapshotRegionSplit split;
     private Scan scan;
     private Result result = null;

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ServerNonceManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ServerNonceManager.java?rev=1550294&r1=1550293&r2=1550294&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ServerNonceManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ServerNonceManager.java
Wed Dec 11 22:20:00 2013
@@ -112,7 +112,7 @@ public class ServerNonceManager {
    * This implementation is not smart and just treats nonce group and nonce as random bits.
    */
   // TODO: we could use pure byte arrays, but then we wouldn't be able to use hash map.
-  private class NonceKey {
+  private static class NonceKey {
     private long group;
     private long nonce;
 



Mime
View raw message