@InterfaceAudience.Private public class RegionInfoBuilder extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
RegionInfoBuilder.MutableRegionInfo
An implementation of RegionInfo that adds mutable methods so can build a RegionInfo instance.
|
Modifier and Type | Field and Description |
---|---|
static String |
ENCODED_REGION_NAME_REGEX
A non-capture group so that this can be embedded.
|
private byte[] |
endKey |
static RegionInfo |
FIRST_META_REGIONINFO
RegionInfo for first meta region
You cannot use this builder to make an instance of the
FIRST_META_REGIONINFO . |
private static org.slf4j.Logger |
LOG |
private static int |
MAX_REPLICA_ID |
static String |
NO_HASH |
private boolean |
offLine |
private long |
regionId |
private int |
replicaId |
private boolean |
split |
private byte[] |
startKey |
private TableName |
tableName |
Modifier | Constructor and Description |
---|---|
private |
RegionInfoBuilder(RegionInfo regionInfo) |
private |
RegionInfoBuilder(TableName tableName) |
Modifier and Type | Method and Description |
---|---|
RegionInfo |
build() |
static RegionInfoBuilder |
newBuilder(RegionInfo regionInfo) |
static RegionInfoBuilder |
newBuilder(TableName tableName) |
RegionInfoBuilder |
setEndKey(byte[] endKey) |
RegionInfoBuilder |
setOffline(boolean offLine) |
RegionInfoBuilder |
setRegionId(long regionId) |
RegionInfoBuilder |
setReplicaId(int replicaId) |
RegionInfoBuilder |
setSplit(boolean split) |
RegionInfoBuilder |
setStartKey(byte[] startKey) |
private static final org.slf4j.Logger LOG
public static final String ENCODED_REGION_NAME_REGEX
private static final int MAX_REPLICA_ID
public static final RegionInfo FIRST_META_REGIONINFO
FIRST_META_REGIONINFO
.
Just refer to this instance. Also, while the instance is actually a MutableRI, its type is
just RI so the mutable methods are not available (unless you go casting); it appears
as immutable (I tried adding Immutable type but it just makes a mess).private byte[] startKey
private byte[] endKey
private long regionId
private int replicaId
private boolean offLine
private boolean split
private RegionInfoBuilder(TableName tableName)
private RegionInfoBuilder(RegionInfo regionInfo)
public static RegionInfoBuilder newBuilder(TableName tableName)
public static RegionInfoBuilder newBuilder(RegionInfo regionInfo)
public RegionInfoBuilder setStartKey(byte[] startKey)
public RegionInfoBuilder setEndKey(byte[] endKey)
public RegionInfoBuilder setRegionId(long regionId)
public RegionInfoBuilder setReplicaId(int replicaId)
public RegionInfoBuilder setSplit(boolean split)
public RegionInfoBuilder setOffline(boolean offLine)
public RegionInfo build()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.