public class GridQueryProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static Class<? extends GridQueryIndexing> |
idxCls
For tests.
|
static String |
INLINE_SIZES_DIFFER_WARN_MSG_FORMAT
Warn message if some indexes have different inline sizes on the nodes.
|
static Pattern |
QRY_ENGINE_PATTERN
Pattern of hint to choose query engine.
|
static Pattern |
QRY_HINT_PATTERN
Pattern of query hint.
|
ctx, diagnosticLog, log| Constructor and Description |
|---|
GridQueryProcessor(GridKernalContext ctx)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beforeExchange(GridDhtPartitionsExchangeFuture fut)
Prepare index rebuild futures if needed before exchange.
|
boolean |
belongsToTable(GridCacheContext cctx,
String expCacheName,
String expTblName,
KeyCacheObject key,
CacheObject val)
Check whether provided key and value belongs to expected cache and table.
|
void |
cancelLocalQueries(Collection<Long> queries)
Cancel specified queries.
|
void |
cancelQuery(long queryId,
@Nullable UUID nodeId,
boolean async)
Cancel query running on remote or local Node.
|
void |
collectGridNodeData(DiscoveryDataBag dataBag)
Collects discovery data on nodes already in grid on receiving
TcpDiscoveryNodeAddedMessage. |
void |
collectJoiningNodeData(DiscoveryDataBag dataBag)
Collects discovery data on joining node before sending
TcpDiscoveryJoinRequestMessage request. |
void |
completeRebuildIndexes(String cacheName)
Force a mark that the index rebuild for the cache has completed.
|
@Nullable GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
IgniteInternalFuture<?> |
dynamicAddQueryEntity(String cacheName,
String schemaName,
QueryEntity entity,
Integer qryParallelism,
boolean sqlEscape)
Enable dynamically indexing of existing cache.
|
IgniteInternalFuture<?> |
dynamicColumnAdd(String cacheName,
String schemaName,
String tblName,
List<QueryField> cols,
boolean ifTblExists,
boolean ifNotExists)
Entry point for add column procedure.
|
IgniteInternalFuture<?> |
dynamicColumnRemove(String cacheName,
String schemaName,
String tblName,
List<String> cols,
boolean ifTblExists,
boolean ifExists)
Entry point for drop column procedure.
|
IgniteInternalFuture<?> |
dynamicIndexCreate(String cacheName,
String schemaName,
String tblName,
QueryIndex idx,
boolean ifNotExists,
int parallel)
Entry point for index procedure.
|
IgniteInternalFuture<?> |
dynamicIndexDrop(String cacheName,
String schemaName,
String idxName,
boolean ifExists)
Entry point for index drop procedure
|
void |
dynamicTableCreate(String schemaName,
QueryEntity entity,
String templateName,
String cacheName,
String cacheGroup,
@Nullable String dataRegion,
String affinityKey,
@Nullable CacheAtomicityMode atomicityMode,
@Nullable CacheWriteSynchronizationMode writeSyncMode,
@Nullable Integer backups,
boolean ifNotExists,
@Nullable Boolean encrypted,
@Nullable Integer qryParallelism)
Create cache and table from given query entity.
|
void |
dynamicTableDrop(String cacheName,
String tblName,
boolean ifExists)
Drop table by destroying its cache if it's an 1:1 per cache table.
|
<R> R |
executeQuery(GridCacheQueryType qryType,
String qry,
@Nullable GridCacheContext<?,?> cctx,
IgniteOutClosureX<R> clo,
boolean complete) |
UpdateSourceIterator<?> |
executeUpdateOnDataNodeTransactional(GridCacheContext<?,?> cctx,
int[] cacheIds,
int[] parts,
String schema,
String qry,
Object[] params,
int flags,
int pageSize,
int timeout,
AffinityTopologyVersion topVer,
MvccSnapshot mvccSnapshot,
GridQueryCancel cancel)
Execute update on DHT node (i.e. when it is possible to execute and update on all nodes independently).
|
IndexBuildStatusStorage |
getIdxBuildStatusStorage() |
GridQueryIndexing |
getIndexing() |
static AffinityTopologyVersion |
getRequestAffinityTopologyVersion() |
boolean |
indexingEnabled() |
@Nullable IgniteInternalFuture<?> |
indexRebuildFuture(int cacheId) |
void |
initQueryStructuresForNotStartedCache(DynamicCacheDescriptor cacheDesc)
Initialize query infrastructure for not started cache.
|
void |
markAsRebuildNeeded(GridCacheContext cctx,
boolean val)
Mark that for given cache index should/would be rebuilt.
|
void |
markIndexRecreate(GridCacheContext cacheCtx)
Mark that index.bin recreating in progress.
|
boolean |
moduleEnabled() |
CacheQueryObjectValueContext |
objectContext() |
void |
onCacheChangeRequested(DynamicCacheChangeBatch batch)
Handle of cache change request.
|
void |
onCacheKernalStart()
Handle cache kernal start.
|
void |
onCacheReconnect()
Handle cache reconnect.
|
void |
onCacheStart(GridCacheContextInfo cacheInfo,
QuerySchema schema,
boolean isSql)
Handle cache start.
|
void |
onCacheStart0(GridCacheContextInfo<?,?> cacheInfo,
QuerySchema schema,
boolean isSql)
Create type descriptors from schema and initialize indexing for given cache.
|
void |
onCacheStop(GridCacheContextInfo cacheInfo,
boolean removeIdx,
boolean clearIdx) |
void |
onCacheStop(String cacheName)
Destroy H2 structures for not started caches.
|
void |
onCacheStop0(GridCacheContextInfo cacheInfo,
boolean destroy,
boolean clearIdx)
Unregister cache.
|
void |
onClientCacheStop(GridCacheContextInfo cacheInfo) |
void |
onClientDisconnect()
Performs necessary actions on disconnect of a stateful client (say, one associated with a transaction).
|
void |
onCoordinatorFinished(SchemaAbstractOperation op,
@Nullable SchemaOperationException err)
Invoked when coordinator finished ensuring that all participants are ready.
|
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onDiscovery(SchemaAbstractDiscoveryMessage msg)
Handle custom discovery message.
|
void |
onFinishRebuildIndexes(GridCacheContext cacheCtx)
Callback on finish of rebuild cache indexes.
|
void |
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
Method is called on nodes that are already in grid (not on joining node).
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onLocalOperationFinished(SchemaAbstractOperation op,
@Nullable QueryTypeDescriptorImpl type)
Apply positive index operation result.
|
void |
onNodeLeave(ClusterNode node)
Handle node leave.
|
void |
onSchemaPropose(SchemaProposeDiscoveryMessage msg)
Handle schema propose from exchange thread.
|
void |
onStartRebuildIndexes(GridCacheContext cacheCtx,
boolean recreate)
Callback on start of rebuild cache indexes.
|
List<JdbcParameterMeta> |
parameterMetaData(SqlFieldsQuery qry,
@Nullable SqlClientContext cliCtx) |
Set<Integer> |
prepareRebuildIndexes(Set<Integer> cacheIds)
Preparing futures of rebuilding indexes for caches.
|
void |
processSchemaOperationLocal(SchemaAbstractOperation op,
QueryTypeDescriptorImpl type,
IgniteUuid depId,
IndexRebuildCancelToken cancelTok)
Process schema operation.
|
<K,V> IndexQueryResult<K,V> |
queryIndex(String cacheName,
String valCls,
IndexQueryDesc idxQryDesc,
@Nullable IgniteBiPredicate<K,V> entryFilter,
IndexingQueryFilter cacheFilter,
boolean keepBinary) |
<K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> |
querySql(GridCacheContext<?,?> cctx,
SqlQuery qry,
boolean keepBinary)
Execute distributed SQL query.
|
List<FieldsQueryCursor<List<?>>> |
querySqlFields(@Nullable GridCacheContext<?,?> cctx,
SqlFieldsQuery qry,
SqlClientContext cliCtx,
boolean keepBinary,
boolean failOnMultipleStmts)
Query SQL fields.
|
List<FieldsQueryCursor<List<?>>> |
querySqlFields(@Nullable GridCacheContext<?,?> cctx,
SqlFieldsQuery qry,
SqlClientContext cliCtx,
boolean keepBinary,
boolean failOnMultipleStmts,
GridCacheQueryType qryType,
@Nullable GridQueryCancel cancel)
Query SQL fields.
|
List<FieldsQueryCursor<List<?>>> |
querySqlFields(@Nullable GridCacheContext<?,?> cctx,
SqlFieldsQuery qry,
SqlClientContext cliCtx,
boolean keepBinary,
boolean failOnMultipleStmts,
@Nullable GridQueryCancel cancel)
Query SQL fields.
|
FieldsQueryCursor<List<?>> |
querySqlFields(SqlFieldsQuery qry,
boolean keepBinary)
Query SQL fields.
|
List<FieldsQueryCursor<List<?>>> |
querySqlFields(SqlFieldsQuery qry,
boolean keepBinary,
boolean failOnMultipleStmts)
Query SQL fields.
|
<K,V> GridCloseableIterator<IgniteBiTuple<K,V>> |
queryText(String cacheName,
String clause,
String resType,
IndexingQueryFilter filters,
int limit) |
boolean |
rebuildIndexesCompleted(GridCacheContext cacheCtx)
Check if rebuilding of indexes for the cache has been completed.
|
IgniteInternalFuture<?> |
rebuildIndexesFromHash(GridCacheContext cctx,
boolean force)
Rebuilds indexes for provided caches from corresponding hash indexes.
|
boolean |
rebuildIndexOnExchange(int cacheId,
GridDhtPartitionsExchangeFuture fut)
Checks that the indexes need to be rebuilt on the exchange.
|
boolean |
recreateCompleted(String cacheName) |
void |
registerMetadataForRegisteredCaches(boolean platformOnly)
Register metadata locally for already registered caches.
|
void |
remove(GridCacheContext cctx,
CacheDataRow row) |
void |
removeIndexRebuildFuturesOnExchange(GridDhtPartitionsExchangeFuture fut,
@Nullable Set<Integer> cacheIds)
Removing futures of rebuilding indexes that should have been rebuilt on the exchange.
|
List<GridQueryFieldMetadata> |
resultSetMetaData(SqlFieldsQuery qry,
@Nullable SqlClientContext cliCtx) |
Collection<GridRunningQueryInfo> |
runningQueries(long duration)
Collect local queries that already running more than specified duration.
|
RunningQueryManager |
runningQueryManager() |
SchemaManager |
schemaManager() |
String |
schemaName(GridCacheContext<?,?> cctx) |
Map<String,Integer> |
secondaryIndexesInlineSize() |
void |
sendStatusMessage(UUID destNodeId,
UUID opId,
SchemaOperationException err)
Send status message to coordinator node.
|
static void |
setRequestAffinityTopologyVersion(AffinityTopologyVersion ver) |
boolean |
skipFieldLookup() |
void |
skipFieldLookup(boolean skipFieldLookup) |
void |
start()
Starts grid component.
|
IgniteStatisticsManager |
statsManager() |
void |
stop(boolean cancel)
Stops grid component.
|
void |
store(GridCacheContext cctx,
CacheDataRow newRow,
@Nullable CacheDataRow prevRow,
boolean prevRowAvailable) |
List<Long> |
streamBatchedUpdateQuery(String schemaName,
SqlClientContext cliCtx,
String qry,
List<Object[]> args,
String qryInitiatorId) |
long |
streamUpdateQuery(@Nullable String cacheName,
String schemaName,
IgniteDataStreamer<?,?> streamer,
String qry,
Object[] args,
String qryInitiatorId) |
@Nullable String |
tableName(String cacheName,
String valType)
Get table name by specified cache and cache value class.
|
@Nullable QueryTypeDescriptorImpl |
typeByValue(String cacheName,
CacheObjectContext coctx,
KeyCacheObject key,
CacheObject val,
boolean checkType) |
@Nullable GridQueryTypeDescriptor |
typeDescriptor(@Nullable String cacheName,
String typeName)
Gets type descriptor for provided cache name and type name if type is still valid.
|
Collection<GridQueryTypeDescriptor> |
types(@Nullable String cacheName)
Gets types for cache.
|
void |
validateKeyAndValue(CacheObjectContext coctx,
KeyCacheObject key,
CacheObject val)
Performs validation of provided key and value against configured constraints.
|
assertParameter, onKernalStart, onReconnected, printMemoryStats, toString, validateNode, validateNodepublic static final String INLINE_SIZES_DIFFER_WARN_MSG_FORMAT
public static final Pattern QRY_HINT_PATTERN
public static final Pattern QRY_ENGINE_PATTERN
public static Class<? extends GridQueryIndexing> idxCls
public GridQueryProcessor(GridKernalContext ctx) throws IgniteCheckedException
ctx - Kernal context.IgniteCheckedExceptionpublic void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void onCacheKernalStart()
throws IgniteCheckedException
IgniteCheckedException - If failed.public void onCacheReconnect()
throws IgniteCheckedException
IgniteCheckedException - If failed.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapterpublic void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage.collectGridNodeData in interface GridComponentcollectGridNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived in interface GridComponentonJoiningNodeDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.JoiningNodeDiscoveryData interface to retrieve discovery data of joining node.public void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage request.collectJoiningNodeData in interface GridComponentcollectJoiningNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived in interface GridComponentonGridDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.GridDiscoveryData interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).public void beforeExchange(GridDhtPartitionsExchangeFuture fut)
fut - Exchange future.public Map<String,Integer> secondaryIndexesInlineSize()
IndexProcessor.secondaryIndexesInlineSize()public void onSchemaPropose(SchemaProposeDiscoveryMessage msg)
msg - Discovery message.public boolean indexingEnabled()
true If indexing module is in classpath and successfully initialized.public boolean moduleEnabled()
true If indexing module is enabled or any query engine is enabled.public GridQueryIndexing getIndexing() throws IgniteException
IgniteException - If module is not enabled.public RunningQueryManager runningQueryManager() throws IgniteException
IgniteException - If module is not enabled.public void onCacheStart0(GridCacheContextInfo<?,?> cacheInfo, QuerySchema schema, boolean isSql) throws IgniteCheckedException
Use with busyLock where appropriate.
cacheInfo - Cache context info.schema - Initial schema.isSql - true in case create cache initialized from SQL.IgniteCheckedException - If failed.public void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.IgniteCheckedException - If failed.public void initQueryStructuresForNotStartedCache(DynamicCacheDescriptor cacheDesc) throws IgniteCheckedException
cacheDesc - Cache descriptor.IgniteCheckedException - If failed.public void onCacheStart(GridCacheContextInfo cacheInfo, QuerySchema schema, boolean isSql) throws IgniteCheckedException
cacheInfo - Cache context info.schema - Index states.isSql - true in case create cache initialized from SQL.IgniteCheckedException - If failed.public void onCacheStop(String cacheName)
cacheName - Cache name.public void onCacheStop(GridCacheContextInfo cacheInfo, boolean removeIdx, boolean clearIdx)
cacheInfo - Cache context info.removeIdx - If true, will remove index.clearIdx - If true, will clear the index.public void onClientCacheStop(GridCacheContextInfo cacheInfo)
cacheInfo - Cache context info.public boolean skipFieldLookup()
public void skipFieldLookup(boolean skipFieldLookup)
skipFieldLookup - Skip field lookup flag.public void registerMetadataForRegisteredCaches(boolean platformOnly)
platformOnly - Whether to register non-Java platformOnly types only.public void onCacheChangeRequested(DynamicCacheChangeBatch batch)
batch - Dynamic cache change batch request.public void onDiscovery(SchemaAbstractDiscoveryMessage msg)
msg - Message.public void onCoordinatorFinished(SchemaAbstractOperation op, @Nullable @Nullable SchemaOperationException err)
op - Operation.err - Error (if any).public void onLocalOperationFinished(SchemaAbstractOperation op, @Nullable @Nullable QueryTypeDescriptorImpl type)
op - Operation.type - Type descriptor (if available),public void onNodeLeave(ClusterNode node)
node - Node.public void processSchemaOperationLocal(SchemaAbstractOperation op, QueryTypeDescriptorImpl type, IgniteUuid depId, IndexRebuildCancelToken cancelTok) throws SchemaOperationException
op - Operation.type - Type descriptor.depId - Cache deployment ID.cancelTok - Cancel token.SchemaOperationException - If failed.public void dynamicTableCreate(String schemaName, QueryEntity entity, String templateName, String cacheName, String cacheGroup, @Nullable @Nullable String dataRegion, String affinityKey, @Nullable @Nullable CacheAtomicityMode atomicityMode, @Nullable @Nullable CacheWriteSynchronizationMode writeSyncMode, @Nullable @Nullable Integer backups, boolean ifNotExists, @Nullable @Nullable Boolean encrypted, @Nullable @Nullable Integer qryParallelism) throws IgniteCheckedException
schemaName - Schema name to create table in. Case sensitive, must not be \"quoted\".entity - Entity to create table from.templateName - Template name.cacheName - Cache name.cacheGroup - Cache group name.dataRegion - Data region name.affinityKey - Affinity key column name.atomicityMode - Atomicity mode.writeSyncMode - Write synchronization mode.backups - Backups.ifNotExists - Quietly ignore this command if table already exists.encrypted - Encrypted flag.qryParallelism - query parallelism value for configuration of underlying cache.IgniteCheckedException - If failed.public void dynamicTableDrop(String cacheName, String tblName, boolean ifExists) throws SchemaOperationException
cacheName - Cache name.tblName - Table name.ifExists - Quietly ignore this command if table does not exist.SchemaOperationException - if ifExists is false and cache was not found.public void onCacheStop0(GridCacheContextInfo cacheInfo, boolean destroy, boolean clearIdx)
Use with busyLock where appropriate.
cacheInfo - Cache context info.destroy - Destroy flag.clearIdx - Clear flag.public boolean belongsToTable(GridCacheContext cctx, String expCacheName, String expTblName, KeyCacheObject key, CacheObject val) throws IgniteCheckedException
cctx - Target cache context.expCacheName - Expected cache name.expTblName - Expected table name.key - Key.val - Value.True if this key-value pair belongs to expected cache/table, false otherwise or
if cache or table doesn't exist.IgniteCheckedException - If failed.@Nullable public @Nullable String tableName(String cacheName, String valType)
cacheName - Cache name.valType - Value type.null if there is no match.public void markAsRebuildNeeded(GridCacheContext cctx, boolean val)
cctx - Cache context.public IgniteInternalFuture<?> rebuildIndexesFromHash(GridCacheContext cctx, boolean force)
cctx - Cache context.force - Force rebuild indexes.@Nullable public @Nullable IgniteInternalFuture<?> indexRebuildFuture(int cacheId)
public void store(GridCacheContext cctx, CacheDataRow newRow, @Nullable @Nullable CacheDataRow prevRow, boolean prevRowAvailable) throws IgniteCheckedException
cctx - Cache context.newRow - New row.prevRow - Previous row.IgniteCheckedException - In case of error.@Nullable public @Nullable QueryTypeDescriptorImpl typeByValue(String cacheName, CacheObjectContext coctx, KeyCacheObject key, CacheObject val, boolean checkType) throws IgniteCheckedException
cacheName - Cache name.coctx - Cache context.key - Key.val - Value.checkType - If true checks that key and value type correspond to found TypeDescriptor.null otherwise.IgniteCheckedException - If type check failed.public UpdateSourceIterator<?> executeUpdateOnDataNodeTransactional(GridCacheContext<?,?> cctx, int[] cacheIds, int[] parts, String schema, String qry, Object[] params, int flags, int pageSize, int timeout, AffinityTopologyVersion topVer, MvccSnapshot mvccSnapshot, GridQueryCancel cancel) throws IgniteCheckedException
cctx - Cache context.cacheIds - Involved cache ids.parts - Partitions.schema - Schema name.qry - Query string.params - Query parameters.flags - Flags.pageSize - Fetch page size.timeout - Timeout.topVer - Topology version.mvccSnapshot - MVCC snapshot.cancel - Query cancel object.IgniteCheckedException - If failed.public List<FieldsQueryCursor<List<?>>> querySqlFields(SqlFieldsQuery qry, boolean keepBinary, boolean failOnMultipleStmts)
qry - Query.keepBinary - Keep binary flag.public FieldsQueryCursor<List<?>> querySqlFields(SqlFieldsQuery qry, boolean keepBinary)
qry - Query.keepBinary - Keep binary flag.public List<FieldsQueryCursor<List<?>>> querySqlFields(@Nullable @Nullable GridCacheContext<?,?> cctx, SqlFieldsQuery qry, SqlClientContext cliCtx, boolean keepBinary, boolean failOnMultipleStmts)
cctx - Cache context.qry - Query.cliCtx - Client context.keepBinary - Keep binary flag.failOnMultipleStmts - If true the method must throws exception when query contains
more then one SQL statement.public List<FieldsQueryCursor<List<?>>> querySqlFields(@Nullable @Nullable GridCacheContext<?,?> cctx, SqlFieldsQuery qry, SqlClientContext cliCtx, boolean keepBinary, boolean failOnMultipleStmts, @Nullable @Nullable GridQueryCancel cancel)
cctx - Cache context.qry - Query.cliCtx - Client context.keepBinary - Keep binary flag.failOnMultipleStmts - If true the method must throws exception when query contains
more then one SQL statement.cancel - Hook for query cancellation.public List<FieldsQueryCursor<List<?>>> querySqlFields(@Nullable @Nullable GridCacheContext<?,?> cctx, SqlFieldsQuery qry, SqlClientContext cliCtx, boolean keepBinary, boolean failOnMultipleStmts, GridCacheQueryType qryType, @Nullable @Nullable GridQueryCancel cancel)
cctx - Cache context.qry - Query.cliCtx - Client context.keepBinary - Keep binary flag.failOnMultipleStmts - If true the method must throws exception when query contains
more then one SQL statement.qryType - Real query type.cancel - Hook for query cancellation.public List<JdbcParameterMeta> parameterMetaData(SqlFieldsQuery qry, @Nullable @Nullable SqlClientContext cliCtx)
public List<GridQueryFieldMetadata> resultSetMetaData(SqlFieldsQuery qry, @Nullable @Nullable SqlClientContext cliCtx)
public String schemaName(GridCacheContext<?,?> cctx)
cctx - Cache context.public long streamUpdateQuery(@Nullable
@Nullable String cacheName,
String schemaName,
IgniteDataStreamer<?,?> streamer,
String qry,
Object[] args,
String qryInitiatorId)
cacheName - Cache name.schemaName - Schema name.streamer - Data streamer.qry - Query.public List<Long> streamBatchedUpdateQuery(String schemaName, SqlClientContext cliCtx, String qry, List<Object[]> args, String qryInitiatorId)
schemaName - Schema name.cliCtx - Client context.qry - Query.args - Query arguments.public <K,V> QueryCursor<javax.cache.Cache.Entry<K,V>> querySql(GridCacheContext<?,?> cctx, SqlQuery qry, boolean keepBinary)
cctx - Cache context.qry - Query.keepBinary - Keep binary flag.public Collection<GridRunningQueryInfo> runningQueries(long duration)
duration - Duration to check.public void cancelQuery(long queryId,
@Nullable
@Nullable UUID nodeId,
boolean async)
queryId - Query id.nodeId - Node id, if null, cancel local query.async - If true, execute asynchronously.public void cancelLocalQueries(Collection<Long> queries)
queries - Queries ID's to cancel.public IgniteInternalFuture<?> dynamicIndexCreate(String cacheName, String schemaName, String tblName, QueryIndex idx, boolean ifNotExists, int parallel)
cacheName - Cache name.schemaName - Schema name.tblName - Table name.idx - Index.ifNotExists - When set to true operation will fail if index already exists.parallel - Index creation parallelism level.public IgniteInternalFuture<?> dynamicIndexDrop(String cacheName, String schemaName, String idxName, boolean ifExists)
cacheName - Cache name.schemaName - Schema name.idxName - Index name.ifExists - When set to true operation fill fail if index doesn't exists.public IgniteInternalFuture<?> dynamicColumnAdd(String cacheName, String schemaName, String tblName, List<QueryField> cols, boolean ifTblExists, boolean ifNotExists)
schemaName - Schema name.tblName - Target table name.cols - Columns to add.ifTblExists - Ignore operation if target table doesn't exist.ifNotExists - Ignore operation if column exists.public IgniteInternalFuture<?> dynamicColumnRemove(String cacheName, String schemaName, String tblName, List<String> cols, boolean ifTblExists, boolean ifExists)
schemaName - Schema name.tblName - Target table name.cols - Columns to drop.ifTblExists - Ignore operation if target table doesn't exist.ifExists - Ignore operation if column does not exist.public IgniteInternalFuture<?> dynamicAddQueryEntity(String cacheName, String schemaName, QueryEntity entity, Integer qryParallelism, boolean sqlEscape)
cacheName - Cache nameschemaName - Target schema name.entity - Instance of QueryEntity.qryParallelism - Query parallelism.sqlEscape - Escape flag, seeQueryUtils.normalizeQueryEntity(org.apache.ignite.internal.GridKernalContext, org.apache.ignite.cache.QueryEntity, boolean).public void remove(GridCacheContext cctx, CacheDataRow row) throws IgniteCheckedException
cctx - Cache context.row - Row removed from cache.IgniteCheckedException - Thrown in case of any errors.public <K,V> GridCloseableIterator<IgniteBiTuple<K,V>> queryText(String cacheName, String clause, String resType, IndexingQueryFilter filters, int limit) throws IgniteCheckedException
K - Key type.V - Value type.cacheName - Cache name.clause - Clause.resType - Result type.filters - Key and value filters.limit - Limits response records count. If 0 or less, the limit considered to be Integer.MAX_VALUE, that is virtually no limit.IgniteCheckedException - If failed.public <K,V> IndexQueryResult<K,V> queryIndex(String cacheName, String valCls, IndexQueryDesc idxQryDesc, @Nullable @Nullable IgniteBiPredicate<K,V> entryFilter, IndexingQueryFilter cacheFilter, boolean keepBinary) throws IgniteCheckedException
K - Key type.V - Value type.cacheName - Cache name.valCls - Cache value class.idxQryDesc - Index query description.entryFilter - Optional user defined cache entries filter.cacheFilter - Ignite specific cache entries filters.keepBinary - Keep binary flag.IgniteCheckedException - If failed.public Collection<GridQueryTypeDescriptor> types(@Nullable @Nullable String cacheName)
cacheName - Cache name.@Nullable public @Nullable GridQueryTypeDescriptor typeDescriptor(@Nullable @Nullable String cacheName, String typeName)
cacheName - Cache name.typeName - Type name.null if descriptor was not found.public <R> R executeQuery(GridCacheQueryType qryType, String qry, @Nullable @Nullable GridCacheContext<?,?> cctx, IgniteOutClosureX<R> clo, boolean complete) throws IgniteCheckedException
qryType - Query type.qry - Query description.cctx - Cache context.clo - Closure.complete - Complete.IgniteCheckedExceptionpublic void sendStatusMessage(UUID destNodeId, UUID opId, SchemaOperationException err)
destNodeId - Destination node ID.opId - Operation ID.err - Error.public CacheQueryObjectValueContext objectContext()
public void validateKeyAndValue(CacheObjectContext coctx, KeyCacheObject key, CacheObject val) throws IgniteCheckedException
coctx - Cache object context.key - Key.val - Value.IgniteCheckedException, - If error happens.IgniteCheckedExceptionpublic void onClientDisconnect()
throws IgniteCheckedException
IgniteCheckedException - If failed.public static void setRequestAffinityTopologyVersion(AffinityTopologyVersion ver)
ver - Version.public static AffinityTopologyVersion getRequestAffinityTopologyVersion()
public void removeIndexRebuildFuturesOnExchange(GridDhtPartitionsExchangeFuture fut, @Nullable @Nullable Set<Integer> cacheIds)
fut - Exchange future.cacheIds - Cache ids for which futures will be deleted,
if null then ids will be taken from the fut.public boolean rebuildIndexOnExchange(int cacheId,
GridDhtPartitionsExchangeFuture fut)
cacheId - Cache id.fut - Exchange future.True if need to rebuild.public Set<Integer> prepareRebuildIndexes(Set<Integer> cacheIds)
cacheIds - Cache ids.public void onStartRebuildIndexes(GridCacheContext cacheCtx, boolean recreate)
rebuildIndexesCompleted(org.apache.ignite.internal.processors.cache.GridCacheContext).cacheCtx - Cache context.recreate - True if index.bin recreating.onFinishRebuildIndexes(org.apache.ignite.internal.processors.cache.GridCacheContext),
rebuildIndexesCompleted(org.apache.ignite.internal.processors.cache.GridCacheContext)public void markIndexRecreate(GridCacheContext cacheCtx)
cacheCtx - Cache context.public void onFinishRebuildIndexes(GridCacheContext cacheCtx)
cacheCtx - Cache context.public boolean rebuildIndexesCompleted(GridCacheContext cacheCtx)
cacheCtx - Cache context.True if completed.public boolean recreateCompleted(String cacheName)
cacheName - Cache name.True if index.bin recreating completed.public void completeRebuildIndexes(String cacheName)
cacheName - Cache name.public IndexBuildStatusStorage getIdxBuildStatusStorage()
public SchemaManager schemaManager()
public IgniteStatisticsManager statsManager()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023