use of org.apache.hadoop.hbase.MetaMutationAnnotation in project hbase by apache.
the class MergeTableRegionsProcedure method preMergeRegionsCommit.
/**
* Post merge region action
* @param env MasterProcedureEnv
*/
private void preMergeRegionsCommit(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
@MetaMutationAnnotation final List<Mutation> metaEntries = new ArrayList<>();
cpHost.preMergeRegionsCommit(regionsToMerge, metaEntries, getUser());
try {
for (Mutation p : metaEntries) {
RegionInfo.parseRegionName(p.getRow());
}
} catch (IOException e) {
LOG.error("Row key of mutation from coprocessor is not parsable as region name. " + "Mutations from coprocessor should only be for hbase:meta table.", e);
throw e;
}
}
}
use of org.apache.hadoop.hbase.MetaMutationAnnotation in project hbase by apache.
the class MergeTableRegionsProcedure method preMergeRegionsCommit.
/**
* Post merge region action
* @param env MasterProcedureEnv
**/
private void preMergeRegionsCommit(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
@MetaMutationAnnotation final List<Mutation> metaEntries = new ArrayList<>();
boolean ret = cpHost.preMergeRegionsCommit(regionsToMerge, metaEntries, getUser());
if (ret) {
throw new IOException("Coprocessor bypassing regions " + getRegionsToMergeListFullNameString() + " merge.");
}
try {
for (Mutation p : metaEntries) {
HRegionInfo.parseRegionName(p.getRow());
}
} catch (IOException e) {
LOG.error("Row key of mutation from coprocessor is not parsable as region name." + "Mutations from coprocessor should only be for hbase:meta table.", e);
throw e;
}
}
}
Aggregations