void ComTdbHashGrby::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[100]; str_sprintf(buf, "\nFor ComTdbHashGrby :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"resultRowLength = %d, extGroupedRowLength = %d", resultRowLength_,extGroupedRowLength_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"keyLength = %d, isPartialGroup = %d, initialHashTableSize = %d", keyLength_,isPartialGroup_,initialHashTableSize_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"memUsagePercent = %d, pressureThreshold = %d, minBuffersToFlush = %d", memUsagePercent_,pressureThreshold_, minBuffersToFlush_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"logDiagnostics = %d", logDiagnostics()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "memoryQuotaMB = %d", memoryQuotaMB()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
// ----------------------------------------------------------------------- // Used by the internal SHOWPLAN command to get attributes of a TDB in a // string. // ----------------------------------------------------------------------- NA_EIDPROC void ComTdb::displayContents(Space * space,ULng32 flag) { #ifndef __EID char buf[100]; str_sprintf(buf, "Contents of %s [%d]:", getNodeName(),getExplainNodeId()); Int32 j = str_len(buf); space->allocateAndCopyToAlignedSpace(buf, j, sizeof(short)); for (Int32 k = 0; k < j; k++) buf[k] = '-'; buf[j] = '\n'; buf[j+1] = 0; space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if(flag & 0x00000008) { str_sprintf(buf,"For ComTdb :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"Class Version = %d, Class Size = %d", getClassVersionID(),getClassSize()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"InitialQueueSizeDown = %d, InitialQueueSizeUp = %d", getInitialQueueSizeDown(),getInitialQueueSizeUp()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"queueResizeLimit = %d, queueResizeFactor = %d", getQueueResizeLimit(),getQueueResizeFactor()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "queueSizeDown = %d, queueSizeUp = %d, numBuffers = %d, bufferSize = %d", getMaxQueueSizeDown(), getMaxQueueSizeUp(), numBuffers_, bufferSize_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "estimatedRowUsed = %f, estimatedRowsAccessed = %f, expressionMode = %d", estRowsUsed_, estRowsAccessed_, expressionMode_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "Flag = %b",flags_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (firstNRows() >= 0) { str_sprintf(buf, "Request Type: GET_N (%d) ", firstNRows()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } } #endif if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbSendTop::displayContents(Space *space, ULng32 flag) { ComTdb::displayContents(space, flag & 0xFFFFFFFE); if (flag & 0x00000008) { char buf[256]; str_sprintf(buf, "\nFor ComTdbSendTop :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "childFragId_ = %d, sendTopFlags_ = %b", (Lng32) childFragId_, (Lng32) sendTopFlags_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "downRecordLength_ = %d, upRecordLength_ = %d", downRecordLength_, upRecordLength_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "sendBufferSize_ = %d, recvBufferSize_ = %d", sendBufferSize_, recvBufferSize_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (sendTopFlags_ & EXTRACT_CONSUMER) { str_sprintf(buf, "This is a parallel extract consumer"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); const char *esp = getExtractEsp(); str_sprintf(buf, "Extract ESP = %s", (esp ? esp : "(NULL)")); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); const char *key = getExtractSecurityKey(); str_sprintf(buf, "Security key = %s", (key ? key : "(NULL)")); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } str_sprintf(buf, "Exchange uses SeaMonster: %s", getExchangeUsesSM() ? "yes" : "no"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbOnlj::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[100]; str_sprintf(buf, "\nFor ComTdbOnlj :\nFlags = %x, ljRecLen = %d, instantiatedRowAtpIndex = %d ", flags_, ljRecLen_, instantiatedRowAtpIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
NA_EIDPROC void ComTdbUnion::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[100]; str_sprintf(buf, "\nFor ComTdbUnion :\nFlags = %b, unionReclen = %d ", flags_,unionReclen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbParallelLabelOp::displayContents(Space *space, ULng32 flag) { ComTdb::displayContents(space, flag & 0xFFFFFFFE); if (flag & 0x00000008) { char buf[100]; str_sprintf(buf,"\nFor ComTdbParallelLabelOp: "); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"Operation = %d", operation_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (flag & 0x00000001) { displayExpression(space, flag); displayChildren(space, flag); } }
void ComTdbSequence::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[100]; str_sprintf(buf, "\nFor ComTdbSequence :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"recLen_ = %d, maxHistoryRows_ = %d, OLAPFlags_ = %b %s", recLen_, maxHistoryRows_, OLAPFlags_, isUnboundedFollowing() ? ", UNBOUNDED_FOLLOWING" : ""); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"minFollowing_ = %d, OLAPBufferSize_ = %d, maxNumberOfOLAPBuffers_ = %d", minFollowing_,OLAPBufferSize_,maxNumberOfOLAPBuffers_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"maxRowsInOLAPBuffer_ = %d, minNumberOfOLAPBuffers_ = %d", maxRowsInOLAPBuffer_, minNumberOfOLAPBuffers_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "numberOfWinOLAPBuffers_ = %d, %s memoryQuotaMB = %d", numberOfWinOLAPBuffers_, logDiagnostics() ? "LOG_DIAGNOSTICS," : "", memoryQuotaMB()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"%s memUsagePercent = %d, pressureThreshold = %d", isNoOverflow() ? "NO_OVERFLOW," : "", memUsagePercent_,pressureThreshold_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbInterpretAsRow::displayContents(Space *space, ULng32 flag) { ComTdb::displayContents(space, flag & 0xFFFFFFFE); if (flag & 0x00000008) { char buf[100]; str_sprintf(buf,"\nFor ComTdbInterpretAsRow: "); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"Audit compression flag = %d", flags_.auditCompressionFlag_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "AuditRowImageLen = %d, extractedRowLen = %d", auditRowImageLen_, extractedRowLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (flag & 0x00000001) { displayExpression(space, flag); displayChildren(space, flag); } }
NA_EIDPROC void ComTdbTupleFlow::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[100]; #pragma nowarn(1506) // warning elimination Lng32 lFlags = flags_%65536; #pragma warn(1506) // warning elimination #pragma nowarn(1506) // warning elimination Lng32 hFlags = (flags_- lFlags)/65536; #pragma warn(1506) // warning elimination str_sprintf(buf, "\nFor ComTdbTupleFlow :\nFlags = %b%b ",hFlags,lFlags ); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbHbaseAccess::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[1000]; str_sprintf(buf, "\nFor ComTdbHbaseAccess :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "accessType_ = %s", (char*)getAccessTypeStr(accessType_)); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "accessDetail_ = %s", getNodeName()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (samplingRate_ > 0) { // str_printf does not handle %f correctly, format as string first. char sbuf[20]; snprintf(sbuf, sizeof(sbuf), "%f", samplingRate_); str_sprintf(buf, "samplingRate_ = %s", sbuf); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (tableName_) { str_sprintf(buf, "tableName_ = %s", (char*)tableName_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } str_sprintf(buf, "asciiTI_ = %d, convertTI_ = %d, rowIdTI_ = %d, returnedTI_ = %d", asciiTuppIndex_, convertTuppIndex_, rowIdTuppIndex_, returnedTuppIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "rowIdAsciiTI_ = %d, updateTI_ = %d, mergeInsertTI_ = %d", rowIdAsciiTuppIndex_, updateTuppIndex_, mergeInsertTuppIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "returnedFetchedTI_ = %d, returnedUpdatedTI_ = %d, mergeInsertRowIdTI_ = %d", returnedFetchedTuppIndex_, returnedUpdatedTuppIndex_, mergeInsertRowIdTuppIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "asciiRowLen_ = %d, convertRowLen_ = %d, rowIdLen_ = %d, outputRowLen_ = %d", asciiRowLen_, convertRowLen_, rowIdLen_, outputRowLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "updateRowLen_ = %d, returnFetchedRowLen_ = %d, returnUpdateedRowLen_ = %d", updateRowLen_, returnFetchedRowLen_, returnUpdatedRowLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "mergeInsertRowLen_ = %d, keyLen_ = %d", mergeInsertRowLen_, keyLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "Flag = %b",flags_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "server_ = %s, zkPort_ = %s", server(), zkPort()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (listOfFetchedColNames()) { str_sprintf(buf, "\nlistOfFetchedColNames_(numEntries = %d):\n", listOfFetchedColNames()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (sqHbaseTable()) showColNames(listOfFetchedColNames(), space); else showStrColNames(listOfFetchedColNames(), space); } if (listOfUpDeldColNames()) { str_sprintf(buf, "\nlistOfUpDeldColNames_(numEntries = %d):\n", listOfUpDeldColNames()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (sqHbaseTable()) showColNames(listOfUpDeldColNames(), space); else showStrColNames(listOfUpDeldColNames(), space); /* if (updelColnameIsStr()) showStrColNames(listOfUpDeldColNames(), space); else showColNames(listOfUpDeldColNames(), space); */ } if (0)//listOfMergedColNames()) { str_sprintf(buf, "\nlistOfMergedColNames_(numEntries = %d):\n", listOfMergedColNames()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); showColNames(listOfMergedColNames(), space); } if (listOfScanRows()) { str_sprintf(buf, "\nlistOfScanRows_(numEntries = %d):", listOfScanRows()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); listOfScanRows()->position(); for (Lng32 i = 0; i < listOfScanRows()->numEntries(); i++) { HbaseScanRows * hsr = (HbaseScanRows*)listOfScanRows()->getNext(); str_sprintf(buf, "\n Entry #%d:", i+1); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, " beginRowId_%s = ", (hsr->beginKeyExclusive_ ? "(excl)" : "(incl)")); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); displayRowId(space, hsr->beginRowId()); str_sprintf(buf, " endRowId_%s = ", (hsr->endKeyExclusive_ ? "(excl)" : "(incl)")); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); displayRowId(space, hsr->endRowId()); if (0) //hsr->colNames()) { str_sprintf(buf, "\n colNames_(numEntries = %d):", hsr->colNames()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); hsr->colNames()->position(); for (Lng32 j = 0; j < hsr->colNames()->numEntries(); j++) { str_sprintf(buf, "\n Entry #%d:", j+1); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); char * colName = (char*)hsr->colNames()->getNext(); str_sprintf(buf, " colName='%s'", colName); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } // for } // if colNames str_sprintf(buf, "\n colTS_=%Ld", hsr->colTS_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } // for } // if if (listOfGetRows()) { str_sprintf(buf, "\nlistOfGetRows_(numEntries = %d):", listOfGetRows()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); listOfGetRows()->position(); for (Lng32 i = 0; i < listOfGetRows()->numEntries(); i++) { HbaseGetRows * hgr = (HbaseGetRows*)listOfGetRows()->getNext(); str_sprintf(buf, "\n Entry #%d:", i+1); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (hgr->rowIds()) { str_sprintf(buf, "\n rowIds_(numEntries = %d):", hgr->rowIds()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); hgr->rowIds()->position(); for (Lng32 j = 0; j < hgr->rowIds()->numEntries(); j++) { str_sprintf(buf, " Entry #%d:", j+1); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); char * rowId = (char*)hgr->rowIds()->getNext(); ExpTupleDesc * asciiSourceTD = workCriDesc_->getTupleDescriptor(rowIdAsciiTuppIndex_); str_sprintf(buf, " rowId_= "); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); displayRowId(space, rowId); } // for } // if if (0) //hgr->colNames()) { str_sprintf(buf, "\n colNames_(numEntries = %d):", hgr->colNames()->numEntries()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); hgr->colNames()->position(); for (Lng32 j = 0; j < hgr->colNames()->numEntries(); j++) { str_sprintf(buf, " Entry #%d:", j+1); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); char * colName = (char*)hgr->colNames()->getNext(); str_sprintf(buf, " colName='%s'", colName); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } // for } // if str_sprintf(buf, "\n colTS_=%Ld", hgr->colTS_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } // for } // if if (getHbaseSnapshotScanAttributes() && getHbaseSnapshotScanAttributes()->getUseSnapshotScan()) { str_sprintf(buf, "use_snapshot_scan = %s, snapshot_name = %s, snapshot_temp_location = %s", "TRUE", getHbaseSnapshotScanAttributes()->getSnapshotName(), getHbaseSnapshotScanAttributes()->getSnapScanTmpLocation()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbCancel::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[200]; str_sprintf(buf, "\nFor ComTdbCancel :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if (action_ == CancelByQid) { str_sprintf(buf, "action_ = cancel by queryId "); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "qid_ = %s ", getQidText()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } else if (action_ == CancelByPname) { str_sprintf(buf, "action_ = cancel by process name " "with minimum blocking interval of %d seconds ", cancelPidBlockThreshold_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "cancelPname_ = %s ", getCancelPname()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } else if (action_ == CancelByNidPid) { str_sprintf(buf, "action_ = cancel by nid,pid " "with minimum blocking interval of %d seconds ", cancelPidBlockThreshold_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "cancelNid_,cancelPid_ = %d,%d ", getCancelNid(), getCancelPid()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } else { if (action_ == Activate) { str_sprintf(buf, "action_ = activate "); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } else // must be Suspend { if (forced_ == Force) str_sprintf(buf, "action_ = suspend (forced) "); else str_sprintf(buf, "action_ = suspend (safe) "); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } str_sprintf(buf, "qid_ = %s ", getQidText()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } str_sprintf(buf, "comment_ = %s ", getCommentText()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbHashj::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if (flag & 0x00000008) { char buf[100]; str_sprintf(buf, "\nFor ComTdbHashj :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "hjFlags = %b, isSemiJoin = %d, isLeftJoin = %d, isRightJoin = %d", hjFlags_,isSemiJoin(),isLeftJoin(),isRightJoin()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"isAntiSemiJoin = %d, isUniqueHashJoin = %d, " "isNoOverflow = %d, isReuse = %d", isAntiSemiJoin(),isUniqueHashJoin(),isNoOverflow(),isReuse()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if ( forceOverflowEvery() ) { str_sprintf(buf,"forceOverflowEvery = %d ", forceOverflowEvery() ); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if ( forceClusterSplitAfterMB() || forceHashLoopAfterNumBuffers() ) { str_sprintf(buf,"forceClusterSplitAfterMB = %d, forceHashLoopAfterNumBuffers = %d ", forceClusterSplitAfterMB(), forceHashLoopAfterNumBuffers()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } str_sprintf(buf,"bufferedWrites = %d, logDiagnostics = %d, hashBufferSize = %d", bufferedWrites(), logDiagnostics(), hashBufferSize_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "memoryQuotaMB = %d, numClusters = %d", memoryQuotaMB(), numClusters()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "isReturnRightOrdered = %d, isPossibleMultipleCalls = %d ", isReturnRightOrdered(), isPossibleMultipleCalls()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"All or Nothing = %d, delayLeftRequest = %d ", isAntiSemiJoin() && ! rightSearchExpr_ , delayLeftRequest()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"leftRowLength = %d, rightRowLength = %d, instRowForLeftJoinLength = %d ", leftRowLength_,rightRowLength_,instRowForLeftJoinLength_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"extLeftRowLength = %d, extRightRowLength = %d, minMaxRowLength = %d", extLeftRowLength_,extRightRowLength_, minMaxRowLength_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"outerExpectedRows = %f, innerExpectedRows = %f", outerExpectedRows(),innerExpectedRows()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"memUsagePercent = %d, pressureThreshold = %d", memUsagePercent_,pressureThreshold_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"hjMemEstInMbPerCpu = %f, estimateErrorPenalty = %d ", hjMemEstInMbPerCpu_, hjGrowthPercent_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"bmoCitizenshipFactor = %f, PhyMemoryContingencyMB = %d ", bmoCitizenshipFactor_, pMemoryContingencyMB_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbUdr::displayContents(Space *space, ULng32 flag) { ComTdb::displayContents(space, flag & 0xFFFFFFFE); if (flag & 0x00000008) { const size_t sz = sizeof(short); char buf[512]; str_sprintf(buf, "\nFor ComTdbUdr :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); Lng32 lowFlags = (Lng32) (flags_ % 65536); Lng32 highFlags = (Lng32) ((flags_ - lowFlags) / 65536); str_sprintf(buf, "flags = %b%b", highFlags, lowFlags); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); if (sqlName_) { char *s = sqlName_; str_sprintf(buf, "routineName = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (routineName_) { char *s = routineName_; str_sprintf(buf, "externalName = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (containerName_) { char *s = containerName_; str_sprintf(buf, "externalFile = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (externalPath_) { char *s = externalPath_; str_sprintf(buf, "externalPath = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (librarySqlName_) { char *s = librarySqlName_; str_sprintf(buf, "librarySqlName = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } // Some strings come from the user and there is no limit on the // maximum length. For these strings we will print two lines, the // first a header line and the second the actual string. For // example, the Java signature will look like this in the SHOWPLAN // output: // // signature = // (Ljava/lang/Float;[Ljava/lang/Float;)V // const char *s1; const char *s2; if (routineSignature_) { s1 = "\nsignature = "; s2 = routineSignature_; space->allocateAndCopyToAlignedSpace(s1, str_len(s1), sz); space->allocateAndCopyToAlignedSpace(s2, str_len(s2), sz); } if (runtimeOptions_) { s1 = "\nruntimeOptions = "; s2 = runtimeOptions_; space->allocateAndCopyToAlignedSpace(s1, str_len(s1), sz); space->allocateAndCopyToAlignedSpace(s2, str_len(s2), sz); } if (runtimeOptionDelimiters_) { s1 = "\noptionDelimiters = "; s2 = runtimeOptionDelimiters_; space->allocateAndCopyToAlignedSpace(s1, str_len(s1), sz); space->allocateAndCopyToAlignedSpace(s2, str_len(s2), sz); } str_sprintf(buf, "\nnumParameters = %d, maxResultSets = %d", numParams_, maxResultSets_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "numInputValues = %d, numOutputValues = %d", numInputValues_, numOutputValues_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "requestBufferSize = %d, replyBufferSize = %d", requestSqlBufferSize_, replySqlBufferSize_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "requestRowLength = %d, replyRowLength = %d", requestRowLen_, replyRowLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "outputRowLen = %d, stateAreaSize = %d", outputRowLen_, stateAreaSize_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "requestTuppIndex = %d, replyTuppIndex = %d", (Int32) requestTuppIndex_, (Int32) replyTuppIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "udrType = %d, languageType = %d", (Int32) udrType_, (Int32) languageType_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "parameterStyle = %d, sqlAccessMode = %d", (Int32) paramStyle_, (Int32) sqlAccessMode_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "transactionAttributes = %d", (Int32) transactionAttrs_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "externalSecurity = %d, routineOwnerId = %d", (Int32) externalSecurity_, (Int32) routineOwnerId_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); UInt32 i; for (i = 0; i < numParams_; i++) { const UdrFormalParamInfo *p = paramInfo_[i]; str_sprintf(buf, "\nParameter %d", (Int32) i); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, " name [%s]", p->getParamName()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, " flags %b, type %d", p->getFlags(), (Int32) p->getType()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, " precision %d, scale %d, charset %d, collation %d", (Int32) p->getPrecision(), (Int32) p->getScale(), (Int32) p->getEncodingCharSet(), (Int32) p->getCollation()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } Queue *optData = getOptionalData(); if (optData) { UInt32 dataElems = optData->numEntries(); str_sprintf(buf, "\nNumber of optional data elements: %d", (Int32) dataElems); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); const char *s = NULL; i = 0; optData->position(); while ((s = (const char *) optData->getNext()) != NULL) { // Each data element is prefixed by a 4-byte length field UInt32 len = 0; str_cpy_all((char *)&len, s, 4); str_sprintf(buf, "\nOptional data %d (length %d):", (Int32) i++, (Int32) len); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); if (len > 0) { // Create a buffer containing at most 200 bytes of data if (len > 200) len = 200; char truncatedBuf[201]; str_cpy_all(truncatedBuf, s + 4, len); truncatedBuf[len] = 0; // Change NULL bytes and non-ASCII characters to '.' for // display purposes for (UInt32 j = 0; j < len; j++) { if (truncatedBuf[j] == 0 || !isascii(truncatedBuf[j])) truncatedBuf[j] = '.'; } space->allocateAndCopyToAlignedSpace(truncatedBuf, len, sz); } } } if (javaDebugPort_ > 0) { str_sprintf(buf, "\njavaDebugPort = %d, javaDebugTimeout = %d", javaDebugPort_, javaDebugTimeout_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } } // if (flag & 0x00000008) if (flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbRoot::displayContents(Space * space,ULng32 flag) { ComTdb::displayContents(space,flag & 0xFFFFFFFE); if(flag & 0x00000008) { char buf[1000]; str_sprintf(buf, "\nFor ComTdbRoot :\nFirstNRows = %d, baseTablenamePosition = %d ", firstNRows_,baseTablenamePosition_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "queryType_ = %d, planVersion_ = %d ", queryType_, planVersion_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); UInt32 lFlags = rtFlags1_%65536; UInt32 hFlags = (rtFlags1_- lFlags)/65536; str_sprintf(buf,"rtFlags1_ = %b%b ",hFlags,lFlags); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); lFlags = rtFlags2_%65536; hFlags = (rtFlags2_- lFlags)/65536; str_sprintf(buf,"rtFlags2_ = %b%b ",hFlags,lFlags); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"rtFlags3_ = %b ", rtFlags3_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); lFlags = rtFlags4_%65536; hFlags = (rtFlags4_- lFlags)/65536; str_sprintf(buf,"rtFlags4_ = %b%b ",hFlags,lFlags); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); lFlags = rtFlags5_%65536; hFlags = (rtFlags5_- lFlags)/65536; str_sprintf(buf,"rtFlags5_ = %b%b ",hFlags,lFlags); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "queryType_ = %d", (Int32) queryType_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "inputVarsSize_ = %d", inputVarsSize()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); if(numUpdateCol_ != 0) { str_sprintf(buf, "numUpdateCol = %d",numUpdateCol_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (compoundStmtsInfo_ != 0) { str_sprintf(buf,"compoundStmtsInfo_ = %b ",compoundStmtsInfo_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (udrCount_ > 0 || maxResultSets_ > 0) { str_sprintf(buf, "UDR count = %d, Max Result Sets = %d", (Int32) udrCount_, (Int32) maxResultSets_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if( uninitializedMvCount_ > 0 ) { str_sprintf(buf, "Uninitialized MV count = %d", (Int32) uninitializedMvCount_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); for( Int32 i = 0; i < uninitializedMvCount_; i++ ) { UninitializedMvName currentMv = uninitializedMvList_[i]; str_sprintf(buf, "Uninitialized MV (physical=%s,ansi=%s)\n", currentMv.getPhysicalName(), currentMv.getAnsiName()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } } if (hasCallStmtExpressions()) { str_sprintf(buf, "Has CALL Statement Expressions = YES"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } if (getRWRSInfo()) { str_sprintf(buf, "rwrsMaxSize_ = %d", getRWRSInfo()->rwrsMaxSize()); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "rwrsInputSizeIndex_ = %d, rwrsMaxInputRowlenIndex_ = %d, ", getRWRSInfo()->rwrsInputSizeIndex_, getRWRSInfo()->rwrsMaxInputRowlenIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "rwrsBufferAddrIndex_ = %d, rwrsPartnNumIndex_ = %d", getRWRSInfo()->rwrsBufferAddrIndex_, getRWRSInfo()->rwrsPartnNumIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf, "rwrsMaxInternalRowlen_ = %d", getRWRSInfo()->rwrsMaxInternalRowlen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); str_sprintf(buf,"flags_ = %b ", getRWRSInfo()->flags_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } Lng32 fragOffset; Lng32 fragLen; Lng32 topNodeOffset; if (getFragDir()->getExplainFragDirEntry (fragOffset, fragLen, topNodeOffset) == 0) { char buf[64]; str_sprintf(buf, "explain_plan_size = %d", fragLen); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short)); } } if(flag & 0x00000001) { displayExpression(space,flag); displayChildren(space,flag); } }
void ComTdbFastExtract::displayContents(Space *space, ULng32 flag) { ComTdb::displayContents(space, flag & 0xFFFFFFFE); if (flag & 0x00000008) { const size_t sz = sizeof(short); char buf[512]; str_sprintf(buf, "\nFor ComTdbFastExtract :"); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); Lng32 lowFlags = (Lng32) (flags_ % 65536); Lng32 highFlags = (Lng32) ((flags_ - lowFlags) / 65536); str_sprintf(buf, "flags = %b%b", highFlags, lowFlags); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "requestRowLength = %d ", requestRowLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "outputRowLen = %d ", outputRowLen_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); str_sprintf(buf, "childTuppIndex = %d ", (Int32) childDataTuppIndex_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); if (targetName_) { char *s = targetName_; str_sprintf(buf, "targetName = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (hdfsHostName_) { char *s = hdfsHostName_; str_sprintf(buf, "hdfsHostName = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } str_sprintf(buf,"hdfsPortNum = %d", hdfsPortNum_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(UInt16)); if (delimiter_) { char *s = delimiter_; str_sprintf(buf, "delimiter = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (header_) { char *s = header_; str_sprintf(buf, "header = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (nullString_) { char *s = nullString_; str_sprintf(buf, "nullString = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } if (recordSeparator_) { char *s = recordSeparator_; str_sprintf(buf, "recordSeparator = %s", s); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz); } str_sprintf(buf,"numIOBuffers = %d", numIOBuffers_); space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(UInt16)); } // if (flag & 0x00000008) displayExpression(space,flag); displayChildren(space,flag); }