HBASE-14012 Double Assignment and Dataloss when ServerCrashProcedure
runs during Master failover
This commit is contained in:
parent
7d3456d8fd
commit
cff1a5f1f5
|
@ -447,7 +447,7 @@ public class ProcedureExecutor<TEnvironment> {
|
||||||
|
|
||||||
// Initialize procedures executor
|
// Initialize procedures executor
|
||||||
for (int i = 0; i < numThreads; ++i) {
|
for (int i = 0; i < numThreads; ++i) {
|
||||||
threads[i] = new Thread("ProcedureExecutorThread-" + i) {
|
threads[i] = new Thread("ProcedureExecutor-" + i) {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
execLoop();
|
execLoop();
|
||||||
|
|
|
@ -1099,22 +1099,22 @@ public final class MasterProcedureProtos {
|
||||||
* <code>SERVER_CRASH_PREPARE_LOG_REPLAY = 6;</code>
|
* <code>SERVER_CRASH_PREPARE_LOG_REPLAY = 6;</code>
|
||||||
*/
|
*/
|
||||||
SERVER_CRASH_PREPARE_LOG_REPLAY(5, 6),
|
SERVER_CRASH_PREPARE_LOG_REPLAY(5, 6),
|
||||||
/**
|
|
||||||
* <code>SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;</code>
|
|
||||||
*/
|
|
||||||
SERVER_CRASH_CALC_REGIONS_TO_ASSIGN(6, 7),
|
|
||||||
/**
|
/**
|
||||||
* <code>SERVER_CRASH_ASSIGN = 8;</code>
|
* <code>SERVER_CRASH_ASSIGN = 8;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Removed SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
SERVER_CRASH_ASSIGN(7, 8),
|
SERVER_CRASH_ASSIGN(6, 8),
|
||||||
/**
|
/**
|
||||||
* <code>SERVER_CRASH_WAIT_ON_ASSIGN = 9;</code>
|
* <code>SERVER_CRASH_WAIT_ON_ASSIGN = 9;</code>
|
||||||
*/
|
*/
|
||||||
SERVER_CRASH_WAIT_ON_ASSIGN(8, 9),
|
SERVER_CRASH_WAIT_ON_ASSIGN(7, 9),
|
||||||
/**
|
/**
|
||||||
* <code>SERVER_CRASH_FINISH = 100;</code>
|
* <code>SERVER_CRASH_FINISH = 100;</code>
|
||||||
*/
|
*/
|
||||||
SERVER_CRASH_FINISH(9, 100),
|
SERVER_CRASH_FINISH(8, 100),
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1141,12 +1141,12 @@ public final class MasterProcedureProtos {
|
||||||
* <code>SERVER_CRASH_PREPARE_LOG_REPLAY = 6;</code>
|
* <code>SERVER_CRASH_PREPARE_LOG_REPLAY = 6;</code>
|
||||||
*/
|
*/
|
||||||
public static final int SERVER_CRASH_PREPARE_LOG_REPLAY_VALUE = 6;
|
public static final int SERVER_CRASH_PREPARE_LOG_REPLAY_VALUE = 6;
|
||||||
/**
|
|
||||||
* <code>SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;</code>
|
|
||||||
*/
|
|
||||||
public static final int SERVER_CRASH_CALC_REGIONS_TO_ASSIGN_VALUE = 7;
|
|
||||||
/**
|
/**
|
||||||
* <code>SERVER_CRASH_ASSIGN = 8;</code>
|
* <code>SERVER_CRASH_ASSIGN = 8;</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* Removed SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;
|
||||||
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public static final int SERVER_CRASH_ASSIGN_VALUE = 8;
|
public static final int SERVER_CRASH_ASSIGN_VALUE = 8;
|
||||||
/**
|
/**
|
||||||
|
@ -1169,7 +1169,6 @@ public final class MasterProcedureProtos {
|
||||||
case 4: return SERVER_CRASH_NO_SPLIT_LOGS;
|
case 4: return SERVER_CRASH_NO_SPLIT_LOGS;
|
||||||
case 5: return SERVER_CRASH_SPLIT_LOGS;
|
case 5: return SERVER_CRASH_SPLIT_LOGS;
|
||||||
case 6: return SERVER_CRASH_PREPARE_LOG_REPLAY;
|
case 6: return SERVER_CRASH_PREPARE_LOG_REPLAY;
|
||||||
case 7: return SERVER_CRASH_CALC_REGIONS_TO_ASSIGN;
|
|
||||||
case 8: return SERVER_CRASH_ASSIGN;
|
case 8: return SERVER_CRASH_ASSIGN;
|
||||||
case 9: return SERVER_CRASH_WAIT_ON_ASSIGN;
|
case 9: return SERVER_CRASH_WAIT_ON_ASSIGN;
|
||||||
case 100: return SERVER_CRASH_FINISH;
|
case 100: return SERVER_CRASH_FINISH;
|
||||||
|
@ -11406,29 +11405,29 @@ public final class MasterProcedureProtos {
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsOnCrashedServerOrBuilder(
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsOnCrashedServerOrBuilder(
|
||||||
int index);
|
int index);
|
||||||
|
|
||||||
// repeated .RegionInfo regions_to_assign = 4;
|
// repeated .RegionInfo regions_assigned = 4;
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo>
|
java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo>
|
||||||
getRegionsToAssignList();
|
getRegionsAssignedList();
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo getRegionsToAssign(int index);
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo getRegionsAssigned(int index);
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
int getRegionsToAssignCount();
|
int getRegionsAssignedCount();
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
java.util.List<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
java.util.List<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
||||||
getRegionsToAssignOrBuilderList();
|
getRegionsAssignedOrBuilderList();
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsToAssignOrBuilder(
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsAssignedOrBuilder(
|
||||||
int index);
|
int index);
|
||||||
|
|
||||||
// optional bool carrying_meta = 5;
|
// optional bool carrying_meta = 5;
|
||||||
|
@ -11530,10 +11529,10 @@ public final class MasterProcedureProtos {
|
||||||
}
|
}
|
||||||
case 34: {
|
case 34: {
|
||||||
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
|
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
regionsToAssign_ = new java.util.ArrayList<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo>();
|
regionsAssigned_ = new java.util.ArrayList<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo>();
|
||||||
mutable_bitField0_ |= 0x00000008;
|
mutable_bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
regionsToAssign_.add(input.readMessage(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.PARSER, extensionRegistry));
|
regionsAssigned_.add(input.readMessage(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.PARSER, extensionRegistry));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 40: {
|
case 40: {
|
||||||
|
@ -11558,7 +11557,7 @@ public final class MasterProcedureProtos {
|
||||||
regionsOnCrashedServer_ = java.util.Collections.unmodifiableList(regionsOnCrashedServer_);
|
regionsOnCrashedServer_ = java.util.Collections.unmodifiableList(regionsOnCrashedServer_);
|
||||||
}
|
}
|
||||||
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
regionsToAssign_ = java.util.Collections.unmodifiableList(regionsToAssign_);
|
regionsAssigned_ = java.util.Collections.unmodifiableList(regionsAssigned_);
|
||||||
}
|
}
|
||||||
this.unknownFields = unknownFields.build();
|
this.unknownFields = unknownFields.build();
|
||||||
makeExtensionsImmutable();
|
makeExtensionsImmutable();
|
||||||
|
@ -11666,40 +11665,40 @@ public final class MasterProcedureProtos {
|
||||||
return regionsOnCrashedServer_.get(index);
|
return regionsOnCrashedServer_.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// repeated .RegionInfo regions_to_assign = 4;
|
// repeated .RegionInfo regions_assigned = 4;
|
||||||
public static final int REGIONS_TO_ASSIGN_FIELD_NUMBER = 4;
|
public static final int REGIONS_ASSIGNED_FIELD_NUMBER = 4;
|
||||||
private java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> regionsToAssign_;
|
private java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> regionsAssigned_;
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> getRegionsToAssignList() {
|
public java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> getRegionsAssignedList() {
|
||||||
return regionsToAssign_;
|
return regionsAssigned_;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public java.util.List<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
public java.util.List<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
||||||
getRegionsToAssignOrBuilderList() {
|
getRegionsAssignedOrBuilderList() {
|
||||||
return regionsToAssign_;
|
return regionsAssigned_;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public int getRegionsToAssignCount() {
|
public int getRegionsAssignedCount() {
|
||||||
return regionsToAssign_.size();
|
return regionsAssigned_.size();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo getRegionsToAssign(int index) {
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo getRegionsAssigned(int index) {
|
||||||
return regionsToAssign_.get(index);
|
return regionsAssigned_.get(index);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsToAssignOrBuilder(
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsAssignedOrBuilder(
|
||||||
int index) {
|
int index) {
|
||||||
return regionsToAssign_.get(index);
|
return regionsAssigned_.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional bool carrying_meta = 5;
|
// optional bool carrying_meta = 5;
|
||||||
|
@ -11738,7 +11737,7 @@ public final class MasterProcedureProtos {
|
||||||
serverName_ = org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName.getDefaultInstance();
|
serverName_ = org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName.getDefaultInstance();
|
||||||
distributedLogReplay_ = false;
|
distributedLogReplay_ = false;
|
||||||
regionsOnCrashedServer_ = java.util.Collections.emptyList();
|
regionsOnCrashedServer_ = java.util.Collections.emptyList();
|
||||||
regionsToAssign_ = java.util.Collections.emptyList();
|
regionsAssigned_ = java.util.Collections.emptyList();
|
||||||
carryingMeta_ = false;
|
carryingMeta_ = false;
|
||||||
shouldSplitWal_ = true;
|
shouldSplitWal_ = true;
|
||||||
}
|
}
|
||||||
|
@ -11761,8 +11760,8 @@ public final class MasterProcedureProtos {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < getRegionsToAssignCount(); i++) {
|
for (int i = 0; i < getRegionsAssignedCount(); i++) {
|
||||||
if (!getRegionsToAssign(i).isInitialized()) {
|
if (!getRegionsAssigned(i).isInitialized()) {
|
||||||
memoizedIsInitialized = 0;
|
memoizedIsInitialized = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -11783,8 +11782,8 @@ public final class MasterProcedureProtos {
|
||||||
for (int i = 0; i < regionsOnCrashedServer_.size(); i++) {
|
for (int i = 0; i < regionsOnCrashedServer_.size(); i++) {
|
||||||
output.writeMessage(3, regionsOnCrashedServer_.get(i));
|
output.writeMessage(3, regionsOnCrashedServer_.get(i));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < regionsToAssign_.size(); i++) {
|
for (int i = 0; i < regionsAssigned_.size(); i++) {
|
||||||
output.writeMessage(4, regionsToAssign_.get(i));
|
output.writeMessage(4, regionsAssigned_.get(i));
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
output.writeBool(5, carryingMeta_);
|
output.writeBool(5, carryingMeta_);
|
||||||
|
@ -11813,9 +11812,9 @@ public final class MasterProcedureProtos {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(3, regionsOnCrashedServer_.get(i));
|
.computeMessageSize(3, regionsOnCrashedServer_.get(i));
|
||||||
}
|
}
|
||||||
for (int i = 0; i < regionsToAssign_.size(); i++) {
|
for (int i = 0; i < regionsAssigned_.size(); i++) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(4, regionsToAssign_.get(i));
|
.computeMessageSize(4, regionsAssigned_.get(i));
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
@ -11860,8 +11859,8 @@ public final class MasterProcedureProtos {
|
||||||
}
|
}
|
||||||
result = result && getRegionsOnCrashedServerList()
|
result = result && getRegionsOnCrashedServerList()
|
||||||
.equals(other.getRegionsOnCrashedServerList());
|
.equals(other.getRegionsOnCrashedServerList());
|
||||||
result = result && getRegionsToAssignList()
|
result = result && getRegionsAssignedList()
|
||||||
.equals(other.getRegionsToAssignList());
|
.equals(other.getRegionsAssignedList());
|
||||||
result = result && (hasCarryingMeta() == other.hasCarryingMeta());
|
result = result && (hasCarryingMeta() == other.hasCarryingMeta());
|
||||||
if (hasCarryingMeta()) {
|
if (hasCarryingMeta()) {
|
||||||
result = result && (getCarryingMeta()
|
result = result && (getCarryingMeta()
|
||||||
|
@ -11897,9 +11896,9 @@ public final class MasterProcedureProtos {
|
||||||
hash = (37 * hash) + REGIONS_ON_CRASHED_SERVER_FIELD_NUMBER;
|
hash = (37 * hash) + REGIONS_ON_CRASHED_SERVER_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + getRegionsOnCrashedServerList().hashCode();
|
hash = (53 * hash) + getRegionsOnCrashedServerList().hashCode();
|
||||||
}
|
}
|
||||||
if (getRegionsToAssignCount() > 0) {
|
if (getRegionsAssignedCount() > 0) {
|
||||||
hash = (37 * hash) + REGIONS_TO_ASSIGN_FIELD_NUMBER;
|
hash = (37 * hash) + REGIONS_ASSIGNED_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + getRegionsToAssignList().hashCode();
|
hash = (53 * hash) + getRegionsAssignedList().hashCode();
|
||||||
}
|
}
|
||||||
if (hasCarryingMeta()) {
|
if (hasCarryingMeta()) {
|
||||||
hash = (37 * hash) + CARRYING_META_FIELD_NUMBER;
|
hash = (37 * hash) + CARRYING_META_FIELD_NUMBER;
|
||||||
|
@ -12012,7 +12011,7 @@ public final class MasterProcedureProtos {
|
||||||
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
||||||
getServerNameFieldBuilder();
|
getServerNameFieldBuilder();
|
||||||
getRegionsOnCrashedServerFieldBuilder();
|
getRegionsOnCrashedServerFieldBuilder();
|
||||||
getRegionsToAssignFieldBuilder();
|
getRegionsAssignedFieldBuilder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static Builder create() {
|
private static Builder create() {
|
||||||
|
@ -12035,11 +12034,11 @@ public final class MasterProcedureProtos {
|
||||||
} else {
|
} else {
|
||||||
regionsOnCrashedServerBuilder_.clear();
|
regionsOnCrashedServerBuilder_.clear();
|
||||||
}
|
}
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
regionsToAssign_ = java.util.Collections.emptyList();
|
regionsAssigned_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.clear();
|
regionsAssignedBuilder_.clear();
|
||||||
}
|
}
|
||||||
carryingMeta_ = false;
|
carryingMeta_ = false;
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
|
@ -12094,14 +12093,14 @@ public final class MasterProcedureProtos {
|
||||||
} else {
|
} else {
|
||||||
result.regionsOnCrashedServer_ = regionsOnCrashedServerBuilder_.build();
|
result.regionsOnCrashedServer_ = regionsOnCrashedServerBuilder_.build();
|
||||||
}
|
}
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
regionsToAssign_ = java.util.Collections.unmodifiableList(regionsToAssign_);
|
regionsAssigned_ = java.util.Collections.unmodifiableList(regionsAssigned_);
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
}
|
}
|
||||||
result.regionsToAssign_ = regionsToAssign_;
|
result.regionsAssigned_ = regionsAssigned_;
|
||||||
} else {
|
} else {
|
||||||
result.regionsToAssign_ = regionsToAssignBuilder_.build();
|
result.regionsAssigned_ = regionsAssignedBuilder_.build();
|
||||||
}
|
}
|
||||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
to_bitField0_ |= 0x00000004;
|
to_bitField0_ |= 0x00000004;
|
||||||
|
@ -12159,29 +12158,29 @@ public final class MasterProcedureProtos {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
if (!other.regionsToAssign_.isEmpty()) {
|
if (!other.regionsAssigned_.isEmpty()) {
|
||||||
if (regionsToAssign_.isEmpty()) {
|
if (regionsAssigned_.isEmpty()) {
|
||||||
regionsToAssign_ = other.regionsToAssign_;
|
regionsAssigned_ = other.regionsAssigned_;
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
} else {
|
} else {
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.addAll(other.regionsToAssign_);
|
regionsAssigned_.addAll(other.regionsAssigned_);
|
||||||
}
|
}
|
||||||
onChanged();
|
onChanged();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!other.regionsToAssign_.isEmpty()) {
|
if (!other.regionsAssigned_.isEmpty()) {
|
||||||
if (regionsToAssignBuilder_.isEmpty()) {
|
if (regionsAssignedBuilder_.isEmpty()) {
|
||||||
regionsToAssignBuilder_.dispose();
|
regionsAssignedBuilder_.dispose();
|
||||||
regionsToAssignBuilder_ = null;
|
regionsAssignedBuilder_ = null;
|
||||||
regionsToAssign_ = other.regionsToAssign_;
|
regionsAssigned_ = other.regionsAssigned_;
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
regionsToAssignBuilder_ =
|
regionsAssignedBuilder_ =
|
||||||
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
|
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
|
||||||
getRegionsToAssignFieldBuilder() : null;
|
getRegionsAssignedFieldBuilder() : null;
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.addAllMessages(other.regionsToAssign_);
|
regionsAssignedBuilder_.addAllMessages(other.regionsAssigned_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12210,8 +12209,8 @@ public final class MasterProcedureProtos {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < getRegionsToAssignCount(); i++) {
|
for (int i = 0; i < getRegionsAssignedCount(); i++) {
|
||||||
if (!getRegionsToAssign(i).isInitialized()) {
|
if (!getRegionsAssigned(i).isInitialized()) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -12628,244 +12627,244 @@ public final class MasterProcedureProtos {
|
||||||
return regionsOnCrashedServerBuilder_;
|
return regionsOnCrashedServerBuilder_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// repeated .RegionInfo regions_to_assign = 4;
|
// repeated .RegionInfo regions_assigned = 4;
|
||||||
private java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> regionsToAssign_ =
|
private java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> regionsAssigned_ =
|
||||||
java.util.Collections.emptyList();
|
java.util.Collections.emptyList();
|
||||||
private void ensureRegionsToAssignIsMutable() {
|
private void ensureRegionsAssignedIsMutable() {
|
||||||
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
regionsToAssign_ = new java.util.ArrayList<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo>(regionsToAssign_);
|
regionsAssigned_ = new java.util.ArrayList<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo>(regionsAssigned_);
|
||||||
bitField0_ |= 0x00000008;
|
bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private com.google.protobuf.RepeatedFieldBuilder<
|
private com.google.protobuf.RepeatedFieldBuilder<
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder> regionsToAssignBuilder_;
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder> regionsAssignedBuilder_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> getRegionsToAssignList() {
|
public java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> getRegionsAssignedList() {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
return java.util.Collections.unmodifiableList(regionsToAssign_);
|
return java.util.Collections.unmodifiableList(regionsAssigned_);
|
||||||
} else {
|
} else {
|
||||||
return regionsToAssignBuilder_.getMessageList();
|
return regionsAssignedBuilder_.getMessageList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public int getRegionsToAssignCount() {
|
public int getRegionsAssignedCount() {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
return regionsToAssign_.size();
|
return regionsAssigned_.size();
|
||||||
} else {
|
} else {
|
||||||
return regionsToAssignBuilder_.getCount();
|
return regionsAssignedBuilder_.getCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo getRegionsToAssign(int index) {
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo getRegionsAssigned(int index) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
return regionsToAssign_.get(index);
|
return regionsAssigned_.get(index);
|
||||||
} else {
|
} else {
|
||||||
return regionsToAssignBuilder_.getMessage(index);
|
return regionsAssignedBuilder_.getMessage(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder setRegionsToAssign(
|
public Builder setRegionsAssigned(
|
||||||
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo value) {
|
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo value) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.set(index, value);
|
regionsAssigned_.set(index, value);
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.setMessage(index, value);
|
regionsAssignedBuilder_.setMessage(index, value);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder setRegionsToAssign(
|
public Builder setRegionsAssigned(
|
||||||
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder builderForValue) {
|
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder builderForValue) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.set(index, builderForValue.build());
|
regionsAssigned_.set(index, builderForValue.build());
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.setMessage(index, builderForValue.build());
|
regionsAssignedBuilder_.setMessage(index, builderForValue.build());
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder addRegionsToAssign(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo value) {
|
public Builder addRegionsAssigned(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo value) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.add(value);
|
regionsAssigned_.add(value);
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.addMessage(value);
|
regionsAssignedBuilder_.addMessage(value);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder addRegionsToAssign(
|
public Builder addRegionsAssigned(
|
||||||
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo value) {
|
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo value) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.add(index, value);
|
regionsAssigned_.add(index, value);
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.addMessage(index, value);
|
regionsAssignedBuilder_.addMessage(index, value);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder addRegionsToAssign(
|
public Builder addRegionsAssigned(
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder builderForValue) {
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder builderForValue) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.add(builderForValue.build());
|
regionsAssigned_.add(builderForValue.build());
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.addMessage(builderForValue.build());
|
regionsAssignedBuilder_.addMessage(builderForValue.build());
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder addRegionsToAssign(
|
public Builder addRegionsAssigned(
|
||||||
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder builderForValue) {
|
int index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder builderForValue) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.add(index, builderForValue.build());
|
regionsAssigned_.add(index, builderForValue.build());
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.addMessage(index, builderForValue.build());
|
regionsAssignedBuilder_.addMessage(index, builderForValue.build());
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder addAllRegionsToAssign(
|
public Builder addAllRegionsAssigned(
|
||||||
java.lang.Iterable<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> values) {
|
java.lang.Iterable<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo> values) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
super.addAll(values, regionsToAssign_);
|
super.addAll(values, regionsAssigned_);
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.addAllMessages(values);
|
regionsAssignedBuilder_.addAllMessages(values);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder clearRegionsToAssign() {
|
public Builder clearRegionsAssigned() {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
regionsToAssign_ = java.util.Collections.emptyList();
|
regionsAssigned_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.clear();
|
regionsAssignedBuilder_.clear();
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public Builder removeRegionsToAssign(int index) {
|
public Builder removeRegionsAssigned(int index) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
ensureRegionsToAssignIsMutable();
|
ensureRegionsAssignedIsMutable();
|
||||||
regionsToAssign_.remove(index);
|
regionsAssigned_.remove(index);
|
||||||
onChanged();
|
onChanged();
|
||||||
} else {
|
} else {
|
||||||
regionsToAssignBuilder_.remove(index);
|
regionsAssignedBuilder_.remove(index);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder getRegionsToAssignBuilder(
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder getRegionsAssignedBuilder(
|
||||||
int index) {
|
int index) {
|
||||||
return getRegionsToAssignFieldBuilder().getBuilder(index);
|
return getRegionsAssignedFieldBuilder().getBuilder(index);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsToAssignOrBuilder(
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder getRegionsAssignedOrBuilder(
|
||||||
int index) {
|
int index) {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
return regionsToAssign_.get(index); } else {
|
return regionsAssigned_.get(index); } else {
|
||||||
return regionsToAssignBuilder_.getMessageOrBuilder(index);
|
return regionsAssignedBuilder_.getMessageOrBuilder(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public java.util.List<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
public java.util.List<? extends org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
||||||
getRegionsToAssignOrBuilderList() {
|
getRegionsAssignedOrBuilderList() {
|
||||||
if (regionsToAssignBuilder_ != null) {
|
if (regionsAssignedBuilder_ != null) {
|
||||||
return regionsToAssignBuilder_.getMessageOrBuilderList();
|
return regionsAssignedBuilder_.getMessageOrBuilderList();
|
||||||
} else {
|
} else {
|
||||||
return java.util.Collections.unmodifiableList(regionsToAssign_);
|
return java.util.Collections.unmodifiableList(regionsAssigned_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder addRegionsToAssignBuilder() {
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder addRegionsAssignedBuilder() {
|
||||||
return getRegionsToAssignFieldBuilder().addBuilder(
|
return getRegionsAssignedFieldBuilder().addBuilder(
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.getDefaultInstance());
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.getDefaultInstance());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder addRegionsToAssignBuilder(
|
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder addRegionsAssignedBuilder(
|
||||||
int index) {
|
int index) {
|
||||||
return getRegionsToAssignFieldBuilder().addBuilder(
|
return getRegionsAssignedFieldBuilder().addBuilder(
|
||||||
index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.getDefaultInstance());
|
index, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.getDefaultInstance());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>repeated .RegionInfo regions_to_assign = 4;</code>
|
* <code>repeated .RegionInfo regions_assigned = 4;</code>
|
||||||
*/
|
*/
|
||||||
public java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder>
|
public java.util.List<org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder>
|
||||||
getRegionsToAssignBuilderList() {
|
getRegionsAssignedBuilderList() {
|
||||||
return getRegionsToAssignFieldBuilder().getBuilderList();
|
return getRegionsAssignedFieldBuilder().getBuilderList();
|
||||||
}
|
}
|
||||||
private com.google.protobuf.RepeatedFieldBuilder<
|
private com.google.protobuf.RepeatedFieldBuilder<
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>
|
||||||
getRegionsToAssignFieldBuilder() {
|
getRegionsAssignedFieldBuilder() {
|
||||||
if (regionsToAssignBuilder_ == null) {
|
if (regionsAssignedBuilder_ == null) {
|
||||||
regionsToAssignBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
|
regionsAssignedBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
|
||||||
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>(
|
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfo.Builder, org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionInfoOrBuilder>(
|
||||||
regionsToAssign_,
|
regionsAssigned_,
|
||||||
((bitField0_ & 0x00000008) == 0x00000008),
|
((bitField0_ & 0x00000008) == 0x00000008),
|
||||||
getParentForChildren(),
|
getParentForChildren(),
|
||||||
isClean());
|
isClean());
|
||||||
regionsToAssign_ = null;
|
regionsAssigned_ = null;
|
||||||
}
|
}
|
||||||
return regionsToAssignBuilder_;
|
return regionsAssignedBuilder_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional bool carrying_meta = 5;
|
// optional bool carrying_meta = 5;
|
||||||
|
@ -13041,78 +13040,77 @@ public final class MasterProcedureProtos {
|
||||||
"_table_state_check\030\003 \002(\010\"|\n\025DisableTable" +
|
"_table_state_check\030\003 \002(\010\"|\n\025DisableTable" +
|
||||||
"StateData\022#\n\tuser_info\030\001 \002(\0132\020.UserInfor" +
|
"StateData\022#\n\tuser_info\030\001 \002(\0132\020.UserInfor" +
|
||||||
"mation\022\036\n\ntable_name\030\002 \002(\0132\n.TableName\022\036" +
|
"mation\022\036\n\ntable_name\030\002 \002(\0132\n.TableName\022\036" +
|
||||||
"\n\026skip_table_state_check\030\003 \002(\010\"\347\001\n\024Serve" +
|
"\n\026skip_table_state_check\030\003 \002(\010\"\346\001\n\024Serve" +
|
||||||
"rCrashStateData\022 \n\013server_name\030\001 \002(\0132\013.S" +
|
"rCrashStateData\022 \n\013server_name\030\001 \002(\0132\013.S" +
|
||||||
"erverName\022\036\n\026distributed_log_replay\030\002 \001(",
|
"erverName\022\036\n\026distributed_log_replay\030\002 \001(",
|
||||||
"\010\022.\n\031regions_on_crashed_server\030\003 \003(\0132\013.R" +
|
"\010\022.\n\031regions_on_crashed_server\030\003 \003(\0132\013.R" +
|
||||||
"egionInfo\022&\n\021regions_to_assign\030\004 \003(\0132\013.R" +
|
"egionInfo\022%\n\020regions_assigned\030\004 \003(\0132\013.Re" +
|
||||||
"egionInfo\022\025\n\rcarrying_meta\030\005 \001(\010\022\036\n\020shou" +
|
"gionInfo\022\025\n\rcarrying_meta\030\005 \001(\010\022\036\n\020shoul" +
|
||||||
"ld_split_wal\030\006 \001(\010:\004true*\330\001\n\020CreateTable" +
|
"d_split_wal\030\006 \001(\010:\004true*\330\001\n\020CreateTableS" +
|
||||||
"State\022\036\n\032CREATE_TABLE_PRE_OPERATION\020\001\022 \n" +
|
"tate\022\036\n\032CREATE_TABLE_PRE_OPERATION\020\001\022 \n\034" +
|
||||||
"\034CREATE_TABLE_WRITE_FS_LAYOUT\020\002\022\034\n\030CREAT" +
|
"CREATE_TABLE_WRITE_FS_LAYOUT\020\002\022\034\n\030CREATE" +
|
||||||
"E_TABLE_ADD_TO_META\020\003\022\037\n\033CREATE_TABLE_AS" +
|
"_TABLE_ADD_TO_META\020\003\022\037\n\033CREATE_TABLE_ASS" +
|
||||||
"SIGN_REGIONS\020\004\022\"\n\036CREATE_TABLE_UPDATE_DE" +
|
"IGN_REGIONS\020\004\022\"\n\036CREATE_TABLE_UPDATE_DES" +
|
||||||
"SC_CACHE\020\005\022\037\n\033CREATE_TABLE_POST_OPERATIO" +
|
"C_CACHE\020\005\022\037\n\033CREATE_TABLE_POST_OPERATION" +
|
||||||
"N\020\006*\207\002\n\020ModifyTableState\022\030\n\024MODIFY_TABLE",
|
"\020\006*\207\002\n\020ModifyTableState\022\030\n\024MODIFY_TABLE_",
|
||||||
"_PREPARE\020\001\022\036\n\032MODIFY_TABLE_PRE_OPERATION" +
|
"PREPARE\020\001\022\036\n\032MODIFY_TABLE_PRE_OPERATION\020" +
|
||||||
"\020\002\022(\n$MODIFY_TABLE_UPDATE_TABLE_DESCRIPT" +
|
"\002\022(\n$MODIFY_TABLE_UPDATE_TABLE_DESCRIPTO" +
|
||||||
"OR\020\003\022&\n\"MODIFY_TABLE_REMOVE_REPLICA_COLU" +
|
"R\020\003\022&\n\"MODIFY_TABLE_REMOVE_REPLICA_COLUM" +
|
||||||
"MN\020\004\022!\n\035MODIFY_TABLE_DELETE_FS_LAYOUT\020\005\022" +
|
"N\020\004\022!\n\035MODIFY_TABLE_DELETE_FS_LAYOUT\020\005\022\037" +
|
||||||
"\037\n\033MODIFY_TABLE_POST_OPERATION\020\006\022#\n\037MODI" +
|
"\n\033MODIFY_TABLE_POST_OPERATION\020\006\022#\n\037MODIF" +
|
||||||
"FY_TABLE_REOPEN_ALL_REGIONS\020\007*\212\002\n\022Trunca" +
|
"Y_TABLE_REOPEN_ALL_REGIONS\020\007*\212\002\n\022Truncat" +
|
||||||
"teTableState\022 \n\034TRUNCATE_TABLE_PRE_OPERA" +
|
"eTableState\022 \n\034TRUNCATE_TABLE_PRE_OPERAT" +
|
||||||
"TION\020\001\022#\n\037TRUNCATE_TABLE_REMOVE_FROM_MET" +
|
"ION\020\001\022#\n\037TRUNCATE_TABLE_REMOVE_FROM_META" +
|
||||||
"A\020\002\022\"\n\036TRUNCATE_TABLE_CLEAR_FS_LAYOUT\020\003\022" +
|
"\020\002\022\"\n\036TRUNCATE_TABLE_CLEAR_FS_LAYOUT\020\003\022#" +
|
||||||
"#\n\037TRUNCATE_TABLE_CREATE_FS_LAYOUT\020\004\022\036\n\032",
|
"\n\037TRUNCATE_TABLE_CREATE_FS_LAYOUT\020\004\022\036\n\032T",
|
||||||
"TRUNCATE_TABLE_ADD_TO_META\020\005\022!\n\035TRUNCATE" +
|
"RUNCATE_TABLE_ADD_TO_META\020\005\022!\n\035TRUNCATE_" +
|
||||||
"_TABLE_ASSIGN_REGIONS\020\006\022!\n\035TRUNCATE_TABL" +
|
"TABLE_ASSIGN_REGIONS\020\006\022!\n\035TRUNCATE_TABLE" +
|
||||||
"E_POST_OPERATION\020\007*\337\001\n\020DeleteTableState\022" +
|
"_POST_OPERATION\020\007*\337\001\n\020DeleteTableState\022\036" +
|
||||||
"\036\n\032DELETE_TABLE_PRE_OPERATION\020\001\022!\n\035DELET" +
|
"\n\032DELETE_TABLE_PRE_OPERATION\020\001\022!\n\035DELETE" +
|
||||||
"E_TABLE_REMOVE_FROM_META\020\002\022 \n\034DELETE_TAB" +
|
"_TABLE_REMOVE_FROM_META\020\002\022 \n\034DELETE_TABL" +
|
||||||
"LE_CLEAR_FS_LAYOUT\020\003\022\"\n\036DELETE_TABLE_UPD" +
|
"E_CLEAR_FS_LAYOUT\020\003\022\"\n\036DELETE_TABLE_UPDA" +
|
||||||
"ATE_DESC_CACHE\020\004\022!\n\035DELETE_TABLE_UNASSIG" +
|
"TE_DESC_CACHE\020\004\022!\n\035DELETE_TABLE_UNASSIGN" +
|
||||||
"N_REGIONS\020\005\022\037\n\033DELETE_TABLE_POST_OPERATI" +
|
"_REGIONS\020\005\022\037\n\033DELETE_TABLE_POST_OPERATIO" +
|
||||||
"ON\020\006*\331\001\n\024AddColumnFamilyState\022\035\n\031ADD_COL" +
|
"N\020\006*\331\001\n\024AddColumnFamilyState\022\035\n\031ADD_COLU" +
|
||||||
"UMN_FAMILY_PREPARE\020\001\022#\n\037ADD_COLUMN_FAMIL",
|
"MN_FAMILY_PREPARE\020\001\022#\n\037ADD_COLUMN_FAMILY",
|
||||||
"Y_PRE_OPERATION\020\002\022-\n)ADD_COLUMN_FAMILY_U" +
|
"_PRE_OPERATION\020\002\022-\n)ADD_COLUMN_FAMILY_UP" +
|
||||||
"PDATE_TABLE_DESCRIPTOR\020\003\022$\n ADD_COLUMN_F" +
|
"DATE_TABLE_DESCRIPTOR\020\003\022$\n ADD_COLUMN_FA" +
|
||||||
"AMILY_POST_OPERATION\020\004\022(\n$ADD_COLUMN_FAM" +
|
"MILY_POST_OPERATION\020\004\022(\n$ADD_COLUMN_FAMI" +
|
||||||
"ILY_REOPEN_ALL_REGIONS\020\005*\353\001\n\027ModifyColum" +
|
"LY_REOPEN_ALL_REGIONS\020\005*\353\001\n\027ModifyColumn" +
|
||||||
"nFamilyState\022 \n\034MODIFY_COLUMN_FAMILY_PRE" +
|
"FamilyState\022 \n\034MODIFY_COLUMN_FAMILY_PREP" +
|
||||||
"PARE\020\001\022&\n\"MODIFY_COLUMN_FAMILY_PRE_OPERA" +
|
"ARE\020\001\022&\n\"MODIFY_COLUMN_FAMILY_PRE_OPERAT" +
|
||||||
"TION\020\002\0220\n,MODIFY_COLUMN_FAMILY_UPDATE_TA" +
|
"ION\020\002\0220\n,MODIFY_COLUMN_FAMILY_UPDATE_TAB" +
|
||||||
"BLE_DESCRIPTOR\020\003\022\'\n#MODIFY_COLUMN_FAMILY" +
|
"LE_DESCRIPTOR\020\003\022\'\n#MODIFY_COLUMN_FAMILY_" +
|
||||||
"_POST_OPERATION\020\004\022+\n\'MODIFY_COLUMN_FAMIL" +
|
"POST_OPERATION\020\004\022+\n\'MODIFY_COLUMN_FAMILY" +
|
||||||
"Y_REOPEN_ALL_REGIONS\020\005*\226\002\n\027DeleteColumnF",
|
"_REOPEN_ALL_REGIONS\020\005*\226\002\n\027DeleteColumnFa",
|
||||||
"amilyState\022 \n\034DELETE_COLUMN_FAMILY_PREPA" +
|
"milyState\022 \n\034DELETE_COLUMN_FAMILY_PREPAR" +
|
||||||
"RE\020\001\022&\n\"DELETE_COLUMN_FAMILY_PRE_OPERATI" +
|
"E\020\001\022&\n\"DELETE_COLUMN_FAMILY_PRE_OPERATIO" +
|
||||||
"ON\020\002\0220\n,DELETE_COLUMN_FAMILY_UPDATE_TABL" +
|
"N\020\002\0220\n,DELETE_COLUMN_FAMILY_UPDATE_TABLE" +
|
||||||
"E_DESCRIPTOR\020\003\022)\n%DELETE_COLUMN_FAMILY_D" +
|
"_DESCRIPTOR\020\003\022)\n%DELETE_COLUMN_FAMILY_DE" +
|
||||||
"ELETE_FS_LAYOUT\020\004\022\'\n#DELETE_COLUMN_FAMIL" +
|
"LETE_FS_LAYOUT\020\004\022\'\n#DELETE_COLUMN_FAMILY" +
|
||||||
"Y_POST_OPERATION\020\005\022+\n\'DELETE_COLUMN_FAMI" +
|
"_POST_OPERATION\020\005\022+\n\'DELETE_COLUMN_FAMIL" +
|
||||||
"LY_REOPEN_ALL_REGIONS\020\006*\350\001\n\020EnableTableS" +
|
"Y_REOPEN_ALL_REGIONS\020\006*\350\001\n\020EnableTableSt" +
|
||||||
"tate\022\030\n\024ENABLE_TABLE_PREPARE\020\001\022\036\n\032ENABLE" +
|
"ate\022\030\n\024ENABLE_TABLE_PREPARE\020\001\022\036\n\032ENABLE_" +
|
||||||
"_TABLE_PRE_OPERATION\020\002\022)\n%ENABLE_TABLE_S" +
|
"TABLE_PRE_OPERATION\020\002\022)\n%ENABLE_TABLE_SE" +
|
||||||
"ET_ENABLING_TABLE_STATE\020\003\022$\n ENABLE_TABL",
|
"T_ENABLING_TABLE_STATE\020\003\022$\n ENABLE_TABLE",
|
||||||
"E_MARK_REGIONS_ONLINE\020\004\022(\n$ENABLE_TABLE_" +
|
"_MARK_REGIONS_ONLINE\020\004\022(\n$ENABLE_TABLE_S" +
|
||||||
"SET_ENABLED_TABLE_STATE\020\005\022\037\n\033ENABLE_TABL" +
|
"ET_ENABLED_TABLE_STATE\020\005\022\037\n\033ENABLE_TABLE" +
|
||||||
"E_POST_OPERATION\020\006*\362\001\n\021DisableTableState" +
|
"_POST_OPERATION\020\006*\362\001\n\021DisableTableState\022" +
|
||||||
"\022\031\n\025DISABLE_TABLE_PREPARE\020\001\022\037\n\033DISABLE_T" +
|
"\031\n\025DISABLE_TABLE_PREPARE\020\001\022\037\n\033DISABLE_TA" +
|
||||||
"ABLE_PRE_OPERATION\020\002\022+\n\'DISABLE_TABLE_SE" +
|
"BLE_PRE_OPERATION\020\002\022+\n\'DISABLE_TABLE_SET" +
|
||||||
"T_DISABLING_TABLE_STATE\020\003\022&\n\"DISABLE_TAB" +
|
"_DISABLING_TABLE_STATE\020\003\022&\n\"DISABLE_TABL" +
|
||||||
"LE_MARK_REGIONS_OFFLINE\020\004\022*\n&DISABLE_TAB" +
|
"E_MARK_REGIONS_OFFLINE\020\004\022*\n&DISABLE_TABL" +
|
||||||
"LE_SET_DISABLED_TABLE_STATE\020\005\022 \n\034DISABLE" +
|
"E_SET_DISABLED_TABLE_STATE\020\005\022 \n\034DISABLE_" +
|
||||||
"_TABLE_POST_OPERATION\020\006*\305\002\n\020ServerCrashS" +
|
"TABLE_POST_OPERATION\020\006*\234\002\n\020ServerCrashSt" +
|
||||||
"tate\022\026\n\022SERVER_CRASH_START\020\001\022\035\n\031SERVER_C",
|
"ate\022\026\n\022SERVER_CRASH_START\020\001\022\035\n\031SERVER_CR",
|
||||||
"RASH_PROCESS_META\020\002\022\034\n\030SERVER_CRASH_GET_" +
|
"ASH_PROCESS_META\020\002\022\034\n\030SERVER_CRASH_GET_R" +
|
||||||
"REGIONS\020\003\022\036\n\032SERVER_CRASH_NO_SPLIT_LOGS\020" +
|
"EGIONS\020\003\022\036\n\032SERVER_CRASH_NO_SPLIT_LOGS\020\004" +
|
||||||
"\004\022\033\n\027SERVER_CRASH_SPLIT_LOGS\020\005\022#\n\037SERVER" +
|
"\022\033\n\027SERVER_CRASH_SPLIT_LOGS\020\005\022#\n\037SERVER_" +
|
||||||
"_CRASH_PREPARE_LOG_REPLAY\020\006\022\'\n#SERVER_CR" +
|
"CRASH_PREPARE_LOG_REPLAY\020\006\022\027\n\023SERVER_CRA" +
|
||||||
"ASH_CALC_REGIONS_TO_ASSIGN\020\007\022\027\n\023SERVER_C" +
|
"SH_ASSIGN\020\010\022\037\n\033SERVER_CRASH_WAIT_ON_ASSI" +
|
||||||
"RASH_ASSIGN\020\010\022\037\n\033SERVER_CRASH_WAIT_ON_AS" +
|
"GN\020\t\022\027\n\023SERVER_CRASH_FINISH\020dBK\n*org.apa" +
|
||||||
"SIGN\020\t\022\027\n\023SERVER_CRASH_FINISH\020dBK\n*org.a" +
|
"che.hadoop.hbase.protobuf.generatedB\025Mas" +
|
||||||
"pache.hadoop.hbase.protobuf.generatedB\025M" +
|
"terProcedureProtosH\001\210\001\001\240\001\001"
|
||||||
"asterProcedureProtosH\001\210\001\001\240\001\001"
|
|
||||||
};
|
};
|
||||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||||
|
@ -13178,7 +13176,7 @@ public final class MasterProcedureProtos {
|
||||||
internal_static_ServerCrashStateData_fieldAccessorTable = new
|
internal_static_ServerCrashStateData_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_ServerCrashStateData_descriptor,
|
internal_static_ServerCrashStateData_descriptor,
|
||||||
new java.lang.String[] { "ServerName", "DistributedLogReplay", "RegionsOnCrashedServer", "RegionsToAssign", "CarryingMeta", "ShouldSplitWal", });
|
new java.lang.String[] { "ServerName", "DistributedLogReplay", "RegionsOnCrashedServer", "RegionsAssigned", "CarryingMeta", "ShouldSplitWal", });
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -188,7 +188,7 @@ message ServerCrashStateData {
|
||||||
required ServerName server_name = 1;
|
required ServerName server_name = 1;
|
||||||
optional bool distributed_log_replay = 2;
|
optional bool distributed_log_replay = 2;
|
||||||
repeated RegionInfo regions_on_crashed_server = 3;
|
repeated RegionInfo regions_on_crashed_server = 3;
|
||||||
repeated RegionInfo regions_to_assign = 4;
|
repeated RegionInfo regions_assigned = 4;
|
||||||
optional bool carrying_meta = 5;
|
optional bool carrying_meta = 5;
|
||||||
optional bool should_split_wal = 6 [default = true];
|
optional bool should_split_wal = 6 [default = true];
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ enum ServerCrashState {
|
||||||
SERVER_CRASH_NO_SPLIT_LOGS = 4;
|
SERVER_CRASH_NO_SPLIT_LOGS = 4;
|
||||||
SERVER_CRASH_SPLIT_LOGS = 5;
|
SERVER_CRASH_SPLIT_LOGS = 5;
|
||||||
SERVER_CRASH_PREPARE_LOG_REPLAY = 6;
|
SERVER_CRASH_PREPARE_LOG_REPLAY = 6;
|
||||||
SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;
|
// Removed SERVER_CRASH_CALC_REGIONS_TO_ASSIGN = 7;
|
||||||
SERVER_CRASH_ASSIGN = 8;
|
SERVER_CRASH_ASSIGN = 8;
|
||||||
SERVER_CRASH_WAIT_ON_ASSIGN = 9;
|
SERVER_CRASH_WAIT_ON_ASSIGN = 9;
|
||||||
SERVER_CRASH_FINISH = 100;
|
SERVER_CRASH_FINISH = 100;
|
||||||
|
|
|
@ -165,8 +165,7 @@ public class RegionStateStore {
|
||||||
try {
|
try {
|
||||||
HRegionInfo hri = newState.getRegion();
|
HRegionInfo hri = newState.getRegion();
|
||||||
|
|
||||||
// update meta before checking for initialization.
|
// Update meta before checking for initialization. Meta state stored in zk.
|
||||||
// meta state stored in zk.
|
|
||||||
if (hri.isMetaRegion()) {
|
if (hri.isMetaRegion()) {
|
||||||
// persist meta state in MetaTableLocator (which in turn is zk storage currently)
|
// persist meta state in MetaTableLocator (which in turn is zk storage currently)
|
||||||
try {
|
try {
|
||||||
|
@ -189,19 +188,19 @@ public class RegionStateStore {
|
||||||
|
|
||||||
int replicaId = hri.getReplicaId();
|
int replicaId = hri.getReplicaId();
|
||||||
Put put = new Put(MetaTableAccessor.getMetaKeyForRegion(hri));
|
Put put = new Put(MetaTableAccessor.getMetaKeyForRegion(hri));
|
||||||
StringBuilder info = new StringBuilder("Updating row ");
|
StringBuilder info = new StringBuilder("Updating hbase:meta row ");
|
||||||
info.append(hri.getRegionNameAsString()).append(" with state=").append(state);
|
info.append(hri.getRegionNameAsString()).append(" with state=").append(state);
|
||||||
if (serverName != null && !serverName.equals(oldServer)) {
|
if (serverName != null && !serverName.equals(oldServer)) {
|
||||||
put.addImmutable(HConstants.CATALOG_FAMILY, getServerNameColumn(replicaId),
|
put.addImmutable(HConstants.CATALOG_FAMILY, getServerNameColumn(replicaId),
|
||||||
Bytes.toBytes(serverName.getServerName()));
|
Bytes.toBytes(serverName.getServerName()));
|
||||||
info.append("&sn=").append(serverName);
|
info.append(", sn=").append(serverName);
|
||||||
}
|
}
|
||||||
if (openSeqNum >= 0) {
|
if (openSeqNum >= 0) {
|
||||||
Preconditions.checkArgument(state == State.OPEN
|
Preconditions.checkArgument(state == State.OPEN
|
||||||
&& serverName != null, "Open region should be on a server");
|
&& serverName != null, "Open region should be on a server");
|
||||||
MetaTableAccessor.addLocation(put, serverName, openSeqNum, -1, replicaId);
|
MetaTableAccessor.addLocation(put, serverName, openSeqNum, -1, replicaId);
|
||||||
info.append("&openSeqNum=").append(openSeqNum);
|
info.append(", openSeqNum=").append(openSeqNum);
|
||||||
info.append("&server=").append(serverName);
|
info.append(", server=").append(serverName);
|
||||||
}
|
}
|
||||||
put.addImmutable(HConstants.CATALOG_FAMILY, getStateColumn(replicaId),
|
put.addImmutable(HConstants.CATALOG_FAMILY, getStateColumn(replicaId),
|
||||||
Bytes.toBytes(state.name()));
|
Bytes.toBytes(state.name()));
|
||||||
|
|
|
@ -252,9 +252,8 @@ public class SplitLogManager {
|
||||||
logDirs + " for serverName=" + serverNames);
|
logDirs + " for serverName=" + serverNames);
|
||||||
FileStatus[] logfiles = getFileList(logDirs, filter);
|
FileStatus[] logfiles = getFileList(logDirs, filter);
|
||||||
status.setStatus("Checking directory contents...");
|
status.setStatus("Checking directory contents...");
|
||||||
LOG.debug("Scheduling batch of logs to split");
|
|
||||||
SplitLogCounters.tot_mgr_log_split_batch_start.incrementAndGet();
|
SplitLogCounters.tot_mgr_log_split_batch_start.incrementAndGet();
|
||||||
LOG.info("started splitting " + logfiles.length + " logs in " + logDirs +
|
LOG.info("Started splitting " + logfiles.length + " logs in " + logDirs +
|
||||||
" for " + serverNames);
|
" for " + serverNames);
|
||||||
long t = EnvironmentEdgeManager.currentTime();
|
long t = EnvironmentEdgeManager.currentTime();
|
||||||
long totalSize = 0;
|
long totalSize = 0;
|
||||||
|
@ -300,8 +299,8 @@ public class SplitLogManager {
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
FileStatus[] files = fs.listStatus(logDir);
|
FileStatus[] files = fs.listStatus(logDir);
|
||||||
if (files != null && files.length > 0) {
|
if (files != null && files.length > 0) {
|
||||||
LOG.warn("returning success without actually splitting and "
|
LOG.warn("Returning success without actually splitting and "
|
||||||
+ "deleting all the log files in path " + logDir);
|
+ "deleting all the log files in path " + logDir + ": " + files, ioe);
|
||||||
} else {
|
} else {
|
||||||
LOG.warn("Unable to delete log src dir. Ignoring. " + logDir, ioe);
|
LOG.warn("Unable to delete log src dir. Ignoring. " + logDir, ioe);
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,9 +115,9 @@ implements ServerProcedureInterface {
|
||||||
private Set<HRegionInfo> regionsOnCrashedServer;
|
private Set<HRegionInfo> regionsOnCrashedServer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regions to assign. Usually some subset of {@link #regionsOnCrashedServer}
|
* Regions assigned. Usually some subset of {@link #regionsOnCrashedServer}.
|
||||||
*/
|
*/
|
||||||
private List<HRegionInfo> regionsToAssign;
|
private List<HRegionInfo> regionsAssigned;
|
||||||
|
|
||||||
private boolean distributedLogReplay = false;
|
private boolean distributedLogReplay = false;
|
||||||
private boolean carryingMeta = false;
|
private boolean carryingMeta = false;
|
||||||
|
@ -179,13 +179,13 @@ implements ServerProcedureInterface {
|
||||||
this.cycles++;
|
this.cycles++;
|
||||||
}
|
}
|
||||||
MasterServices services = env.getMasterServices();
|
MasterServices services = env.getMasterServices();
|
||||||
|
// Is master fully online? If not, yield. No processing of servers unless master is up
|
||||||
|
if (!services.getAssignmentManager().isFailoverCleanupDone()) {
|
||||||
|
throwProcedureYieldException("Waiting on master failover to complete");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case SERVER_CRASH_START:
|
case SERVER_CRASH_START:
|
||||||
// Is master fully online? If not, yield. No processing of servers unless master is up
|
|
||||||
if (!services.getAssignmentManager().isFailoverCleanupDone()) {
|
|
||||||
throwProcedureYieldException("Waiting on master failover to complete");
|
|
||||||
}
|
|
||||||
LOG.info("Start processing crashed " + this.serverName);
|
LOG.info("Start processing crashed " + this.serverName);
|
||||||
start(env);
|
start(env);
|
||||||
// If carrying meta, process it first. Else, get list of regions on crashed server.
|
// If carrying meta, process it first. Else, get list of regions on crashed server.
|
||||||
|
@ -203,7 +203,7 @@ implements ServerProcedureInterface {
|
||||||
// Where to go next? Depends on whether we should split logs at all or if we should do
|
// Where to go next? Depends on whether we should split logs at all or if we should do
|
||||||
// distributed log splitting (DLS) vs distributed log replay (DLR).
|
// distributed log splitting (DLS) vs distributed log replay (DLR).
|
||||||
if (!this.shouldSplitWal) {
|
if (!this.shouldSplitWal) {
|
||||||
setNextState(ServerCrashState.SERVER_CRASH_CALC_REGIONS_TO_ASSIGN);
|
setNextState(ServerCrashState.SERVER_CRASH_ASSIGN);
|
||||||
} else if (this.distributedLogReplay) {
|
} else if (this.distributedLogReplay) {
|
||||||
setNextState(ServerCrashState.SERVER_CRASH_PREPARE_LOG_REPLAY);
|
setNextState(ServerCrashState.SERVER_CRASH_PREPARE_LOG_REPLAY);
|
||||||
} else {
|
} else {
|
||||||
|
@ -221,34 +221,36 @@ implements ServerProcedureInterface {
|
||||||
|
|
||||||
case SERVER_CRASH_PREPARE_LOG_REPLAY:
|
case SERVER_CRASH_PREPARE_LOG_REPLAY:
|
||||||
prepareLogReplay(env, this.regionsOnCrashedServer);
|
prepareLogReplay(env, this.regionsOnCrashedServer);
|
||||||
setNextState(ServerCrashState.SERVER_CRASH_CALC_REGIONS_TO_ASSIGN);
|
setNextState(ServerCrashState.SERVER_CRASH_ASSIGN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SERVER_CRASH_SPLIT_LOGS:
|
case SERVER_CRASH_SPLIT_LOGS:
|
||||||
splitLogs(env);
|
splitLogs(env);
|
||||||
// If DLR, go to FINISH. Otherwise, if DLS, go to SERVER_CRASH_CALC_REGIONS_TO_ASSIGN
|
// If DLR, go to FINISH. Otherwise, if DLS, go to SERVER_CRASH_CALC_REGIONS_TO_ASSIGN
|
||||||
if (this.distributedLogReplay) setNextState(ServerCrashState.SERVER_CRASH_FINISH);
|
if (this.distributedLogReplay) setNextState(ServerCrashState.SERVER_CRASH_FINISH);
|
||||||
else setNextState(ServerCrashState.SERVER_CRASH_CALC_REGIONS_TO_ASSIGN);
|
else setNextState(ServerCrashState.SERVER_CRASH_ASSIGN);
|
||||||
break;
|
|
||||||
|
|
||||||
case SERVER_CRASH_CALC_REGIONS_TO_ASSIGN:
|
|
||||||
this.regionsToAssign = calcRegionsToAssign(env);
|
|
||||||
setNextState(ServerCrashState.SERVER_CRASH_ASSIGN);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SERVER_CRASH_ASSIGN:
|
case SERVER_CRASH_ASSIGN:
|
||||||
|
List<HRegionInfo> regionsToAssign = calcRegionsToAssign(env);
|
||||||
|
|
||||||
// Assign may not be idempotent. SSH used to requeue the SSH if we got an IOE assigning
|
// Assign may not be idempotent. SSH used to requeue the SSH if we got an IOE assigning
|
||||||
// which is what we are mimicing here but it looks prone to double assignment if assign
|
// which is what we are mimicing here but it looks prone to double assignment if assign
|
||||||
// fails midway. TODO: Test.
|
// fails midway. TODO: Test.
|
||||||
|
|
||||||
// If no regions to assign, skip assign and skip to the finish.
|
// If no regions to assign, skip assign and skip to the finish.
|
||||||
boolean regions = this.regionsToAssign != null && !this.regionsToAssign.isEmpty();
|
boolean regions = regionsToAssign != null && !regionsToAssign.isEmpty();
|
||||||
if (regions) {
|
if (regions) {
|
||||||
if (!assign(env, this.regionsToAssign)) {
|
this.regionsAssigned = regionsToAssign;
|
||||||
|
if (!assign(env, regionsToAssign)) {
|
||||||
throwProcedureYieldException("Failed assign; will retry");
|
throwProcedureYieldException("Failed assign; will retry");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (regions && this.shouldSplitWal && distributedLogReplay) {
|
if (this.shouldSplitWal && distributedLogReplay) {
|
||||||
|
// Take this route even if there are apparently no regions assigned. This may be our
|
||||||
|
// second time through here; i.e. we assigned and crashed just about here. On second
|
||||||
|
// time through, there will be no regions because we assigned them in the previous step.
|
||||||
|
// Even though no regions, we need to go through here to clean up the DLR zk markers.
|
||||||
setNextState(ServerCrashState.SERVER_CRASH_WAIT_ON_ASSIGN);
|
setNextState(ServerCrashState.SERVER_CRASH_WAIT_ON_ASSIGN);
|
||||||
} else {
|
} else {
|
||||||
setNextState(ServerCrashState.SERVER_CRASH_FINISH);
|
setNextState(ServerCrashState.SERVER_CRASH_FINISH);
|
||||||
|
@ -256,15 +258,15 @@ implements ServerProcedureInterface {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SERVER_CRASH_WAIT_ON_ASSIGN:
|
case SERVER_CRASH_WAIT_ON_ASSIGN:
|
||||||
// TODO: The list of regionsToAssign may be more than we actually assigned. See down in
|
// TODO: The list of regionsAssigned may be more than we actually assigned. See down in
|
||||||
// AM #1629 around 'if (regionStates.wasRegionOnDeadServer(encodedName)) {' where where we
|
// AM #1629 around 'if (regionStates.wasRegionOnDeadServer(encodedName)) {' where where we
|
||||||
// will skip assigning a region because it is/was on a dead server. Should never happen!
|
// will skip assigning a region because it is/was on a dead server. Should never happen!
|
||||||
// It was on this server. Worst comes to worst, we'll still wait here till other server is
|
// It was on this server. Worst comes to worst, we'll still wait here till other server is
|
||||||
// processed.
|
// processed.
|
||||||
|
|
||||||
// If the wait on assign failed, yield -- if we have regions to assign.
|
// If the wait on assign failed, yield -- if we have regions to assign.
|
||||||
if (this.regionsToAssign != null && !this.regionsToAssign.isEmpty()) {
|
if (this.regionsAssigned != null && !this.regionsAssigned.isEmpty()) {
|
||||||
if (!waitOnAssign(env, this.regionsToAssign)) {
|
if (!waitOnAssign(env, this.regionsAssigned)) {
|
||||||
throwProcedureYieldException("Waiting on region assign");
|
throwProcedureYieldException("Waiting on region assign");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,8 +368,8 @@ implements ServerProcedureInterface {
|
||||||
private void prepareLogReplay(final MasterProcedureEnv env, final Set<HRegionInfo> regions)
|
private void prepareLogReplay(final MasterProcedureEnv env, final Set<HRegionInfo> regions)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("Mark " + size(this.regionsOnCrashedServer) +
|
LOG.debug("Mark " + size(this.regionsOnCrashedServer) + " regions-in-recovery from " +
|
||||||
" regions-in-recovery from " + this.serverName);
|
this.serverName);
|
||||||
}
|
}
|
||||||
MasterFileSystem mfs = env.getMasterServices().getMasterFileSystem();
|
MasterFileSystem mfs = env.getMasterServices().getMasterFileSystem();
|
||||||
AssignmentManager am = env.getMasterServices().getAssignmentManager();
|
AssignmentManager am = env.getMasterServices().getAssignmentManager();
|
||||||
|
@ -438,8 +440,8 @@ implements ServerProcedureInterface {
|
||||||
// If this region is in transition on the dead server, it must be
|
// If this region is in transition on the dead server, it must be
|
||||||
// opening or pending_open, which should have been covered by
|
// opening or pending_open, which should have been covered by
|
||||||
// AM#cleanOutCrashedServerReferences
|
// AM#cleanOutCrashedServerReferences
|
||||||
LOG.info("Skip assigning region " + hri.getRegionNameAsString()
|
LOG.info("Skip assigning " + hri.getRegionNameAsString()
|
||||||
+ " because it has been opened in " + addressFromAM.getServerName());
|
+ " because opened on " + addressFromAM.getServerName());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (rit != null) {
|
if (rit != null) {
|
||||||
|
@ -574,9 +576,9 @@ implements ServerProcedureInterface {
|
||||||
state.addRegionsOnCrashedServer(HRegionInfo.convert(hri));
|
state.addRegionsOnCrashedServer(HRegionInfo.convert(hri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.regionsToAssign != null && !this.regionsToAssign.isEmpty()) {
|
if (this.regionsAssigned != null && !this.regionsAssigned.isEmpty()) {
|
||||||
for (HRegionInfo hri: this.regionsToAssign) {
|
for (HRegionInfo hri: this.regionsAssigned) {
|
||||||
state.addRegionsToAssign(HRegionInfo.convert(hri));
|
state.addRegionsAssigned(HRegionInfo.convert(hri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.build().writeDelimitedTo(stream);
|
state.build().writeDelimitedTo(stream);
|
||||||
|
@ -601,11 +603,11 @@ implements ServerProcedureInterface {
|
||||||
this.regionsOnCrashedServer.add(HRegionInfo.convert(ri));
|
this.regionsOnCrashedServer.add(HRegionInfo.convert(ri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
size = state.getRegionsToAssignCount();
|
size = state.getRegionsAssignedCount();
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
this.regionsToAssign = new ArrayList<HRegionInfo>(size);
|
this.regionsAssigned = new ArrayList<HRegionInfo>(size);
|
||||||
for (RegionInfo ri: state.getRegionsOnCrashedServerList()) {
|
for (RegionInfo ri: state.getRegionsOnCrashedServerList()) {
|
||||||
this.regionsToAssign.add(HRegionInfo.convert(ri));
|
this.regionsAssigned.add(HRegionInfo.convert(ri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue