@InterfaceAudience.Private public final class RequestConverter extends Object
Modifier and Type | Method and Description |
---|---|
static MasterProtos.AddColumnRequest |
buildAddColumnRequest(TableName tableName,
ColumnFamilyDescriptor column,
long nonceGroup,
long nonce)
Create a protocol buffer AddColumnRequest
|
static ReplicationProtos.AddReplicationPeerRequest |
buildAddReplicationPeerRequest(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled) |
static MasterProtos.AssignRegionRequest |
buildAssignRegionRequest(byte[] regionName)
Create a protocol buffer AssignRegionRequest
|
static MasterProtos.BalanceRequest |
buildBalanceRequest(boolean force)
Creates a protocol buffer BalanceRequest
|
static ClientProtos.BulkLoadHFileRequest |
buildBulkLoadHFileRequest(List<Pair<byte[],String>> familyPaths,
byte[] regionName,
boolean assignSeqNum,
org.apache.hadoop.security.token.Token<?> userToken,
String bulkToken)
Create a protocol buffer bulk load request
|
static ClientProtos.BulkLoadHFileRequest |
buildBulkLoadHFileRequest(List<Pair<byte[],String>> familyPaths,
byte[] regionName,
boolean assignSeqNum,
org.apache.hadoop.security.token.Token<?> userToken,
String bulkToken,
boolean copyFiles)
Create a protocol buffer bulk load request
|
static MasterProtos.RunCatalogScanRequest |
buildCatalogScanRequest()
Creates a request for running a catalog scan
|
static AdminProtos.ClearCompactionQueuesRequest |
buildClearCompactionQueuesRequest(Set<String> queues) |
static MasterProtos.ClearDeadServersRequest |
buildClearDeadServersRequest(Collection<ServerName> deadServers) |
static AdminProtos.ClearRegionBlockCacheRequest |
buildClearRegionBlockCacheRequest(List<RegionInfo> hris)
Creates a protocol buffer ClearRegionBlockCacheRequest
|
static AdminProtos.CompactRegionRequest |
buildCompactRegionRequest(byte[] regionName,
boolean major,
byte[] columnFamily)
Create a CompactRegionRequest for a given region name
|
static ClientProtos.Condition |
buildCondition(byte[] row,
byte[] family,
byte[] qualifier,
ByteArrayComparable comparator,
HBaseProtos.CompareType compareType,
TimeRange timeRange)
Create a protocol buffer Condition
|
static MasterProtos.CreateNamespaceRequest |
buildCreateNamespaceRequest(NamespaceDescriptor descriptor)
Creates a protocol buffer CreateNamespaceRequest
|
static MasterProtos.CreateTableRequest |
buildCreateTableRequest(TableDescriptor tableDescriptor,
byte[][] splitKeys,
long nonceGroup,
long nonce)
Creates a protocol buffer CreateTableRequest
|
static MasterProtos.DecommissionRegionServersRequest |
buildDecommissionRegionServersRequest(List<ServerName> servers,
boolean offload) |
static MasterProtos.DeleteColumnRequest |
buildDeleteColumnRequest(TableName tableName,
byte[] columnName,
long nonceGroup,
long nonce)
Create a protocol buffer DeleteColumnRequest
|
static MasterProtos.DeleteNamespaceRequest |
buildDeleteNamespaceRequest(String name)
Creates a protocol buffer DeleteNamespaceRequest
|
static MasterProtos.DeleteTableRequest |
buildDeleteTableRequest(TableName tableName,
long nonceGroup,
long nonce)
Creates a protocol buffer DeleteTableRequest
|
static ReplicationProtos.DisableReplicationPeerRequest |
buildDisableReplicationPeerRequest(String peerId) |
static MasterProtos.DisableTableRequest |
buildDisableTableRequest(TableName tableName,
long nonceGroup,
long nonce)
Creates a protocol buffer DisableTableRequest
|
static MasterProtos.EnableCatalogJanitorRequest |
buildEnableCatalogJanitorRequest(boolean enable)
Creates a request for enabling/disabling the catalog janitor
|
static ReplicationProtos.EnableReplicationPeerRequest |
buildEnableReplicationPeerRequest(String peerId) |
static MasterProtos.EnableTableRequest |
buildEnableTableRequest(TableName tableName,
long nonceGroup,
long nonce)
Creates a protocol buffer EnableTableRequest
|
static AdminProtos.FlushRegionRequest |
buildFlushRegionRequest(byte[] regionName)
Create a protocol buffer FlushRegionRequest for a given region name
|
static AdminProtos.FlushRegionRequest |
buildFlushRegionRequest(byte[] regionName,
boolean writeFlushWALMarker)
Create a protocol buffer FlushRegionRequest for a given region name
|
static MasterProtos.GetClusterStatusRequest |
buildGetClusterStatusRequest(EnumSet<ClusterMetrics.Option> options)
Creates a protocol buffer GetClusterStatusRequest
|
static RegionServerStatusProtos.GetLastFlushedSequenceIdRequest |
buildGetLastFlushedSequenceIdRequest(byte[] regionName)
Creates a request for querying the master the last flushed sequence Id for a region
|
static MasterProtos.GetNamespaceDescriptorRequest |
buildGetNamespaceDescriptorRequest(String name)
Creates a protocol buffer GetNamespaceDescriptorRequest
|
static AdminProtos.GetOnlineRegionRequest |
buildGetOnlineRegionRequest()
Create a protocol buffer GetOnlineRegionRequest
|
static QuotaProtos.GetQuotaStatesRequest |
buildGetQuotaStatesRequest()
Returns a
QuotaProtos.GetQuotaStatesRequest object. |
static AdminProtos.GetRegionInfoRequest |
buildGetRegionInfoRequest(byte[] regionName)
Create a protocol buffer GetRegionInfoRequest for a given region name
|
static AdminProtos.GetRegionInfoRequest |
buildGetRegionInfoRequest(byte[] regionName,
boolean includeCompactionState)
Create a protocol buffer GetRegionInfoRequest for a given region name
|
static AdminProtos.GetRegionInfoRequest |
buildGetRegionInfoRequest(byte[] regionName,
boolean includeCompactionState,
boolean includeBestSplitRow) |
static AdminProtos.GetRegionLoadRequest |
buildGetRegionLoadRequest(TableName tableName)
Create a protocol buffer GetRegionLoadRequest for all regions/regions of a table.
|
static ReplicationProtos.GetReplicationPeerConfigRequest |
buildGetReplicationPeerConfigRequest(String peerId) |
static ClientProtos.GetRequest |
buildGetRequest(byte[] regionName,
Get get)
Create a protocol buffer GetRequest for a client Get
|
static MasterProtos.GetSchemaAlterStatusRequest |
buildGetSchemaAlterStatusRequest(TableName tableName)
Creates a protocol buffer GetSchemaAlterStatusRequest
|
static AdminProtos.GetServerInfoRequest |
buildGetServerInfoRequest()
Create a new GetServerInfoRequest
|
static QuotaProtos.GetSpaceQuotaRegionSizesRequest |
buildGetSpaceQuotaRegionSizesRequest()
Returns a
QuotaProtos.GetSpaceQuotaRegionSizesRequest object. |
static QuotaProtos.GetSpaceQuotaSnapshotsRequest |
buildGetSpaceQuotaSnapshotsRequest()
Returns a
QuotaProtos.GetSpaceQuotaSnapshotsRequest object. |
static MasterProtos.GetTableDescriptorsRequest |
buildGetTableDescriptorsRequest(List<TableName> tableNames)
Creates a protocol buffer GetTableDescriptorsRequest
|
static MasterProtos.GetTableDescriptorsRequest |
buildGetTableDescriptorsRequest(Pattern pattern,
boolean includeSysTables)
Creates a protocol buffer GetTableDescriptorsRequest
|
static MasterProtos.GetTableDescriptorsRequest |
buildGetTableDescriptorsRequest(TableName tableName)
Creates a protocol buffer GetTableDescriptorsRequest for a single table
|
static MasterProtos.GetTableNamesRequest |
buildGetTableNamesRequest(Pattern pattern,
boolean includeSysTables)
Creates a protocol buffer GetTableNamesRequest
|
static MasterProtos.GetTableStateRequest |
buildGetTableStateRequest(TableName tableName)
Creates a protocol buffer GetTableStateRequest
|
static ClientProtos.MutateRequest |
buildIncrementRequest(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
long amount,
Durability durability,
long nonceGroup,
long nonce)
Create a protocol buffer MutateRequest for a client increment
|
static MasterProtos.IsBalancerEnabledRequest |
buildIsBalancerEnabledRequest()
Creates a protocol buffer IsBalancerEnabledRequest
|
static MasterProtos.IsCatalogJanitorEnabledRequest |
buildIsCatalogJanitorEnabledRequest()
Creates a request for querying the master whether the catalog janitor is enabled
|
static MasterProtos.IsCleanerChoreEnabledRequest |
buildIsCleanerChoreEnabledRequest()
Creates a request for querying the master whether the cleaner chore is enabled
|
static MasterProtos.IsMasterRunningRequest |
buildIsMasterRunningRequest()
Creates a protocol buffer IsMasterRunningRequest
|
static MasterProtos.IsNormalizerEnabledRequest |
buildIsNormalizerEnabledRequest()
Creates a protocol buffer IsNormalizerEnabledRequest
|
static MasterProtos.IsSplitOrMergeEnabledRequest |
buildIsSplitOrMergeEnabledRequest(MasterSwitchType switchType)
Creates a protocol buffer IsSplitOrMergeEnabledRequest
|
static ReplicationProtos.ListReplicationPeersRequest |
buildListReplicationPeersRequest(Pattern pattern) |
static MasterProtos.MergeTableRegionsRequest |
buildMergeTableRegionsRequest(byte[][] encodedNameOfdaughaterRegions,
boolean forcible,
long nonceGroup,
long nonce) |
static MasterProtos.ModifyColumnRequest |
buildModifyColumnRequest(TableName tableName,
ColumnFamilyDescriptor column,
long nonceGroup,
long nonce)
Create a protocol buffer ModifyColumnRequest
|
static MasterProtos.ModifyNamespaceRequest |
buildModifyNamespaceRequest(NamespaceDescriptor descriptor)
Creates a protocol buffer ModifyNamespaceRequest
|
static MasterProtos.ModifyTableRequest |
buildModifyTableRequest(TableName tableName,
TableDescriptor tableDesc,
long nonceGroup,
long nonce)
Creates a protocol buffer ModifyTableRequest
|
static MasterProtos.MoveRegionRequest |
buildMoveRegionRequest(byte[] encodedRegionName,
ServerName destServerName)
Create a protocol buffer MoveRegionRequest
|
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
Append append,
long nonceGroup,
long nonce)
Create a protocol buffer MutateRequest for an append
|
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
ByteArrayComparable comparator,
HBaseProtos.CompareType compareType,
TimeRange timeRange,
Delete delete)
Create a protocol buffer MutateRequest for a conditioned delete
|
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
ByteArrayComparable comparator,
HBaseProtos.CompareType compareType,
TimeRange timeRange,
Mutation mutation,
ClientProtos.MutationProto.MutationType type) |
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
ByteArrayComparable comparator,
HBaseProtos.CompareType compareType,
TimeRange timeRange,
Put put)
Create a protocol buffer MutateRequest for a conditioned put
|
static ClientProtos.MultiRequest |
buildMutateRequest(byte[] regionName,
byte[] row,
byte[] family,
byte[] qualifier,
ByteArrayComparable comparator,
HBaseProtos.CompareType compareType,
TimeRange timeRange,
RowMutations rowMutations)
Create a protocol buffer MutateRequest for conditioned row mutations
|
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
Delete delete)
Create a protocol buffer MutateRequest for a delete
|
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
Increment increment,
long nonceGroup,
long nonce)
Create a protocol buffer MutateRequest for a client increment
|
static ClientProtos.MutateRequest |
buildMutateRequest(byte[] regionName,
Put put)
Create a protocol buffer MutateRequest for a put
|
static ClientProtos.RegionAction.Builder |
buildNoDataRegionAction(byte[] regionName,
RowMutations rowMutations,
List<CellScannable> cells,
ClientProtos.RegionAction.Builder regionActionBuilder,
ClientProtos.Action.Builder actionBuilder,
ClientProtos.MutationProto.Builder mutationBuilder)
Create a protocol buffer MultiRequest for row mutations that does not hold data.
|
static void |
buildNoDataRegionActions(byte[] regionName,
Iterable<Action> actions,
List<CellScannable> cells,
ClientProtos.MultiRequest.Builder multiRequestBuilder,
ClientProtos.RegionAction.Builder regionActionBuilder,
ClientProtos.Action.Builder actionBuilder,
ClientProtos.MutationProto.Builder mutationBuilder,
long nonceGroup,
Map<Integer,Integer> rowMutationsIndexMap)
Create a protocol buffer multirequest with NO data for a list of actions (data is carried
otherwise than via protobuf).
|
static MasterProtos.NormalizeRequest |
buildNormalizeRequest()
Creates a protocol buffer NormalizeRequest
|
static MasterProtos.OfflineRegionRequest |
buildOfflineRegionRequest(byte[] regionName)
Creates a protocol buffer OfflineRegionRequest
|
static AdminProtos.OpenRegionRequest |
buildOpenRegionRequest(ServerName server,
List<Pair<RegionInfo,List<ServerName>>> regionOpenInfos)
Create a protocol buffer OpenRegionRequest to open a list of regions
|
static AdminProtos.OpenRegionRequest |
buildOpenRegionRequest(ServerName server,
RegionInfo region,
List<ServerName> favoredNodes)
Create a protocol buffer OpenRegionRequest for a given region
|
static MasterProtos.RecommissionRegionServerRequest |
buildRecommissionRegionServerRequest(ServerName server,
List<byte[]> encodedRegionNames) |
static ClientProtos.RegionAction.Builder |
buildRegionAction(byte[] regionName,
RowMutations rowMutations)
Create a protocol buffer MultiRequest for row mutations.
|
static void |
buildRegionActions(byte[] regionName,
List<Action> actions,
ClientProtos.MultiRequest.Builder multiRequestBuilder,
ClientProtos.RegionAction.Builder regionActionBuilder,
ClientProtos.Action.Builder actionBuilder,
ClientProtos.MutationProto.Builder mutationBuilder,
long nonceGroup,
Map<Integer,Integer> rowMutationsIndexMap)
Create a protocol buffer multi request for a list of actions.
|
static AdminProtos.OpenRegionRequest.RegionOpenInfo |
buildRegionOpenInfo(RegionInfo region,
List<ServerName> favoredNodes)
Create a RegionOpenInfo based on given region info and version of offline node
|
static HBaseProtos.RegionSpecifier |
buildRegionSpecifier(HBaseProtos.RegionSpecifier.RegionSpecifierType type,
byte[] value)
Convert a byte array to a protocol buffer RegionSpecifier
|
static ReplicationProtos.RemoveReplicationPeerRequest |
buildRemoveReplicationPeerRequest(String peerId) |
static AdminProtos.RollWALWriterRequest |
buildRollWALWriterRequest()
Create a new RollWALWriterRequest
|
static MasterProtos.RunCleanerChoreRequest |
buildRunCleanerChoreRequest()
Creates a request for running cleaner chore
|
static ClientProtos.ScanRequest |
buildScanRequest(byte[] regionName,
Scan scan,
int numberOfRows,
boolean closeScanner)
Create a protocol buffer ScanRequest for a client Scan
|
static ClientProtos.ScanRequest |
buildScanRequest(long scannerId,
int numberOfRows,
boolean closeScanner,
boolean trackMetrics)
Create a protocol buffer ScanRequest for a scanner id
|
static ClientProtos.ScanRequest |
buildScanRequest(long scannerId,
int numberOfRows,
boolean closeScanner,
long nextCallSeq,
boolean trackMetrics,
boolean renew,
int limitOfRows)
Create a protocol buffer ScanRequest for a scanner id
|
static MasterProtos.SetBalancerRunningRequest |
buildSetBalancerRunningRequest(boolean on,
boolean synchronous)
Creates a protocol buffer SetBalancerRunningRequest
|
static MasterProtos.SetCleanerChoreRunningRequest |
buildSetCleanerChoreRunningRequest(boolean on)
Creates a request for enabling/disabling the cleaner chore
|
static MasterProtos.SetNormalizerRunningRequest |
buildSetNormalizerRunningRequest(boolean on)
Creates a protocol buffer SetNormalizerRunningRequest
|
static MasterProtos.SetSplitOrMergeEnabledRequest |
buildSetSplitOrMergeEnabledRequest(boolean enabled,
boolean synchronous,
MasterSwitchType... switchTypes)
Creates a protocol buffer SetSplitOrMergeEnabledRequest
|
static MasterProtos.SetTableStateInMetaRequest |
buildSetTableStateInMetaRequest(TableState state)
Creates a protocol buffer SetTableStateInMetaRequest
|
static MasterProtos.SplitTableRegionRequest |
buildSplitTableRegionRequest(RegionInfo regionInfo,
byte[] splitRow,
long nonceGroup,
long nonce) |
static AdminProtos.StopServerRequest |
buildStopServerRequest(String reason)
Create a new StopServerRequest
|
static MasterProtos.TruncateTableRequest |
buildTruncateTableRequest(TableName tableName,
boolean preserveSplits,
long nonceGroup,
long nonce)
Creates a protocol buffer TruncateTableRequest
|
static MasterProtos.UnassignRegionRequest |
buildUnassignRegionRequest(byte[] regionName,
boolean force)
Creates a protocol buffer UnassignRegionRequest
|
static AdminProtos.UpdateFavoredNodesRequest |
buildUpdateFavoredNodesRequest(List<Pair<RegionInfo,List<ServerName>>> updateRegionInfos)
Create a protocol buffer UpdateFavoredNodesRequest to update a list of favorednode mappings
|
static ReplicationProtos.UpdateReplicationPeerConfigRequest |
buildUpdateReplicationPeerConfigRequest(String peerId,
ReplicationPeerConfig peerConfig) |
static AdminProtos.WarmupRegionRequest |
buildWarmupRegionRequest(RegionInfo regionInfo)
Create a WarmupRegionRequest for a given region name
|
static ClientProtos.RegionAction.Builder |
getRegionActionBuilderWithRegion(ClientProtos.RegionAction.Builder regionActionBuilder,
byte[] regionName) |
static MasterProtos.AssignsRequest |
toAssignRegionsRequest(List<String> encodedRegionNames,
boolean override) |
static MasterProtos.ScheduleServerCrashProcedureRequest |
toScheduleServerCrashProcedureRequest(List<HBaseProtos.ServerName> serverNames) |
static MasterProtos.UnassignsRequest |
toUnassignRegionsRequest(List<String> encodedRegionNames,
boolean override) |
public static ClientProtos.GetRequest buildGetRequest(byte[] regionName, Get get) throws IOException
regionName
- the name of the region to getget
- the client GetIOException
public static ClientProtos.MutateRequest buildIncrementRequest(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, long amount, Durability durability, long nonceGroup, long nonce)
regionName
- row
- family
- qualifier
- amount
- durability
- public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, ByteArrayComparable comparator, HBaseProtos.CompareType compareType, TimeRange timeRange, Put put) throws IOException
regionName
- row
- family
- qualifier
- comparator
- compareType
- put
- IOException
public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, ByteArrayComparable comparator, HBaseProtos.CompareType compareType, TimeRange timeRange, Delete delete) throws IOException
regionName
- row
- family
- qualifier
- comparator
- compareType
- delete
- IOException
public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, ByteArrayComparable comparator, HBaseProtos.CompareType compareType, TimeRange timeRange, Mutation mutation, ClientProtos.MutationProto.MutationType type) throws IOException
IOException
public static ClientProtos.MultiRequest buildMutateRequest(byte[] regionName, byte[] row, byte[] family, byte[] qualifier, ByteArrayComparable comparator, HBaseProtos.CompareType compareType, TimeRange timeRange, RowMutations rowMutations) throws IOException
regionName
- row
- family
- qualifier
- comparator
- compareType
- rowMutations
- IOException
public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, Put put) throws IOException
regionName
- put
- IOException
public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, Append append, long nonceGroup, long nonce) throws IOException
regionName
- append
- IOException
public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, Increment increment, long nonceGroup, long nonce) throws IOException
regionName
- increment
- IOException
public static ClientProtos.MutateRequest buildMutateRequest(byte[] regionName, Delete delete) throws IOException
regionName
- delete
- IOException
public static ClientProtos.RegionAction.Builder buildRegionAction(byte[] regionName, RowMutations rowMutations) throws IOException
regionName
- rowMutations
- IOException
public static ClientProtos.RegionAction.Builder buildNoDataRegionAction(byte[] regionName, RowMutations rowMutations, List<CellScannable> cells, ClientProtos.RegionAction.Builder regionActionBuilder, ClientProtos.Action.Builder actionBuilder, ClientProtos.MutationProto.Builder mutationBuilder) throws IOException
cells
param.
Does not propagate Action absolute position. Does not set atomic action on the created
RegionAtomic. Caller should do that if wanted.regionName
- rowMutations
- cells
- Return in here a list of Cells as CellIterable.IOException
public static ClientProtos.RegionAction.Builder getRegionActionBuilderWithRegion(ClientProtos.RegionAction.Builder regionActionBuilder, byte[] regionName)
public static ClientProtos.ScanRequest buildScanRequest(byte[] regionName, Scan scan, int numberOfRows, boolean closeScanner) throws IOException
regionName
- scan
- numberOfRows
- closeScanner
- IOException
public static ClientProtos.ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner, boolean trackMetrics)
scannerId
- numberOfRows
- closeScanner
- public static ClientProtos.ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner, long nextCallSeq, boolean trackMetrics, boolean renew, int limitOfRows)
scannerId
- numberOfRows
- closeScanner
- nextCallSeq
- public static ClientProtos.BulkLoadHFileRequest buildBulkLoadHFileRequest(List<Pair<byte[],String>> familyPaths, byte[] regionName, boolean assignSeqNum, org.apache.hadoop.security.token.Token<?> userToken, String bulkToken)
familyPaths
- regionName
- assignSeqNum
- userToken
- bulkToken
- public static ClientProtos.BulkLoadHFileRequest buildBulkLoadHFileRequest(List<Pair<byte[],String>> familyPaths, byte[] regionName, boolean assignSeqNum, org.apache.hadoop.security.token.Token<?> userToken, String bulkToken, boolean copyFiles)
familyPaths
- regionName
- assignSeqNum
- userToken
- bulkToken
- copyFiles
- public static void buildRegionActions(byte[] regionName, List<Action> actions, ClientProtos.MultiRequest.Builder multiRequestBuilder, ClientProtos.RegionAction.Builder regionActionBuilder, ClientProtos.Action.Builder actionBuilder, ClientProtos.MutationProto.Builder mutationBuilder, long nonceGroup, Map<Integer,Integer> rowMutationsIndexMap) throws IOException
regionName
- The region name of the actions.actions
- The actions that are grouped by the same region name.multiRequestBuilder
- The multiRequestBuilder to be populated with region actions.regionActionBuilder
- regionActionBuilder to be used to build region action.actionBuilder
- actionBuilder to be used to build action.mutationBuilder
- mutationBuilder to be used to build mutation.nonceGroup
- nonceGroup to be applied.rowMutationsIndexMap
- Map of created RegionAction to the original index for a
RowMutations within the original list of actionsIOException
public static void buildNoDataRegionActions(byte[] regionName, Iterable<Action> actions, List<CellScannable> cells, ClientProtos.MultiRequest.Builder multiRequestBuilder, ClientProtos.RegionAction.Builder regionActionBuilder, ClientProtos.Action.Builder actionBuilder, ClientProtos.MutationProto.Builder mutationBuilder, long nonceGroup, Map<Integer,Integer> rowMutationsIndexMap) throws IOException
data
param.
Propagates Actions original index.
The passed in multiRequestBuilder will be populated with region actions.
regionName
- The region name of the actions.actions
- The actions that are grouped by the same region name.cells
- Place to stuff references to actual data.multiRequestBuilder
- The multiRequestBuilder to be populated with region actions.regionActionBuilder
- regionActionBuilder to be used to build region action.actionBuilder
- actionBuilder to be used to build action.mutationBuilder
- mutationBuilder to be used to build mutation.nonceGroup
- nonceGroup to be applied.rowMutationsIndexMap
- Map of created RegionAction to the original index for a
RowMutations within the original list of actionsIOException
public static AdminProtos.GetRegionInfoRequest buildGetRegionInfoRequest(byte[] regionName)
regionName
- the name of the region to get infopublic static AdminProtos.GetRegionInfoRequest buildGetRegionInfoRequest(byte[] regionName, boolean includeCompactionState)
regionName
- the name of the region to get infoincludeCompactionState
- indicate if the compaction state is requestedpublic static AdminProtos.GetRegionInfoRequest buildGetRegionInfoRequest(byte[] regionName, boolean includeCompactionState, boolean includeBestSplitRow)
regionName
- the name of the region to get infoincludeCompactionState
- indicate if the compaction state is requestedincludeBestSplitRow
- indicate if the bestSplitRow is requestedpublic static AdminProtos.GetRegionLoadRequest buildGetRegionLoadRequest(TableName tableName)
tableName
- the table for which regionLoad should be obtained from RSpublic static AdminProtos.GetOnlineRegionRequest buildGetOnlineRegionRequest()
public static AdminProtos.FlushRegionRequest buildFlushRegionRequest(byte[] regionName)
regionName
- the name of the region to get infopublic static AdminProtos.FlushRegionRequest buildFlushRegionRequest(byte[] regionName, boolean writeFlushWALMarker)
regionName
- the name of the region to get infopublic static AdminProtos.OpenRegionRequest buildOpenRegionRequest(ServerName server, List<Pair<RegionInfo,List<ServerName>>> regionOpenInfos)
server
- the serverName for the RPCregionOpenInfos
- info of a list of regions to openpublic static AdminProtos.OpenRegionRequest buildOpenRegionRequest(ServerName server, RegionInfo region, List<ServerName> favoredNodes)
server
- the serverName for the RPCregion
- the region to openfavoredNodes
- a list of favored nodespublic static AdminProtos.UpdateFavoredNodesRequest buildUpdateFavoredNodesRequest(List<Pair<RegionInfo,List<ServerName>>> updateRegionInfos)
updateRegionInfos
- a list of favored node mappingspublic static AdminProtos.WarmupRegionRequest buildWarmupRegionRequest(RegionInfo regionInfo)
regionInfo
- Region we are warming uppublic static AdminProtos.CompactRegionRequest buildCompactRegionRequest(byte[] regionName, boolean major, byte[] columnFamily)
regionName
- the name of the region to get infomajor
- indicator if it is a major compactioncolumnFamily
- public static AdminProtos.RollWALWriterRequest buildRollWALWriterRequest()
public static AdminProtos.GetServerInfoRequest buildGetServerInfoRequest()
public static AdminProtos.StopServerRequest buildStopServerRequest(String reason)
reason
- the reason to stop the serverpublic static HBaseProtos.RegionSpecifier buildRegionSpecifier(HBaseProtos.RegionSpecifier.RegionSpecifierType type, byte[] value)
type
- the region specifier typevalue
- the region specifier byte array valuepublic static ClientProtos.Condition buildCondition(byte[] row, byte[] family, byte[] qualifier, ByteArrayComparable comparator, HBaseProtos.CompareType compareType, TimeRange timeRange)
row
- family
- qualifier
- comparator
- compareType
- IOException
public static MasterProtos.AddColumnRequest buildAddColumnRequest(TableName tableName, ColumnFamilyDescriptor column, long nonceGroup, long nonce)
tableName
- column
- public static MasterProtos.DeleteColumnRequest buildDeleteColumnRequest(TableName tableName, byte[] columnName, long nonceGroup, long nonce)
tableName
- columnName
- public static MasterProtos.ModifyColumnRequest buildModifyColumnRequest(TableName tableName, ColumnFamilyDescriptor column, long nonceGroup, long nonce)
tableName
- column
- public static MasterProtos.MoveRegionRequest buildMoveRegionRequest(byte[] encodedRegionName, ServerName destServerName)
encodedRegionName
- destServerName
- public static MasterProtos.MergeTableRegionsRequest buildMergeTableRegionsRequest(byte[][] encodedNameOfdaughaterRegions, boolean forcible, long nonceGroup, long nonce) throws DeserializationException
DeserializationException
public static MasterProtos.SplitTableRegionRequest buildSplitTableRegionRequest(RegionInfo regionInfo, byte[] splitRow, long nonceGroup, long nonce) throws DeserializationException
DeserializationException
public static MasterProtos.AssignRegionRequest buildAssignRegionRequest(byte[] regionName)
regionName
- public static MasterProtos.UnassignRegionRequest buildUnassignRegionRequest(byte[] regionName, boolean force)
regionName
- force
- public static MasterProtos.OfflineRegionRequest buildOfflineRegionRequest(byte[] regionName)
regionName
- public static MasterProtos.DeleteTableRequest buildDeleteTableRequest(TableName tableName, long nonceGroup, long nonce)
tableName
- public static MasterProtos.TruncateTableRequest buildTruncateTableRequest(TableName tableName, boolean preserveSplits, long nonceGroup, long nonce)
tableName
- name of table to truncatepreserveSplits
- True if the splits should be preservedpublic static MasterProtos.EnableTableRequest buildEnableTableRequest(TableName tableName, long nonceGroup, long nonce)
tableName
- public static MasterProtos.DisableTableRequest buildDisableTableRequest(TableName tableName, long nonceGroup, long nonce)
tableName
- public static MasterProtos.CreateTableRequest buildCreateTableRequest(TableDescriptor tableDescriptor, byte[][] splitKeys, long nonceGroup, long nonce)
tableDescriptor
- splitKeys
- public static MasterProtos.ModifyTableRequest buildModifyTableRequest(TableName tableName, TableDescriptor tableDesc, long nonceGroup, long nonce)
tableName
- tableDesc
- public static MasterProtos.GetSchemaAlterStatusRequest buildGetSchemaAlterStatusRequest(TableName tableName)
tableName
- public static MasterProtos.GetTableDescriptorsRequest buildGetTableDescriptorsRequest(List<TableName> tableNames)
tableNames
- public static MasterProtos.GetTableDescriptorsRequest buildGetTableDescriptorsRequest(Pattern pattern, boolean includeSysTables)
pattern
- The compiled regular expression to match againstincludeSysTables
- False to match only against userspace tablespublic static MasterProtos.GetTableNamesRequest buildGetTableNamesRequest(Pattern pattern, boolean includeSysTables)
pattern
- The compiled regular expression to match againstincludeSysTables
- False to match only against userspace tablespublic static MasterProtos.GetTableStateRequest buildGetTableStateRequest(TableName tableName)
tableName
- table to get request forpublic static MasterProtos.SetTableStateInMetaRequest buildSetTableStateInMetaRequest(TableState state)
state
- table state to update in Metapublic static MasterProtos.GetTableDescriptorsRequest buildGetTableDescriptorsRequest(TableName tableName)
tableName
- the table namepublic static MasterProtos.IsMasterRunningRequest buildIsMasterRunningRequest()
public static MasterProtos.BalanceRequest buildBalanceRequest(boolean force)
public static MasterProtos.SetBalancerRunningRequest buildSetBalancerRunningRequest(boolean on, boolean synchronous)
on
- synchronous
- public static MasterProtos.IsBalancerEnabledRequest buildIsBalancerEnabledRequest()
public static AdminProtos.ClearRegionBlockCacheRequest buildClearRegionBlockCacheRequest(List<RegionInfo> hris)
public static MasterProtos.GetClusterStatusRequest buildGetClusterStatusRequest(EnumSet<ClusterMetrics.Option> options)
public static MasterProtos.RunCatalogScanRequest buildCatalogScanRequest()
MasterProtos.RunCatalogScanRequest
public static MasterProtos.EnableCatalogJanitorRequest buildEnableCatalogJanitorRequest(boolean enable)
MasterProtos.EnableCatalogJanitorRequest
public static MasterProtos.IsCatalogJanitorEnabledRequest buildIsCatalogJanitorEnabledRequest()
MasterProtos.IsCatalogJanitorEnabledRequest
public static MasterProtos.RunCleanerChoreRequest buildRunCleanerChoreRequest()
MasterProtos.RunCleanerChoreRequest
public static MasterProtos.SetCleanerChoreRunningRequest buildSetCleanerChoreRunningRequest(boolean on)
MasterProtos.SetCleanerChoreRunningRequest
public static MasterProtos.IsCleanerChoreEnabledRequest buildIsCleanerChoreEnabledRequest()
MasterProtos.IsCleanerChoreEnabledRequest
public static RegionServerStatusProtos.GetLastFlushedSequenceIdRequest buildGetLastFlushedSequenceIdRequest(byte[] regionName)
regionName
- RegionServerStatusProtos.GetLastFlushedSequenceIdRequest
public static AdminProtos.OpenRegionRequest.RegionOpenInfo buildRegionOpenInfo(RegionInfo region, List<ServerName> favoredNodes)
public static MasterProtos.NormalizeRequest buildNormalizeRequest()
public static MasterProtos.IsNormalizerEnabledRequest buildIsNormalizerEnabledRequest()
public static MasterProtos.SetNormalizerRunningRequest buildSetNormalizerRunningRequest(boolean on)
on
- public static MasterProtos.IsSplitOrMergeEnabledRequest buildIsSplitOrMergeEnabledRequest(MasterSwitchType switchType)
switchType
- see MasterSwitchType
public static MasterProtos.SetSplitOrMergeEnabledRequest buildSetSplitOrMergeEnabledRequest(boolean enabled, boolean synchronous, MasterSwitchType... switchTypes)
enabled
- switch is enabled or notsynchronous
- set switch sync?switchTypes
- see MasterSwitchType
, it is
a list.public static ReplicationProtos.AddReplicationPeerRequest buildAddReplicationPeerRequest(String peerId, ReplicationPeerConfig peerConfig, boolean enabled)
public static ReplicationProtos.RemoveReplicationPeerRequest buildRemoveReplicationPeerRequest(String peerId)
public static ReplicationProtos.EnableReplicationPeerRequest buildEnableReplicationPeerRequest(String peerId)
public static ReplicationProtos.DisableReplicationPeerRequest buildDisableReplicationPeerRequest(String peerId)
public static ReplicationProtos.GetReplicationPeerConfigRequest buildGetReplicationPeerConfigRequest(String peerId)
public static ReplicationProtos.UpdateReplicationPeerConfigRequest buildUpdateReplicationPeerConfigRequest(String peerId, ReplicationPeerConfig peerConfig)
public static ReplicationProtos.ListReplicationPeersRequest buildListReplicationPeersRequest(Pattern pattern)
public static MasterProtos.CreateNamespaceRequest buildCreateNamespaceRequest(NamespaceDescriptor descriptor)
descriptor
- public static MasterProtos.ModifyNamespaceRequest buildModifyNamespaceRequest(NamespaceDescriptor descriptor)
descriptor
- public static MasterProtos.DeleteNamespaceRequest buildDeleteNamespaceRequest(String name)
name
- public static MasterProtos.GetNamespaceDescriptorRequest buildGetNamespaceDescriptorRequest(String name)
name
- public static AdminProtos.ClearCompactionQueuesRequest buildClearCompactionQueuesRequest(Set<String> queues)
public static MasterProtos.ClearDeadServersRequest buildClearDeadServersRequest(Collection<ServerName> deadServers)
public static QuotaProtos.GetSpaceQuotaRegionSizesRequest buildGetSpaceQuotaRegionSizesRequest()
QuotaProtos.GetSpaceQuotaRegionSizesRequest
object.public static QuotaProtos.GetSpaceQuotaSnapshotsRequest buildGetSpaceQuotaSnapshotsRequest()
QuotaProtos.GetSpaceQuotaSnapshotsRequest
object.public static QuotaProtos.GetQuotaStatesRequest buildGetQuotaStatesRequest()
QuotaProtos.GetQuotaStatesRequest
object.public static MasterProtos.DecommissionRegionServersRequest buildDecommissionRegionServersRequest(List<ServerName> servers, boolean offload)
public static MasterProtos.RecommissionRegionServerRequest buildRecommissionRegionServerRequest(ServerName server, List<byte[]> encodedRegionNames)
public static MasterProtos.AssignsRequest toAssignRegionsRequest(List<String> encodedRegionNames, boolean override)
public static MasterProtos.UnassignsRequest toUnassignRegionsRequest(List<String> encodedRegionNames, boolean override)
public static MasterProtos.ScheduleServerCrashProcedureRequest toScheduleServerCrashProcedureRequest(List<HBaseProtos.ServerName> serverNames)
Copyright © 2007–2019 Cloudera. All rights reserved.