[NO ISSUE][EXT] enable override of active recovery

Change-Id: I50639d8b61af5d9d0068433ab132d76e363f7bef
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11583
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index e18e50c..0242ecd 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -434,6 +434,10 @@
         }
     }
 
+    protected synchronized void doRecover(MetadataProvider metadataProvider) throws HyracksDataException {
+        doStart(metadataProvider);
+    }
+
     private void cancelJob(Throwable th) {
         cancelJobSafely(metadataProvider, th);
         final WaitForStateSubscriber cancelSubscriber =
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
index 968876d..3bc1c28 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
@@ -125,7 +125,7 @@
                     try {
                         if (!cancelRecovery && listener.getState() == ActivityState.TEMPORARILY_FAILED) {
                             listener.setState(ActivityState.RECOVERING);
-                            listener.doStart(metadataProvider);
+                            listener.doRecover(metadataProvider);
                         }
                         LOGGER.log(level, "Recovery completed successfully");
                         return null;
@@ -141,7 +141,7 @@
                 releaseRecoveryLocks(metadataProvider);
             }
         } while (policy.retry(failure));
-        // Recovery task is essntially over now either through failure or through cancellation(stop)
+        // Recovery task is essentially over now either through failure or through cancellation(stop)
         synchronized (listener) {
             listener.notifyAll();
             if (listener.getState() != ActivityState.TEMPORARILY_FAILED