public class RecoveryTestVersionHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RecoveryTestVersionHelper.KeySnapshotFilter
Key SnapshotFilter only accepts original entries (created before snapshot written)
based on the key (FilterObject_XXX vs.
|
static class |
RecoveryTestVersionHelper.ValueSnapshotFilter
Value SnapshotFilter only accepts original entries (created before snapshot written)
based on the value (value should NOT start with this string "object to be filtered").
|
static class |
RecoveryTestVersionHelper.ValueTypeSnapshotFilter
Value Type SnapshotFilter only accepts original entries (created before snapshot written)
based on the value type (ValueHolders are accepted, String values are not).
|
| Constructor and Description |
|---|
RecoveryTestVersionHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createDiskStore(com.gemstone.gemfire.cache.RegionAttributes attr)
Create the DiskStore if the RegionAttributes specifies it.
|
static void |
createXmlFile()
Create an xml file for the current cache and all its regions.
|
static void |
doOperationsHA(RecoveryTest testInstance)
Task to do random operations that expect exceptions from shutDownAllMembers
|
static void |
doOperationsShutDownAll(RecoveryTest testInstance)
Task to do random operations that expect exceptions from shutDownAllMembers
|
static void |
forceRecovery(boolean doValidation)
Forces recovery by revoking the members the system is waiting for.
|
static BaseValueHolder |
getVersionedValueHolder(String valueClassName,
String key,
RandomValues randomValues) |
static void |
handleOpsException(Exception e) |
static void |
handleOpsExceptionDuringShutDownAll(Exception e)
During a shutDownAll we are disconnected from the DS and exceptions can occur.
|
static void |
HydraTask_initializeExpectException()
Creates and initializes a server or peer.
|
protected static void |
importAndVerify(RecoveryTest testInstance)
One thread imports ...
|
static void |
initPdxClassLoader() |
static void |
initPRObserver()
Initialize the PRObserver
|
static void |
installPersistenceObserver()
Install a PersistenceObserver to help tests create a "tie" on disk
recovery.
|
static void |
installPRObserver()
Install the PRObserver
|
static boolean |
instanceOfPdxInstance(Object value) |
static void |
logDiskStore(com.gemstone.gemfire.cache.Region aRegion,
StringBuffer aStr)
Appends to a StringBuffer logging that describes a DiskSTore for the
given Region.
|
protected static void |
performBackup()
Performs a backup.
|
static void |
removeDiskFiles()
Remove disk files in disk dirs corresponding to this vm's vmID.
|
static com.gemstone.gemfire.cache.AttributesFactory |
setDiskStoreIfNeeded(String regionConfigName)
Set a random DiskStore for the region defined with regionConfigName if
it is persistent or has eviction with overflow to disk.
|
static void |
setRandomDiskStore(com.gemstone.gemfire.cache.RegionAttributes baseAttr,
com.gemstone.gemfire.cache.AttributesFactory attrFac,
List<String> diskStoreNames,
GsRandom rand)
Choose a random DiskStore and set it in the attributes factory.
|
protected static void |
snapshotResponder(RecoveryTest testInstance)
Do operations and pause when directed by the snapshotController
Also, writes the snapshot to the blackboard and exports snapshot to disk
|
static BaseValueHolder |
toValueHolder(Object value) |
protected static void |
verifyWaiting(ClientVmInfo expectedWaitingForMember,
List<ClientVmInfo> membersWaiting)
Verify that the system is waiting for member(s) to come up before recovering.
|
static boolean |
withPersistence(com.gemstone.gemfire.cache.Region aRegion)
Return whether the given region has persistence
|
public static void setRandomDiskStore(com.gemstone.gemfire.cache.RegionAttributes baseAttr,
com.gemstone.gemfire.cache.AttributesFactory attrFac,
List<String> diskStoreNames,
GsRandom rand)
baseAttr - The region attributes we start with (without a DiskStore set)attrFac - The attributes factory to set the DiskStore in.diskStoreNames - A List of potential DiskStore names to choose from.rand - The random number generator used while creating regions and attributes.public static String createDiskStore(com.gemstone.gemfire.cache.RegionAttributes attr)
attr - The RegionAttributes that could specify a DiskStore.public static void logDiskStore(com.gemstone.gemfire.cache.Region aRegion,
StringBuffer aStr)
aRegion - The Region possibly containing a DiskStore.aStr - The StringBuffer to append to.public static void installPersistenceObserver()
public static void HydraTask_initializeExpectException()
throws Throwable
Throwableprotected static void verifyWaiting(ClientVmInfo expectedWaitingForMember, List<ClientVmInfo> membersWaiting)
expectedWaitingForMember - This specifies the vmID of the member the system
should be waiting for.membersWaiting - This is a List of the members that should be waiting.public static void forceRecovery(boolean doValidation)
doValidation - If true, then validate the missing disk stores (used
for serial tests or tests that are in a silent phase), if false
then don't do validation (used for concurrent tests).public static boolean withPersistence(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The Region to check for persistence.public static void removeDiskFiles()
public static void doOperationsShutDownAll(RecoveryTest testInstance) throws Exception
testInstance - The RecoveryTest instance.Exceptionpublic static void doOperationsHA(RecoveryTest testInstance) throws Exception
testInstance - The RecoveryTest instance.Exceptionpublic static void handleOpsExceptionDuringShutDownAll(Exception e)
e - The exception that occurred during shutDownAllpublic static void installPRObserver()
public static void initPRObserver()
public static com.gemstone.gemfire.cache.AttributesFactory setDiskStoreIfNeeded(String regionConfigName)
regionConfigName - A hydra region config name.
return factory The attributes factory for the regionConfigName with possibly
a DiskStore.public static void handleOpsException(Exception e)
public static void createXmlFile()
public static void initPdxClassLoader()
public static BaseValueHolder getVersionedValueHolder(String valueClassName, String key, RandomValues randomValues)
valueClassName - key - randomValues - public static boolean instanceOfPdxInstance(Object value)
value - public static BaseValueHolder toValueHolder(Object value)
value - protected static void snapshotResponder(RecoveryTest testInstance) throws Exception
Exceptionprotected static void importAndVerify(RecoveryTest testInstance)
protected static void performBackup()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.