You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2017/11/10 20:53:12 UTC
[geode] 01/02: spotless
This is an automated email from the ASF dual-hosted git repository.
dschneider pushed a commit to branch feature/GEODE-3940
in repository https://gitbox.apache.org/repos/asf/geode.git
commit c84330aee3a8d239438de7d29a46795b26a967a6
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Fri Nov 10 12:36:19 2017 -0800
spotless
---
.../org/apache/geode/internal/DSFIDFactory.java | 12 +--
.../org/apache/geode/internal/SystemAdmin.java | 2 +-
.../apache/geode/internal/cache/DiskStoreImpl.java | 4 +-
.../geode/internal/cache/GemFireCacheImpl.java | 2 +-
.../org/apache/geode/internal/cache/Oplog.java | 2 +-
.../internal/cache/PartitionedRegionDataStore.java | 2 +-
.../cache/backup/BackupDataStoreHelper.java | 27 +++----
.../cache/backup/BackupDataStoreResult.java | 22 +++---
.../internal/cache/backup/BackupInspector.java | 22 +++---
.../geode/internal/cache/backup/BackupLock.java | 22 +++---
.../geode/internal/cache/backup/BackupManager.java | 34 ++++----
.../cache/backup/BackupResultCollector.java | 26 +++---
.../geode/internal/cache/backup/BackupUtil.java | 22 +++---
.../cache/backup/FinishBackupReplyProcessor.java | 34 ++++----
.../internal/cache/backup/FinishBackupRequest.java | 22 +++---
.../cache/backup/FinishBackupResponse.java | 22 +++---
.../cache/backup/FlushToDiskProcessor.java | 26 +++---
.../internal/cache/backup/FlushToDiskRequest.java | 22 +++---
.../internal/cache/backup/FlushToDiskResponse.java | 22 +++---
.../geode/internal/cache/backup/PrepareBackup.java | 28 +++----
.../cache/backup/PrepareBackupFactory.java | 38 ++++-----
.../cache/backup/PrepareBackupOperation.java | 52 ++++++------
.../cache/backup/PrepareBackupReplyProcessor.java | 29 ++++---
.../cache/backup/PrepareBackupRequest.java | 28 +++----
.../cache/backup/PrepareBackupResponse.java | 22 +++---
.../geode/internal/cache/backup/RestoreScript.java | 22 +++---
.../internal/cache/backup/ScriptGenerator.java | 22 +++---
.../internal/cache/backup/UnixBackupInspector.java | 22 +++---
.../internal/cache/backup/UnixScriptGenerator.java | 28 +++----
.../cache/backup/WindowsBackupInspector.java | 22 +++---
.../cache/backup/WindowsScriptGenerator.java | 22 +++---
.../internal/cache/xmlcache/CacheCreation.java | 2 +-
.../internal/beans/DistributedSystemBridge.java | 4 +-
.../internal/beans/MemberMBeanBridge.java | 2 +-
.../cli/commands/BackupDiskStoreCommand.java | 2 +-
.../cache/backup/BackupDistributedTest.java | 92 +++++++++++-----------
.../backup/BackupInspectorIntegrationTest.java | 35 ++++----
.../cache/backup/BackupIntegrationTest.java | 61 +++++++-------
.../internal/cache/backup/BackupLockTest.java | 31 ++++----
.../backup/BackupPrepareAndFinishMsgDUnitTest.java | 61 +++++++-------
.../cache/backup/FinishBackupRequestTest.java | 47 ++++++-----
.../cache/backup/FlushToDiskRequestTest.java | 41 +++++-----
.../backup/IncrementalBackupDistributedTest.java | 55 +++++++------
...titionedBackupPrepareAndFinishMsgDUnitTest.java | 22 +++---
.../cache/backup/PrepareBackupFactoryTest.java | 37 +++++----
.../cache/backup/PrepareBackupOperationTest.java | 76 +++++++++---------
.../backup/PrepareBackupReplyProcessorTest.java | 37 +++++----
.../cache/backup/PrepareBackupRequestTest.java | 48 +++++------
...eplicateBackupPrepareAndFinishMsgDUnitTest.java | 22 +++---
.../cache/backup/UnixScriptGeneratorTest.java | 35 ++++----
.../cache/backup/WindowsScriptGeneratorTest.java | 35 ++++----
.../PersistentPartitionedRegionDUnitTest.java | 13 +--
.../PersistentPartitionedRegionTestBase.java | 86 ++++++++++++--------
.../beans/DistributedSystemBridgeJUnitTest.java | 8 +-
54 files changed, 756 insertions(+), 778 deletions(-)
diff --git a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
index cdab0e2..3abcf0f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
@@ -24,12 +24,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import org.apache.geode.DataSerializer;
import org.apache.geode.InternalGemFireError;
-import org.apache.geode.internal.cache.backup.FinishBackupRequest;
-import org.apache.geode.internal.cache.backup.FinishBackupResponse;
-import org.apache.geode.internal.cache.backup.FlushToDiskRequest;
-import org.apache.geode.internal.cache.backup.FlushToDiskResponse;
-import org.apache.geode.internal.cache.backup.PrepareBackupRequest;
-import org.apache.geode.internal.cache.backup.PrepareBackupResponse;
import org.apache.geode.admin.internal.SystemMemberCacheEventProcessor;
import org.apache.geode.admin.jmx.internal.StatAlertNotification;
import org.apache.geode.cache.InterestResultPolicy;
@@ -281,6 +275,12 @@ import org.apache.geode.internal.cache.UpdateAttributesProcessor;
import org.apache.geode.internal.cache.UpdateEntryVersionOperation.UpdateEntryVersionMessage;
import org.apache.geode.internal.cache.UpdateOperation;
import org.apache.geode.internal.cache.VMCachedDeserializable;
+import org.apache.geode.internal.cache.backup.FinishBackupRequest;
+import org.apache.geode.internal.cache.backup.FinishBackupResponse;
+import org.apache.geode.internal.cache.backup.FlushToDiskRequest;
+import org.apache.geode.internal.cache.backup.FlushToDiskResponse;
+import org.apache.geode.internal.cache.backup.PrepareBackupRequest;
+import org.apache.geode.internal.cache.backup.PrepareBackupResponse;
import org.apache.geode.internal.cache.compression.SnappyCompressedCachedDeserializable;
import org.apache.geode.internal.cache.control.ResourceAdvisor.ResourceManagerProfile;
import org.apache.geode.internal.cache.control.ResourceAdvisor.ResourceProfileMessage;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/SystemAdmin.java b/geode-core/src/main/java/org/apache/geode/internal/SystemAdmin.java
index 792891a..d6660b2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/SystemAdmin.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/SystemAdmin.java
@@ -75,8 +75,8 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.distributed.internal.tcpserver.TcpClient;
import org.apache.geode.internal.admin.remote.TailLogResponse;
-import org.apache.geode.internal.cache.backup.BackupUtil;
import org.apache.geode.internal.cache.DiskStoreImpl;
+import org.apache.geode.internal.cache.backup.BackupUtil;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.internal.logging.DateFormatter;
import org.apache.geode.internal.logging.MergeLogFiles;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
index 7f3793a..3bf13ea 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
@@ -59,8 +59,6 @@ import java.util.regex.Pattern;
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
-import org.apache.geode.internal.cache.backup.BackupLock;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.logging.log4j.Logger;
import org.apache.geode.CancelCriterion;
@@ -82,6 +80,8 @@ import org.apache.geode.distributed.internal.membership.InternalDistributedMembe
import org.apache.geode.i18n.StringId;
import org.apache.geode.internal.Version;
import org.apache.geode.internal.cache.ExportDiskRegion.ExportWriter;
+import org.apache.geode.internal.cache.backup.BackupLock;
+import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.entries.DiskEntry;
import org.apache.geode.internal.cache.entries.DiskEntry.Helper.ValueWrapper;
import org.apache.geode.internal.cache.entries.DiskEntry.RecoveredEntry;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index a2888b9..252684e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -77,7 +77,6 @@ import javax.transaction.TransactionManager;
import com.sun.jna.Native;
import com.sun.jna.Platform;
import org.apache.commons.lang.StringUtils;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.logging.log4j.Logger;
import org.apache.geode.CancelCriterion;
@@ -173,6 +172,7 @@ import org.apache.geode.i18n.LogWriterI18n;
import org.apache.geode.internal.Assert;
import org.apache.geode.internal.ClassPathLoader;
import org.apache.geode.internal.SystemTimer;
+import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.control.InternalResourceManager;
import org.apache.geode.internal.cache.control.InternalResourceManager.ResourceType;
import org.apache.geode.internal.cache.control.ResourceAdvisor;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
index 231d8bf..9b4ed10 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
@@ -53,7 +53,6 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.logging.log4j.Logger;
import org.apache.geode.CancelException;
@@ -82,6 +81,7 @@ import org.apache.geode.internal.cache.DiskInitFile.DiskRegionFlag;
import org.apache.geode.internal.cache.DiskStoreImpl.OplogCompactor;
import org.apache.geode.internal.cache.DiskStoreImpl.OplogEntryIdSet;
import org.apache.geode.internal.cache.DistributedRegion.DiskPosition;
+import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.entries.DiskEntry;
import org.apache.geode.internal.cache.entries.DiskEntry.Helper.Flushable;
import org.apache.geode.internal.cache.entries.DiskEntry.Helper.ValueWrapper;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
index 43008f6..33d03ba 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java
@@ -31,7 +31,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Lock;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.logging.log4j.Logger;
import org.apache.geode.InternalGemFireError;
@@ -78,6 +77,7 @@ import org.apache.geode.internal.cache.BucketRegion.RawValue;
import org.apache.geode.internal.cache.LocalRegion.RegionPerfStats;
import org.apache.geode.internal.cache.PartitionedRegion.BucketLock;
import org.apache.geode.internal.cache.PartitionedRegion.SizeEntry;
+import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.execute.BucketMovedException;
import org.apache.geode.internal.cache.execute.FunctionStats;
import org.apache.geode.internal.cache.execute.PartitionedRegionFunctionResultSender;
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 364bca6..2671ce5 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -36,14 +34,15 @@ public class BackupDataStoreHelper {
@SuppressWarnings("rawtypes")
public static BackupDataStoreResult backupAllMembers(DM dm, Set recipients, File targetDir,
- File baselineDir) {
+ File baselineDir) {
FlushToDiskRequest.send(dm, recipients);
boolean abort = true;
Map<DistributedMember, Set<PersistentID>> successfulMembers;
Map<DistributedMember, Set<PersistentID>> existingDataStores;
try {
- existingDataStores = new PrepareBackupOperation(dm, dm.getId(), dm.getCache(), recipients).send();
+ existingDataStores =
+ new PrepareBackupOperation(dm, dm.getId(), dm.getCache(), recipients).send();
abort = false;
} finally {
successfulMembers = FinishBackupRequest.send(dm, recipients, targetDir, baselineDir, abort);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreResult.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreResult.java
index d838cc9..294c71a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreResult.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupDataStoreResult.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupInspector.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupInspector.java
index 4ca582e..80d9673 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupInspector.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupInspector.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupLock.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupLock.java
index 5392a36..29d6976 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupLock.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupLock.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupManager.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupManager.java
index 6134cac..f773b21 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupManager.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -31,12 +29,6 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import org.apache.commons.io.FileUtils;
-import org.apache.geode.internal.cache.DirectoryHolder;
-import org.apache.geode.internal.cache.DiskStoreBackup;
-import org.apache.geode.internal.cache.DiskStoreImpl;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
-import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.internal.cache.Oplog;
import org.apache.logging.log4j.Logger;
import org.apache.geode.InternalGemFireError;
@@ -50,6 +42,12 @@ import org.apache.geode.distributed.internal.membership.InternalDistributedMembe
import org.apache.geode.internal.ClassPathLoader;
import org.apache.geode.internal.DeployedJar;
import org.apache.geode.internal.JarDeployer;
+import org.apache.geode.internal.cache.DirectoryHolder;
+import org.apache.geode.internal.cache.DiskStoreBackup;
+import org.apache.geode.internal.cache.DiskStoreImpl;
+import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.Oplog;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.internal.logging.LogService;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupResultCollector.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupResultCollector.java
index 050d98e..d4ab322 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupResultCollector.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupResultCollector.java
@@ -1,26 +1,24 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
+import java.util.Set;
+
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import java.util.Set;
-
interface BackupResultCollector {
void addToResults(InternalDistributedMember member, Set<PersistentID> persistentIds);
}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupUtil.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupUtil.java
index 8897411..264879d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupUtil.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/BackupUtil.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupReplyProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupReplyProcessor.java
index 0afc45f..72d621e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupReplyProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupReplyProcessor.java
@@ -1,27 +1,19 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
-import org.apache.geode.cache.persistence.PersistentID;
-import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.DM;
-import org.apache.geode.distributed.internal.DistributionMessage;
-import org.apache.geode.internal.admin.remote.AdminMultipleReplyProcessor;
-
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -29,6 +21,12 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import org.apache.geode.cache.persistence.PersistentID;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.internal.admin.remote.AdminMultipleReplyProcessor;
+
class FinishBackupReplyProcessor extends AdminMultipleReplyProcessor {
private final Map<DistributedMember, Set<PersistentID>> results =
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 a277478..1cec313 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupResponse.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupResponse.java
index aa793e9..03fd471 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FinishBackupResponse.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskProcessor.java
index 999f9af..0839ccc 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskProcessor.java
@@ -1,27 +1,25 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
+import java.util.Collection;
+
import org.apache.geode.distributed.internal.DM;
import org.apache.geode.distributed.internal.DistributionMessage;
import org.apache.geode.internal.admin.remote.AdminMultipleReplyProcessor;
-import java.util.Collection;
-
class FlushToDiskProcessor extends AdminMultipleReplyProcessor {
FlushToDiskProcessor(DM dm, Collection initMembers) {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskRequest.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskRequest.java
index 501e8d1..8910527 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskRequest.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskRequest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskResponse.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskResponse.java
index 4195b5b..89b1b71 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/FlushToDiskResponse.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
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 41ec91e..de71173 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
@@ -1,28 +1,26 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
+import java.io.IOException;
+import java.util.HashSet;
+
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.InternalCache;
-import java.io.IOException;
-import java.util.HashSet;
-
class PrepareBackup {
private final InternalDistributedMember member;
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 7d45471..5124002 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
@@ -1,36 +1,37 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
+import java.util.HashSet;
+import java.util.Set;
+
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.internal.DM;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.InternalCache;
-import java.util.HashSet;
-import java.util.Set;
-
class PrepareBackupFactory {
- PrepareBackupReplyProcessor createReplyProcessor(BackupResultCollector resultCollector, DM dm, Set<InternalDistributedMember> recipients) {
+ PrepareBackupReplyProcessor createReplyProcessor(BackupResultCollector resultCollector, DM dm,
+ Set<InternalDistributedMember> recipients) {
return new PrepareBackupReplyProcessor(resultCollector, dm, recipients);
}
- PrepareBackupRequest createRequest(InternalDistributedMember sender, Set<InternalDistributedMember> recipients, int processorId, PrepareBackupFactory prepareBackupFactory) {
+ PrepareBackupRequest createRequest(InternalDistributedMember sender,
+ Set<InternalDistributedMember> recipients, int processorId,
+ PrepareBackupFactory prepareBackupFactory) {
return new PrepareBackupRequest(sender, recipients, processorId, prepareBackupFactory);
}
@@ -38,7 +39,8 @@ class PrepareBackupFactory {
return new PrepareBackup(member, cache);
}
- PrepareBackupResponse createPrepareBackupResponse(InternalDistributedMember sender, HashSet<PersistentID> persistentIds) {
+ PrepareBackupResponse createPrepareBackupResponse(InternalDistributedMember sender,
+ HashSet<PersistentID> persistentIds) {
return new PrepareBackupResponse(sender, persistentIds);
}
}
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 463cef3..37b1d29 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
@@ -1,21 +1,27 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.logging.log4j.Logger;
+
import org.apache.geode.CancelException;
import org.apache.geode.annotations.TestingOnly;
import org.apache.geode.cache.persistence.PersistentID;
@@ -25,13 +31,6 @@ import org.apache.geode.distributed.internal.ReplyException;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.logging.LogService;
-import org.apache.logging.log4j.Logger;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
class PrepareBackupOperation implements BackupResultCollector {
private static final Logger logger = LogService.getLogger();
@@ -42,14 +41,17 @@ class PrepareBackupOperation implements BackupResultCollector {
private final Set<InternalDistributedMember> recipients;
private final PrepareBackupFactory prepareBackupFactory;
- private final Map<DistributedMember, Set<PersistentID>> results = Collections.synchronizedMap(new HashMap<DistributedMember, Set<PersistentID>>());
+ private final Map<DistributedMember, Set<PersistentID>> results =
+ Collections.synchronizedMap(new HashMap<DistributedMember, Set<PersistentID>>());
- PrepareBackupOperation(DM dm, InternalDistributedMember member, InternalCache cache, Set<InternalDistributedMember> recipients) {
+ PrepareBackupOperation(DM dm, InternalDistributedMember member, InternalCache cache,
+ Set<InternalDistributedMember> recipients) {
this(dm, member, cache, recipients, new PrepareBackupFactory());
}
@TestingOnly
- PrepareBackupOperation(DM dm, InternalDistributedMember member, InternalCache cache, Set<InternalDistributedMember> recipients, PrepareBackupFactory prepareBackupFactory) {
+ PrepareBackupOperation(DM dm, InternalDistributedMember member, InternalCache cache,
+ Set<InternalDistributedMember> recipients, PrepareBackupFactory prepareBackupFactory) {
this.dm = dm;
this.member = member;
this.cache = cache;
@@ -58,8 +60,10 @@ class PrepareBackupOperation implements BackupResultCollector {
}
Map<DistributedMember, Set<PersistentID>> send() {
- PrepareBackupReplyProcessor replyProcessor = prepareBackupFactory.createReplyProcessor(this, dm, recipients);
- PrepareBackupRequest request = prepareBackupFactory.createRequest(member, recipients, replyProcessor.getProcessorId(), prepareBackupFactory);
+ PrepareBackupReplyProcessor replyProcessor =
+ prepareBackupFactory.createReplyProcessor(this, dm, recipients);
+ PrepareBackupRequest request = prepareBackupFactory.createRequest(member, recipients,
+ replyProcessor.getProcessorId(), prepareBackupFactory);
dm.putOutgoing(request);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessor.java
index 9d1a1fb..49a7112 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessor.java
@@ -1,33 +1,32 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
+import java.util.Set;
+
import org.apache.geode.distributed.internal.DM;
import org.apache.geode.distributed.internal.DistributionMessage;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.admin.remote.AdminMultipleReplyProcessor;
-import java.util.Set;
-
class PrepareBackupReplyProcessor extends AdminMultipleReplyProcessor {
private final BackupResultCollector resultCollector;
- PrepareBackupReplyProcessor(BackupResultCollector resultCollector, DM dm, Set<InternalDistributedMember> recipients) {
+ PrepareBackupReplyProcessor(BackupResultCollector resultCollector, DM dm,
+ Set<InternalDistributedMember> recipients) {
super(dm, recipients);
this.resultCollector = resultCollector;
}
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 ab7c8af..c786fa2 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -46,7 +44,8 @@ public class PrepareBackupRequest extends CliLegacyMessage {
// nothing
}
- PrepareBackupRequest(InternalDistributedMember sender, Set<InternalDistributedMember> recipients, int msgId, PrepareBackupFactory prepareBackupFactory) {
+ PrepareBackupRequest(InternalDistributedMember sender, Set<InternalDistributedMember> recipients,
+ int msgId, PrepareBackupFactory prepareBackupFactory) {
setSender(sender);
setRecipients(recipients);
this.msgId = msgId;
@@ -57,7 +56,8 @@ public class PrepareBackupRequest extends CliLegacyMessage {
protected AdminResponse createResponse(DM dm) {
HashSet<PersistentID> persistentIds;
try {
- persistentIds = prepareBackupFactory.createPrepareBackup(dm.getDistributionManagerId(), dm.getCache()).run();
+ persistentIds = prepareBackupFactory
+ .createPrepareBackup(dm.getDistributionManagerId(), dm.getCache()).run();
} catch (IOException e) {
logger.error(LocalizedMessage.create(LocalizedStrings.CliLegacyMessage_ERROR, getClass()), e);
return AdminFailureResponse.create(getSender(), e);
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupResponse.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupResponse.java
index ed4e28d..b547f11 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/PrepareBackupResponse.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/RestoreScript.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/RestoreScript.java
index a9e53fa..cd9d160 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/RestoreScript.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/RestoreScript.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/ScriptGenerator.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/ScriptGenerator.java
index 368b8d4..7804d13 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/ScriptGenerator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/ScriptGenerator.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixBackupInspector.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixBackupInspector.java
index 642fe3f..cc14cb4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixBackupInspector.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixBackupInspector.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixScriptGenerator.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixScriptGenerator.java
index c71e8ac..ee9a53d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixScriptGenerator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/UnixScriptGenerator.java
@@ -1,28 +1,26 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
-import org.apache.geode.internal.cache.backup.RestoreScript;
-import org.apache.geode.internal.cache.backup.ScriptGenerator;
-
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
+import org.apache.geode.internal.cache.backup.RestoreScript;
+import org.apache.geode.internal.cache.backup.ScriptGenerator;
+
class UnixScriptGenerator implements ScriptGenerator {
private static final String SCRIPT_FILE_NAME = "restore.sh";
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsBackupInspector.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsBackupInspector.java
index 85372ad..2d5adf7 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsBackupInspector.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsBackupInspector.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsScriptGenerator.java b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsScriptGenerator.java
index 7a5306a..7f35691 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsScriptGenerator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/backup/WindowsScriptGenerator.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
index 168eb84..e9267ad 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java
@@ -103,7 +103,6 @@ import org.apache.geode.distributed.internal.membership.InternalDistributedMembe
import org.apache.geode.i18n.LogWriterI18n;
import org.apache.geode.internal.Assert;
import org.apache.geode.internal.SystemTimer;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.CacheConfig;
import org.apache.geode.internal.cache.CachePerfStats;
import org.apache.geode.internal.cache.CacheServerImpl;
@@ -128,6 +127,7 @@ import org.apache.geode.internal.cache.RegionListener;
import org.apache.geode.internal.cache.TXEntryStateFactory;
import org.apache.geode.internal.cache.TXManagerImpl;
import org.apache.geode.internal.cache.TombstoneService;
+import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.control.InternalResourceManager;
import org.apache.geode.internal.cache.control.ResourceAdvisor;
import org.apache.geode.internal.cache.event.EventTrackerExpiryTask;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/DistributedSystemBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/DistributedSystemBridge.java
index d48c89f..7cd6665 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/DistributedSystemBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/DistributedSystemBridge.java
@@ -44,8 +44,6 @@ import javax.management.ObjectName;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.Logger;
-import org.apache.geode.internal.cache.backup.BackupDataStoreHelper;
-import org.apache.geode.internal.cache.backup.BackupDataStoreResult;
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.DM;
@@ -58,6 +56,8 @@ import org.apache.geode.internal.admin.remote.RevokePersistentIDRequest;
import org.apache.geode.internal.admin.remote.ShutdownAllRequest;
import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.backup.BackupDataStoreHelper;
+import org.apache.geode.internal.cache.backup.BackupDataStoreResult;
import org.apache.geode.internal.cache.persistence.PersistentMemberPattern;
import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.internal.logging.LogService;
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 96096ba..2a6565a 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
@@ -63,7 +63,6 @@ import org.apache.geode.distributed.internal.locks.DLockStats;
import org.apache.geode.internal.Assert;
import org.apache.geode.internal.GemFireVersion;
import org.apache.geode.internal.PureJavaMode;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.CachePerfStats;
import org.apache.geode.internal.cache.DirectoryHolder;
import org.apache.geode.internal.cache.DiskDirectoryStats;
@@ -74,6 +73,7 @@ import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.LocalRegion;
import org.apache.geode.internal.cache.PartitionedRegion;
import org.apache.geode.internal.cache.PartitionedRegionStats;
+import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.control.ResourceManagerStats;
import org.apache.geode.internal.cache.execute.FunctionServiceStats;
import org.apache.geode.internal.cache.lru.LRUStatistics;
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/BackupDiskStoreCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/BackupDiskStoreCommand.java
index bd89918..8eb9bf8 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/BackupDiskStoreCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/BackupDiskStoreCommand.java
@@ -25,8 +25,8 @@ import org.springframework.shell.core.annotation.CliOption;
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.DM;
-import org.apache.geode.internal.cache.backup.BackupUtil;
import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.backup.BackupUtil;
import org.apache.geode.management.BackupStatus;
import org.apache.geode.management.cli.CliMetaData;
import org.apache.geode.management.cli.Result;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupDistributedTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupDistributedTest.java
index e8c186b..ec869b6 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupDistributedTest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -26,7 +24,32 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.UncheckedIOException;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.regex.Pattern;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import junitparams.naming.TestCaseName;
import org.apache.commons.io.FileUtils;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.DataPolicy;
import org.apache.geode.cache.DiskStore;
@@ -56,30 +79,6 @@ import org.apache.geode.test.dunit.SerializableCallable;
import org.apache.geode.test.dunit.SerializableRunnable;
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.junit.categories.DistributedTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.UncheckedIOException;
-import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.regex.Pattern;
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-import junitparams.naming.TestCaseName;
/**
* Additional tests to consider adding:
@@ -260,7 +259,8 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
@Test
@Parameters({"BEFORE_SENDING_DESTROYREGIONMESSAGE", "BEFORE_PROCESSING_REPLYMESSAGE"})
@TestCaseName("{method}({params})")
- public void testWhileBucketIsMovedBackup(final WhenToInvokeBackup whenToInvokeBackup) throws Exception {
+ public void testWhileBucketIsMovedBackup(final WhenToInvokeBackup whenToInvokeBackup)
+ throws Exception {
vm0.invoke("Add listener to invoke backup", () -> {
disconnectFromDS();
@@ -377,7 +377,8 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
assertThat(status.getOfflineDiskStores()).hasSize(2);
}
- private DistributionMessageObserver createTestHookToBackup(WhenToInvokeBackup backupInvocationTestHook) {
+ private DistributionMessageObserver createTestHookToBackup(
+ WhenToInvokeBackup backupInvocationTestHook) {
switch (backupInvocationTestHook) {
case BEFORE_SENDING_DESTROYREGIONMESSAGE:
return createTestHookToBackupBeforeSendingDestroyRegionMessage(() -> backup(vm2));
@@ -388,7 +389,8 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
}
}
- private DistributionMessageObserver createTestHookToBackupBeforeProcessingReplyMessage(Runnable task) {
+ private DistributionMessageObserver createTestHookToBackupBeforeProcessingReplyMessage(
+ Runnable task) {
return new DistributionMessageObserver() {
private volatile boolean done;
private final AtomicInteger count = new AtomicInteger();
@@ -404,7 +406,8 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
@Override
public void beforeProcessMessage(DistributionManager dm, DistributionMessage message) {
- if (message instanceof ReplyMessage && replyId != -0xBAD && replyId == message.getProcessorId() && !done && count.incrementAndGet() == 2) {
+ if (message instanceof ReplyMessage && replyId != -0xBAD
+ && replyId == message.getProcessorId() && !done && count.incrementAndGet() == 2) {
task.run();
done = true;
}
@@ -412,7 +415,8 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
};
}
- private DistributionMessageObserver createTestHookToBackupBeforeSendingDestroyRegionMessage(Runnable task) {
+ private DistributionMessageObserver createTestHookToBackupBeforeSendingDestroyRegionMessage(
+ Runnable task) {
return new DistributionMessageObserver() {
private volatile boolean done;
@@ -437,7 +441,8 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
});
}
- private DistributionMessageObserver createTestHookToThrowIOExceptionBeforeProcessingPrepareBackupRequest(final String exceptionMessage) {
+ private DistributionMessageObserver createTestHookToThrowIOExceptionBeforeProcessingPrepareBackupRequest(
+ final String exceptionMessage) {
return new DistributionMessageObserver() {
@Override
public void beforeProcessMessage(DistributionManager dm, DistributionMessage message) {
@@ -740,7 +745,6 @@ public class BackupDistributedTest extends PersistentPartitionedRegionTestBase {
}
enum WhenToInvokeBackup {
- BEFORE_SENDING_DESTROYREGIONMESSAGE,
- BEFORE_PROCESSING_REPLYMESSAGE
+ BEFORE_SENDING_DESTROYREGIONMESSAGE, BEFORE_PROCESSING_REPLYMESSAGE
}
}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupInspectorIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupInspectorIntegrationTest.java
index 75e5daf..1a2be04 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupInspectorIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupInspectorIntegrationTest.java
@@ -1,36 +1,35 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import org.apache.geode.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
+import org.apache.geode.test.junit.categories.IntegrationTest;
/**
* Tests for the BackupInspector.
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 e229272..ee58738 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -25,25 +23,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.filefilter.DirectoryFileFilter;
-import org.apache.commons.io.filefilter.RegexFileFilter;
-import org.apache.geode.cache.CacheFactory;
-import org.apache.geode.cache.DataPolicy;
-import org.apache.geode.cache.DiskStore;
-import org.apache.geode.cache.DiskStoreFactory;
-import org.apache.geode.cache.EvictionAction;
-import org.apache.geode.cache.EvictionAttributes;
-import org.apache.geode.cache.Region;
-import org.apache.geode.cache.RegionFactory;
-import org.apache.geode.internal.cache.DiskStoreImpl;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
-import org.apache.geode.test.junit.categories.IntegrationTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -59,6 +38,26 @@ import java.util.Properties;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.commons.io.filefilter.RegexFileFilter;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.cache.CacheFactory;
+import org.apache.geode.cache.DataPolicy;
+import org.apache.geode.cache.DiskStore;
+import org.apache.geode.cache.DiskStoreFactory;
+import org.apache.geode.cache.EvictionAction;
+import org.apache.geode.cache.EvictionAttributes;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionFactory;
+import org.apache.geode.internal.cache.DiskStoreImpl;
+import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+
@Category(IntegrationTest.class)
public class BackupIntegrationTest {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupLockTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupLockTest.java
index 79efdb5..9f1c82b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupLockTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/BackupLockTest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -20,14 +18,15 @@ import static java.util.concurrent.TimeUnit.SECONDS;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
-import org.apache.geode.test.junit.categories.UnitTest;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicBoolean;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.geode.test.junit.categories.UnitTest;
@Category(UnitTest.class)
public class BackupLockTest {
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 12f4335..dc40102 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -20,6 +18,26 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.stream.Collectors;
+
+import org.awaitility.Awaitility;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.apache.geode.cache.Cache;
import org.apache.geode.cache.DiskStore;
import org.apache.geode.cache.DiskStoreFactory;
@@ -36,25 +54,6 @@ import org.apache.geode.distributed.internal.DM;
import org.apache.geode.internal.cache.DiskStoreImpl;
import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.test.junit.categories.DistributedTest;
-import org.awaitility.Awaitility;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.stream.Collectors;
@Category({DistributedTest.class})
public abstract class BackupPrepareAndFinishMsgDUnitTest extends CacheTestCase {
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 f90e68e..68cae0f 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -27,6 +25,19 @@ 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.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.InOrder;
+
import org.apache.geode.cache.CacheClosedException;
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.DistributedMember;
@@ -37,18 +48,6 @@ import org.apache.geode.internal.admin.remote.AdminFailureResponse;
import org.apache.geode.internal.admin.remote.AdminResponse;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.test.junit.categories.UnitTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.InOrder;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
@Category(UnitTest.class)
public class FinishBackupRequestTest {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FlushToDiskRequestTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FlushToDiskRequestTest.java
index 97fb747..f1ea67d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FlushToDiskRequestTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/FlushToDiskRequestTest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -27,6 +25,16 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.InOrder;
+
import org.apache.geode.cache.CacheClosedException;
import org.apache.geode.cache.DiskStore;
import org.apache.geode.distributed.internal.DM;
@@ -35,15 +43,6 @@ import org.apache.geode.distributed.internal.membership.InternalDistributedMembe
import org.apache.geode.internal.admin.remote.AdminResponse;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.test.junit.categories.UnitTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.InOrder;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
@Category(UnitTest.class)
public class FlushToDiskRequestTest {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/IncrementalBackupDistributedTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/IncrementalBackupDistributedTest.java
index deeacd0..69b6478 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/IncrementalBackupDistributedTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/IncrementalBackupDistributedTest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -22,9 +20,26 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.file.Files;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.DirectoryFileFilter;
import org.apache.commons.io.filefilter.RegexFileFilter;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.apache.geode.admin.AdminDistributedSystem;
import org.apache.geode.admin.internal.AdminDistributedSystemImpl;
import org.apache.geode.cache.Cache;
@@ -55,22 +70,6 @@ import org.apache.geode.test.dunit.Wait;
import org.apache.geode.test.dunit.WaitCriterion;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
import org.apache.geode.test.junit.categories.DistributedTest;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.file.Files;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
/**
* Tests for the incremental backup feature.
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PartitionedBackupPrepareAndFinishMsgDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PartitionedBackupPrepareAndFinishMsgDUnitTest.java
index bd931d9..b734286 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PartitionedBackupPrepareAndFinishMsgDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PartitionedBackupPrepareAndFinishMsgDUnitTest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
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 c202ab8..cbb8d36 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
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
@@ -20,18 +18,19 @@ import static org.assertj.core.api.Assertions.*;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.apache.geode.CancelCriterion;
import org.apache.geode.distributed.internal.DM;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.test.junit.categories.UnitTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.HashSet;
-import java.util.Set;
@Category(UnitTest.class)
public class PrepareBackupFactoryTest {
@@ -78,4 +77,4 @@ public class PrepareBackupFactoryTest {
assertThat(prepareBackupFactory.createPrepareBackup(member, cache))
.isInstanceOf(PrepareBackup.class);
}
-}
\ No newline at end of file
+}
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 800b976..9e6c006 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
@@ -1,39 +1,38 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
-import org.apache.geode.annotations.TestingOnly;
-import org.apache.geode.cache.persistence.PersistentID;
-import org.apache.geode.distributed.internal.DM;
-import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.test.junit.categories.UnitTest;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
+import org.apache.geode.annotations.TestingOnly;
+import org.apache.geode.cache.persistence.PersistentID;
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.test.junit.categories.UnitTest;
@Category(UnitTest.class)
public class PrepareBackupOperationTest {
@@ -69,12 +68,15 @@ public class PrepareBackupOperationTest {
member2 = mock(InternalDistributedMember.class, "member2");
recipients = new HashSet<>();
- prepareBackupOperation = new PrepareBackupOperation(dm, sender, cache, recipients, prepareBackupFactory);
+ prepareBackupOperation =
+ new PrepareBackupOperation(dm, sender, cache, recipients, prepareBackupFactory);
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), eq(prepareBackupFactory))).thenReturn(prepareBackupRequest);
+ when(prepareBackupFactory.createReplyProcessor(eq(prepareBackupOperation), eq(dm),
+ eq(recipients))).thenReturn(prepareBackupReplyProcessor);
+ when(prepareBackupFactory.createRequest(eq(sender), eq(recipients), eq(42),
+ eq(prepareBackupFactory))).thenReturn(prepareBackupRequest);
when(prepareBackupFactory.createPrepareBackup(eq(sender), eq(cache))).thenReturn(prepareBackup);
}
@@ -92,7 +94,8 @@ public class PrepareBackupOperationTest {
doAnswer(invokeAddToResults(new MemberWithPersistentIds(member1, persistentIdsForMember1)))
.when(prepareBackupReplyProcessor).waitForReplies();
- assertThat(prepareBackupOperation.send()).containsOnlyKeys(member1).containsValues(persistentIdsForMember1);
+ assertThat(prepareBackupOperation.send()).containsOnlyKeys(member1)
+ .containsValues(persistentIdsForMember1);
}
@Test
@@ -101,7 +104,8 @@ public class PrepareBackupOperationTest {
persistentIdsForSender.add(mock(PersistentID.class));
when(prepareBackup.run()).thenReturn(persistentIdsForSender);
- assertThat(prepareBackupOperation.send()).containsOnlyKeys(sender).containsValue(persistentIdsForSender);
+ assertThat(prepareBackupOperation.send()).containsOnlyKeys(sender)
+ .containsValue(persistentIdsForSender);
}
@Test
@@ -114,13 +118,12 @@ public class PrepareBackupOperationTest {
MemberWithPersistentIds[] ids = new MemberWithPersistentIds[] {
new MemberWithPersistentIds(member1, persistentIdsForMember1),
- new MemberWithPersistentIds(member2, persistentIdsForMember2) };
+ new MemberWithPersistentIds(member2, persistentIdsForMember2)};
- doAnswer(invokeAddToResults(ids)).when(prepareBackupReplyProcessor)
- .waitForReplies();
+ doAnswer(invokeAddToResults(ids)).when(prepareBackupReplyProcessor).waitForReplies();
-// prepareBackupOperation.addToResults(ids[0].member, ids[0].persistentIds);
-// prepareBackupOperation.addToResults(ids[1].member, ids[1].persistentIds);
+ // prepareBackupOperation.addToResults(ids[0].member, ids[0].persistentIds);
+ // prepareBackupOperation.addToResults(ids[1].member, ids[1].persistentIds);
HashSet<PersistentID> persistentIdsForSender = new HashSet<>();
persistentIdsForSender.add(mock(PersistentID.class));
@@ -148,13 +151,13 @@ public class PrepareBackupOperationTest {
@Test
public void sendShouldPrepareForBackupInLocalMemberBeforeWaitingForReplies() throws Exception {
fail("sendShouldPrepareForBackupInLocalMemberBeforeWaitingForReplies");
-// InOrder inOrder = inOrder(backupManager, replyProcessor);
+ // InOrder inOrder = inOrder(backupManager, replyProcessor);
-// prepareBackupRequest.send();
+ // prepareBackupRequest.send();
// assert that prepareForBackup is invoked before invoking waitForReplies
-// inOrder.verify(backupManager, times(1)).prepareForBackup();
-// inOrder.verify(replyProcessor, times(1)).waitForReplies();
+ // inOrder.verify(backupManager, times(1)).prepareForBackup();
+ // inOrder.verify(replyProcessor, times(1)).waitForReplies();
}
private Answer<Object> invokeAddToResults(MemberWithPersistentIds... memberWithPersistentIds) {
@@ -169,9 +172,10 @@ public class PrepareBackupOperationTest {
private static class MemberWithPersistentIds {
InternalDistributedMember member;
HashSet<PersistentID> persistentIds;
+
MemberWithPersistentIds(InternalDistributedMember member, HashSet<PersistentID> persistentIds) {
this.member = member;
this.persistentIds = persistentIds;
}
}
-}
\ No newline at end of file
+}
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessorTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessorTest.java
index 7f22f75..535327e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/PrepareBackupReplyProcessorTest.java
@@ -1,24 +1,29 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.apache.geode.CancelCriterion;
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.internal.DM;
@@ -26,12 +31,6 @@ import org.apache.geode.distributed.internal.DistributionMessage;
import org.apache.geode.distributed.internal.InternalDistributedSystem;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.test.junit.categories.UnitTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.HashSet;
-import java.util.Set;
@Category(UnitTest.class)
public class PrepareBackupReplyProcessorTest {
@@ -88,4 +87,4 @@ public class PrepareBackupReplyProcessorTest {
verify(resultCollector, times(0)).addToResults(eq(sender), eq(persistentIds));
}
-}
\ No newline at end of file
+}
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 59f7daa..ae120c8 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
@@ -1,38 +1,37 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.internal.DM;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.internal.admin.remote.AdminFailureResponse;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.test.junit.categories.UnitTest;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
@Category(UnitTest.class)
public class PrepareBackupRequestTest {
@@ -63,10 +62,12 @@ public class PrepareBackupRequestTest {
when(dm.getCache()).thenReturn(cache);
when(dm.getDistributionManagerId()).thenReturn(sender);
when(prepareBackupFactory.createPrepareBackup(eq(sender), eq(cache))).thenReturn(prepareBackup);
- when(prepareBackupFactory.createPrepareBackupResponse(eq(sender), eq(persistentIds))).thenReturn(mock(PrepareBackupResponse.class));
+ when(prepareBackupFactory.createPrepareBackupResponse(eq(sender), eq(persistentIds)))
+ .thenReturn(mock(PrepareBackupResponse.class));
when(prepareBackup.run()).thenReturn(persistentIds);
- prepareBackupRequest = new PrepareBackupRequest(sender, recipients, msgId, prepareBackupFactory);
+ prepareBackupRequest =
+ new PrepareBackupRequest(sender, recipients, msgId, prepareBackupFactory);
}
@Test
@@ -80,7 +81,8 @@ public class PrepareBackupRequestTest {
public void usesFactoryToCreatePrepareBackupResponse() throws Exception {
prepareBackupRequest.createResponse(dm);
- verify(prepareBackupFactory, times(1)).createPrepareBackupResponse(eq(sender), eq(persistentIds));
+ verify(prepareBackupFactory, times(1)).createPrepareBackupResponse(eq(sender),
+ eq(persistentIds));
}
@Test
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/ReplicateBackupPrepareAndFinishMsgDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/ReplicateBackupPrepareAndFinishMsgDUnitTest.java
index d8a7622..aa097c1 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/ReplicateBackupPrepareAndFinishMsgDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/ReplicateBackupPrepareAndFinishMsgDUnitTest.java
@@ -1,18 +1,16 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/UnixScriptGeneratorTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/UnixScriptGeneratorTest.java
index df832a6..1b13cbf 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/UnixScriptGeneratorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/UnixScriptGeneratorTest.java
@@ -1,35 +1,34 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
import static org.assertj.core.api.Assertions.assertThat;
-import org.apache.geode.test.junit.categories.IntegrationTest;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.List;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.util.List;
+import org.apache.geode.test.junit.categories.IntegrationTest;
@Category(IntegrationTest.class)
public class UnixScriptGeneratorTest {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/WindowsScriptGeneratorTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/WindowsScriptGeneratorTest.java
index 265036c..59abacf 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/backup/WindowsScriptGeneratorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/backup/WindowsScriptGeneratorTest.java
@@ -1,35 +1,34 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
*/
package org.apache.geode.internal.cache.backup;
import static org.assertj.core.api.Assertions.assertThat;
-import org.apache.geode.test.junit.categories.IntegrationTest;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.List;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.util.List;
+import org.apache.geode.test.junit.categories.IntegrationTest;
@Category(IntegrationTest.class)
public class WindowsScriptGeneratorTest {
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
index 69629a9..dad51c4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
@@ -1063,7 +1063,8 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
/**
* This test this case we replace buckets where are offline on A by creating them on C We then
- * shutdown C and restart A, which recovers those buckets<p>
+ * shutdown C and restart A, which recovers those buckets
+ * <p>
*
* TRAC 41340: data inconsistency after disk recovery from persistent PR
*/
@@ -1180,7 +1181,8 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
/**
* Test that we don't record our old member ID as offline, preventing redundancy recovery in the
- * future.<p>
+ * future.
+ * <p>
*
* TRAC 41341: Redundancy not restored after reinitializing after locally destroying persistent PR
*/
@@ -1709,10 +1711,11 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
* Test for bug 4226. 1. Member A has the bucket 2. Member B starts creating the bucket. It tells
* member A that it hosts the bucket 3. Member A crashes 4. Member B destroys the bucket and
* throws a partition offline exception, because it wasn't able to complete initialization. 5.
- * Member A recovers, and gets stuck waiting for member B.<p>
+ * Member A recovers, and gets stuck waiting for member B.
+ * <p>
*
- * TRAC 42226: recycled VM hangs during re-start while waiting for Partition to come online
- * (after Controller VM sees unexpected PartitionOffLineException while doing ops)
+ * TRAC 42226: recycled VM hangs during re-start while waiting for Partition to come online (after
+ * Controller VM sees unexpected PartitionOffLineException while doing ops)
*/
@Category(FlakyTest.class) // GEODE-1208: time sensitive, multiple non-thread-safe test hooks,
// async actions
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
index 08ea72f..1b2732e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
@@ -21,7 +21,21 @@ import static org.apache.geode.admin.AdminDistributedSystemFactory.getDistribute
import static org.apache.geode.test.dunit.Invoke.invokeInEveryVM;
import static org.assertj.core.api.Assertions.assertThat;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.util.Collection;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
import org.apache.commons.io.filefilter.RegexFileFilter;
+import org.apache.logging.log4j.Logger;
+import org.junit.Before;
+
import org.apache.geode.admin.AdminDistributedSystem;
import org.apache.geode.admin.AdminException;
import org.apache.geode.admin.DistributedSystemConfig;
@@ -37,11 +51,11 @@ import org.apache.geode.cache.partition.PartitionRegionInfo;
import org.apache.geode.cache.persistence.ConflictingPersistentDataException;
import org.apache.geode.cache.persistence.PersistentID;
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.cache.backup.BackupUtil;
import org.apache.geode.internal.cache.DiskRegion;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.PartitionedRegion;
import org.apache.geode.internal.cache.PartitionedRegionDataStore;
+import org.apache.geode.internal.cache.backup.BackupUtil;
import org.apache.geode.internal.cache.control.InternalResourceManager;
import org.apache.geode.internal.cache.control.InternalResourceManager.ResourceObserver;
import org.apache.geode.internal.cache.control.InternalResourceManager.ResourceObserverAdapter;
@@ -57,19 +71,6 @@ import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.Wait;
import org.apache.geode.test.dunit.WaitCriterion;
import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.logging.log4j.Logger;
-import org.junit.Before;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.util.Collection;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
@SuppressWarnings("serial")
public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTestCase {
@@ -144,7 +145,7 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
protected void createData(final VM vm, final int startKey, final int endKey, final String value,
final String regionName) {
vm.invoke("createData", () -> {
- Region region = getCache().getRegion(regionName);
+ Region region = getCache().getRegion(regionName);
for (int i = startKey; i < endKey; i++) {
region.put(i, value);
}
@@ -176,15 +177,17 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
}
void localDestroyPR(final VM vm) {
- vm.invoke("localDestroyPR", () -> getCache().getRegion(getPartitionedRegionName()).localDestroyRegion());
+ vm.invoke("localDestroyPR",
+ () -> getCache().getRegion(getPartitionedRegionName()).localDestroyRegion());
}
- protected void createPR(final VM vm, final int redundancy, final int recoveryDelay, final int numBuckets) {
+ protected void createPR(final VM vm, final int redundancy, final int recoveryDelay,
+ final int numBuckets) {
vm.invoke(getCreatePRRunnable(redundancy, recoveryDelay, numBuckets));
}
- protected void createPR(final VM vm, final int redundancy, final int recoveryDelay, final int numBuckets,
- final boolean synchronous) {
+ protected void createPR(final VM vm, final int redundancy, final int recoveryDelay,
+ final int numBuckets, final boolean synchronous) {
vm.invoke(getCreatePRRunnable(redundancy, recoveryDelay, numBuckets, synchronous));
}
@@ -251,7 +254,8 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
};
}
- void createCoLocatedPR(final VM vm, final int setRedundantCopies, final boolean setPersistenceAdvisorObserver) {
+ void createCoLocatedPR(final VM vm, final int setRedundantCopies,
+ final boolean setPersistenceAdvisorObserver) {
vm.invoke(() -> {
String dsName = "colacatedpr";
@@ -307,8 +311,8 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
cache.createRegion(getPartitionedRegionName(), attributesFactory.create());
// Colocated region
- partitionAttributesFactory = (new PartitionAttributesFactory()).setRedundantCopies(setRedundantCopies)
- .setColocatedWith(getPartitionedRegionName());
+ partitionAttributesFactory = (new PartitionAttributesFactory())
+ .setRedundantCopies(setRedundantCopies).setColocatedWith(getPartitionedRegionName());
attributesFactory = new AttributesFactory();
attributesFactory.setDataPolicy(DataPolicy.PERSISTENT_PARTITION);
@@ -397,7 +401,8 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
return attributesFactory.create();
}
- AsyncInvocation createPRAsync(final VM vm, final int redundancy, int recoveryDelay, int numBuckets) {
+ AsyncInvocation createPRAsync(final VM vm, final int redundancy, int recoveryDelay,
+ int numBuckets) {
return vm.invokeAsync(getCreatePRRunnable(redundancy, recoveryDelay, numBuckets));
}
@@ -426,11 +431,13 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
public boolean done() {
return expectedBuckets.equals(getActualBuckets());
}
+
@Override
public String description() {
return "Buckets on vm " + getActualBuckets() + " never became equal to expected "
+ expectedBuckets;
}
+
Set<Integer> getActualBuckets() {
return new TreeSet<>(region.getDataStore().getAllLocalBucketIds());
}
@@ -444,9 +451,9 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
Set<Integer> getPrimaryBucketList(final VM vm, final String regionName) {
return vm.invoke("getPrimaryBucketList", () -> {
- Cache cache = getCache();
- PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
- return new TreeSet<>(region.getDataStore().getAllLocalPrimaryBucketIds());
+ Cache cache = getCache();
+ PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
+ return new TreeSet<>(region.getDataStore().getAllLocalPrimaryBucketIds());
});
}
@@ -474,11 +481,11 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
throw new RuntimeException(e);
}
}
+
@Override
public String description() {
try {
- return "expected " + numExpectedMissing
- + " missing members for revocation, current: "
+ return "expected " + numExpectedMissing + " missing members for revocation, current: "
+ adminDS.getMissingPersistentMembers();
} catch (AdminException e) {
throw new RuntimeException(e);
@@ -528,7 +535,8 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
InternalDistributedMember sourceId = getInternalDistributedMember(source);
return target.invoke("moveBucket", () -> {
- PartitionedRegion region = (PartitionedRegion) getCache().getRegion(getPartitionedRegionName());
+ PartitionedRegion region =
+ (PartitionedRegion) getCache().getRegion(getPartitionedRegionName());
return region.getDataStore().moveBucket(bucketId, sourceId, false);
});
}
@@ -540,15 +548,19 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
Set<PersistentMemberID> getOfflineMembers(final int bucketId, final VM vm) {
return vm.invoke("getOfflineMembers", () -> {
- PartitionedRegion region = (PartitionedRegion) getCache().getRegion(getPartitionedRegionName());
- return region.getRegionAdvisor().getProxyBucketArray()[bucketId].getPersistenceAdvisor().getMembershipView().getOfflineMembers();
+ PartitionedRegion region =
+ (PartitionedRegion) getCache().getRegion(getPartitionedRegionName());
+ return region.getRegionAdvisor().getProxyBucketArray()[bucketId].getPersistenceAdvisor()
+ .getMembershipView().getOfflineMembers();
});
}
Set<PersistentMemberID> getOnlineMembers(final int bucketId, final VM vm) {
return vm.invoke("getOnlineMembers", () -> {
- PartitionedRegion region = (PartitionedRegion) getCache().getRegion(getPartitionedRegionName());
- return region.getRegionAdvisor().getProxyBucketArray()[bucketId].getPersistenceAdvisor().getPersistedOnlineOrEqualMembers();
+ PartitionedRegion region =
+ (PartitionedRegion) getCache().getRegion(getPartitionedRegionName());
+ return region.getRegionAdvisor().getProxyBucketArray()[bucketId].getPersistenceAdvisor()
+ .getPersistedOnlineOrEqualMembers();
});
}
@@ -568,6 +580,7 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
Set<Integer> vm2Buckets = dataStore.getAllLocalBucketIds();
return lostBuckets.equals(vm2Buckets);
}
+
@Override
public String description() {
return "expected to recover " + lostBuckets + " buckets, now have "
@@ -577,7 +590,8 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
});
}
- void waitForRedundancyRecovery(final VM vm, final int expectedRedundancy, final String regionName) {
+ void waitForRedundancyRecovery(final VM vm, final int expectedRedundancy,
+ final String regionName) {
vm.invoke("waitForRedundancyRecovery", () -> {
Region region = getCache().getRegion(regionName);
@@ -587,6 +601,7 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
PartitionRegionInfo info = PartitionRegionHelper.getPartitionRegionInfo(region);
return info.getActualRedundantCopies() == expectedRedundancy;
}
+
@Override
public String description() {
PartitionRegionInfo info = PartitionRegionHelper.getPartitionRegionInfo(region);
@@ -608,7 +623,8 @@ public abstract class PersistentPartitionedRegionTestBase extends JUnit4CacheTes
});
}
- protected void restoreBackup(final int expectedNumScripts) throws IOException, InterruptedException {
+ protected void restoreBackup(final int expectedNumScripts)
+ throws IOException, InterruptedException {
Collection<File> restoreScripts =
listFiles(getBackupDir(), new RegexFileFilter(".*restore.*"), DIRECTORY);
assertThat(restoreScripts).hasSize(expectedNumScripts);
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 5e0870e..c742c5f 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
@@ -26,13 +26,13 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.mockito.InOrder;
-import org.apache.geode.internal.cache.backup.BackupDataStoreHelper;
-import org.apache.geode.internal.cache.backup.FinishBackupRequest;
-import org.apache.geode.internal.cache.backup.PrepareBackupRequest;
import org.apache.geode.distributed.internal.DM;
import org.apache.geode.distributed.internal.locks.DLockService;
-import org.apache.geode.internal.cache.backup.BackupManager;
import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.backup.BackupDataStoreHelper;
+import org.apache.geode.internal.cache.backup.BackupManager;
+import org.apache.geode.internal.cache.backup.FinishBackupRequest;
+import org.apache.geode.internal.cache.backup.PrepareBackupRequest;
import org.apache.geode.internal.cache.persistence.PersistentMemberManager;
import org.apache.geode.test.fake.Fakes;
import org.apache.geode.test.junit.categories.UnitTest;
--
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.