This is an automated email from the ASF dual-hosted git repository.

nreich pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 94049aa  GEODE-4405: Move backup target and base line dirs to prepare 
backup message (#1377)
94049aa is described below

commit 94049aa1b3046b6143cb155c219a18e628a6282a
Author: Nick Reich <nre...@pivotal.io>
AuthorDate: Fri Feb 2 09:20:18 2018 -0800

    GEODE-4405: Move backup target and base line dirs to prepare backup message 
(#1377)
---
 .../cache/backup/BackupDataStoreHelper.java        |  4 ++--
 .../geode/internal/cache/backup/BackupService.java | 11 +++++----
 .../geode/internal/cache/backup/BackupTask.java    | 20 ++++++++---------
 .../geode/internal/cache/backup/FinishBackup.java  |  9 ++------
 .../internal/cache/backup/FinishBackupFactory.java | 12 ++++------
 .../cache/backup/FinishBackupOperation.java        | 14 ++++--------
 .../internal/cache/backup/FinishBackupRequest.java | 15 ++-----------
 .../geode/internal/cache/backup/PrepareBackup.java | 10 +++++++--
 .../cache/backup/PrepareBackupFactory.java         | 11 +++++----
 .../cache/backup/PrepareBackupOperation.java       | 13 ++++++++---
 .../cache/backup/PrepareBackupRequest.java         | 26 ++++++++++++++++++++--
 .../internal/beans/MemberMBeanBridge.java          |  6 ++---
 .../cache/backup/BackupIntegrationTest.java        | 25 ++++++++++++---------
 .../backup/BackupPrepareAndFinishMsgDUnitTest.java | 10 ++++-----
 .../internal/cache/backup/BackupServiceTest.java   | 18 +++++++--------
 .../cache/backup/FinishBackupFactoryTest.java      |  9 ++++----
 .../cache/backup/FinishBackupOperationTest.java    | 13 +++++------
 .../cache/backup/FinishBackupRequestTest.java      | 14 ++++--------
 .../cache/backup/PrepareBackupFactoryTest.java     |  7 ++++--
 .../cache/backup/PrepareBackupOperationTest.java   | 15 ++++++++-----
 .../cache/backup/PrepareBackupRequestTest.java     | 15 +++++++++----
 .../beans/DistributedSystemBridgeJUnitTest.java    |  6 ++---
 .../codeAnalysis/sanctionedDataSerializables.txt   |  8 +++++--
 23 files changed, 157 insertions(+), 134 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreHelper.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreHelper.java
index 48941c2..f290332 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreHelper.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreHelper.java
@@ -43,11 +43,11 @@ public class BackupDataStoreHelper {
     Map<DistributedMember, Set<PersistentID>> existingDataStores;
     try {
       existingDataStores = new PrepareBackupOperation(dm, dm.getId(), 
dm.getCache(), recipients,
-          prepareBackupFactory).send();
+          prepareBackupFactory, targetDir, baselineDir).send();
       abort = false;
     } finally {
       successfulMembers = new FinishBackupOperation(dm, dm.getId(), 
dm.getCache(), recipients,
-          targetDir, baselineDir, abort, finishBackupFactory).send();
+          abort, finishBackupFactory).send();
     }
     return new BackupDataStoreResult(existingDataStores, successfulMembers);
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupService.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupService.java
index 1bb463e..040f6e6 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupService.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupService.java
@@ -70,10 +70,10 @@ public class BackupService {
     return Executors.newSingleThreadExecutor(threadFactory);
   }
 
-  public HashSet<PersistentID> prepareBackup(InternalDistributedMember sender)
-      throws IOException, InterruptedException {
+  public HashSet<PersistentID> prepareBackup(InternalDistributedMember sender, 
File targetDir,
+      File baselineDir) throws IOException, InterruptedException {
     validateRequestingAdmin(sender);
-    BackupTask backupTask = new BackupTask(cache);
+    BackupTask backupTask = new BackupTask(cache, targetDir, baselineDir);
     if (!currentTask.compareAndSet(null, backupTask)) {
       throw new IOException("Another backup already in progress");
     }
@@ -81,8 +81,7 @@ public class BackupService {
     return backupTask.awaitLockAcquisition();
   }
 
-  public HashSet<PersistentID> doBackup(File targetDir, File baselineDir, 
boolean abort)
-      throws IOException {
+  public HashSet<PersistentID> doBackup(boolean abort) throws IOException {
     BackupTask task = currentTask.get();
     if (task == null) {
       if (abort) {
@@ -90,7 +89,7 @@ public class BackupService {
       }
       throw new IOException("No backup currently in progress");
     }
-    task.notifyOtherMembersReady(targetDir, baselineDir, abort);
+    task.notifyOtherMembersReady(abort);
 
     HashSet<PersistentID> result;
     try {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupTask.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupTask.java
index 29753a8..20c0654 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupTask.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupTask.java
@@ -60,16 +60,18 @@ public class BackupTask {
   private final CountDownLatch locksAcquired = new CountDownLatch(1);
   private final CountDownLatch otherMembersReady = new CountDownLatch(1);
   private final HashSet<PersistentID> diskStoresWithData = new HashSet<>();
+  private final File targetDir;
+  private final File baselineDir;
 
-  private volatile File targetDir;
-  private volatile File baselineDir;
   private volatile boolean isCancelled = false;
 
   private TemporaryBackupFiles temporaryFiles;
   private BackupFileCopier fileCopier;
 
-  BackupTask(InternalCache gemFireCache) {
+  BackupTask(InternalCache gemFireCache, File targetDir, File baselineDir) {
     this.cache = gemFireCache;
+    this.targetDir = targetDir;
+    this.baselineDir = baselineDir;
     memberId = getCleanedMemberId();
   }
 
@@ -78,9 +80,7 @@ public class BackupTask {
     return diskStoresWithData;
   }
 
-  void notifyOtherMembersReady(File targetDir, File baselineDir, boolean 
abort) {
-    this.targetDir = targetDir;
-    this.baselineDir = baselineDir;
+  void notifyOtherMembersReady(boolean abort) {
     this.isCancelled = abort;
     otherMembersReady.countDown();
   }
@@ -99,7 +99,7 @@ public class BackupTask {
       return new HashSet<>();
     }
 
-    return doBackup(targetDir, baselineDir);
+    return doBackup();
   }
 
   private void prepareForBackup() {
@@ -114,7 +114,7 @@ public class BackupTask {
     }
   }
 
-  private HashSet<PersistentID> doBackup(File targetDir, File baselineDir) 
throws IOException {
+  private HashSet<PersistentID> doBackup() throws IOException {
     if (isCancelled) {
       cleanup();
       return new HashSet<>();
@@ -126,9 +126,9 @@ public class BackupTask {
       File memberBackupDir = new File(targetDir, memberId);
 
       // Make sure our baseline is okay for this member, then create inspector 
for baseline backup
-      baselineDir = checkBaseline(baselineDir);
+      File checkedBaselineDir = checkBaseline(baselineDir);
       BackupInspector inspector =
-          (baselineDir == null ? null : 
BackupInspector.createInspector(baselineDir));
+          (checkedBaselineDir == null ? null : 
BackupInspector.createInspector(checkedBaselineDir));
       File storesDir = new File(memberBackupDir, DATA_STORES_DIRECTORY);
       Collection<DiskStore> diskStores = 
cache.listDiskStoresIncludingRegionOwned();
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackup.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackup.java
index ce33042..7038335 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackup.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackup.java
@@ -14,7 +14,6 @@
  */
 package org.apache.geode.internal.cache.backup;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 
@@ -24,14 +23,10 @@ import org.apache.geode.internal.cache.InternalCache;
 class FinishBackup {
 
   private final InternalCache cache;
-  private final File targetDir;
-  private final File baselineDir;
   private final boolean abort;
 
-  FinishBackup(InternalCache cache, File targetDir, File baselineDir, boolean 
abort) {
+  FinishBackup(InternalCache cache, boolean abort) {
     this.cache = cache;
-    this.targetDir = targetDir;
-    this.baselineDir = baselineDir;
     this.abort = abort;
   }
 
@@ -40,7 +35,7 @@ class FinishBackup {
     if (cache == null) {
       persistentIds = new HashSet<>();
     } else {
-      persistentIds = cache.getBackupService().doBackup(targetDir, 
baselineDir, abort);
+      persistentIds = cache.getBackupService().doBackup(abort);
     }
     return persistentIds;
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupFactory.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupFactory.java
index 13fad5f..1123c9a 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupFactory.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupFactory.java
@@ -14,7 +14,6 @@
  */
 package org.apache.geode.internal.cache.backup;
 
-import java.io.File;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -31,15 +30,12 @@ class FinishBackupFactory {
   }
 
   FinishBackupRequest createRequest(InternalDistributedMember sender,
-      Set<InternalDistributedMember> recipients, int processorId, File 
targetDir, File baselineDir,
-      boolean abort) {
-    return new FinishBackupRequest(sender, recipients, processorId, targetDir, 
baselineDir, abort,
-        this);
+      Set<InternalDistributedMember> recipients, int processorId, boolean 
abort) {
+    return new FinishBackupRequest(sender, recipients, processorId, abort, 
this);
   }
 
-  FinishBackup createFinishBackup(InternalCache cache, File targetDir, File 
baselineDir,
-      boolean abort) {
-    return new FinishBackup(cache, targetDir, baselineDir, abort);
+  FinishBackup createFinishBackup(InternalCache cache, boolean abort) {
+    return new FinishBackup(cache, abort);
   }
 
   BackupResponse createBackupResponse(InternalDistributedMember sender,
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupOperation.java
index 1d2305c..b82a5ef 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupOperation.java
@@ -14,7 +14,6 @@
  */
 package org.apache.geode.internal.cache.backup;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.Set;
 
@@ -33,20 +32,16 @@ class FinishBackupOperation extends BackupOperation {
   private final InternalDistributedMember member;
   private final InternalCache cache;
   private final Set<InternalDistributedMember> recipients;
-  private final File targetDir;
-  private final File baselineDir;
   private final boolean abort;
   private final FinishBackupFactory finishBackupFactory;
 
   FinishBackupOperation(DistributionManager dm, InternalDistributedMember 
member,
-      InternalCache cache, Set<InternalDistributedMember> recipients, File 
targetDir,
-      File baselineDir, boolean abort, FinishBackupFactory 
FinishBackupFactory) {
+      InternalCache cache, Set<InternalDistributedMember> recipients, boolean 
abort,
+      FinishBackupFactory FinishBackupFactory) {
     super(dm);
     this.member = member;
     this.cache = cache;
     this.recipients = recipients;
-    this.targetDir = targetDir;
-    this.baselineDir = baselineDir;
     this.abort = abort;
     this.finishBackupFactory = FinishBackupFactory;
   }
@@ -59,14 +54,13 @@ class FinishBackupOperation extends BackupOperation {
   @Override
   DistributionMessage createDistributionMessage(ReplyProcessor21 
replyProcessor) {
     return finishBackupFactory.createRequest(member, recipients, 
replyProcessor.getProcessorId(),
-        targetDir, baselineDir, abort);
+        abort);
   }
 
   @Override
   void processLocally() {
     try {
-      addToResults(member,
-          finishBackupFactory.createFinishBackup(cache, targetDir, 
baselineDir, abort).run());
+      addToResults(member, finishBackupFactory.createFinishBackup(cache, 
abort).run());
     } catch (IOException e) {
       logger.fatal("Failed to FinishBackup in " + member, e);
     }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupRequest.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupRequest.java
index 9ae9061..d5c770f 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupRequest.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupRequest.java
@@ -16,7 +16,6 @@ package org.apache.geode.internal.cache.backup;
 
 import java.io.DataInput;
 import java.io.DataOutput;
-import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Set;
@@ -43,8 +42,6 @@ public class FinishBackupRequest extends CliLegacyMessage {
 
   private final transient FinishBackupFactory finishBackupFactory;
 
-  private File targetDir;
-  private File baselineDir;
   private boolean abort;
 
   public FinishBackupRequest() {
@@ -52,14 +49,11 @@ public class FinishBackupRequest extends CliLegacyMessage {
   }
 
   FinishBackupRequest(InternalDistributedMember sender, 
Set<InternalDistributedMember> recipients,
-      int processorId, File targetDir, File baselineDir, boolean abort,
-      FinishBackupFactory finishBackupFactory) {
+      int processorId, boolean abort, FinishBackupFactory finishBackupFactory) 
{
     setSender(sender);
     setRecipients(recipients);
     this.msgId = processorId;
     this.finishBackupFactory = finishBackupFactory;
-    this.targetDir = targetDir;
-    this.baselineDir = baselineDir;
     this.abort = abort;
   }
 
@@ -67,8 +61,7 @@ public class FinishBackupRequest extends CliLegacyMessage {
   protected AdminResponse createResponse(DistributionManager dm) {
     HashSet<PersistentID> persistentIds;
     try {
-      persistentIds = finishBackupFactory
-          .createFinishBackup(dm.getCache(), this.targetDir, this.baselineDir, 
this.abort).run();
+      persistentIds = finishBackupFactory.createFinishBackup(dm.getCache(), 
this.abort).run();
     } catch (IOException e) {
       
logger.error(LocalizedMessage.create(LocalizedStrings.CliLegacyMessage_ERROR, 
getClass()), e);
       return AdminFailureResponse.create(getSender(), e);
@@ -84,16 +77,12 @@ public class FinishBackupRequest extends CliLegacyMessage {
   @Override
   public void fromData(DataInput in) throws IOException, 
ClassNotFoundException {
     super.fromData(in);
-    targetDir = DataSerializer.readFile(in);
-    baselineDir = DataSerializer.readFile(in);
     abort = DataSerializer.readBoolean(in);
   }
 
   @Override
   public void toData(DataOutput out) throws IOException {
     super.toData(out);
-    DataSerializer.writeFile(targetDir, out);
-    DataSerializer.writeFile(baselineDir, out);
     DataSerializer.writeBoolean(abort, out);
   }
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackup.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackup.java
index 19b6bc1..fc3f085 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackup.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackup.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.internal.cache.backup;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 
@@ -25,10 +26,15 @@ class PrepareBackup {
 
   private final InternalDistributedMember member;
   private final InternalCache cache;
+  private final File targetDir;
+  private final File baselineDir;
 
-  PrepareBackup(InternalDistributedMember member, InternalCache cache) {
+  PrepareBackup(InternalDistributedMember member, InternalCache cache, File 
targetDir,
+      File baselineDir) {
     this.member = member;
     this.cache = cache;
+    this.targetDir = targetDir;
+    this.baselineDir = baselineDir;
   }
 
   HashSet<PersistentID> run() throws IOException, InterruptedException {
@@ -36,7 +42,7 @@ class PrepareBackup {
     if (cache == null) {
       persistentIds = new HashSet<>();
     } else {
-      persistentIds = cache.getBackupService().prepareBackup(member);
+      persistentIds = cache.getBackupService().prepareBackup(member, 
targetDir, baselineDir);
     }
     return persistentIds;
   }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupFactory.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupFactory.java
index d4c1869..8364d3a 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupFactory.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupFactory.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.internal.cache.backup;
 
+import java.io.File;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -30,12 +31,14 @@ class PrepareBackupFactory {
   }
 
   PrepareBackupRequest createRequest(InternalDistributedMember sender,
-      Set<InternalDistributedMember> recipients, int processorId) {
-    return new PrepareBackupRequest(sender, recipients, processorId, this);
+      Set<InternalDistributedMember> recipients, int processorId, File 
targetDir,
+      File baselineDir) {
+    return new PrepareBackupRequest(sender, recipients, processorId, this, 
targetDir, baselineDir);
   }
 
-  PrepareBackup createPrepareBackup(InternalDistributedMember member, 
InternalCache cache) {
-    return new PrepareBackup(member, cache);
+  PrepareBackup createPrepareBackup(InternalDistributedMember member, 
InternalCache cache,
+      File targetDir, File baselineDir) {
+    return new PrepareBackup(member, cache, targetDir, baselineDir);
   }
 
   BackupResponse createBackupResponse(InternalDistributedMember sender,
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupOperation.java
index b0d92a4..eb583c8 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupOperation.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.internal.cache.backup;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.Set;
 
@@ -33,15 +34,19 @@ class PrepareBackupOperation extends BackupOperation {
   private final InternalCache cache;
   private final Set<InternalDistributedMember> recipients;
   private final PrepareBackupFactory prepareBackupFactory;
+  private final File targetDir;
+  private final File baselineDir;
 
   PrepareBackupOperation(DistributionManager dm, InternalDistributedMember 
member,
       InternalCache cache, Set<InternalDistributedMember> recipients,
-      PrepareBackupFactory prepareBackupFactory) {
+      PrepareBackupFactory prepareBackupFactory, File targetDir, File 
baselineDir) {
     super(dm);
     this.member = member;
     this.cache = cache;
     this.recipients = recipients;
     this.prepareBackupFactory = prepareBackupFactory;
+    this.targetDir = targetDir;
+    this.baselineDir = baselineDir;
   }
 
   @Override
@@ -51,13 +56,15 @@ class PrepareBackupOperation extends BackupOperation {
 
   @Override
   DistributionMessage createDistributionMessage(ReplyProcessor21 
replyProcessor) {
-    return prepareBackupFactory.createRequest(member, recipients, 
replyProcessor.getProcessorId());
+    return prepareBackupFactory.createRequest(member, recipients, 
replyProcessor.getProcessorId(),
+        targetDir, baselineDir);
   }
 
   @Override
   void processLocally() {
     try {
-      addToResults(member, prepareBackupFactory.createPrepareBackup(member, 
cache).run());
+      addToResults(member,
+          prepareBackupFactory.createPrepareBackup(member, cache, targetDir, 
baselineDir).run());
     } catch (IOException | InterruptedException e) {
       logger.fatal("Failed to PrepareBackup in " + member, e);
     }
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupRequest.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupRequest.java
index 6a59cfc..8d6a66e 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupRequest.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupRequest.java
@@ -14,12 +14,16 @@
  */
 package org.apache.geode.internal.cache.backup;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
 
+import org.apache.geode.DataSerializer;
 import org.apache.geode.cache.persistence.PersistentID;
 import org.apache.geode.distributed.internal.DistributionManager;
 import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
@@ -39,17 +43,21 @@ public class PrepareBackupRequest extends CliLegacyMessage {
   private static final Logger logger = LogService.getLogger();
 
   private final transient PrepareBackupFactory prepareBackupFactory;
+  private File targetDir;
+  private File baselineDir;
 
   public PrepareBackupRequest() {
     this.prepareBackupFactory = new PrepareBackupFactory();
   }
 
   PrepareBackupRequest(InternalDistributedMember sender, 
Set<InternalDistributedMember> recipients,
-      int msgId, PrepareBackupFactory prepareBackupFactory) {
+      int msgId, PrepareBackupFactory prepareBackupFactory, File targetDir, 
File baselineDir) {
     setSender(sender);
     setRecipients(recipients);
     this.msgId = msgId;
     this.prepareBackupFactory = prepareBackupFactory;
+    this.targetDir = targetDir;
+    this.baselineDir = baselineDir;
   }
 
   @Override
@@ -57,7 +65,8 @@ public class PrepareBackupRequest extends CliLegacyMessage {
     HashSet<PersistentID> persistentIds;
     try {
       persistentIds = prepareBackupFactory
-          .createPrepareBackup(dm.getDistributionManagerId(), 
dm.getCache()).run();
+          .createPrepareBackup(dm.getDistributionManagerId(), dm.getCache(), 
targetDir, baselineDir)
+          .run();
     } catch (IOException | InterruptedException e) {
       
logger.error(LocalizedMessage.create(LocalizedStrings.CliLegacyMessage_ERROR, 
getClass()), e);
       return AdminFailureResponse.create(getSender(), e);
@@ -70,4 +79,17 @@ public class PrepareBackupRequest extends CliLegacyMessage {
     return PREPARE_BACKUP_REQUEST;
   }
 
+  @Override
+  public void fromData(DataInput in) throws IOException, 
ClassNotFoundException {
+    super.fromData(in);
+    targetDir = DataSerializer.readFile(in);
+    baselineDir = DataSerializer.readFile(in);
+  }
+
+  @Override
+  public void toData(DataOutput out) throws IOException {
+    super.toData(out);
+    DataSerializer.writeFile(targetDir, out);
+    DataSerializer.writeFile(baselineDir, out);
+  }
 }
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
index 69cdbc3..f0e614f 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
@@ -1013,11 +1013,11 @@ public class MemberMBeanBridge {
         Set<PersistentID> existingDataStores;
         Set<PersistentID> successfulDataStores;
         try {
-          existingDataStores = cache.getBackupService()
-              
.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember());
+          existingDataStores = cache.getBackupService().prepareBackup(
+              cache.getInternalDistributedSystem().getDistributedMember(), 
targetDir, null);
           abort = false;
         } finally {
-          successfulDataStores = cache.getBackupService().doBackup(targetDir, 
null, abort);
+          successfulDataStores = cache.getBackupService().doBackup(abort);
         }
         diskBackUpResult = new DiskBackupResult[existingDataStores.size()];
         int j = 0;
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
index 30f2693..de58d8b 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupIntegrationTest.java
@@ -192,8 +192,9 @@ public class BackupIntegrationTest {
     }
 
     BackupService backup = cache.getBackupService();
-    
backup.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember());
-    backup.doBackup(backupDir, null, false);
+    
backup.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember(),
 backupDir,
+        null);
+    backup.doBackup(false);
 
     // Put another key to make sure we restore
     // from a backup that doesn't contain this key
@@ -240,8 +241,9 @@ public class BackupIntegrationTest {
     createDiskStore();
 
     BackupService backup = cache.getBackupService();
-    
backup.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember());
-    backup.doBackup(backupDir, null, false);
+    
backup.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember(),
 backupDir,
+        null);
+    backup.doBackup(false);
     assertEquals("No backup files should have been created", 
Collections.emptyList(),
         Arrays.asList(backupDir.list()));
   }
@@ -255,8 +257,9 @@ public class BackupIntegrationTest {
     region.put("A", "A");
 
     BackupService backup = cache.getBackupService();
-    
backup.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember());
-    backup.doBackup(backupDir, null, false);
+    
backup.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember(),
 backupDir,
+        null);
+    backup.doBackup(false);
 
 
     assertEquals("No backup files should have been created", 
Collections.emptyList(),
@@ -282,11 +285,12 @@ public class BackupIntegrationTest {
     }
 
     BackupService backupService = cache.getBackupService();
-    
backupService.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember());
+    
backupService.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember(),
+        backupDir, null);
     final Region theRegion = region;
     final DiskStore theDiskStore = ds;
     CompletableFuture.runAsync(() -> destroyAndCompact(theRegion, 
theDiskStore));
-    backupService.doBackup(backupDir, null, false);
+    backupService.doBackup(false);
 
     cache.close();
     destroyDiskDirs();
@@ -315,8 +319,9 @@ public class BackupIntegrationTest {
     createRegion();
 
     BackupService backupService = cache.getBackupService();
-    
backupService.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember());
-    backupService.doBackup(backupDir, null, false);
+    
backupService.prepareBackup(cache.getInternalDistributedSystem().getDistributedMember(),
+        backupDir, null);
+    backupService.doBackup(false);
     Collection<File> fileCollection = FileUtils.listFiles(backupDir,
         new RegexFileFilter("BackupIntegrationTest.cache.xml"), 
DirectoryFileFilter.DIRECTORY);
     assertEquals(1, fileCollection.size());
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupPrepareAndFinishMsgDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupPrepareAndFinishMsgDUnitTest.java
index 09cb4d2..48d1adf 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupPrepareAndFinishMsgDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupPrepareAndFinishMsgDUnitTest.java
@@ -55,9 +55,7 @@ import 
org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.TypeMismatchException;
 import org.apache.geode.cache30.CacheTestCase;
 import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.internal.cache.DiskStoreImpl;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
-import org.apache.geode.internal.cache.InternalRegion;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
@@ -147,12 +145,12 @@ public abstract class BackupPrepareAndFinishMsgDUnitTest 
extends CacheTestCase {
     Set recipients = dm.getOtherDistributionManagerIds();
     Future<Void> future = null;
     new PrepareBackupOperation(dm, dm.getId(), dm.getCache(), recipients,
-        new PrepareBackupFactory()).send();
+        new PrepareBackupFactory(), diskDirs[0], null).send();
     ReentrantLock backupLock = ((LocalRegion) 
region).getDiskStore().getBackupLock();
     future = CompletableFuture.runAsync(function);
     Awaitility.await().atMost(5, TimeUnit.SECONDS)
         .until(() -> assertTrue(backupLock.getQueueLength() > 0));
-    new FinishBackupOperation(dm, dm.getId(), dm.getCache(), recipients, 
diskDirs[0], null, false,
+    new FinishBackupOperation(dm, dm.getId(), dm.getCache(), recipients, false,
         new FinishBackupFactory()).send();
     future.get(5, TimeUnit.SECONDS);
   }
@@ -161,12 +159,12 @@ public abstract class BackupPrepareAndFinishMsgDUnitTest 
extends CacheTestCase {
     DistributionManager dm = 
GemFireCacheImpl.getInstance().getDistributionManager();
     Set recipients = dm.getOtherDistributionManagerIds();
     new PrepareBackupOperation(dm, dm.getId(), dm.getCache(), recipients,
-        new PrepareBackupFactory()).send();
+        new PrepareBackupFactory(), diskDirs[0], null).send();
     ReentrantLock backupLock = ((LocalRegion) 
region).getDiskStore().getBackupLock();
     List<CompletableFuture<?>> futureList = doReadActions();
     CompletableFuture.allOf(futureList.toArray(new 
CompletableFuture<?>[futureList.size()]));
     assertTrue(backupLock.getQueueLength() == 0);
-    new FinishBackupOperation(dm, dm.getId(), dm.getCache(), recipients, 
diskDirs[0], null, false,
+    new FinishBackupOperation(dm, dm.getId(), dm.getCache(), recipients, false,
         new FinishBackupFactory()).send();
   }
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupServiceTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupServiceTest.java
index a042cad..b5936c9 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupServiceTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupServiceTest.java
@@ -37,13 +37,13 @@ import org.apache.geode.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class BackupServiceTest {
 
-  BackupService backupService;
+  private BackupService backupService;
 
-  DistributionManager distributionManager;
+  private DistributionManager distributionManager;
 
-  InternalDistributedMember sender = new 
InternalDistributedMember("localhost", 5555);
+  private InternalDistributedMember sender = new 
InternalDistributedMember("localhost", 5555);
 
-  InternalCache cache;
+  private InternalCache cache;
 
   @Before
   public void setUp() throws Exception {
@@ -73,23 +73,23 @@ public class BackupServiceTest {
   public void startBackupThrowsExceptionWhenAnotherBackupInProgress() throws 
Exception {
     BackupTask backupTask = mock(BackupTask.class);
     backupService.currentTask.set(backupTask);
-    assertThatThrownBy(() -> 
backupService.prepareBackup(sender)).isInstanceOf(IOException.class);
+    assertThatThrownBy(() -> backupService.prepareBackup(sender, null, null))
+        .isInstanceOf(IOException.class);
   }
 
   @Test
   public void doBackupThrowsExceptionWhenNoBackupInProgress() throws Exception 
{
-    assertThatThrownBy(() -> backupService.doBackup(null, null, false))
-        .isInstanceOf(IOException.class);
+    assertThatThrownBy(() -> 
backupService.doBackup(false)).isInstanceOf(IOException.class);
   }
 
   @Test
   public void doBackupAbortsWithEmptyPersistentIds() throws Exception {
-    assertThat(backupService.doBackup(null, null, true).size()).isEqualTo(0);
+    assertThat(backupService.doBackup(true).size()).isEqualTo(0);
   }
 
   @Test
   public void prepareBackupReturnsEmptyPersistentIdsWhenBackupNotInProgress() 
throws Exception {
-    assertThat(backupService.prepareBackup(sender).size()).isEqualTo(0);
+    assertThat(backupService.prepareBackup(sender, null, 
null).size()).isEqualTo(0);
   }
 
 }
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupFactoryTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupFactoryTest.java
index ba4c5a3..ec15db5 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupFactoryTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupFactoryTest.java
@@ -18,7 +18,6 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import java.io.File;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -69,14 +68,14 @@ public class FinishBackupFactoryTest {
 
   @Test
   public void createRequestReturnsFinishBackupRequest() throws Exception {
-    assertThat(finishBackupFactory.createRequest(sender, recipients, 1, new 
File("targetDir"),
-        new File("baselineDir"), 
false)).isInstanceOf(FinishBackupRequest.class);
+    assertThat(finishBackupFactory.createRequest(sender, recipients, 1, false))
+        .isInstanceOf(FinishBackupRequest.class);
   }
 
   @Test
   public void createFinishBackupReturnsFinishBackup() throws Exception {
-    assertThat(finishBackupFactory.createFinishBackup(cache, new 
File("targetDir"),
-        new File("baselineDir"), false)).isInstanceOf(FinishBackup.class);
+    assertThat(finishBackupFactory.createFinishBackup(cache, false))
+        .isInstanceOf(FinishBackup.class);
   }
 
   @Test
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupOperationTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupOperationTest.java
index dad8f41..49fdd78 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupOperationTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupOperationTest.java
@@ -54,8 +54,6 @@ public class FinishBackupOperationTest {
   private InternalDistributedMember member1;
   private InternalDistributedMember member2;
 
-  private File targetDir = new File("targetDir");
-  private File baselineDir = new File("baselineDir");
   private boolean abort = false;
 
   private FinishBackupFactory finishBackupFactory;
@@ -81,18 +79,17 @@ public class FinishBackupOperationTest {
     member2 = mock(InternalDistributedMember.class, "member2");
     recipients = new HashSet<>();
 
-    finishBackupOperation = new FinishBackupOperation(dm, sender, cache, 
recipients, targetDir,
-        baselineDir, abort, finishBackupFactory);
+    finishBackupOperation =
+        new FinishBackupOperation(dm, sender, cache, recipients, abort, 
finishBackupFactory);
 
     when(finishBackupReplyProcessor.getProcessorId()).thenReturn(42);
 
     when(
         finishBackupFactory.createReplyProcessor(eq(finishBackupOperation), 
eq(dm), eq(recipients)))
             .thenReturn(finishBackupReplyProcessor);
-    when(finishBackupFactory.createRequest(eq(sender), eq(recipients), eq(42), 
eq(targetDir),
-        eq(baselineDir), eq(abort))).thenReturn(finishBackupRequest);
-    when(finishBackupFactory.createFinishBackup(eq(cache), eq(targetDir), 
eq(baselineDir),
-        eq(abort))).thenReturn(finishBackup);
+    when(finishBackupFactory.createRequest(eq(sender), eq(recipients), eq(42), 
eq(abort)))
+        .thenReturn(finishBackupRequest);
+    when(finishBackupFactory.createFinishBackup(eq(cache), 
eq(abort))).thenReturn(finishBackup);
   }
 
   @Test
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupRequestTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupRequestTest.java
index 53deb7b..4114576 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupRequestTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FinishBackupRequestTest.java
@@ -46,8 +46,6 @@ public class FinishBackupRequestTest {
   private InternalCache cache;
   private BackupService backupService;
   private int processorId = 79;
-  private File targetDir;
-  private File baselineDir;
   private boolean abort;
   private FinishBackupFactory finishBackupFactory;
   private InternalDistributedMember sender;
@@ -61,8 +59,6 @@ public class FinishBackupRequestTest {
     dm = mock(DistributionManager.class);
     cache = mock(InternalCache.class);
     backupService = mock(BackupService.class);
-    targetDir = mock(File.class);
-    baselineDir = mock(File.class);
     abort = false;
 
     when(dm.getCache()).thenReturn(cache);
@@ -78,22 +74,20 @@ public class FinishBackupRequestTest {
     when(finishBackup.run()).thenReturn(persistentIds);
 
     finishBackupFactory = mock(FinishBackupFactory.class);
-    when(finishBackupFactory.createFinishBackup(eq(cache), eq(targetDir), 
eq(baselineDir),
-        eq(abort))).thenReturn(finishBackup);
+    when(finishBackupFactory.createFinishBackup(eq(cache), 
eq(abort))).thenReturn(finishBackup);
     when(finishBackupFactory.createBackupResponse(eq(sender), 
eq(persistentIds)))
         .thenReturn(mock(BackupResponse.class));
 
 
-    finishBackupRequest = new FinishBackupRequest(sender, recipients, 
processorId, targetDir,
-        baselineDir, false, finishBackupFactory);
+    finishBackupRequest =
+        new FinishBackupRequest(sender, recipients, processorId, false, 
finishBackupFactory);
   }
 
   @Test
   public void usesFactoryToCreateFinishBackup() throws Exception {
     finishBackupRequest.createResponse(dm);
 
-    verify(finishBackupFactory, times(1)).createFinishBackup(eq(cache), 
eq(targetDir),
-        eq(baselineDir), eq(abort));
+    verify(finishBackupFactory, times(1)).createFinishBackup(eq(cache), 
eq(abort));
   }
 
   @Test
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupFactoryTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupFactoryTest.java
index e1625e0..7f2f95b 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupFactoryTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupFactoryTest.java
@@ -18,6 +18,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import java.io.File;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -43,6 +44,7 @@ public class PrepareBackupFactoryTest {
   private Set<InternalDistributedMember> recipients;
   private InternalDistributedMember member;
   private InternalCache cache;
+  private File targetDir;
 
   @Before
   public void setUp() throws Exception {
@@ -51,6 +53,7 @@ public class PrepareBackupFactoryTest {
     sender = mock(InternalDistributedMember.class);
     member = mock(InternalDistributedMember.class);
     cache = mock(InternalCache.class);
+    targetDir = mock(File.class);
 
     recipients = new HashSet<>();
 
@@ -68,13 +71,13 @@ public class PrepareBackupFactoryTest {
 
   @Test
   public void createRequestReturnsPrepareBackupRequest() throws Exception {
-    assertThat(prepareBackupFactory.createRequest(sender, recipients, 1))
+    assertThat(prepareBackupFactory.createRequest(sender, recipients, 1, 
targetDir, null))
         .isInstanceOf(PrepareBackupRequest.class);
   }
 
   @Test
   public void createPrepareBackupReturnsPrepareBackup() throws Exception {
-    assertThat(prepareBackupFactory.createPrepareBackup(member, cache))
+    assertThat(prepareBackupFactory.createPrepareBackup(member, cache, 
targetDir, null))
         .isInstanceOf(PrepareBackup.class);
   }
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupOperationTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupOperationTest.java
index 7a9f3d5..a132e76 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupOperationTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupOperationTest.java
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Set;
@@ -71,21 +72,25 @@ public class PrepareBackupOperationTest {
 
     prepareBackupFactory = mock(PrepareBackupFactory.class);
 
+    File targetDir = mock(File.class);
+    File baselineDir = mock(File.class);
+
     sender = mock(InternalDistributedMember.class, "sender");
     member1 = mock(InternalDistributedMember.class, "member1");
     member2 = mock(InternalDistributedMember.class, "member2");
     recipients = new HashSet<>();
 
-    prepareBackupOperation =
-        new PrepareBackupOperation(dm, sender, cache, recipients, 
prepareBackupFactory);
+    prepareBackupOperation = new PrepareBackupOperation(dm, sender, cache, 
recipients,
+        prepareBackupFactory, targetDir, baselineDir);
 
     when(prepareBackupReplyProcessor.getProcessorId()).thenReturn(42);
 
     when(prepareBackupFactory.createReplyProcessor(eq(prepareBackupOperation), 
eq(dm),
         eq(recipients))).thenReturn(prepareBackupReplyProcessor);
-    when(prepareBackupFactory.createRequest(eq(sender), eq(recipients), 
eq(42)))
-        .thenReturn(prepareBackupRequest);
-    when(prepareBackupFactory.createPrepareBackup(eq(sender), 
eq(cache))).thenReturn(prepareBackup);
+    when(prepareBackupFactory.createRequest(eq(sender), eq(recipients), 
eq(42), eq(targetDir),
+        eq(baselineDir))).thenReturn(prepareBackupRequest);
+    when(prepareBackupFactory.createPrepareBackup(eq(sender), eq(cache), 
eq(targetDir),
+        eq(baselineDir))).thenReturn(prepareBackup);
   }
 
   @Test
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupRequestTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupRequestTest.java
index abb784f..b8cbcc0 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupRequestTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupRequestTest.java
@@ -21,6 +21,7 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Set;
@@ -49,6 +50,8 @@ public class PrepareBackupRequestTest {
   private InternalCache cache;
   private HashSet<PersistentID> persistentIds;
   private PrepareBackup prepareBackup;
+  private File targetDir;
+  private File baselineDir;
 
   @Before
   public void setUp() throws Exception {
@@ -57,6 +60,8 @@ public class PrepareBackupRequestTest {
     cache = mock(InternalCache.class);
     prepareBackupFactory = mock(PrepareBackupFactory.class);
     prepareBackup = mock(PrepareBackup.class);
+    targetDir = mock(File.class);
+    baselineDir = mock(File.class);
 
     msgId = 42;
     recipients = new HashSet<>();
@@ -64,20 +69,22 @@ public class PrepareBackupRequestTest {
 
     when(dm.getCache()).thenReturn(cache);
     when(dm.getDistributionManagerId()).thenReturn(sender);
-    when(prepareBackupFactory.createPrepareBackup(eq(sender), 
eq(cache))).thenReturn(prepareBackup);
+    when(prepareBackupFactory.createPrepareBackup(eq(sender), eq(cache), 
eq(targetDir),
+        eq(baselineDir))).thenReturn(prepareBackup);
     when(prepareBackupFactory.createBackupResponse(eq(sender), 
eq(persistentIds)))
         .thenReturn(mock(BackupResponse.class));
     when(prepareBackup.run()).thenReturn(persistentIds);
 
-    prepareBackupRequest =
-        new PrepareBackupRequest(sender, recipients, msgId, 
prepareBackupFactory);
+    prepareBackupRequest = new PrepareBackupRequest(sender, recipients, msgId, 
prepareBackupFactory,
+        targetDir, baselineDir);
   }
 
   @Test
   public void usesFactoryToCreatePrepareBackup() throws Exception {
     prepareBackupRequest.createResponse(dm);
 
-    verify(prepareBackupFactory, times(1)).createPrepareBackup(eq(sender), 
eq(cache));
+    verify(prepareBackupFactory, times(1)).createPrepareBackup(eq(sender), 
eq(cache), eq(targetDir),
+        eq(baselineDir));
   }
 
   @Test
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
index 593103b..e26d813 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/beans/DistributedSystemBridgeJUnitTest.java
@@ -72,9 +72,9 @@ public class DistributedSystemBridgeJUnitTest {
 
     InOrder inOrder = inOrder(dm, backupService);
     inOrder.verify(dm).putOutgoing(isA(PrepareBackupRequest.class));
-    inOrder.verify(backupService).prepareBackup(any());
+    inOrder.verify(backupService).prepareBackup(any(), any(), any());
     inOrder.verify(dm).putOutgoing(isA(FinishBackupRequest.class));
-    inOrder.verify(backupService).doBackup(any(), any(), eq(false));
+    inOrder.verify(backupService).doBackup(eq(false));
   }
 
   @Test
@@ -97,6 +97,6 @@ public class DistributedSystemBridgeJUnitTest {
     }
 
     verify(dm).putOutgoing(isA(FinishBackupRequest.class));
-    verify(backupService).doBackup(any(), any(), eq(true));
+    verify(backupService).doBackup(eq(true));
   }
 }
diff --git 
a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
 
b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index 1a51bd0..51d3384 100644
--- 
a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ 
b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -1426,8 +1426,12 @@ fromData,14,2a2bb700042a2bb80005b50003b1
 toData,14,2a2bb700062ab400032bb80007b1
 
 org/apache/geode/internal/cache/backup/FinishBackupRequest,2
-fromData,33,2a2bb700182a2bb80019b500082a2bb80019b500092a2bb8001ab6001bb5000ab1
-toData,33,2a2bb7001c2ab400082bb8001d2ab400092bb8001d2ab4000ab8001e2bb8001fb1
+fromData,17,2a2bb700162a2bb80017b60018b50008b1
+toData,17,2a2bb700192ab40008b8001a2bb8001bb1
+
+org/apache/geode/internal/cache/backup/PrepareBackupRequest,2
+fromData,22,2a2bb700192a2bb8001ab500082a2bb8001ab50009b1
+toData,22,2a2bb7001b2ab400082bb8001c2ab400092bb8001cb1
 
 org/apache/geode/internal/cache/compression/CompressedCachedDeserializable,2
 fromData,18,2a2ab600082bb8000fb900090200b50003b1

-- 
To stop receiving notification emails like this one, please contact
nre...@apache.org.

Reply via email to