public class SerialQueryAndEntryOpsTest extends QueryTest
QueryTask that performs operations serially. It
also validates the state of the cache after each operation. Note that this
test must be configured to use regions whose scope is
DISTRIBUTED_ACK or GLOBAL.QueryTest.QueryObserverImpl| Modifier and Type | Field and Description |
|---|---|
static AtomicBoolean |
firstTimeInvocation |
protected String[] |
queries |
protected static String |
SELECT_STRING |
ADD_OPERATION, COUNT_QUERY_OPERATION, countQueryResults, CREATE_INDEX_OPERATION, createCallbackPrefix, DESTROY_OPERATION, destroyCallbackPrefix, distLockService, enumWhereClause1, enumWhereClause2, ID_COMPACT_RANGE_INDEX, ID_HASH_INDEX, ID_RANGE_INDEX, ignoreQueryExecTimeOutException, INVALIDATE_OPERATION, invalidateCallbackPrefix, isCarefulValidation, isMirrored, isSerialExecution, LOCAL_DESTROY_OPERATION, LOCAL_INVALIDATE_OPERATION, LOCK_NAME, LOCK_SERVICE_NAME, MAP_RANGE_INDEX_1, MAP_RANGE_INDEX_2, maxObjects, MILLIS_TO_WAIT, minTaskGranularityMS, minTaskGranularitySec, numOfRegions, numQueries, numVMs, origClassLoader, pdxReadSerialized, PDXSTRING_QUERY_OPERATION, pool, QUERY_OPERATION, queryLimit, queryTest, randomValues, READ_OPERATION, REGION_NAME, REGION_WITHOUT_INDEX, REMOVE_INDEX_OPERATION, statisticsWrittenToBB, STATUS_COMPACT_RANGE_INDEX, STATUS_HASH_INDEX, STATUS_RANGE_INDEX, UPDATE_OPERATION, updateCallbackPrefix, useEvictionController| Constructor and Description |
|---|
SerialQueryAndEntryOpsTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addObject(com.gemstone.gemfire.cache.Region aRegion,
boolean aBoolean) |
protected void |
checkEventCounters()
Check all counters from EventCountersBB.
|
protected void |
checkEventCounters(boolean numCloseIsExact)
Check event counters.
|
protected void |
destroyObject(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalDestroy) |
protected void |
doQuery(boolean logAddition)
This method will be called if this is a serial execution environment.
|
protected int |
getNumVMsWithListeners() |
protected void |
getQueryResultsWithIndexes()
Obtain the query results with indexes
|
static void |
HydraTask_attachQueryObserver() |
static void |
HydraTask_calculateAndVerifyIndexSizesForPR()
Calculate and verify index sizes for a partitioned region.
|
static void |
HydraTask_calculateIndexSizesForPR()
This method calculates the actual index sizes using index statistics and
compares them with the expected index sizes based on the data in region.
|
static void |
HydraTask_createIndexes() |
static void |
HydraTask_getQueryResultsWithIndexes()
Obtain the query results with indexes
|
static void |
HydraTask_initialize() |
static void |
HydraTask_stopStartVMs_bridgeVMs()
Randomly stop and restart vms.
|
static void |
HydraTask_stopStartVMs_queryPRData()
Randomly stop and restart vms and query on partitioned region data.
|
static void |
HydraTask_stopVM_verifyIndex_queryPRData_startVM()
Randomly stop and restart vms and query on partitioned region data.
|
static void |
HydraTask_validateCountStar() |
static void |
HydraTask_verifyIndexSize_QueryData_EatExpectedException()
Hydra task to verify index data structures which were created in a node.
|
static void |
HydraTask_verifyIndexSize_QueryData()
HydraTask which verifies index datastructures and also queries data.
|
static void |
HydraTask_verifyIndexSizes()
This method calculates the actual index sizes using index statistics and
compares them with the expected index sizes based on the data in region.
|
static void |
HydraTask_verifyQueryResultsWithAndWithoutIndexes()
Obtain the query results with and without indexes and compare them.
|
protected void |
invalidateObject(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalInvalidate) |
static void |
queryData_EatExpectedException() |
static void |
queryData()
Execute specific queries on the data and verify result sizes based on region sizes.
|
protected String |
randRgn() |
protected void |
readObject(com.gemstone.gemfire.cache.Region aRegion)
Fetches (reads) the value of a randomly selected entry in the given region.
|
protected void |
updateObject(com.gemstone.gemfire.cache.Region aRegion)
Updates the "first" entry in a given region
|
protected void |
validateIndex(String expectedIndexName,
String query)
This method will be called if this is a serial execution environment.
|
protected void |
validateQuery(com.gemstone.gemfire.cache.Region aRegion) |
static void |
verifyIndexSizes_PR(com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex index,
com.gemstone.gemfire.internal.cache.PartitionedRegion region)
This method calculates the actual index sizes using index statistics and
compares them with the expected index sizes based on the data in region.
|
static void |
verifyIndexSizes(com.gemstone.gemfire.cache.query.Index index,
com.gemstone.gemfire.cache.Region region)
Verify index size based on the region size, for a non-partitioned region
|
protected void |
verifyQueryResultsWithAndWithoutIndexes()
Obtain the query results with and without indexes and compare them.
|
compareQueryResultsBetweenIndexRegions, compareQueryResultsWithoutAndWithIndexes, createCacheFromXml, createIndex_task, createIndex, createRootRegions, doCountQuery, doEntryAndQueryOperations, doPdxStringQuery, getCacheListener, getNumNames, getObjectToAdd, getOperation, getUpdateObject, handleRegionDestroyedException, HydraTask_closeTask_writeQueryStats_To_Blackboard, HydraTask_compareQueryResultsBetweenIndexRegions, HydraTask_doEntryAndQueryOperations, HydraTask_endTask_verifyQueryStats_With_Blackboard, HydraTask_endTask, HydraTask_initialize_clientCache, HydraTask_initialize_withIndexTestHook, HydraTask_initialize_xml, HydraTask_iterate, HydraTask_load, HydraTask_populateRegions, HydraTask_printBB, initialize_clientCache, initialize, initialize, iterateRegion, logExecutionNumber, removeIndex, updateObject, validateQueryLimit, verifyCountQueryResults, verifyObjectDestroyed, verifyObjectInvalidatedpublic static AtomicBoolean firstTimeInvocation
protected static String SELECT_STRING
protected String[] queries
public static void HydraTask_initialize()
public static void HydraTask_createIndexes()
public static void HydraTask_attachQueryObserver()
protected int getNumVMsWithListeners()
getNumVMsWithListeners in class QueryTestprotected void addObject(com.gemstone.gemfire.cache.Region aRegion,
boolean aBoolean)
protected void invalidateObject(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalInvalidate)
invalidateObject in class QueryTestprotected void destroyObject(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalDestroy)
destroyObject in class QueryTestprotected void updateObject(com.gemstone.gemfire.cache.Region aRegion)
QueryTestupdateObject in class QueryTestprotected void readObject(com.gemstone.gemfire.cache.Region aRegion)
QueryTestreadObject in class QueryTestpublic static void HydraTask_validateCountStar()
throws Throwable
Throwableprotected void validateQuery(com.gemstone.gemfire.cache.Region aRegion)
protected void checkEventCounters()
checkEventCounters in class QueryTestprotected void checkEventCounters(boolean numCloseIsExact)
numCloseIsExact - True if the numClose event counters must exactly match the
expected numClose value, false if the numClose event counters must
be no less than the expected numClose counter.protected void doQuery(boolean logAddition)
protected void validateIndex(String expectedIndexName, String query)
public static void HydraTask_verifyIndexSize_QueryData_EatExpectedException()
public static void queryData_EatExpectedException()
public static void queryData()
throws Exception
Exceptionpublic static void HydraTask_verifyIndexSize_QueryData()
throws Exception
Exceptionpublic static void HydraTask_calculateAndVerifyIndexSizesForPR()
public static void HydraTask_calculateIndexSizesForPR()
public static void verifyIndexSizes(com.gemstone.gemfire.cache.query.Index index,
com.gemstone.gemfire.cache.Region region)
index - region - public static void verifyIndexSizes_PR(com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex index,
com.gemstone.gemfire.internal.cache.PartitionedRegion region)
public static void HydraTask_verifyIndexSizes()
public static void HydraTask_getQueryResultsWithIndexes()
public static void HydraTask_verifyQueryResultsWithAndWithoutIndexes()
protected void getQueryResultsWithIndexes()
protected void verifyQueryResultsWithAndWithoutIndexes()
public static void HydraTask_stopStartVMs_bridgeVMs()
public static void HydraTask_stopStartVMs_queryPRData()
public static void HydraTask_stopVM_verifyIndex_queryPRData_startVM()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.