/** * @see GfxdFunctionMessage#clone() */ @Override protected GetExecutorMessage clone() { return new GetExecutorMessage(this); }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { ser_deser_time = this.timeStatsEnabled ? (ser_deser_time == 0 ? -1 /*record*/ : -2/*ignore nested call*/) : 0; super.fromData(in); final short flags = this.flags; // read any projection this.hasProjection = (flags & HAS_PROJECTION) != 0; if (this.hasProjection) { this.projectionFixedColumns = readIntArray(in); this.projectionVarColumns = readIntArray(in); this.projectionLobColumns = readIntArray(in); this.targetFormatOffsetBytes = in.readByte(); } this.queryHDFS = in.readBoolean(); this.hasLoader = ((flags & HAS_LOADER) != 0); this.canStartTX = ((flags & CAN_START_TX) != 0); this.forUpdate = ((flags & FOR_UPDATE) != 0); // recording end of de-serialization here instead of AbstractOperationMessage. if (this.timeStatsEnabled && ser_deser_time == -1) { this.ser_deser_time = XPLAINUtil.recordStdTiming(getTimestamp()); } }
final Object resultOneKey = executeOneKey(this, this.key, this.callbackArg, this.bucketId, this.pr, this.region, this.regionPath, this.isSecondaryCopy, this.hasProjection, this.targetFormat, SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_QUERYDISTRIB, ID + ": sending lastResult [" + resultOneKey + "] for region " + region.getFullPath() + " processorId=" + getProcessorId() + ", isSecondaryCopy=" + isSecondaryCopy); lastResult(resultOneKey, isPrimary /* flush any entries added via loader */, isPrimary, true); } catch (RuntimeException re) { if (GemFireXDUtils.isOffHeapEnabled() && this.isLocallyExecuted()) { OffHeapReleaseUtil.freeOffHeapReference(resultOneKey); if (GemFireXDUtils.isOffHeapEnabled() && !this.isLocallyExecuted()) { OffHeapReleaseUtil.freeOffHeapReference(resultOneKey); SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_QUERYDISTRIB, ID + ": Not sending lastResult now for region " + region.getFullPath() + " processorId=" + getProcessorId() + ", forceUseOfPRExecutor=" + forceUseOfPRExecutor);
getMsg = new GetExecutorMessage(region, key, callbackArg, routingObject, this.projectionFormat, this.projectionFixedColumns, this.projectionVarColumns, this.projectionLobColumns, this.projectionAllColumnsWithLobs, tx, lcc, this.forUpdate, this.queryHDFS); rawRow = getMsg.executeFunction(); fetchRow = processResultRow(key, region, hasLoader, getMsg.hasProjection(), isTX, rawRow); } catch (CacheLoaderException ex) { final boolean isItENFE = checkIfENFE(ex); getMsg != null ? getMsg.getTarget() : null, region);
public GetExecutorMessage(final LocalRegion region, final Object key, final Object callbackArg, final Object routingObject, final RowFormatter targetFormat, final int[] projectionFixedColumns, final int[] projectionVarColumns, final int[] projectionLobColumns, final int[] projectionAllColumns, final TXStateInterface tx, final LanguageConnectionContext lcc, final boolean forUpdate, final boolean queryHDFS) { // acquire lock on all copies for REPEATABLE_READ super(region, key, callbackArg, routingObject, tx != null && tx.getLockingPolicy().readCanStartTX(), tx, getTimeStatsSettings(lcc)); final int offsetBytes = targetFormat.getNumOffsetBytes(); assert offsetBytes > 0 && offsetBytes <= 4: offsetBytes; this.targetFormat = targetFormat; this.projectionFixedColumns = projectionFixedColumns; this.projectionVarColumns = projectionVarColumns; this.projectionLobColumns = projectionLobColumns; this.projectionAllColumns = projectionAllColumns; this.targetFormatOffsetBytes = (byte)offsetBytes; this.hasProjection = projectionAllColumns != null; this.forUpdate = forUpdate; this.hasLoader = ((GemFireContainer)region.getUserAttribute()) .getHasLoaderAnywhere(); if (isTransactional() && !region.getScope().isLocal()) { // check for loader in the region this.canStartTX = getLockingPolicy().readCanStartTX() || this.forUpdate || this.hasLoader; } this.queryHDFS = queryHDFS; }
callbackArg.setRoutingObject(routingObject); result = GetExecutorMessage.executeOneKey(this, key, callbackArg, bucketId, this.pr, this.region, this.regionPath, false, this.hasProjection, this.targetFormat,
final Object resultOneKey = executeOneKey(this, this.key, this.callbackArg, this.bucketId, this.pr, this.region, this.regionPath, this.isSecondaryCopy, this.hasProjection, this.targetFormat, SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_QUERYDISTRIB, ID + ": sending lastResult [" + resultOneKey + "] for region " + region.getFullPath() + " processorId=" + getProcessorId() + ", isSecondaryCopy=" + isSecondaryCopy); lastResult(resultOneKey, isPrimary /* flush any entries added via loader */, isPrimary, true); } catch (RuntimeException re) { if (GemFireXDUtils.isOffHeapEnabled() && this.isLocallyExecuted()) { OffHeapReleaseUtil.freeOffHeapReference(resultOneKey); if (GemFireXDUtils.isOffHeapEnabled() && !this.isLocallyExecuted()) { OffHeapReleaseUtil.freeOffHeapReference(resultOneKey); SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_QUERYDISTRIB, ID + ": Not sending lastResult now for region " + region.getFullPath() + " processorId=" + getProcessorId() + ", forceUseOfPRExecutor=" + forceUseOfPRExecutor);
getMsg = new GetExecutorMessage(region, key, callbackArg, routingObject, this.projectionFormat, this.projectionFixedColumns, this.projectionVarColumns, this.projectionLobColumns, this.projectionAllColumnsWithLobs, tx, lcc, this.forUpdate, this.queryHDFS); rawRow = getMsg.executeFunction(); fetchRow = processResultRow(key, region, hasLoader, getMsg.hasProjection(), isTX, rawRow); } catch (CacheLoaderException ex) { final boolean isItENFE = checkIfENFE(ex); getMsg != null ? getMsg.getTarget() : null, region);
public GetExecutorMessage(final LocalRegion region, final Object key, final Object callbackArg, final Object routingObject, final RowFormatter targetFormat, final int[] projectionFixedColumns, final int[] projectionVarColumns, final int[] projectionLobColumns, final int[] projectionAllColumns, final TXStateInterface tx, final LanguageConnectionContext lcc, final boolean forUpdate, final boolean queryHDFS) { // acquire lock on all copies for REPEATABLE_READ super(region, key, callbackArg, routingObject, tx != null && tx.getLockingPolicy().readCanStartTX(), tx, getTimeStatsSettings(lcc)); final int offsetBytes = targetFormat.getNumOffsetBytes(); assert offsetBytes > 0 && offsetBytes <= 4: offsetBytes; this.targetFormat = targetFormat; this.projectionFixedColumns = projectionFixedColumns; this.projectionVarColumns = projectionVarColumns; this.projectionLobColumns = projectionLobColumns; this.projectionAllColumns = projectionAllColumns; this.targetFormatOffsetBytes = (byte)offsetBytes; this.hasProjection = projectionAllColumns != null; this.forUpdate = forUpdate; this.hasLoader = ((GemFireContainer)region.getUserAttribute()) .getHasLoaderAnywhere(); if (isTransactional() && !region.getScope().isLocal()) { // check for loader in the region this.canStartTX = getLockingPolicy().readCanStartTX() || this.forUpdate || this.hasLoader; } this.queryHDFS = queryHDFS; }
callbackArg.setRoutingObject(routingObject); result = GetExecutorMessage.executeOneKey(this, key, callbackArg, bucketId, this.pr, this.region, this.regionPath, false, this.hasProjection, this.targetFormat,
final Object resultOneKey = executeOneKey(this, this.key, this.callbackArg, this.bucketId, this.pr, this.region, this.regionPath, this.isSecondaryCopy, this.hasProjection, this.targetFormat, SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_QUERYDISTRIB, ID + ": sending lastResult [" + resultOneKey + "] for region " + region.getFullPath() + " processorId=" + getProcessorId() + ", isSecondaryCopy=" + isSecondaryCopy); lastResult(resultOneKey, isPrimary /* flush any entries added via loader */, isPrimary, true); } catch (RuntimeException re) { if (GemFireXDUtils.isOffHeapEnabled() && this.isLocallyExecuted()) { OffHeapReleaseUtil.freeOffHeapReference(resultOneKey); if (GemFireXDUtils.isOffHeapEnabled() && !this.isLocallyExecuted()) { OffHeapReleaseUtil.freeOffHeapReference(resultOneKey); SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_QUERYDISTRIB, ID + ": Not sending lastResult now for region " + region.getFullPath() + " processorId=" + getProcessorId() + ", forceUseOfPRExecutor=" + forceUseOfPRExecutor);
getMsg = new GetExecutorMessage(region, key, callbackArg, routingObject, this.projectionFormat, this.projectionFixedColumns, this.projectionVarColumns, this.projectionLobColumns, this.projectionAllColumnsWithLobs, tx, lcc, this.forUpdate, this.queryHDFS); rawRow = getMsg.executeFunction(); fetchRow = processResultRow(key, region, hasLoader, getMsg.hasProjection(), isTX, rawRow); } catch (CacheLoaderException ex) { final boolean isItENFE = checkIfENFE(ex); getMsg != null ? getMsg.getTarget() : null, region);
public GetExecutorMessage(final LocalRegion region, final Object key, final Object callbackArg, final Object routingObject, final RowFormatter targetFormat, final int[] projectionFixedColumns, final int[] projectionVarColumns, final int[] projectionLobColumns, final int[] projectionAllColumns, final TXStateInterface tx, final LanguageConnectionContext lcc, final boolean forUpdate, final boolean queryHDFS) { // acquire lock on all copies for REPEATABLE_READ super(region, key, callbackArg, routingObject, tx != null && tx.getLockingPolicy().readCanStartTX(), tx, getTimeStatsSettings(lcc)); final int offsetBytes = targetFormat.getNumOffsetBytes(); assert offsetBytes > 0 && offsetBytes <= 4: offsetBytes; this.targetFormat = targetFormat; this.projectionFixedColumns = projectionFixedColumns; this.projectionVarColumns = projectionVarColumns; this.projectionLobColumns = projectionLobColumns; this.projectionAllColumns = projectionAllColumns; this.targetFormatOffsetBytes = (byte)offsetBytes; this.hasProjection = projectionAllColumns != null; this.forUpdate = forUpdate; this.hasLoader = ((GemFireContainer)region.getUserAttribute()) .getHasLoaderAnywhere(); if (isTransactional() && !region.getScope().isLocal()) { // check for loader in the region this.canStartTX = getLockingPolicy().readCanStartTX() || this.forUpdate || this.hasLoader; } this.queryHDFS = queryHDFS; }
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { ser_deser_time = this.timeStatsEnabled ? (ser_deser_time == 0 ? -1 /*record*/ : -2/*ignore nested call*/) : 0; super.fromData(in); final short flags = this.flags; // read any projection this.hasProjection = (flags & HAS_PROJECTION) != 0; if (this.hasProjection) { this.projectionFixedColumns = readIntArray(in); this.projectionVarColumns = readIntArray(in); this.projectionLobColumns = readIntArray(in); this.targetFormatOffsetBytes = in.readByte(); } this.queryHDFS = in.readBoolean(); this.hasLoader = ((flags & HAS_LOADER) != 0); this.canStartTX = ((flags & CAN_START_TX) != 0); this.forUpdate = ((flags & FOR_UPDATE) != 0); // recording end of de-serialization here instead of AbstractOperationMessage. if (this.timeStatsEnabled && ser_deser_time == -1) { this.ser_deser_time = XPLAINUtil.recordStdTiming(getTimestamp()); } }
/** * @see GfxdFunctionMessage#clone() */ @Override protected GetExecutorMessage clone() { return new GetExecutorMessage(this); }
callbackArg.setRoutingObject(routingObject); result = GetExecutorMessage.executeOneKey(this, key, callbackArg, bucketId, this.pr, this.region, this.regionPath, false, this.hasProjection, this.targetFormat,
@Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { ser_deser_time = this.timeStatsEnabled ? (ser_deser_time == 0 ? -1 /*record*/ : -2/*ignore nested call*/) : 0; super.fromData(in); final short flags = this.flags; // read any projection this.hasProjection = (flags & HAS_PROJECTION) != 0; if (this.hasProjection) { this.projectionFixedColumns = readIntArray(in); this.projectionVarColumns = readIntArray(in); this.projectionLobColumns = readIntArray(in); this.targetFormatOffsetBytes = in.readByte(); } this.queryHDFS = in.readBoolean(); this.hasLoader = ((flags & HAS_LOADER) != 0); this.canStartTX = ((flags & CAN_START_TX) != 0); this.forUpdate = ((flags & FOR_UPDATE) != 0); // recording end of de-serialization here instead of AbstractOperationMessage. if (this.timeStatsEnabled && ser_deser_time == -1) { this.ser_deser_time = XPLAINUtil.recordStdTiming(getTimestamp()); } }
/** * @see GfxdFunctionMessage#clone() */ @Override protected GetExecutorMessage clone() { return new GetExecutorMessage(this); }
() -> new GemFireRegionSizeResultSet.RegionSizeMessage()); DSFIDFactory.registerGemFireXDClass(GET_EXECUTOR_MSG, () -> new GetExecutorMessage()); DSFIDFactory.registerGemFireXDClass(GET_ALL_EXECUTOR_MSG, () -> new GetAllExecutorMessage());