HBASE-19649 Use singleton feature for ImmutableSegment
Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
9e141d12a4
commit
24b7fc92f0
@ -18,15 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase.regionserver;
|
package org.apache.hadoop.hbase.regionserver;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
|
||||||
import org.apache.hadoop.hbase.util.ClassSize;
|
|
||||||
import org.apache.hadoop.hbase.CellComparator;
|
|
||||||
import org.apache.hadoop.hbase.io.TimeRange;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.apache.hadoop.hbase.CellComparator;
|
||||||
|
import org.apache.hadoop.hbase.util.ClassSize;
|
||||||
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ImmutableSegment is an abstract class that extends the API supported by a {@link Segment},
|
* ImmutableSegment is an abstract class that extends the API supported by a {@link Segment},
|
||||||
@ -75,8 +71,7 @@ public abstract class ImmutableSegment extends Segment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Segment> getAllSegments() {
|
public List<Segment> getAllSegments() {
|
||||||
List<Segment> res = new ArrayList<>(Arrays.asList(this));
|
return Collections.singletonList(this);
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user