@Override protected final PrepStatementExecutorMessage<T> clone() { return new PrepStatementExecutorMessage<T>(this); }
@Override protected void execute() throws Exception { String argsStr = null; if (GemFireXDUtils.TraceQuery | GemFireXDUtils.TraceNCJ) { final StringBuilder sb = new StringBuilder(); appendFields(sb); argsStr = sb.toString(); } this.wrapperForMarkUnused = null; StatementQueryExecutor.executePrepStatement(this.defaultSchema, this.connectionId, this.statementId, this.source, getActivationFlags(), statsEnabled(), timeStatsEnabled(), this, argsStr, getTXState(), this); }
final GfxdConnectionWrapper wrapper = msg.getAndClearWrapper(userName, connId); final EmbedConnection conn = wrapper.getConnectionForSynchronization(); tc = (GemFireTransaction)lcc.getTransactionExecute(); GfxdConnectionWrapper.checkForTransaction(conn, tc, tx); pstmt = msg.getAndClearPreparedStatement(); pvs = pstmt.getParms(); final GemFireXDQueryObserver observer = GemFireXDQueryObserverHolder act.setFunctionContext(fc); act.setConnectionID(connId); pstmt.setQueryTimeout((int) (msg.getTimeOutMillis() / 1000)); // convert to seconds final int statementType = pstmt.getStatementType(); if (msg.isLocallyExecuted()) { if (rh.setupResults(msg.getGfxdResultCollector(), act)) { InternalDistributedMember m = msg.getSenderForReply(); final Version v = m != null ? m.getVersionObject() : null; while (rh.prepareSend(v)) { msg.sendResult(rh); msg.lastResult(rh, false /* TX flush will be done by ResultHolder */, false /* TXChanges send will be done by ResultHolder*/, ers = null; int numUpdate = pstmt.executeUpdate();
private EmbedPreparedStatement getStatement() throws SQLException { Properties props = new Properties(); props.setProperty(Attribute.QUERY_HDFS, Boolean.toString(getQueryHDFS())); this.wrapper = GfxdConnectionHolder.getOrCreateWrapper(this.defaultSchema, this.connectionId, false, props); final EmbedConnection conn = this.wrapper.getConnectionForSynchronization(); synchronized (conn.getConnectionSynchronization()) { conn.setDefaultSchema(this.defaultSchema); this.wrapper.convertToHardReference(conn); conn.getLanguageConnection().setStatsEnabled(statsEnabled(), timeStatsEnabled(), explainConnectionEnabled()); conn.getLanguageConnection().setQueryHDFS(getQueryHDFS()); if (this.getNCJMetaDataOnRemote() != null) { conn.getLanguageConnection().setNcjBatchSize( NcjHashMapWrapper.getBatchSize(this.getNCJMetaDataOnRemote())); conn.getLanguageConnection().setNcjCacheSize( NcjHashMapWrapper.getCacheSize(this.getNCJMetaDataOnRemote())); } this.wrapperForMarkUnused = this.wrapper; return (EmbedPreparedStatement)this.wrapper.getStatement(this.source, this.statementId, true /* is prep stmnt */, needGfxdSubActivation(), allowSubqueryFlattening(), allTablesAreReplicatedOnRemote(), this.getNCJMetaDataOnRemote(), false, this.rootId, this.statementLevel); } }
functionMsg = prepMsg = new PrepStatementExecutorMessage<Object>( rc, defaultSchema, this.connectionID, this.statementID, this.executionID, newrootID, newstmtLevel, preg, routingKeysToExecute, this.qInfo.isInsertAsSubSelect(), lcc, this.getTimeOutMillis()); prepMsg.setPartitionRegions(this.qInfo.getOtherRegions()); + this.qInfo.hasIntersectOrExceptNode()); prepMsg.setHasSetOperatorNode(true, this.qInfo.hasIntersectOrExceptNode()); prepMsg.setNCJoinOnQN(this.qInfo.getNCJMetaData(), lcc);
final GfxdConnectionWrapper wrapper = msg.getAndClearWrapper(userName, connId); final EmbedConnection conn = wrapper.getConnectionForSynchronization(); tc = (GemFireTransaction)lcc.getTransactionExecute(); GfxdConnectionWrapper.checkForTransaction(conn, tc, tx); pstmt = msg.getAndClearPreparedStatement(); pvs = pstmt.getParms(); final GemFireXDQueryObserver observer = GemFireXDQueryObserverHolder act.setFunctionContext(fc); act.setConnectionID(connId); pstmt.setQueryTimeout((int) (msg.getTimeOutMillis() / 1000)); // convert to seconds final int statementType = pstmt.getStatementType(); if (msg.isLocallyExecuted()) { if (rh.setupResults(msg.getGfxdResultCollector(), act)) { InternalDistributedMember m = msg.getSenderForReply(); final Version v = m != null ? m.getVersionObject() : null; while (rh.prepareSend(v)) { msg.sendResult(rh); msg.lastResult(rh, false /* TX flush will be done by ResultHolder */, false /* TXChanges send will be done by ResultHolder*/, ers = null; int numUpdate = pstmt.executeUpdate();
private EmbedPreparedStatement getStatement() throws SQLException { Properties props = new Properties(); props.setProperty(Attribute.QUERY_HDFS, Boolean.toString(getQueryHDFS())); this.wrapper = GfxdConnectionHolder.getOrCreateWrapper(this.defaultSchema, this.connectionId, false, props); final EmbedConnection conn = this.wrapper.getConnectionForSynchronization(); synchronized (conn.getConnectionSynchronization()) { conn.setDefaultSchema(this.defaultSchema); this.wrapper.convertToHardReference(conn); conn.getLanguageConnection().setStatsEnabled(statsEnabled(), timeStatsEnabled(), explainConnectionEnabled()); conn.getLanguageConnection().setQueryHDFS(getQueryHDFS()); if (this.getNCJMetaDataOnRemote() != null) { conn.getLanguageConnection().setNcjBatchSize( NcjHashMapWrapper.getBatchSize(this.getNCJMetaDataOnRemote())); conn.getLanguageConnection().setNcjCacheSize( NcjHashMapWrapper.getCacheSize(this.getNCJMetaDataOnRemote())); } this.wrapperForMarkUnused = this.wrapper; return (EmbedPreparedStatement)this.wrapper.getStatement(this.source, this.statementId, true /* is prep stmnt */, needGfxdSubActivation(), allowSubqueryFlattening(), allTablesAreReplicatedOnRemote(), this.getNCJMetaDataOnRemote(), false, this.rootId, this.statementLevel); } }
functionMsg = prepMsg = new PrepStatementExecutorMessage<Object>( rc, defaultSchema, this.connectionID, this.statementID, this.executionID, newrootID, newstmtLevel, preg, routingKeysToExecute, this.qInfo.isInsertAsSubSelect(), lcc, this.getTimeOutMillis()); prepMsg.setPartitionRegions(this.qInfo.getOtherRegions()); + this.qInfo.hasIntersectOrExceptNode()); prepMsg.setHasSetOperatorNode(true, this.qInfo.hasIntersectOrExceptNode()); prepMsg.setNCJoinOnQN(this.qInfo.getNCJMetaData(), lcc);
final GfxdConnectionWrapper wrapper = msg.getAndClearWrapper(userName, connId); final EmbedConnection conn = wrapper.getConnectionForSynchronization(); tc = (GemFireTransaction)lcc.getTransactionExecute(); GfxdConnectionWrapper.checkForTransaction(conn, tc, tx); pstmt = msg.getAndClearPreparedStatement(); pvs = pstmt.getParms(); final GemFireXDQueryObserver observer = GemFireXDQueryObserverHolder act.setFunctionContext(fc); act.setConnectionID(connId); pstmt.setQueryTimeout((int) (msg.getTimeOutMillis() / 1000)); // convert to seconds final int statementType = pstmt.getStatementType(); if (msg.isLocallyExecuted()) { if (rh.setupResults(msg.getGfxdResultCollector(), act)) { InternalDistributedMember m = msg.getSenderForReply(); final Version v = m != null ? m.getVersionObject() : null; while (rh.prepareSend(v)) { msg.sendResult(rh); msg.lastResult(rh, false /* TX flush will be done by ResultHolder */, false /* TXChanges send will be done by ResultHolder*/, ers = null; int numUpdate = pstmt.executeUpdate();
private EmbedPreparedStatement getStatement() throws SQLException { Properties props = new Properties(); props.setProperty(Attribute.QUERY_HDFS, Boolean.toString(getQueryHDFS())); this.wrapper = GfxdConnectionHolder.getOrCreateWrapper(this.defaultSchema, this.connectionId, false, props); final EmbedConnection conn = this.wrapper.getConnectionForSynchronization(); synchronized (conn.getConnectionSynchronization()) { conn.setDefaultSchema(this.defaultSchema); this.wrapper.convertToHardReference(conn); conn.getLanguageConnection().setStatsEnabled(statsEnabled(), timeStatsEnabled(), explainConnectionEnabled()); conn.getLanguageConnection().setQueryHDFS(getQueryHDFS()); if (this.getNCJMetaDataOnRemote() != null) { conn.getLanguageConnection().setNcjBatchSize( NcjHashMapWrapper.getBatchSize(this.getNCJMetaDataOnRemote())); conn.getLanguageConnection().setNcjCacheSize( NcjHashMapWrapper.getCacheSize(this.getNCJMetaDataOnRemote())); } this.wrapperForMarkUnused = this.wrapper; return (EmbedPreparedStatement)this.wrapper.getStatement(this.source, this.statementId, true /* is prep stmnt */, needGfxdSubActivation(), allowSubqueryFlattening(), allTablesAreReplicatedOnRemote(), this.getNCJMetaDataOnRemote(), false, this.rootId, this.statementLevel); } }
@Override protected void execute() throws Exception { String argsStr = null; if (GemFireXDUtils.TraceQuery | GemFireXDUtils.TraceNCJ) { final StringBuilder sb = new StringBuilder(); appendFields(sb); argsStr = sb.toString(); } this.wrapperForMarkUnused = null; StatementQueryExecutor.executePrepStatement(this.defaultSchema, this.connectionId, this.statementId, this.source, getActivationFlags(), statsEnabled(), timeStatsEnabled(), this, argsStr, getTXState(), this); }
@Override protected final PrepStatementExecutorMessage<T> clone() { return new PrepStatementExecutorMessage<T>(this); }
@Override protected void execute() throws Exception { String argsStr = null; if (GemFireXDUtils.TraceQuery | GemFireXDUtils.TraceNCJ) { final StringBuilder sb = new StringBuilder(); appendFields(sb); argsStr = sb.toString(); } this.wrapperForMarkUnused = null; StatementQueryExecutor.executePrepStatement(this.defaultSchema, this.connectionId, this.statementId, this.source, getActivationFlags(), statsEnabled(), timeStatsEnabled(), this, argsStr, getTXState(), this); }
@Override protected final PrepStatementExecutorMessage<T> clone() { return new PrepStatementExecutorMessage<T>(this); }
functionMsg = new PrepStatementExecutorMessage<Object>( rc, defaultSchema,
functionMsg = new PrepStatementExecutorMessage<Object>( rc, defaultSchema,
() -> new StatementExecutorMessage()); DSFIDFactory.registerGemFireXDClass(PREP_STMNT_EXECUTOR_FUNCTION, () -> new PrepStatementExecutorMessage()); DSFIDFactory.registerGemFireXDClass(GFXD_CONFIG_MSG, () -> new GfxdConfigMessage());