ndimiduk commented on a change in pull request #1018: HBASE-23652 Move the
unsupported procedure type check before migratin…
URL: https://github.com/apache/hbase/pull/1018#discussion_r366578815
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java
##########
@@ -298,6 +307,45 @@ private HRegion open(Configuration conf, FileSystem fs,
Path rootDir) throws IOE
null);
}
+ @SuppressWarnings("deprecation")
+ private static final ImmutableSet<Class<?>> UNSUPPORTED_PROCEDURES =
+ ImmutableSet.of(RecoverMetaProcedure.class, AssignProcedure.class,
UnassignProcedure.class,
+ MoveRegionProcedure.class);
+
+ /**
+ * In HBASE-20811, we have introduced a new TRSP to assign/unassign/move
regions, and it is
+ * incompatible with the old
AssignProcedure/UnassignProcedure/MoveRegionProcedure. So we need to
+ * make sure that there are none these procedures when upgrading. If there
are, the master will
+ * quit, you need to go back to the old version to finish these procedures
first before upgrading.
+ */
+ private void checkUnsupportedProcedure(Map<Class<?>, List<Procedure<?>>>
procsByType)
+ throws HBaseIOException {
+ // Confirm that we do not have unfinished assign/unassign related
procedures. It is not easy to
+ // support both the old assign/unassign procedures and the new
TransitRegionStateProcedure as
+ // there will be conflict in the code for AM. We should finish all these
procedures before
+ // upgrading.
+ for (Class<?> clazz : UNSUPPORTED_PROCEDURES) {
+ List<Procedure<?>> procs = procsByType.get(clazz);
+ if (procs != null) {
+ LOG.error(
+ "Unsupported procedure type {} found, please rollback your master to
the old" +
Review comment:
Both of these error messages should include a link to
https://hbase.apache.org/book.html#upgrade2.2
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services