HBASE-10124 Make Sub Classes Static When Possible

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1550294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
eclark 2013-12-11 22:20:00 +00:00
parent 4b63043643
commit 1e0185468c
5 changed files with 11 additions and 11 deletions

View File

@ -48,7 +48,7 @@ public class TestMetricsRegionSourceImpl {
CompatibilitySingletonFactory.getInstance(MetricsRegionSource.class);
}
class RegionWrapperStub implements MetricsRegionWrapper {
static class RegionWrapperStub implements MetricsRegionWrapper {
private String regionName;

View File

@ -48,7 +48,7 @@ public class TestMetricsRegionSourceImpl {
CompatibilitySingletonFactory.getInstance(MetricsRegionSource.class);
}
class RegionWrapperStub implements MetricsRegionWrapper {
static class RegionWrapperStub implements MetricsRegionWrapper {
private String regionName;

View File

@ -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;

View File

@ -185,7 +185,7 @@ public class TableSnapshotInputFormat extends InputFormat<ImmutableBytesWritable
}
@VisibleForTesting
class TableSnapshotRegionRecordReader extends RecordReader<ImmutableBytesWritable, Result> {
static class TableSnapshotRegionRecordReader extends RecordReader<ImmutableBytesWritable, Result> {
private TableSnapshotRegionSplit split;
private Scan scan;
private Result result = null;

View File

@ -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;