public abstract class RegionWithHDFSTestBase extends CacheTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected String |
tmpDir |
cachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
RegionWithHDFSTestBase(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cacheClose(VM vm,
boolean sleep) |
protected abstract void |
checkWithGet(String uniqueName,
int start,
int end,
boolean expectValue) |
protected abstract void |
checkWithGetAll(String uniqueName,
ArrayList arrayl) |
protected void |
closeCache(VM vm0) |
protected HashMap<String,HashMap<String,String>> |
createFilesAndEntriesMap(VM vm0,
String uniqueName,
String regionName)
Reads all the sequence files and returns the list of key value pairs persisted.
|
protected int |
createServerRegion(VM vm,
int totalnumOfBuckets,
int batchSizeMB,
int maximumEntries,
String folderPath,
String uniqueName,
int batchInterval,
boolean writeonly,
boolean queuePersistent) |
protected int |
createServerRegion(VM vm,
int totalnumOfBuckets,
int batchSizeMB,
int maximumEntries,
String folderPath,
String uniqueName,
int batchInterval,
boolean writeonly,
boolean queuePersistent,
long timeForRollover,
long maxFileSize) |
protected AsyncInvocation |
createServerRegionAsync(VM vm,
int totalnumOfBuckets,
int batchSizeMB,
int maximumEntries,
String folderPath,
String uniqueName,
int batchInterval,
boolean writeonly,
boolean queuePersistent) |
protected AsyncInvocation |
createServerRegionAsync(VM vm,
int totalnumOfBuckets,
int batchSizeMB,
int maximumEntries,
String folderPath,
String uniqueName,
int batchInterval,
boolean writeonly,
boolean queuePersistent,
long timeForRollover,
long maxFileSize) |
protected abstract AsyncInvocation |
doAsyncPuts(VM vm,
String regionName,
int start,
int end,
String suffix) |
protected abstract void |
doDestroys(String uniqueName,
int start,
int end) |
protected abstract void |
doPutAll(String uniqueName,
Map map) |
protected abstract void |
doPuts(String uniqueName,
int start,
int end) |
protected void |
doPuts(VM vm0,
String uniqueName,
int numEntries) |
protected void |
dumpFiles(VM vm0,
String uniqueName) |
protected abstract SerializableCallable |
getCreateRegionCallable(int totalnumOfBuckets,
int batchSizeMB,
int maximumEntries,
String folderPath,
String uniqueName,
int batchInterval,
boolean queuePersistent,
boolean writeonly,
long timeForRollover,
long maxFileSize) |
void |
setUp()
Sets up the test (noop).
|
void |
tearDown2()
Tears down the test.
|
void |
testGetAllForAsyncQueue()
puts a few entries (keys with multiple updates ).
|
void |
testGetForAsyncQueue()
puts a few entries (keys with multiple updates ).
|
void |
testGetFromHDFS()
Does puts, gets, destroy and getAll.
|
void |
testPutAllAndGetFromHDFS()
Does putAll and get.
|
void |
testPutAllForAsyncQueue()
puts a few entries (keys with multiple updates ).
|
void |
testWObasicClose() |
protected void |
validate(VM vm1,
String uniqueName,
int numEntries) |
protected SerializableCallable |
validateEmpty(VM vm0,
int numEntries,
String uniqueName) |
protected void |
verifyDataInHDFS(VM vm0,
String uniqueName,
boolean shouldHaveData,
boolean wait,
boolean waitForQueueToDrain,
int numEntries) |
protected abstract void |
verifyHDFSData(VM vm,
String uniqueName) |
protected void |
verifyInEntriesMap(HashMap<String,String> entriesMap,
int start,
int end,
String suffix) |
addExceptionTag1, basicGetCache, beginCacheXml, cleanDiskDirs, closeAllCache, closeCache, createLonerCache, createMcastCache, createMcastCache, createRegion, createRegion, createRootRegion, createRootRegion, disconnectFromDS, finishCacheXml, finishCacheXml, getCache, getCache, getCache, getCache, getClientCache, getDiskDirs, getGemfireCache, getInternalRegionArguments, getRootRegion, getRootRegion, hasCache, remoteTearDown, removeExceptionTag1, sendSerialMessageToAll, sendUnorderedMessageToAlladdExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, dumpAllStacks, dumpMyThreads, dumpStack, dumpStack, dumpStack, dumpStackTrace, fail, getAllDistributedSystemProperties, getDistributedSystemProperties, getDUnitLocatorAddress, getDUnitLocatorPort, getDUnitLocatorString, getDUnitLogLevel, getIPLiteral, getLogWriter, getLonerSystem, getMcastSystem, getMcastSystem, getRepeatTimeoutMs, getServerHostName, getSystem, getSystem, getTestClass, getTestName, getUniqueName, getVMCount, incBBFlag, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVMRepeatingIfNecessary, invokeInLocator, invokeRepeatingIfNecessary, isConnectedToDS, join, noteTiming, pause, pause, perVMSetUp, realTearDown, setDiskStoreForGateway, setSystem, setTestName, staticPause, tearDown, unregisterAllDataSerializersFromAllVms, unregisterDataSerializerInThisVM, unregisterInstantiatorsInThisVM, waitForBBFlag, waitForCriterion, waitMutexassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected String tmpDir
public RegionWithHDFSTestBase(String name)
protected abstract void checkWithGet(String uniqueName, int start, int end, boolean expectValue)
protected abstract void doDestroys(String uniqueName, int start, int end)
protected abstract void doPuts(String uniqueName, int start, int end)
protected abstract SerializableCallable getCreateRegionCallable(int totalnumOfBuckets, int batchSizeMB, int maximumEntries, String folderPath, String uniqueName, int batchInterval, boolean queuePersistent, boolean writeonly, long timeForRollover, long maxFileSize)
protected abstract void verifyHDFSData(VM vm, String uniqueName) throws Exception
Exceptionprotected abstract AsyncInvocation doAsyncPuts(VM vm, String regionName, int start, int end, String suffix) throws Exception
Exceptionpublic void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class CacheTestCaseExceptionpublic void setUp()
throws Exception
DistributedTestCasesetUp in class DistributedTestCaseExceptionprotected int createServerRegion(VM vm, int totalnumOfBuckets, int batchSizeMB, int maximumEntries, String folderPath, String uniqueName, int batchInterval, boolean writeonly, boolean queuePersistent)
protected int createServerRegion(VM vm, int totalnumOfBuckets, int batchSizeMB, int maximumEntries, String folderPath, String uniqueName, int batchInterval, boolean writeonly, boolean queuePersistent, long timeForRollover, long maxFileSize)
protected AsyncInvocation createServerRegionAsync(VM vm, int totalnumOfBuckets, int batchSizeMB, int maximumEntries, String folderPath, String uniqueName, int batchInterval, boolean writeonly, boolean queuePersistent)
protected AsyncInvocation createServerRegionAsync(VM vm, int totalnumOfBuckets, int batchSizeMB, int maximumEntries, String folderPath, String uniqueName, int batchInterval, boolean writeonly, boolean queuePersistent, long timeForRollover, long maxFileSize)
public void testGetFromHDFS()
throws Throwable
Throwablepublic void testGetForAsyncQueue()
public void testGetAllForAsyncQueue()
public void testPutAllForAsyncQueue()
public void testPutAllAndGetFromHDFS()
protected void cacheClose(VM vm, boolean sleep)
protected void verifyInEntriesMap(HashMap<String,String> entriesMap, int start, int end, String suffix)
protected HashMap<String,HashMap<String,String>> createFilesAndEntriesMap(VM vm0, String uniqueName, String regionName) throws Exception
Exceptionprotected SerializableCallable validateEmpty(VM vm0, int numEntries, String uniqueName)
protected void closeCache(VM vm0)
protected void verifyDataInHDFS(VM vm0, String uniqueName, boolean shouldHaveData, boolean wait, boolean waitForQueueToDrain, int numEntries)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.