From 39b2a1ac061b527ca8f6feb51295bbfd46ff6de2 Mon Sep 17 00:00:00 2001 From: g-pan Date: Thu, 31 Aug 2023 17:14:01 -0400 Subject: [PATCH 01/20] HPCC-20246 Update ECL IDE documentation Signed-off-by: g-pan --- .../HPCCClientTools/CT_Mods/CT_ECL_IDE.xml | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/docs/EN_US/HPCCClientTools/CT_Mods/CT_ECL_IDE.xml b/docs/EN_US/HPCCClientTools/CT_Mods/CT_ECL_IDE.xml index db45914095e..d469c6eefb6 100644 --- a/docs/EN_US/HPCCClientTools/CT_Mods/CT_ECL_IDE.xml +++ b/docs/EN_US/HPCCClientTools/CT_Mods/CT_ECL_IDE.xml @@ -202,17 +202,17 @@ compiler matches each server you need to access. Check the Override Automatic Compiler Selection checkbox and specify the Complier you want - to use. + to use. For Compiler, it is usually best to let the system select the best match for you. You can see the available compilers in the Best Compiler Match drop list. + role="bold">Best Compiler Match drop list. Use the Scan button to update the list of available compilers. Use the Match button to find the best match. - + role="bold">Match button to find the best + match. @@ -712,14 +712,6 @@ Check this box to disable Invoke. - - Graph Search Includes - Tooltips - - Check this box to ensure that tooltips are also - included in your search. - - Ignore Whitespace on Compare @@ -752,6 +744,30 @@ example, when looking for workunits sent during a specific year/month etc. + + + WU Persist + Limit + + The maximum number of days WUs are allowed to + persist. + + + + Disable Update Checking + + + Check this box to disable checking for available + updates. + + + + Disable Meta Processing + + + Check this box to disable metadata + processing. + From 4bf9336e5a149b664aa95d83145cf01bf3c9dcbc Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Wed, 9 Aug 2023 12:19:15 +0100 Subject: [PATCH 02/20] HPCC-30057 Use DataBuffers to store returned rows in localAgent mode Signed-off-by: Richard Chapman --- devdoc/roxie.md | 14 ++ helm/hpcc/values.schema.json | 5 + roxie/ccd/ccd.hpp | 1 + roxie/ccd/ccdmain.cpp | 17 +- roxie/ccd/ccdqueue.cpp | 378 +++++++++++++++++++++++++++++++++-- roxie/roxiemem/roxiemem.hpp | 24 +++ roxie/udplib/udplib.hpp | 1 + roxie/udplib/udpsha.hpp | 2 - 8 files changed, 425 insertions(+), 17 deletions(-) diff --git a/devdoc/roxie.md b/devdoc/roxie.md index cfcbadf92b9..60a808be4c8 100644 --- a/devdoc/roxie.md +++ b/devdoc/roxie.md @@ -281,3 +281,17 @@ Should the scope of the blacklist be different? Possible scopes are: Options 2 and 4 above would allow all aspects of the blacklisting behaviour to be specified by options on the SOAPCALL. We could control whether or not the blacklister is to be used at all via a SOAPCALL option with any of the above... + +Some notes on LocalAgent mode +============================= + +In localAgent mode, the global queueManager object (normally a RoxieUdpSocketQueueManager) is replaced by a RoxieLocalQueueManager. Outbound packets are added directly to target queue, inbound are packed into DataBuffers. + +There is also "local optimizations" mode where any index operation reading a one-part file (does the same apply to one-part disk files?) just reads it directly on the server (regardless of localAgent setting). Typically still injected into receiver code though as otherwise handling exception cases, limits etc would all be duplicated/messy. Rows created in localOptimization mode are created directly in the caller's row manager, and are injected in serialized format. + +Why are inbound not created directly in the desired destination's allocator and then marked as serialized? Some lifespan issues... are they insurmountable? +We do pack into dataBuffers rather than MemoryBuffers, which avoids a need to copy the data before the receiver can use it. Large rows get split and will require copying again, but we could set dataBufferSize to be bigger in localAgent mode to mitigate this somewhat. + +What is the lifespan issue? In-flight queries may be abandoned when a server-side query fails, times out, or no longer needs the data. Using DataBuffer does not have this issue as they are attached to the query's memory manager/allocation once read. Or we could bypass the agent queue altogether, but rather more refactoring needed for that (might almost be easier to extent the "local optimization" mode to use multiple threads at that point) + +abortPending, replyPending, and abortPendingData methods are unimplemented, which may lead to some inefficiencies? diff --git a/helm/hpcc/values.schema.json b/helm/hpcc/values.schema.json index 7db1fdd4c16..a193b858a68 100644 --- a/helm/hpcc/values.schema.json +++ b/helm/hpcc/values.schema.json @@ -1585,6 +1585,11 @@ "default": 0, "description": "Specify an IONICE value for the background copy thread, if backgroundCopyClass set to best-effort." }, + "blockedLocalAgent": { + "type": "boolean", + "default": true, + "description": "Used DataBuffer blocks to return agent data in localAgent mode." + }, "callbackRetries": { "type": "integer", "default": 3, diff --git a/roxie/ccd/ccd.hpp b/roxie/ccd/ccd.hpp index f70b654b18a..a3acd99016a 100644 --- a/roxie/ccd/ccd.hpp +++ b/roxie/ccd/ccd.hpp @@ -300,6 +300,7 @@ extern IPropertyTree *topology; extern MapStringTo *preferredClusters; extern StringArray allQuerySetNames; +extern bool blockedLocalAgent; extern bool acknowledgeAllRequests; extern bool alwaysTrustFormatCrcs; extern bool allFilesDynamic; diff --git a/roxie/ccd/ccdmain.cpp b/roxie/ccd/ccdmain.cpp index c028d6dfada..7cd596372a0 100644 --- a/roxie/ccd/ccdmain.cpp +++ b/roxie/ccd/ccdmain.cpp @@ -68,6 +68,7 @@ unsigned numServerThreads = 30; unsigned numAgentThreads = 30; bool prestartAgentThreads = false; unsigned numRequestArrayThreads = 5; +bool blockedLocalAgent = true; bool acknowledgeAllRequests = true; unsigned headRegionSize; unsigned ccdMulticastPort; @@ -756,8 +757,19 @@ int CCD_API roxie_main(int argc, const char *argv[], const char * defaultYaml) else setStatisticsComponentName(SCTroxie, "roxie", true); #ifdef _CONTAINERIZED - getDefaultStoragePlane(defaultPlane); - getDefaultIndexBuildStoragePlane(defaultIndexBuildPlane); + try + { + getDefaultStoragePlane(defaultPlane); + getDefaultIndexBuildStoragePlane(defaultIndexBuildPlane); + } + catch (IException *E) + { +#ifdef _DEBUG + E->Release(); // Useful for some local testing to be able to ignore these configuration errors +#else + throw; +#endif + } #endif installDefaultFileHooks(topology); @@ -966,6 +978,7 @@ int CCD_API roxie_main(int argc, const char *argv[], const char * defaultYaml) } minPayloadSize = topology->getPropInt("@minPayloadSize", minPayloadSize); + blockedLocalAgent = topology->getPropBool("@blockedLocalAgent", blockedLocalAgent); acknowledgeAllRequests = topology->getPropBool("@acknowledgeAllRequests", acknowledgeAllRequests); headRegionSize = topology->getPropInt("@headRegionSize", 0); ccdMulticastPort = topology->getPropInt("@multicastPort", CCD_MULTICAST_PORT); diff --git a/roxie/ccd/ccdqueue.cpp b/roxie/ccd/ccdqueue.cpp index 3c19f614c28..cc99b474ac3 100644 --- a/roxie/ccd/ccdqueue.cpp +++ b/roxie/ccd/ccdqueue.cpp @@ -3010,7 +3010,8 @@ unsigned CDummyMessagePacker::size() const interface ILocalMessageCollator : extends IMessageCollator { - virtual void enqueueMessage(bool outOfBand, void *data, unsigned datalen, void *meta, unsigned metalen, void *header, unsigned headerlen) = 0; + virtual bool attachDataBuffers(const ArrayOf &buffers) = 0; + virtual void enqueueMessage(bool outOfBand, unsigned totalSize, IMessageResult *result) = 0; }; interface ILocalReceiveManager : extends IReceiveManager @@ -3018,10 +3019,11 @@ interface ILocalReceiveManager : extends IReceiveManager virtual ILocalMessageCollator *lookupCollator(ruid_t id) = 0; }; - - -class LocalMessagePacker : public CDummyMessagePacker +class LocalMessagePacker : public CInterfaceOf { +protected: + unsigned lastput = 0; + MemoryBuffer data; MemoryBuffer meta; MemoryBuffer header; Linked rm; @@ -3029,13 +3031,173 @@ class LocalMessagePacker : public CDummyMessagePacker bool outOfBand; public: - IMPLEMENT_IINTERFACE; LocalMessagePacker(RoxiePacketHeader &_header, bool _outOfBand, ILocalReceiveManager *_rm) : rm(_rm), outOfBand(_outOfBand) { id = _header.uid; header.append(sizeof(RoxiePacketHeader), &_header); } + void * getBuffer(unsigned len, bool variable) override + { + if (variable) + { + char *ret = (char *) data.ensureCapacity(len + sizeof(RecordLengthType)); + return ret + sizeof(RecordLengthType); + } + else + { + return data.ensureCapacity(len); + } + } + + void putBuffer(const void *buf, unsigned len, bool variable) override + { + if (variable) + { + buf = ((char *) buf) - sizeof(RecordLengthType); + *(RecordLengthType *) buf = len; + len += sizeof(RecordLengthType); + } + data.setWritePos(lastput + len); + lastput += len; + } + + unsigned size() const + { + return lastput; + } + + virtual void flush() override; + + virtual void sendMetaInfo(const void *buf, unsigned len) override + { + meta.append(len, buf); + } + +}; + +class LocalBlockedMessagePacker : public CInterfaceOf +{ +protected: + unsigned lastput = 0; + MemoryBuffer meta; + MemoryBuffer header; + Linked rm; + ruid_t id; + bool outOfBand; + const unsigned dataBufferSize = DATA_PAYLOAD - sizeof(unsigned short); + bool packed = false; + unsigned tempBufferSize = 0; // MORE - use a MemoryBuffer? + void *tempBuffer = nullptr; + unsigned dataPos = 0; + unsigned bufferRemaining = 0; + DataBuffer *currentBuffer = nullptr; + ArrayOf buffers; + unsigned totalDataLen = 0; +public: + LocalBlockedMessagePacker(RoxiePacketHeader &_header, bool _outOfBand, ILocalReceiveManager *_rm) : rm(_rm), outOfBand(_outOfBand) + { + id = _header.uid; + header.append(sizeof(RoxiePacketHeader), &_header); + } + ~LocalBlockedMessagePacker() + { + free(tempBuffer); + } + + void * getBuffer(unsigned len, bool variable) override + { + if (variable) + len += sizeof(RecordLengthType); + if (dataBufferSize < len) + { + // Won't fit in one, so allocate temp location + // This code stolen from UDP layer - we could redo using a MemoryBuffer... + packed = false; + if (tempBufferSize < len) + { + free(tempBuffer); + tempBuffer = checked_malloc(len, ROXIE_MEMORY_ERROR); + tempBufferSize = len; + } + if (variable) + return ((char *) tempBuffer) + sizeof(RecordLengthType); + else + return tempBuffer; + } + else + { + // Will fit in one, though not necessarily the current one... + packed = true; + if (currentBuffer && (bufferRemaining < len)) + { + // Note that we never span records that are small enough to fit in one buffer - this can result in significant wastage if record just over DATA_PAYLOAD/2 + *(unsigned short *) ¤tBuffer->data = dataPos - sizeof(unsigned short); + buffers.append(currentBuffer); + currentBuffer = nullptr; + } + if (!currentBuffer) + { + currentBuffer = bufferManager->allocate(); + dataPos = sizeof (unsigned short); + bufferRemaining = dataBufferSize; + } + if (variable) + return ¤tBuffer->data[dataPos + sizeof(RecordLengthType)]; + else + return ¤tBuffer->data[dataPos]; + } + } + + void putBuffer(const void *buf, unsigned len, bool variable) override + { + if (variable) + { + assertex(len < MAX_RECORD_LENGTH); + buf = ((char *) buf) - sizeof(RecordLengthType); + *(RecordLengthType *) buf = len; + len += sizeof(RecordLengthType); + } + totalDataLen += len; + if (packed) + { + assert(len <= bufferRemaining); + dataPos += len; + bufferRemaining -= len; + } + else + { + while (len) + { + if (!currentBuffer) + { + currentBuffer = bufferManager->allocate(); + dataPos = sizeof (unsigned short); + bufferRemaining = dataBufferSize; + } + unsigned chunkLen = bufferRemaining; + if (chunkLen > len) + chunkLen = len; + memcpy(¤tBuffer->data[dataPos], buf, chunkLen); + dataPos += chunkLen; + len -= chunkLen; + buf = &(((char*)buf)[chunkLen]); + bufferRemaining -= chunkLen; + if (len) + { + *(unsigned short *) ¤tBuffer->data = dataPos - sizeof(unsigned short); + buffers.append(currentBuffer); + currentBuffer = nullptr; + } + } + } + } + + unsigned size() const + { + return lastput; + } + virtual void flush() override; virtual void sendMetaInfo(const void *buf, unsigned len) override @@ -3047,6 +3209,8 @@ class LocalMessagePacker : public CDummyMessagePacker class CLocalMessageUnpackCursor : implements IMessageUnpackCursor, public CInterface { + // Note that the data is owned by the CLocalMessageCursor that created me, + // and will be released by it when it dies void *data; unsigned datalen; unsigned pos; @@ -3100,13 +3264,110 @@ class CLocalMessageUnpackCursor : implements IMessageUnpackCursor, public CInter } }; +class CLocalBlockedMessageUnpackCursor : implements IMessageUnpackCursor, public CInterface +{ + Linked rowManager; + const ArrayOf &buffers; // Owned by the CLocalBlockedMessageCursor that created me + const byte *currentBuffer = nullptr; + unsigned currentBufferRemaining = 0; + unsigned bufferIdx = 0; +public: + IMPLEMENT_IINTERFACE; + CLocalBlockedMessageUnpackCursor(IRowManager *_rowManager, const ArrayOf &_buffers) + : rowManager(_rowManager), buffers(_buffers) + { + if (buffers.length()) + { + currentBuffer = (const byte *) buffers.item(0).get()->data; + currentBufferRemaining = *(unsigned short *) currentBuffer; + currentBuffer += sizeof(unsigned short); + } + } + + ~CLocalBlockedMessageUnpackCursor() + { + } + + virtual bool atEOF() const + { + return currentBuffer != nullptr; + } + + virtual bool isSerialized() const + { + // NOTE: tempting to think that we could avoid serializing in localAgent case, but have to be careful about the lifespan of the rowManager... + return true; + } + + virtual const void * getNext(int length) + { + if (!currentBuffer) + return nullptr; + if ((currentBufferRemaining) >= (unsigned) length) + { + // Simple case - no need to copy + const void *res = currentBuffer; + currentBuffer += length; + currentBufferRemaining -= length; + checkNext(); + LinkRoxieRow(res); + return res; + } + char *currResLoc = (char*)rowManager->allocate(length, 0); + const void *res = currResLoc; + while (length && currentBuffer) + { + // Spans more than one block - allocate and copy + unsigned cpyLen = currentBufferRemaining; + if (cpyLen > (unsigned) length) cpyLen = length; + memcpy(currResLoc, currentBuffer, cpyLen); + length -= cpyLen; + currResLoc += cpyLen; + currentBuffer += cpyLen; + currentBufferRemaining -= cpyLen; + checkNext(); + } + assertex(!length); // fail if not enough data available + return res; + } + + virtual RecordLengthType *getNextLength() override + { + if (!currentBuffer) + return nullptr; + assertex (currentBufferRemaining >= sizeof(RecordLengthType)); + RecordLengthType *res = (RecordLengthType *) currentBuffer; + currentBuffer += sizeof(RecordLengthType); + currentBufferRemaining -= sizeof(RecordLengthType); + checkNext(); // Note that length is never separated from data... but length can be zero so still need to do this... + return res; + } + + void checkNext() + { + if (!currentBufferRemaining) + { + if (buffers.isItem(bufferIdx+1)) + { + bufferIdx++; + currentBuffer = (const byte *) &buffers.item(bufferIdx).get()->data; + currentBufferRemaining = *(unsigned short *) currentBuffer; + currentBuffer += sizeof(unsigned short); + } + else + { + currentBuffer = nullptr; + } + } + } +}; + class CLocalMessageResult : implements IMessageResult, public CInterface { void *data; void *meta; void *header; unsigned datalen, metalen, headerlen; - unsigned pos; public: IMPLEMENT_IINTERFACE; CLocalMessageResult(void *_data, unsigned _datalen, void *_meta, unsigned _metalen, void *_header, unsigned _headerlen) @@ -3117,7 +3378,6 @@ class CLocalMessageResult : implements IMessageResult, public CInterface data = _data; meta = _meta; header = _header; - pos = 0; } ~CLocalMessageResult() @@ -3150,6 +3410,52 @@ class CLocalMessageResult : implements IMessageResult, public CInterface }; +class CLocalBlockedMessageResult : implements IMessageResult, public CInterface +{ + ArrayOf buffers; + void *meta; + void *header; + unsigned metalen, headerlen; +public: + IMPLEMENT_IINTERFACE; + CLocalBlockedMessageResult(ArrayOf &_buffers, void *_meta, unsigned _metalen, void *_header, unsigned _headerlen) + { + buffers.swapWith(_buffers); + metalen = _metalen; + headerlen = _headerlen; + meta = _meta; + header = _header; + } + + ~CLocalBlockedMessageResult() + { + free(meta); + free(header); + } + + virtual IMessageUnpackCursor *getCursor(IRowManager *rowMgr) const + { + return new CLocalBlockedMessageUnpackCursor(rowMgr, buffers); + } + + virtual const void *getMessageHeader(unsigned &length) const + { + length = headerlen; + return header; + } + + virtual const void *getMessageMetadata(unsigned &length) const + { + length = metalen; + return meta; + } + + virtual void discard() const + { + } + +}; + class CLocalMessageCollator : implements ILocalMessageCollator, public CInterface { InterruptableSemaphore sem; @@ -3159,6 +3465,7 @@ class CLocalMessageCollator : implements ILocalMessageCollator, public CInterfac Linked receiveManager; ruid_t id; unsigned totalBytesReceived; + bool memLimitExceeded = false; public: IMPLEMENT_IINTERFACE; @@ -3172,6 +3479,11 @@ class CLocalMessageCollator : implements ILocalMessageCollator, public CInterfac virtual IMessageResult* getNextResult(unsigned time_out, bool &anyActivity) { + if (memLimitExceeded) + { + DBGLOG("LocalCollator: CLocalMessageCollator::getNextResult() throwing memory limit exceeded exception"); + throw MakeStringException(0, "memory limit exceeded"); + } anyActivity = false; if (!sem.wait(time_out)) return NULL; @@ -3185,15 +3497,32 @@ class CLocalMessageCollator : implements ILocalMessageCollator, public CInterfac sem.interrupt(E); } - virtual void enqueueMessage(bool outOfBand, void *data, unsigned datalen, void *meta, unsigned metalen, void *header, unsigned headerlen) + virtual void enqueueMessage(bool outOfBand, unsigned totalSize, IMessageResult *result) override { CriticalBlock c(crit); if (outOfBand) - pending.enqueueHead(new CLocalMessageResult(data, datalen, meta, metalen, header, headerlen)); + pending.enqueueHead(result); else - pending.enqueue(new CLocalMessageResult(data, datalen, meta, metalen, header, headerlen)); + pending.enqueue(result); sem.signal(); - totalBytesReceived += datalen + metalen + headerlen; + totalBytesReceived += totalSize; + } + + virtual bool attachDataBuffers(const ArrayOf &buffers) override + { + if (memLimitExceeded) + return false; + ForEachItemIn(idx, buffers) + { + roxiemem::OwnedDataBuffer dataBuffer = buffers.item(idx); + if (!dataBuffer.get()->attachToRowMgr(rowManager)) + { + memLimitExceeded = true; + interrupt(MakeStringException(0, "memory limit exceeded")); + return(false); + } + } + return true; } virtual unsigned queryBytesReceived() const @@ -3259,7 +3588,27 @@ void LocalMessagePacker::flush() unsigned datalen = data.length(); unsigned metalen = meta.length(); unsigned headerlen = header.length(); - collator->enqueueMessage(outOfBand, data.detach(), datalen, meta.detach(), metalen, header.detach(), headerlen); + collator->enqueueMessage(outOfBand, datalen+metalen+headerlen, new CLocalMessageResult(data.detach(), datalen, meta.detach(), metalen, header.detach(), headerlen)); + } + // otherwise Roxie server is no longer interested and we can simply discard +} + +void LocalBlockedMessagePacker::flush() +{ + if (currentBuffer && (dataPos > sizeof(unsigned short))) + { + *(unsigned short *) ¤tBuffer->data = dataPos - sizeof(unsigned short); + buffers.append(currentBuffer); + currentBuffer = nullptr; + } + Owned collator = rm->lookupCollator(id); + if (collator) + { + unsigned metalen = meta.length(); + unsigned headerlen = header.length(); + // NOTE - takes ownership of buffers and leaves it empty + if (collator->attachDataBuffers(buffers)) + collator->enqueueMessage(outOfBand, totalDataLen+metalen+headerlen, new CLocalBlockedMessageResult(buffers, meta.detach(), metalen, header.detach(), headerlen)); } // otherwise Roxie server is no longer interested and we can simply discard } @@ -3380,7 +3729,10 @@ class RoxieLocalQueueManager : public RoxieReceiverBase virtual IMessagePacker *createOutputStream(RoxiePacketHeader &header, bool outOfBand, const IRoxieContextLogger &logctx) override { - return new LocalMessagePacker(header, outOfBand, receiveManager); + if (blockedLocalAgent) + return new LocalBlockedMessagePacker(header, outOfBand, receiveManager); + else + return new LocalMessagePacker(header, outOfBand, receiveManager); } virtual IReceiveManager *queryReceiveManager() override diff --git a/roxie/roxiemem/roxiemem.hpp b/roxie/roxiemem/roxiemem.hpp index 4a671c0efe3..d5b3cd1bdbf 100644 --- a/roxie/roxiemem/roxiemem.hpp +++ b/roxie/roxiemem/roxiemem.hpp @@ -418,6 +418,30 @@ class OwnedRoxieString const char * ptr; }; +class OwnedDataBuffer +{ +public: + inline OwnedDataBuffer() { ptr = NULL; } + inline OwnedDataBuffer(DataBuffer * _ptr) { ptr = _ptr; } + inline OwnedDataBuffer(const OwnedDataBuffer & other) { ptr = other.getLink(); } + + inline ~OwnedDataBuffer() { if (ptr) ptr->Release(); } + + inline operator DataBuffer *() const { return ptr; } + inline DataBuffer * get() const { return ptr; } + inline DataBuffer * getLink() const { if (ptr) ptr->Link(); return ptr; } + inline DataBuffer * set(DataBuffer * _ptr) { DataBuffer * temp = ptr; if (_ptr) _ptr->Link(); ptr = _ptr; if (temp) temp->Release(); return ptr; } + inline DataBuffer * setown(DataBuffer * _ptr) { DataBuffer * temp = ptr; ptr = _ptr; if (temp) temp->Release(); return ptr; } + inline void clear() { DataBuffer * temp = ptr; ptr = NULL; if (temp) temp->Release(); } +private: + /* Disable use of some constructs that often cause memory leaks by creating private members */ + void operator = (const void * _ptr) { } + void operator = (const OwnedDataBuffer & other) { } + void setown(const OwnedDataBuffer &other) { } + +private: + DataBuffer * ptr; +}; interface IRowHeap : extends IInterface { diff --git a/roxie/udplib/udplib.hpp b/roxie/udplib/udplib.hpp index f9e230c7d06..c832c506540 100644 --- a/roxie/udplib/udplib.hpp +++ b/roxie/udplib/udplib.hpp @@ -81,6 +81,7 @@ class UDPLIB_API ServerIdentifier }; extern UDPLIB_API ServerIdentifier myNode; +extern UDPLIB_API roxiemem::IDataBufferManager *bufferManager; interface IMessagePacker : extends IInterface { diff --git a/roxie/udplib/udpsha.hpp b/roxie/udplib/udpsha.hpp index b2dfa39f5e4..be41365e205 100644 --- a/roxie/udplib/udpsha.hpp +++ b/roxie/udplib/udpsha.hpp @@ -28,8 +28,6 @@ typedef unsigned sequence_t; #define SEQF -extern roxiemem::IDataBufferManager *bufferManager; - typedef bool (*PKT_CMP_FUN) (const void *pkData, const void *key); From 70a0cfb0fa26ab5b67fdd19720865e6ceffacfc8 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 7 Sep 2023 17:33:34 +0100 Subject: [PATCH 03/20] Split off 8.12.52 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- helm/hpcc/templates/dafilesrv.yaml | 2 +- helm/hpcc/templates/dali.yaml | 2 +- helm/hpcc/templates/dfuserver.yaml | 2 +- helm/hpcc/templates/eclagent.yaml | 4 ++-- helm/hpcc/templates/eclccserver.yaml | 4 ++-- helm/hpcc/templates/eclscheduler.yaml | 2 +- helm/hpcc/templates/esp.yaml | 2 +- helm/hpcc/templates/localroxie.yaml | 2 +- helm/hpcc/templates/roxie.yaml | 8 ++++---- helm/hpcc/templates/sasha.yaml | 2 +- helm/hpcc/templates/thor.yaml | 10 +++++----- version.cmake | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index ed9666ad33d..acfa3667476 100644 --- a/helm/hpcc/Chart.yaml +++ b/helm/hpcc/Chart.yaml @@ -6,9 +6,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 8.12.51-closedown0 +version: 8.12.53-closedown0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 8.12.51-closedown0 +appVersion: 8.12.53-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 1535729a067..d5de9b8ef1d 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1240,7 +1240,7 @@ kind: Service metadata: name: {{ $lvars.serviceName | quote }} labels: - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $.root "instance" $lvars.serviceName ) | indent 4 }} {{- if $lvars.labels }} {{ toYaml $lvars.labels | indent 4 }} diff --git a/helm/hpcc/templates/dafilesrv.yaml b/helm/hpcc/templates/dafilesrv.yaml index 4f2558ddfff..63cc6c75e05 100644 --- a/helm/hpcc/templates/dafilesrv.yaml +++ b/helm/hpcc/templates/dafilesrv.yaml @@ -50,7 +50,7 @@ spec: labels: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dafilesrv" "name" "dafilesrv" "instance" .name) | indent 8 }} server: {{ .name | quote }} - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 annotations: checksum/config: {{ $configSHA }} spec: diff --git a/helm/hpcc/templates/dali.yaml b/helm/hpcc/templates/dali.yaml index d6b6b9ffe86..0aa5be9e781 100644 --- a/helm/hpcc/templates/dali.yaml +++ b/helm/hpcc/templates/dali.yaml @@ -82,7 +82,7 @@ spec: run: {{ $dali.name | quote }} server: {{ $dali.name | quote }} app: dali - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} {{- end }} diff --git a/helm/hpcc/templates/dfuserver.yaml b/helm/hpcc/templates/dfuserver.yaml index 3757deac049..930c33e0c23 100644 --- a/helm/hpcc/templates/dfuserver.yaml +++ b/helm/hpcc/templates/dfuserver.yaml @@ -56,7 +56,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dfuserver" "name" "dfuserver" "instance" .name) | indent 8 }} run: {{ .name | quote }} accessDali: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclagent.yaml b/helm/hpcc/templates/eclagent.yaml index 4d90f66e76f..a3aca749839 100644 --- a/helm/hpcc/templates/eclagent.yaml +++ b/helm/hpcc/templates/eclagent.yaml @@ -58,7 +58,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -137,7 +137,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclccserver.yaml b/helm/hpcc/templates/eclccserver.yaml index eaf19412330..af6c74c1704 100644 --- a/helm/hpcc/templates/eclccserver.yaml +++ b/helm/hpcc/templates/eclccserver.yaml @@ -57,7 +57,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclccserver" "name" "eclccserver" "instance" $compileJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -142,7 +142,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclscheduler.yaml b/helm/hpcc/templates/eclscheduler.yaml index cf744922d6b..e9f04c95451 100644 --- a/helm/hpcc/templates/eclscheduler.yaml +++ b/helm/hpcc/templates/eclscheduler.yaml @@ -64,7 +64,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: "no" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/esp.yaml b/helm/hpcc/templates/esp.yaml index 327c4d125a6..038b73000e7 100644 --- a/helm/hpcc/templates/esp.yaml +++ b/helm/hpcc/templates/esp.yaml @@ -117,7 +117,7 @@ spec: server: {{ .name | quote }} accessDali: "yes" app: {{ $application }} - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "name" $application "component" "esp" "instance" .name) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index d2b5334b329..319e579fcfd 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -70,7 +70,7 @@ spec: server: {{ $servername | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index a0498d42cb1..f0dc18c45b6 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -120,7 +120,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} @@ -180,7 +180,7 @@ kind: Service metadata: name: {{ $commonCtx.toponame | quote }} labels: - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: @@ -242,7 +242,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} @@ -347,7 +347,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} diff --git a/helm/hpcc/templates/sasha.yaml b/helm/hpcc/templates/sasha.yaml index 725fdc6c357..71f53205cf3 100644 --- a/helm/hpcc/templates/sasha.yaml +++ b/helm/hpcc/templates/sasha.yaml @@ -52,7 +52,7 @@ spec: run: {{ $serviceName | quote }} server: {{ $serviceName | quote }} accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }} - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- if hasKey $sasha "labels" }} {{ toYaml $sasha.labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index 18bbc7d8a9a..449f80256b7 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -82,7 +82,7 @@ data: labels: accessDali: "yes" accessEsp: "yes" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $eclAgentJobName "instanceOf" (printf "%s-job" .eclAgentName)) | indent 8 }} {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} @@ -149,7 +149,7 @@ data: accessEsp: "yes" app: "thor" component: "thormanager" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thormanager" "name" "thor" "instance" $thorManagerJobName "instanceOf" (printf "%s-thormanager-job" .me.name)) | indent 12 }} @@ -218,7 +218,7 @@ data: accessEsp: "yes" app: "thor" component: "thorworker" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thorworker" "name" "thor" "instance" $thorWorkerJobName "instanceOf" (printf "%s-thorworker-job" .me.name)) | indent 12 }} @@ -353,7 +353,7 @@ spec: accessEsp: {{ $commonCtx.eclAgentUseChildProcesses | ternary "yes" "no" | quote }} app: "thor" component: "thor-eclagent" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 instance: {{ $commonCtx.eclAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.eclAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} @@ -418,7 +418,7 @@ spec: accessEsp: "no" app: "thor" component: "thor-thoragent" - helmVersion: 8.12.51-closedown0 + helmVersion: 8.12.53-closedown0 instance: {{ $commonCtx.thorAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.thorAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} diff --git a/version.cmake b/version.cmake index 9464e8e2198..9b84e1f6177 100644 --- a/version.cmake +++ b/version.cmake @@ -5,7 +5,7 @@ set ( HPCC_NAME "Community Edition" ) set ( HPCC_PROJECT "community" ) set ( HPCC_MAJOR 8 ) set ( HPCC_MINOR 12 ) -set ( HPCC_POINT 51 ) +set ( HPCC_POINT 53 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) ### From 87f50a9d250fd53f8bb988b2661931c72268e374 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 7 Sep 2023 17:34:58 +0100 Subject: [PATCH 04/20] Split off 9.0.42 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- helm/hpcc/templates/dafilesrv.yaml | 2 +- helm/hpcc/templates/dali.yaml | 2 +- helm/hpcc/templates/dfuserver.yaml | 2 +- helm/hpcc/templates/eclagent.yaml | 4 ++-- helm/hpcc/templates/eclccserver.yaml | 4 ++-- helm/hpcc/templates/eclscheduler.yaml | 2 +- helm/hpcc/templates/esp.yaml | 2 +- helm/hpcc/templates/localroxie.yaml | 2 +- helm/hpcc/templates/roxie.yaml | 8 ++++---- helm/hpcc/templates/sasha.yaml | 2 +- helm/hpcc/templates/thor.yaml | 10 +++++----- version.cmake | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index 7c1308e4f82..ddf646b855d 100644 --- a/helm/hpcc/Chart.yaml +++ b/helm/hpcc/Chart.yaml @@ -6,9 +6,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 9.0.41-closedown0 +version: 9.0.43-closedown0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 9.0.41-closedown0 +appVersion: 9.0.43-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 8b7d986b723..70ee98883e6 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1314,7 +1314,7 @@ kind: Service metadata: name: {{ $lvars.serviceName | quote }} labels: - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $.root "instance" $lvars.serviceName ) | indent 4 }} {{- if $lvars.labels }} {{ toYaml $lvars.labels | indent 4 }} diff --git a/helm/hpcc/templates/dafilesrv.yaml b/helm/hpcc/templates/dafilesrv.yaml index 42b6ed6d85f..d26ae5b3625 100644 --- a/helm/hpcc/templates/dafilesrv.yaml +++ b/helm/hpcc/templates/dafilesrv.yaml @@ -50,7 +50,7 @@ spec: labels: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dafilesrv" "name" "dafilesrv" "instance" .name) | indent 8 }} server: {{ .name | quote }} - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 annotations: checksum/config: {{ $configSHA }} spec: diff --git a/helm/hpcc/templates/dali.yaml b/helm/hpcc/templates/dali.yaml index e864ff21dcf..711ab785db5 100644 --- a/helm/hpcc/templates/dali.yaml +++ b/helm/hpcc/templates/dali.yaml @@ -82,7 +82,7 @@ spec: run: {{ $dali.name | quote }} server: {{ $dali.name | quote }} app: dali - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} {{- end }} diff --git a/helm/hpcc/templates/dfuserver.yaml b/helm/hpcc/templates/dfuserver.yaml index 2fbce4bdbf1..d83eaeb6788 100644 --- a/helm/hpcc/templates/dfuserver.yaml +++ b/helm/hpcc/templates/dfuserver.yaml @@ -56,7 +56,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dfuserver" "name" "dfuserver" "instance" .name) | indent 8 }} run: {{ .name | quote }} accessDali: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclagent.yaml b/helm/hpcc/templates/eclagent.yaml index 656b3dcbfd4..19830ee09a0 100644 --- a/helm/hpcc/templates/eclagent.yaml +++ b/helm/hpcc/templates/eclagent.yaml @@ -58,7 +58,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -135,7 +135,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclccserver.yaml b/helm/hpcc/templates/eclccserver.yaml index b9b4fcc276c..cbba2ba22f2 100644 --- a/helm/hpcc/templates/eclccserver.yaml +++ b/helm/hpcc/templates/eclccserver.yaml @@ -57,7 +57,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclccserver" "name" "eclccserver" "instance" $compileJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -142,7 +142,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclscheduler.yaml b/helm/hpcc/templates/eclscheduler.yaml index cb479c0771a..ebcb7fa27c9 100644 --- a/helm/hpcc/templates/eclscheduler.yaml +++ b/helm/hpcc/templates/eclscheduler.yaml @@ -64,7 +64,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: "no" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/esp.yaml b/helm/hpcc/templates/esp.yaml index 31561cdf163..cfffa85852c 100644 --- a/helm/hpcc/templates/esp.yaml +++ b/helm/hpcc/templates/esp.yaml @@ -117,7 +117,7 @@ spec: server: {{ .name | quote }} accessDali: "yes" app: {{ $application }} - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "name" $application "component" "esp" "instance" .name) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index 002456fc3fc..8b7cbf24ada 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -70,7 +70,7 @@ spec: server: {{ $servername | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index d886a4b2df4..e23c02bc1c3 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -120,7 +120,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} @@ -180,7 +180,7 @@ kind: Service metadata: name: {{ $commonCtx.toponame | quote }} labels: - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: @@ -242,7 +242,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} @@ -347,7 +347,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} diff --git a/helm/hpcc/templates/sasha.yaml b/helm/hpcc/templates/sasha.yaml index 6a7cd10cd80..e28d5adc9be 100644 --- a/helm/hpcc/templates/sasha.yaml +++ b/helm/hpcc/templates/sasha.yaml @@ -52,7 +52,7 @@ spec: run: {{ $serviceName | quote }} server: {{ $serviceName | quote }} accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }} - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- if hasKey $sasha "labels" }} {{ toYaml $sasha.labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index fb3749f9b73..cb4a7ffa2d9 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -82,7 +82,7 @@ data: labels: accessDali: "yes" accessEsp: "yes" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $eclAgentJobName "instanceOf" (printf "%s-job" .eclAgentName)) | indent 8 }} {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} @@ -147,7 +147,7 @@ data: accessEsp: "yes" app: "thor" component: "thormanager" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thormanager" "name" "thor" "instance" $thorManagerJobName "instanceOf" (printf "%s-thormanager-job" .me.name)) | indent 12 }} @@ -214,7 +214,7 @@ data: accessEsp: "yes" app: "thor" component: "thorworker" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thorworker" "name" "thor" "instance" $thorWorkerJobName "instanceOf" (printf "%s-thorworker-job" .me.name)) | indent 12 }} @@ -347,7 +347,7 @@ spec: accessEsp: {{ $commonCtx.eclAgentUseChildProcesses | ternary "yes" "no" | quote }} app: "thor" component: "thor-eclagent" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 instance: {{ $commonCtx.eclAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.eclAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} @@ -412,7 +412,7 @@ spec: accessEsp: "no" app: "thor" component: "thor-thoragent" - helmVersion: 9.0.41-closedown0 + helmVersion: 9.0.43-closedown0 instance: {{ $commonCtx.thorAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.thorAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} diff --git a/version.cmake b/version.cmake index 0fb58eb3b7a..e25b863f699 100644 --- a/version.cmake +++ b/version.cmake @@ -5,7 +5,7 @@ set ( HPCC_NAME "Community Edition" ) set ( HPCC_PROJECT "community" ) set ( HPCC_MAJOR 9 ) set ( HPCC_MINOR 0 ) -set ( HPCC_POINT 41 ) +set ( HPCC_POINT 43 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) ### From db240a33e8a6e66aabf48832513c3a0a49afcab0 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 7 Sep 2023 17:36:19 +0100 Subject: [PATCH 05/20] Split off 9.2.20 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- helm/hpcc/templates/dafilesrv.yaml | 2 +- helm/hpcc/templates/dali.yaml | 2 +- helm/hpcc/templates/dfuserver.yaml | 2 +- helm/hpcc/templates/eclagent.yaml | 4 ++-- helm/hpcc/templates/eclccserver.yaml | 4 ++-- helm/hpcc/templates/eclscheduler.yaml | 2 +- helm/hpcc/templates/esp.yaml | 2 +- helm/hpcc/templates/localroxie.yaml | 2 +- helm/hpcc/templates/roxie.yaml | 8 ++++---- helm/hpcc/templates/sasha.yaml | 2 +- helm/hpcc/templates/thor.yaml | 10 +++++----- version.cmake | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index a6bb9e8aeed..8ac68a684aa 100644 --- a/helm/hpcc/Chart.yaml +++ b/helm/hpcc/Chart.yaml @@ -6,9 +6,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 9.2.19-closedown0 +version: 9.2.21-closedown0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 9.2.19-closedown0 +appVersion: 9.2.21-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 3ccef74c933..c9da7756f8d 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1337,7 +1337,7 @@ kind: Service metadata: name: {{ $lvars.serviceName | quote }} labels: - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $.root "instance" $lvars.serviceName ) | indent 4 }} {{- if $lvars.labels }} {{ toYaml $lvars.labels | indent 4 }} diff --git a/helm/hpcc/templates/dafilesrv.yaml b/helm/hpcc/templates/dafilesrv.yaml index 9fef5b3546e..1e1b36c788d 100644 --- a/helm/hpcc/templates/dafilesrv.yaml +++ b/helm/hpcc/templates/dafilesrv.yaml @@ -50,7 +50,7 @@ spec: labels: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dafilesrv" "name" "dafilesrv" "instance" .name) | indent 8 }} server: {{ .name | quote }} - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 annotations: checksum/config: {{ $configSHA }} spec: diff --git a/helm/hpcc/templates/dali.yaml b/helm/hpcc/templates/dali.yaml index 0ba80fcfe5e..998d0d43373 100644 --- a/helm/hpcc/templates/dali.yaml +++ b/helm/hpcc/templates/dali.yaml @@ -82,7 +82,7 @@ spec: run: {{ $dali.name | quote }} server: {{ $dali.name | quote }} app: dali - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} {{- end }} diff --git a/helm/hpcc/templates/dfuserver.yaml b/helm/hpcc/templates/dfuserver.yaml index b55a30e2957..7f61b7b3a96 100644 --- a/helm/hpcc/templates/dfuserver.yaml +++ b/helm/hpcc/templates/dfuserver.yaml @@ -56,7 +56,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dfuserver" "name" "dfuserver" "instance" .name) | indent 8 }} run: {{ .name | quote }} accessDali: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclagent.yaml b/helm/hpcc/templates/eclagent.yaml index eb75cf3e8b3..be74659f375 100644 --- a/helm/hpcc/templates/eclagent.yaml +++ b/helm/hpcc/templates/eclagent.yaml @@ -58,7 +58,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -135,7 +135,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclccserver.yaml b/helm/hpcc/templates/eclccserver.yaml index 96ab09f04bf..30aa1dae501 100644 --- a/helm/hpcc/templates/eclccserver.yaml +++ b/helm/hpcc/templates/eclccserver.yaml @@ -57,7 +57,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclccserver" "name" "eclccserver" "instance" $compileJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -142,7 +142,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclscheduler.yaml b/helm/hpcc/templates/eclscheduler.yaml index a17a27801b5..99a6fcd9503 100644 --- a/helm/hpcc/templates/eclscheduler.yaml +++ b/helm/hpcc/templates/eclscheduler.yaml @@ -64,7 +64,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: "no" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/esp.yaml b/helm/hpcc/templates/esp.yaml index 63415e5ce36..ca7647d2734 100644 --- a/helm/hpcc/templates/esp.yaml +++ b/helm/hpcc/templates/esp.yaml @@ -117,7 +117,7 @@ spec: server: {{ .name | quote }} accessDali: "yes" app: {{ $application }} - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "name" $application "component" "esp" "instance" .name) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index e467de15b65..7c703e1a7fe 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -70,7 +70,7 @@ spec: server: {{ $servername | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index 5228851d9a6..c0f10d3209a 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -120,7 +120,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} @@ -180,7 +180,7 @@ kind: Service metadata: name: {{ $commonCtx.toponame | quote }} labels: - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: @@ -242,7 +242,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} @@ -347,7 +347,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} diff --git a/helm/hpcc/templates/sasha.yaml b/helm/hpcc/templates/sasha.yaml index e465fbc468a..2f669a3cdb7 100644 --- a/helm/hpcc/templates/sasha.yaml +++ b/helm/hpcc/templates/sasha.yaml @@ -52,7 +52,7 @@ spec: run: {{ $serviceName | quote }} server: {{ $serviceName | quote }} accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }} - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- if hasKey $sasha "labels" }} {{ toYaml $sasha.labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index e834efa6425..4e578687dc7 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -82,7 +82,7 @@ data: labels: accessDali: "yes" accessEsp: "yes" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $eclAgentJobName "instanceOf" (printf "%s-job" .eclAgentName)) | indent 8 }} {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} @@ -147,7 +147,7 @@ data: accessEsp: "yes" app: "thor" component: "thormanager" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thormanager" "name" "thor" "instance" $thorManagerJobName "instanceOf" (printf "%s-thormanager-job" .me.name)) | indent 12 }} @@ -214,7 +214,7 @@ data: accessEsp: "yes" app: "thor" component: "thorworker" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thorworker" "name" "thor" "instance" $thorWorkerJobName "instanceOf" (printf "%s-thorworker-job" .me.name)) | indent 12 }} @@ -347,7 +347,7 @@ spec: accessEsp: {{ $commonCtx.eclAgentUseChildProcesses | ternary "yes" "no" | quote }} app: "thor" component: "thor-eclagent" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 instance: {{ $commonCtx.eclAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.eclAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} @@ -412,7 +412,7 @@ spec: accessEsp: "no" app: "thor" component: "thor-thoragent" - helmVersion: 9.2.19-closedown0 + helmVersion: 9.2.21-closedown0 instance: {{ $commonCtx.thorAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.thorAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} diff --git a/version.cmake b/version.cmake index 6b6d4bdaf1b..3f50c2ba181 100644 --- a/version.cmake +++ b/version.cmake @@ -5,7 +5,7 @@ set ( HPCC_NAME "Community Edition" ) set ( HPCC_PROJECT "community" ) set ( HPCC_MAJOR 9 ) set ( HPCC_MINOR 2 ) -set ( HPCC_POINT 19 ) +set ( HPCC_POINT 21 ) set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) ### From 957d9a60a3eceb191a1126c4a349e69dbe83f42d Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Fri, 8 Sep 2023 09:32:22 +0100 Subject: [PATCH 06/20] Split off 9.4.0 Signed-off-by: Gordon Smith --- helm/hpcc/Chart.yaml | 4 ++-- helm/hpcc/templates/_helpers.tpl | 2 +- helm/hpcc/templates/dafilesrv.yaml | 2 +- helm/hpcc/templates/dali.yaml | 2 +- helm/hpcc/templates/dfuserver.yaml | 2 +- helm/hpcc/templates/eclagent.yaml | 4 ++-- helm/hpcc/templates/eclccserver.yaml | 4 ++-- helm/hpcc/templates/eclscheduler.yaml | 2 +- helm/hpcc/templates/esp.yaml | 2 +- helm/hpcc/templates/localroxie.yaml | 2 +- helm/hpcc/templates/roxie.yaml | 8 ++++---- helm/hpcc/templates/sasha.yaml | 2 +- helm/hpcc/templates/thor.yaml | 10 +++++----- version.cmake | 6 +++--- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/helm/hpcc/Chart.yaml b/helm/hpcc/Chart.yaml index 02abb3e67fd..fea06197f43 100644 --- a/helm/hpcc/Chart.yaml +++ b/helm/hpcc/Chart.yaml @@ -6,9 +6,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 9.3.0-trunk0 +version: 9.4.1-closedown0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 9.3.0-trunk0 +appVersion: 9.4.1-closedown0 diff --git a/helm/hpcc/templates/_helpers.tpl b/helm/hpcc/templates/_helpers.tpl index 17d221cbbf8..54e498d2e35 100644 --- a/helm/hpcc/templates/_helpers.tpl +++ b/helm/hpcc/templates/_helpers.tpl @@ -1337,7 +1337,7 @@ kind: Service metadata: name: {{ $lvars.serviceName | quote }} labels: - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $.root "instance" $lvars.serviceName ) | indent 4 }} {{- if $lvars.labels }} {{ toYaml $lvars.labels | indent 4 }} diff --git a/helm/hpcc/templates/dafilesrv.yaml b/helm/hpcc/templates/dafilesrv.yaml index 1f2575919ef..3a53f69154a 100644 --- a/helm/hpcc/templates/dafilesrv.yaml +++ b/helm/hpcc/templates/dafilesrv.yaml @@ -50,7 +50,7 @@ spec: labels: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dafilesrv" "name" "dafilesrv" "instance" .name) | indent 8 }} server: {{ .name | quote }} - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 annotations: checksum/config: {{ $configSHA }} spec: diff --git a/helm/hpcc/templates/dali.yaml b/helm/hpcc/templates/dali.yaml index 8be6387b9a6..c63af7b3e9d 100644 --- a/helm/hpcc/templates/dali.yaml +++ b/helm/hpcc/templates/dali.yaml @@ -82,7 +82,7 @@ spec: run: {{ $dali.name | quote }} server: {{ $dali.name | quote }} app: dali - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} {{- end }} diff --git a/helm/hpcc/templates/dfuserver.yaml b/helm/hpcc/templates/dfuserver.yaml index a0209f5ae83..6493f65a2ed 100644 --- a/helm/hpcc/templates/dfuserver.yaml +++ b/helm/hpcc/templates/dfuserver.yaml @@ -56,7 +56,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "dfuserver" "name" "dfuserver" "instance" .name) | indent 8 }} run: {{ .name | quote }} accessDali: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclagent.yaml b/helm/hpcc/templates/eclagent.yaml index 245e7554577..089155d2efe 100644 --- a/helm/hpcc/templates/eclagent.yaml +++ b/helm/hpcc/templates/eclagent.yaml @@ -58,7 +58,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -135,7 +135,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclccserver.yaml b/helm/hpcc/templates/eclccserver.yaml index 2e066e7d2db..4887709f7fd 100644 --- a/helm/hpcc/templates/eclccserver.yaml +++ b/helm/hpcc/templates/eclccserver.yaml @@ -57,7 +57,7 @@ data: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclccserver" "name" "eclccserver" "instance" $compileJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} {{- end }} @@ -142,7 +142,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: {{ .useChildProcesses | default false | ternary "yes" "no" | quote }} - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/eclscheduler.yaml b/helm/hpcc/templates/eclscheduler.yaml index 23aeff086d8..714d25b1f88 100644 --- a/helm/hpcc/templates/eclscheduler.yaml +++ b/helm/hpcc/templates/eclscheduler.yaml @@ -64,7 +64,7 @@ spec: run: {{ .name | quote }} accessDali: "yes" accessEsp: "no" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/esp.yaml b/helm/hpcc/templates/esp.yaml index 95fb11ba4d8..fe87bd4012d 100644 --- a/helm/hpcc/templates/esp.yaml +++ b/helm/hpcc/templates/esp.yaml @@ -117,7 +117,7 @@ spec: server: {{ .name | quote }} accessDali: "yes" app: {{ $application }} - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "name" $application "component" "esp" "instance" .name) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8 }} diff --git a/helm/hpcc/templates/localroxie.yaml b/helm/hpcc/templates/localroxie.yaml index 645a8cbb35b..61470862b44 100644 --- a/helm/hpcc/templates/localroxie.yaml +++ b/helm/hpcc/templates/localroxie.yaml @@ -70,7 +70,7 @@ spec: server: {{ $servername | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $roxie.name) | indent 8 }} {{- if hasKey . "labels" }} {{ toYaml .labels | indent 8 }} diff --git a/helm/hpcc/templates/roxie.yaml b/helm/hpcc/templates/roxie.yaml index 4c1f128b5b1..a06ccae7adb 100644 --- a/helm/hpcc/templates/roxie.yaml +++ b/helm/hpcc/templates/roxie.yaml @@ -120,7 +120,7 @@ spec: {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 8 }} run: {{ $commonCtx.toponame | quote }} roxie-cluster: {{ $roxie.name | quote }} - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} @@ -180,7 +180,7 @@ kind: Service metadata: name: {{ $commonCtx.toponame | quote }} labels: - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "topology-server" "name" "roxie" "instance" $commonCtx.toponame) | indent 4 }} spec: ports: @@ -242,7 +242,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "roxie-server" "name" "roxie" "instance" $servername) | indent 8 }} {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} @@ -347,7 +347,7 @@ spec: roxie-cluster: {{ $roxie.name | quote }} accessDali: "yes" accessEsp: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey $.Values.global "metrics" }} {{- include "hpcc.generateMetricsReporterLabel" $.Values.global.metrics | nindent 8}} {{- end }} diff --git a/helm/hpcc/templates/sasha.yaml b/helm/hpcc/templates/sasha.yaml index 5b64f920782..174ae29b7d5 100644 --- a/helm/hpcc/templates/sasha.yaml +++ b/helm/hpcc/templates/sasha.yaml @@ -52,7 +52,7 @@ spec: run: {{ $serviceName | quote }} server: {{ $serviceName | quote }} accessDali: {{ (has "dali" $sasha.access) | ternary "yes" "no" | quote }} - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- if hasKey $sasha "labels" }} {{ toYaml $sasha.labels | indent 8 }} {{- end }} diff --git a/helm/hpcc/templates/thor.yaml b/helm/hpcc/templates/thor.yaml index 5eafff196c0..77387122412 100644 --- a/helm/hpcc/templates/thor.yaml +++ b/helm/hpcc/templates/thor.yaml @@ -82,7 +82,7 @@ data: labels: accessDali: "yes" accessEsp: "yes" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $eclAgentJobName "instanceOf" (printf "%s-job" .eclAgentName)) | indent 8 }} {{- if hasKey .me "labels" }} {{ toYaml .me.labels | indent 12 }} @@ -147,7 +147,7 @@ data: accessEsp: "yes" app: "thor" component: "thormanager" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thormanager" "name" "thor" "instance" $thorManagerJobName "instanceOf" (printf "%s-thormanager-job" .me.name)) | indent 12 }} @@ -214,7 +214,7 @@ data: accessEsp: "yes" app: "thor" component: "thorworker" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 instance: "_HPCC_JOBNAME_" job: "_HPCC_JOBNAME_" {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "thorworker" "name" "thor" "instance" $thorWorkerJobName "instanceOf" (printf "%s-thorworker-job" .me.name)) | indent 12 }} @@ -347,7 +347,7 @@ spec: accessEsp: {{ $commonCtx.eclAgentUseChildProcesses | ternary "yes" "no" | quote }} app: "thor" component: "thor-eclagent" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 instance: {{ $commonCtx.eclAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.eclAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} @@ -412,7 +412,7 @@ spec: accessEsp: "no" app: "thor" component: "thor-thoragent" - helmVersion: 9.3.0-trunk0 + helmVersion: 9.4.1-closedown0 instance: {{ $commonCtx.thorAgentName | quote }} {{- include "hpcc.addStandardLabels" (dict "root" $ "component" "eclagent" "name" "thor" "instance" $commonCtx.thorAgentName ) | indent 8 }} {{- if hasKey $commonCtx.me "labels" }} diff --git a/version.cmake b/version.cmake index a0517a4a5bb..87be8eeb764 100644 --- a/version.cmake +++ b/version.cmake @@ -4,8 +4,8 @@ set ( HPCC_NAME "Community Edition" ) set ( HPCC_PROJECT "community" ) set ( HPCC_MAJOR 9 ) -set ( HPCC_MINOR 3 ) -set ( HPCC_POINT 0 ) -set ( HPCC_MATURITY "trunk" ) +set ( HPCC_MINOR 4 ) +set ( HPCC_POINT 1 ) +set ( HPCC_MATURITY "closedown" ) set ( HPCC_SEQUENCE 0 ) ### From 7c3ec056c2229d53bb128ca723b7dca8d3fdd8cb Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 7 Sep 2023 15:09:35 +0100 Subject: [PATCH 07/20] HPCC-30245 Alphanumeric sorting is ignored Signed-off-by: Gordon Smith --- esp/src/src/Utility.ts | 28 +++++++++++--- esp/src/src/store/Memory.ts | 1 + esp/src/src/store/Store.ts | 3 +- esp/src/src/store/util/SimpleQueryEngine.ts | 42 +++++++++++++-------- 4 files changed, 52 insertions(+), 22 deletions(-) diff --git a/esp/src/src/Utility.ts b/esp/src/src/Utility.ts index 2361ba9db91..2f322016579 100644 --- a/esp/src/src/Utility.ts +++ b/esp/src/src/Utility.ts @@ -451,14 +451,30 @@ export function onDomMutate(domNode, callback, observerOpts) { observer.observe(domNode, observerOpts); } +export function alphanumCompare(l, r, caseInsensitive: boolean = true, reverse: boolean = true): number { + const cmp = caseInsensitive ? alphanumCase(l, r) : alphanum(l, r); + if (cmp !== 0) { + return cmp * (reverse ? -1 : 1); + } + return 0; +} + +export function createAlphanumSortFunc(cols: string[], caseInsensitive: boolean, reverse: boolean = false) { + return function (l, r) { + for (let i = 0; i < cols.length; ++i) { + const col = cols[i]; + const cmp = alphanumCompare(l[col], r[col], caseInsensitive, reverse); + if (cmp !== 0) { + return cmp; + } + } + return 0; + }; +} + export function alphanumSort(arr, col, caseInsensitive, reverse: boolean = false) { if (arr && arr instanceof Array) { - arr.sort(function (l, r) { - if (caseInsensitive) { - return alphanumCase(r[col], l[col]) * (reverse ? -1 : 1); - } - return alphanum(l[col], r[col]) * (reverse ? -1 : 1); - }); + arr.sort(createAlphanumSortFunc(col, caseInsensitive, reverse)); } } diff --git a/esp/src/src/store/Memory.ts b/esp/src/src/store/Memory.ts index 7aa12694de9..ec36b30414c 100644 --- a/esp/src/src/store/Memory.ts +++ b/esp/src/src/store/Memory.ts @@ -70,6 +70,7 @@ export class Memory extends BaseStore { } protected fetchData(request: QueryRequest, options: QueryOptions): ThenableResponse { + options.alphanumColumns = this.alphanumSort; const data = this.queryEngine(request, options)(this.data); data.total = this.data.length; return Promise.resolve(data); diff --git a/esp/src/src/store/Store.ts b/esp/src/src/store/Store.ts index c9fbcae3ff6..41dea790b39 100644 --- a/esp/src/src/store/Store.ts +++ b/esp/src/src/store/Store.ts @@ -20,7 +20,8 @@ export type QuerySort = QuerySortFunction | QuerySortItem[]; export interface QueryOptions { start?: number; count?: number; - sort?: QuerySort + sort?: QuerySort; + alphanumColumns: { [id: string]: boolean }; } export abstract class BaseStore { diff --git a/esp/src/src/store/util/SimpleQueryEngine.ts b/esp/src/src/store/util/SimpleQueryEngine.ts index ee1b430511d..e7b8a9e9bc4 100644 --- a/esp/src/src/store/util/SimpleQueryEngine.ts +++ b/esp/src/src/store/util/SimpleQueryEngine.ts @@ -1,5 +1,29 @@ -import { BaseRow, QueryOptions, QueryRequest } from "../Store"; +import { alphanumCompare } from "../../Utility"; +import { BaseRow, QueryOptions, QueryRequest, QuerySort } from "../Store"; +function createSortFunc(sortSet: QuerySort, alphanumColumns: { [id: string]: boolean }) { + return typeof sortSet == "function" ? sortSet : function (a, b) { + for (let i = 0; sortSet[i]; i++) { + const sort = sortSet[i]; + if (alphanumColumns[sort.attribute as string]) { + const cmp = alphanumCompare(a[sort.attribute], b[sort.attribute], true, sort.descending); + if (cmp !== 0) { + return cmp; + } + } else { + let aValue = a[sort.attribute]; + let bValue = b[sort.attribute]; + // valueOf enables proper comparison of dates + aValue = aValue != null ? aValue.valueOf() : aValue; + bValue = bValue != null ? bValue.valueOf() : bValue; + if (aValue != bValue) { + return !!sort.descending == (aValue == null || aValue > bValue) ? -1 : 1; + } + } + return 0; + } + }; +} export function SimpleQueryEngine(_query?: QueryRequest, options?: QueryOptions) { // summary: // Simple query engine that matches using filter functions, named filter @@ -84,20 +108,7 @@ export function SimpleQueryEngine(_query?: // next we sort const sortSet = options && options.sort; if (sortSet) { - results.sort(typeof sortSet == "function" ? sortSet : function (a, b) { - for (let i = 0; sortSet[i]; i++) { - const sort = sortSet[i]; - let aValue = a[sort.attribute]; - let bValue = b[sort.attribute]; - // valueOf enables proper comparison of dates - aValue = aValue != null ? aValue.valueOf() : aValue; - bValue = bValue != null ? bValue.valueOf() : bValue; - if (aValue != bValue) { - return !!sort.descending == (aValue == null || aValue > bValue) ? -1 : 1; - } - } - return 0; - }); + results.sort(createSortFunc(sortSet, options.alphanumColumns)); } // now we paginate if (options && (options.start || options.count)) { @@ -111,3 +122,4 @@ export function SimpleQueryEngine(_query?: execute.matches = query; return execute; } + From 6bb7909effe927c493a03cdf2aae1f984843f275 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Fri, 8 Sep 2023 11:04:42 +0100 Subject: [PATCH 08/20] HPCC-30246 remove unused DFS function getNodePermissions Signed-off-by: Jake Smith --- dali/base/dadfs.cpp | 11 ----------- dali/base/dadfs.hpp | 1 - 2 files changed, 12 deletions(-) diff --git a/dali/base/dadfs.cpp b/dali/base/dadfs.cpp index 713041951fe..c2f5f587733 100644 --- a/dali/base/dadfs.cpp +++ b/dali/base/dadfs.cpp @@ -1181,7 +1181,6 @@ protected: friend class CDistributedFile; IDistributedSuperFile *lookupSuperFile(const char *logicalname, IUserDescriptor *user, AccessMode accessMode, IDistributedFileTransaction *transaction, unsigned timeout=INFINITE); SecAccessFlags getFilePermissions(const char *lname,IUserDescriptor *user,unsigned auditflags); - SecAccessFlags getNodePermissions(const IpAddress &ip,IUserDescriptor *user,unsigned auditflags); SecAccessFlags getFDescPermissions(IFileDescriptor *,IUserDescriptor *user,unsigned auditflags=0); SecAccessFlags getDLFNPermissions(CDfsLogicalFileName &dlfn,IUserDescriptor *user,unsigned auditflags=0); SecAccessFlags getDropZoneScopePermissions(const char *dropZoneName,const char *dropZonePath,IUserDescriptor *user,unsigned auditflags=0); @@ -11808,16 +11807,6 @@ SecAccessFlags CDistributedFileDirectory::getFilePermissions(const char *lname,I return getDLFNPermissions(dlfn,user,auditflags); } -SecAccessFlags CDistributedFileDirectory::getNodePermissions(const IpAddress &ip,IUserDescriptor *user,unsigned auditflags) -{ - if (ip.isNull()) - return SecAccess_None; - CDfsLogicalFileName dlfn; - SocketEndpoint ep(0,ip); - dlfn.setExternal(ep,"/x"); - return getDLFNPermissions(dlfn,user,auditflags); -} - SecAccessFlags CDistributedFileDirectory::getFDescPermissions(IFileDescriptor *fdesc,IUserDescriptor *user,unsigned auditflags) { // this checks have access to the nodes in the file descriptor diff --git a/dali/base/dadfs.hpp b/dali/base/dadfs.hpp index 71e29bd750a..7f28f414826 100644 --- a/dali/base/dadfs.hpp +++ b/dali/base/dadfs.hpp @@ -644,7 +644,6 @@ interface IDistributedFileDirectory: extends IInterface virtual SecAccessFlags getFilePermissions(const char *lname,IUserDescriptor *user,unsigned auditflags=0)=0; // see dasess for auditflags values virtual void setDefaultUser(IUserDescriptor *user)=0; virtual IUserDescriptor* queryDefaultUser()=0; - virtual SecAccessFlags getNodePermissions(const IpAddress &ip,IUserDescriptor *user,unsigned auditflags=0)=0; virtual SecAccessFlags getFDescPermissions(IFileDescriptor *,IUserDescriptor *user,unsigned auditflags=0)=0; virtual SecAccessFlags getDLFNPermissions(CDfsLogicalFileName &dlfn,IUserDescriptor *user,unsigned auditflags=0)=0; virtual SecAccessFlags getDropZoneScopePermissions(const char *dropZoneName,const char *dropZonePath,IUserDescriptor *user,unsigned auditflags=0)=0; From 47803e638c5bdd2b9452bbe1a5d254591d9376cc Mon Sep 17 00:00:00 2001 From: Jim DeFabia Date: Fri, 25 Aug 2023 16:27:32 -0400 Subject: [PATCH 09/20] HPCC-30170 Add Runnable to more ECL examples Signed-off-by: Jim DeFabia --- .../ECLR_mods/BltInFunc-JOIN.xml | 6 +- .../ECLR_mods/BltInFunc-KEYDIFF.xml | 2 +- .../ECLR_mods/BltInFunc-KEYPATCH.xml | 2 +- .../ECLR_mods/BltInFunc-KEYUNICODE.xml | 2 +- .../ECLR_mods/BltInFunc-LENGTH.xml | 7 +- .../ECLR_mods/BltInFunc-LIBRARY.xml | 2 +- .../ECLR_mods/BltInFunc-LIMIT.xml | 129 +++++++++------- .../ECLR_mods/BltInFunc-LN.xml | 7 +- .../ECLR_mods/BltInFunc-LOCAL.xml | 6 +- .../ECLR_mods/BltInFunc-LOG.xml | 7 +- .../ECLR_mods/BltInFunc-LOOP.xml | 2 +- .../ECLR_mods/BltInFunc-LoadXML.xml | 2 +- .../ECLR_mods/BltInFunc-MAP.xml | 2 +- .../ECLR_mods/BltInFunc-MAX.xml | 140 +++++++++++------- .../ECLR_mods/BltInFunc-MERGE.xml | 111 +++++++++----- .../ECLR_mods/BltInFunc-MIN.xml | 140 +++++++++++------- .../ECLR_mods/BltInFunc-NOFOLD.xml | 3 +- .../ECLR_mods/BltInFunc-NOLOCAL.xml | 6 +- .../ECLR_mods/BltInFunc-NONEMPTY.xml | 17 ++- .../ECLR_mods/BltInFunc-NORMALIZE.xml | 84 +++++++---- .../ECLR_mods/BltInFunc-NOTIFY.xml | 8 +- .../ECLR_mods/BltInFunc-ORDERED.xml | 18 +-- .../ECLR_mods/BltInFunc-OUTPUT.xml | 31 ++-- .../ECLR_mods/BltInFunc-PARALLEL.xml | 2 +- .../ECLR_mods/BltInFunc-PARSE.xml | 2 +- .../ECLR_mods/BltInFunc-PIPE.xml | 54 +++++-- .../ECLR_mods/BltInFunc-POWER.xml | 12 +- .../ECLR_mods/BltInFunc-PRELOAD.xml | 6 +- .../ECLR_mods/BltInFunc-PROCESS.xml | 68 ++++++--- .../ECLR_mods/BltInFunc-PROJECT.xml | 62 ++++++-- .../ECLR_mods/BltInFunc-PULL.xml | 4 +- .../ECLR_mods/BltInFunc-RANDOM.xml | 5 +- .../ECLR_mods/BltInFunc-RANGE.xml | 48 ++++-- .../ECLR_mods/BltInFunc-RANK.xml | 8 +- .../ECLR_mods/BltInFunc-RANKED.xml | 9 +- .../ECLR_mods/BltInFunc-REALFORMAT.xml | 4 +- .../ECLR_mods/BltInFunc-REGEXFIND.xml | 22 ++- .../ECLR_mods/BltInFunc-REGEXFINDSET.xml | 3 +- .../ECLR_mods/BltInFunc-REGEXREPLACE.xml | 2 +- .../ECLR_mods/BltInFunc-REGROUP.xml | 2 +- .../ECLR_mods/BltInFunc-REJECTED.xml | 7 +- .../ECLR_mods/BltInFunc-ROLLUP.xml | 100 +++++++++---- .../ECLR_mods/BltInFunc-ROUND.xml | 7 +- .../ECLR_mods/BltInFunc-ROUNDUP.xml | 20 +-- .../ECLR_mods/BltInFunc-ROW.xml | 9 +- .../ECLR_mods/BltInFunc-ROWDIFF.xml | 2 +- .../ECLR_mods/BltInFunc-SAMPLE.xml | 72 +++++++-- .../ECLR_mods/BltInFunc-SET.xml | 17 ++- .../ECLR_mods/BltInFunc-SIN.xml | 6 +- .../ECLR_mods/BltInFunc-SINH.xml | 6 +- .../ECLR_mods/BltInFunc-SIZEOF.xml | 55 +++---- .../ECLR_mods/BltInFunc-SOAPCALL.xml | 7 +- .../ECLR_mods/BltInFunc-SORT.xml | 38 +++-- .../ECLR_mods/BltInFunc-SORTED.xml | 2 +- .../ECLR_mods/BltInFunc-SQRT.xml | 8 +- .../ECLR_mods/BltInFunc-STEPPED.xml | 4 +- .../ECLR_mods/BltInFunc-STORED.xml | 2 +- .../ECLR_mods/BltInFunc-SUM.xml | 70 +++++++-- .../ECLR_mods/BltInFunc-TABLE.xml | 5 +- .../ECLR_mods/BltInFunc-TAN.xml | 6 +- .../ECLR_mods/BltInFunc-TANH.xml | 6 +- .../ECLR_mods/BltInFunc-THISNODE.xml | 5 +- .../ECLR_mods/BltInFunc-TOJSON.xml | 2 +- .../ECLR_mods/BltInFunc-TOPN.xml | 46 ++++-- .../ECLR_mods/BltInFunc-TOUNICODE.xml | 11 +- .../ECLR_mods/BltInFunc-TOXML.xml | 2 +- .../ECLR_mods/BltInFunc-TRACE.xml | 8 +- .../ECLR_mods/BltInFunc-TRANSFER.xml | 12 +- .../ECLR_mods/BltInFunc-TRIM.xml | 23 +-- .../ECLR_mods/BltInFunc-TRUNCATE.xml | 8 +- .../ECLR_mods/BltInFunc-UNGROUP.xml | 88 +++++++---- .../ECLR_mods/BltInFunc-UNICODEORDER.xml | 20 ++- .../ECLR_mods/BltInFunc-UNORDERED.xml | 6 +- .../ECLR_mods/BltInFunc-VARIANCE.xml | 106 +++++++------ .../ECLR_mods/BltInFunc-WAIT.xml | 74 ++++----- .../ECLR_mods/BltInFunc-WHEN.xml | 2 +- .../ECLR_mods/BltInFunc-WHICH.xml | 9 +- .../ECLR_mods/BltInFunc-WORKUNIT.xml | 9 +- .../ECLR_mods/BltInFunc-XMLDECODE.xml | 8 +- .../ECLR_mods/BltInFunc-XMLENCODE.xml | 7 +- .../ECLR_mods/Templ-APPEND.xml | 10 +- .../ECLR_mods/Templ-CONSTANT.xml | 7 +- .../ECLR_mods/Templ-DECLARE.xml | 8 +- .../ECLR_mods/Templ-DEMANGLE.xml | 20 ++- .../ECLR_mods/Templ-ERROR.xml | 16 +- .../ECLR_mods/Templ-EXPAND.xml | 10 +- .../ECLR_mods/Templ-EXPORT.xml | 64 ++++---- .../ECLR_mods/Templ-FOR.xml | 2 +- .../ECLR_mods/Templ-GETDATATYPE.xml | 14 +- .../ECLR_mods/Templ-IF.xml | 39 +++-- .../ECLR_mods/Templ-IFDEFINED.xml | 6 +- .../ECLR_mods/Templ-INMODULE.xml | 30 ++-- .../ECLR_mods/Templ-LOOP-BREAK.xml | 43 +++--- .../ECLR_mods/Templ-MANGLE.xml | 23 +-- .../ECLR_mods/Templ-ONWARNING.xml | 4 +- .../ECLR_mods/Templ-OPTION.xml | 82 +++++----- .../ECLR_mods/Templ-SET.xml | 8 +- .../ECLR_mods/Templ-STORED.xml | 5 +- .../ECLR_mods/Templ-TEXT.xml | 26 ++-- .../ECLR_mods/Templ-UNIQUENAME.xml | 40 +++-- .../ECLR_mods/Templ-WARNING.xml | 16 +- .../ECLR_mods/Templ-WEBSERVICE.xml | 2 +- .../ECLR_mods/Templ-WORKUNIT.xml | 4 +- .../ECLR_mods/WkFlo-CheckPoint.xml | 2 +- .../ECLR_mods/WkFlo-DEPRECATED.xml | 49 +++--- .../ECLR_mods/WkFlo-FAILURE.xml | 12 +- .../ECLR_mods/WkFlo-GLOBAL.xml | 6 +- .../ECLR_mods/WkFlo-INDEPENDENT.xml | 42 +++--- .../ECLR_mods/WkFlo-ONCE.xml | 3 +- .../ECLR_mods/WkFlo-ONWARNING.xml | 2 +- .../ECLR_mods/WkFlo-PERSIST.xml | 17 +-- .../ECLR_mods/WkFlo-PRIORITY.xml | 25 +++- .../ECLR_mods/WkFlo-RECOVERY.xml | 17 +-- .../ECLR_mods/WkFlo-STORED.xml | 38 +++-- .../ECLR_mods/WkFlo-SUCCESS.xml | 8 +- .../ECLR_mods/WkFlo-WHEN.xml | 20 +-- 116 files changed, 1597 insertions(+), 1065 deletions(-) diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-JOIN.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-JOIN.xml index cea5762b581..ddf008eae2b 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-JOIN.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-JOIN.xml @@ -999,12 +999,12 @@ SEQUENTIAL(PtblOut,Bld1,Bld2,OUTPUT(FilledRecs1),OUTPUT(FilledRecs2)) joincondition is duplicated between adjacent pairs of datasets, which means that this joincondition: - LEFT.field = RIGHT.field + LEFT.field = RIGHT.field when applied against a setofdatasets containing three datasets, is logically equivalent to: - ds1.field = ds2.field AND ds2.field = ds3.field + ds1.field = ds2.field AND ds2.field = ds3.field @@ -1101,7 +1101,7 @@ SEQUENTIAL(PtblOut,Bld1,Bld2,OUTPUT(FilledRecs1),OUTPUT(FilledRecs2)) Example: - Rec := RECORD,MAXLENGTH(4096) + Rec := RECORD,MAXLENGTH(4096) STRING1 Letter; UNSIGNED1 DS; UNSIGNED1 Matches := 0; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYDIFF.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYDIFF.xml index d4502ce7b37..9315d8180ed 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYDIFF.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYDIFF.xml @@ -157,7 +157,7 @@ Example: - Vehicles := DATASET('vehicles', + Vehicles := DATASET('vehicles', {STRING2 st, STRING20 city, STRING20 lname, diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYPATCH.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYPATCH.xml index eb0f86535f3..2fd96baa49f 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYPATCH.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYPATCH.xml @@ -154,7 +154,7 @@ Example: - Vehicles := DATASET('vehicles', + Vehicles := DATASET('vehicles', {STRING2 st, STRING20 city, STRING20 lname, diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYUNICODE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYUNICODE.xml index 9db26e68e15..0f4bc2d9ff0 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYUNICODE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-KEYUNICODE.xml @@ -45,7 +45,7 @@ Example: - //where you might do this: + //where you might do this: my_record := RECORD UNICODE_en_US str; END; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LENGTH.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LENGTH.xml index ca6c54fe0bf..0cdcdc04508 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LENGTH.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LENGTH.xml @@ -39,8 +39,9 @@ Example: - INTEGER MyLength := LENGTH('XYZ' + 'ABC'); - //MyLength is 6 + INTEGER MyLength := LENGTH('XYZ' + 'ABC'); +OUTPUT(MyLength); //MyLength is 6 - See Also: String Operators, STRING + See Also: String Operators, + STRING diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIBRARY.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIBRARY.xml index 3ac98616099..dc85399de43 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIBRARY.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIBRARY.xml @@ -91,7 +91,7 @@ Example: - NamesRec := RECORD + NamesRec := RECORD INTEGER1 NameID; STRING20 FName; STRING20 LName; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIMIT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIMIT.xml index e3e6fcb3d71..8bee4f959bb 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIMIT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LIMIT.xml @@ -20,7 +20,11 @@ ] ] [, SKIP SKIP - [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) LIMIT(recset, maxrecs [, @@ -34,8 +38,12 @@ role="bold">[, COUNT COUNT - ] ] - [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] + ] ] [, + UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( + numthreads ) ] ] [, + ALGORITHM( name ) + ] @@ -99,52 +107,70 @@ The TRANSFORM function to call to produce the single output record. - - UNORDERED - - Optional. Specifies the output record order is not significant. - - - ORDERED - - Specifies the significance of the output record order. - - - bool - - When False, specifies the output record order is not significant. When True, specifies the default output record order. - - - STABLE - - Optional. Specifies the input record order is significant. - - - UNSTABLE - - Optional. Specifies the input record order is not significant. - - - PARALLEL - - Optional. Try to evaluate this activity in parallel. - - - numthreads - - Optional. Try to evaluate this activity using numthreads threads. - - - ALGORITHM - - Optional. Override the algorithm used for this activity. - - - name - - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. - - + + + UNORDERED + + Optional. Specifies the output record order is not + significant. + + + + ORDERED + + Specifies the significance of the output record + order. + + + + bool + + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + + + + STABLE + + Optional. Specifies the input record order is + significant. + + + + UNSTABLE + + Optional. Specifies the input record order is not + significant. + + + + PARALLEL + + Optional. Try to evaluate this activity in parallel. + + + + numthreads + + Optional. Try to evaluate this activity using + numthreads threads. + + + + ALGORITHM + + Optional. Override the algorithm used for this + activity. + + + + name + + The algorithm to use for this activity. Must be from the list + of supported algorithms for the SORT function's STABLE and UNSTABLE + options. + @@ -160,7 +186,7 @@ Example: - RecStruct := RECORD + RecStruct := RECORD INTEGER1 Number; STRING1 Letter; END; @@ -178,6 +204,9 @@ Y := LIMIT(SomeFile,10, SELF := ROW({0,''},RecStruct)))); //no exception, just no record Z := LIMIT(SomeFile,10,SKIP); +// OUTPUT(X); //This one will throw an exception +OUTPUT(Y); +OUTPUT(Z); See Also: FAIL, Example: - MyLogPI := LN(3.14159); //1.14473 + MyLogPI := LN(3.14159); //1.144729041185178 +OUTPUT(MyLogPI); - See Also: EXP, SQRT, POWER, LOG + See Also: EXP, SQRT, POWER, LOG diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOCAL.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOCAL.xml index bcf98d64b9a..b544b900403 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOCAL.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOCAL.xml @@ -43,7 +43,9 @@ Example: - ds := JOIN(SomeData,LOCAL(SomeIndex), LEFT.ID = RIGHT.ID); + ds := JOIN(SomeData,LOCAL(SomeIndex), LEFT.ID = RIGHT.ID); - See Also: ALLNODES, THISNODE, NOLOCAL + See Also: ALLNODES, THISNODE, NOLOCAL diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOG.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOG.xml index 9cb7729fba5..8ed5dcdec3b 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOG.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOG.xml @@ -38,7 +38,10 @@ Example: - MyLogPI := LOG(3.14159); //0.49715 + MyLogPI := LOG(3.14159); // 0.4971495058611233 +OUTPUT(MyLogPI); - See Also: EXP, SQRT, POWER, LN + See Also: EXP, SQRT, POWER, LN diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOOP.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOOP.xml index 0c759eb6647..a2db93c86d1 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOOP.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LOOP.xml @@ -165,7 +165,7 @@ Example: - namesRec := RECORD + namesRec := RECORD STRING20 lname; STRING10 fname; UNSIGNED2 age := 25; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LoadXML.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LoadXML.xml index db2e1f9a00b..eca24db3005 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LoadXML.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-LoadXML.xml @@ -60,7 +60,7 @@ Example: - LOADXML('<section><item type="count"><set>person</set></item></section>') + LOADXML('<section><item type="count"><set>person</set></item></section>'); //this macro receives in-line XML as its parameter //and demonstrates the code for multiple row drilldown EXPORT id(xmlRow) := MACRO diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAP.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAP.xml index 4b4689b7419..f3483e7cfa7 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAP.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAP.xml @@ -84,7 +84,7 @@ Example: - Attr01 := MAP(EXISTS(Person(Person.EyeColor = 'Blue')) => 1, + Attr01 := MAP(EXISTS(Person(Person.EyeColor = 'Blue')) => 1, EXISTS(Person(Person.Haircolor = 'Brown')) => 2, 3); //If there are any blue-eyed people, Attr01 gets 1 diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAX.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAX.xml index 9ca2e8c3460..53c32dfbe17 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAX.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MAX.xml @@ -7,7 +7,11 @@ MAX MAX function (recordset, value [, KEYED ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + role="bold">[, KEYED ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) MAX(valuelistA comma-delimited list of expressions to find the maximum value of. This may also be a SET of values. - - UNORDERED - - Optional. Specifies the output record order is not significant. - - - ORDERED - - Specifies the significance of the output record order. - - - bool - - When False, specifies the output record order is not significant. When True, specifies the default output record order. - - - STABLE - - Optional. Specifies the input record order is significant. - - - UNSTABLE - - Optional. Specifies the input record order is not significant. - - - PARALLEL - - Optional. Try to evaluate this activity in parallel. - - - numthreads - - Optional. Try to evaluate this activity using numthreads threads. - - - ALGORITHM - - Optional. Override the algorithm used for this activity. - - - name - - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. - + + + UNORDERED + + Optional. Specifies the output record order is not + significant. + + + + ORDERED + + Specifies the significance of the output record + order. + + + + bool + + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + + + + STABLE + + Optional. Specifies the input record order is + significant. + + + + UNSTABLE + + Optional. Specifies the input record order is not + significant. + + + + PARALLEL + + Optional. Try to evaluate this activity in parallel. + + + + numthreads + + Optional. Try to evaluate this activity using + numthreads threads. + + + + ALGORITHM + + Optional. Override the algorithm used for this + activity. + + + + name + + The algorithm to use for this activity. Must be from the list + of supported algorithms for the SORT function's STABLE and UNSTABLE + options. + Return: @@ -113,11 +136,28 @@ Example: - MaxVal1 := MAX(Trades,Trades.trd_rate); -MaxVal2 := MAX(4,8,16,2,1); //returns 16 + MaxVal2 := MAX(4,8,16,2,1); SetVals := [4,8,16,2,1]; -MaxVal3 := MAX(SetVals); //returns 16 +MaxVal3 := MAX(SetVals); + +OUTPUT(MaxVal2); //returns 16 +OUTPUT(MaxVal3); //returns 16 + +//example using a DATASET +SalesRecord := RECORD + INTEGER OrderNumber; + INTEGER SaleAmount; +END; +Sales := DATASET([{923,1001}, + {924,23}, + {925,3000}, + {926,3423}, + {927,9999}, + {931,113}], SalesRecord); + +OUTPUT(MAX(Sales,Sales.SaleAmount)); //returns 9999 - See Also: MIN, AVE + See Also: MIN, AVE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MERGE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MERGE.xml index 1d3c459212a..67c96a10256 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MERGE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MERGE.xml @@ -19,7 +19,11 @@ ] [, LOCAL LOCAL - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) MERGE(recordsetset , @@ -28,7 +32,11 @@ role="bold">SORTED( fieldlist ) [, DEDUP ] [, LOCAL ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + role="bold">LOCAL ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) @@ -81,51 +89,70 @@ A SET ( [ds1,ds2,ds3] ) of the datasets or indexes to merge, which must all be in exactly the same format. - - UNORDERED - Optional. Specifies the output record order is not significant. - - - ORDERED + + UNORDERED + + Optional. Specifies the output record order is not + significant. + - Specifies the significance of the output record order. - - - bool + + ORDERED - When False, specifies the output record order is not significant. When True, specifies the default output record order. - - - STABLE + Specifies the significance of the output record + order. + - Optional. Specifies the input record order is significant. - - - UNSTABLE + + bool - Optional. Specifies the input record order is not significant. - - - PARALLEL + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + - Optional. Try to evaluate this activity in parallel. - - - numthreads + + STABLE - Optional. Try to evaluate this activity using numthreads threads. - - - ALGORITHM + Optional. Specifies the input record order is + significant. + - Optional. Override the algorithm used for this activity. - - - name + + UNSTABLE - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. - + Optional. Specifies the input record order is not + significant. + + + + PARALLEL + + Optional. Try to evaluate this activity in parallel. + + + + numthreads + + Optional. Try to evaluate this activity using + numthreads threads. + + + + ALGORITHM + + Optional. Override the algorithm used for this + activity. + + + + name + + The algorithm to use for this activity. Must be from the list + of supported algorithms for the SORT function's STABLE and UNSTABLE + options. + Return: @@ -148,7 +175,7 @@ Example: - ds1 := SORTED(DATASET([{1,'A'},{1,'B'},{1,'C'},{1,'D'},{1,'E'}, + ds1 := SORTED(DATASET([{1,'A'},{1,'B'},{1,'C'},{1,'D'},{1,'E'}, {1,'F'},{1,'G'},{1,'H'},{1,'I'},{1,'J'}], {INTEGER1 number,STRING1 Letter}), letter,number); @@ -158,7 +185,11 @@ ds2 := SORTED(DATASET([{2,'A'},{2,'B'},{2,'C'},{2,'D'},{2,'E'}, letter,number); ds3 := MERGE(ds1,ds2,SORTED(letter,number)); + SetDS := [ds1,ds2]; -ds4 := MERGE(SetDS,letter,number); +ds4 := MERGE(SetDS,SORTED(letter,number)); + +OUTPUT(ds3); +OUTPUT(ds4); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MIN.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MIN.xml index bff5eca29f4..9558ec49423 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MIN.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-MIN.xml @@ -11,7 +11,11 @@ (recordset, value [, KEYED KEYED - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) MIN(valuelistA comma-delimited list of expressions to find the minimum value of. This may also be a SET of values. - - UNORDERED - - Optional. Specifies the output record order is not significant. - - - ORDERED - - Specifies the significance of the output record order. - - - bool - - When False, specifies the output record order is not significant. When True, specifies the default output record order. - - - STABLE - - Optional. Specifies the input record order is significant. - - - UNSTABLE - - Optional. Specifies the input record order is not significant. - - - PARALLEL - - Optional. Try to evaluate this activity in parallel. - - - numthreads - - Optional. Try to evaluate this activity using numthreads threads. - - - ALGORITHM - - Optional. Override the algorithm used for this activity. - - - name - - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. - + + + UNORDERED + + Optional. Specifies the output record order is not + significant. + + + + ORDERED + + Specifies the significance of the output record + order. + + + + bool + + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + + + + STABLE + + Optional. Specifies the input record order is + significant. + + + + UNSTABLE + + Optional. Specifies the input record order is not + significant. + + + + PARALLEL + + Optional. Try to evaluate this activity in parallel. + + + + numthreads + + Optional. Try to evaluate this activity using + numthreads threads. + + + + ALGORITHM + + Optional. Override the algorithm used for this + activity. + + + + name + + The algorithm to use for this activity. Must be from the list + of supported algorithms for the SORT function's STABLE and UNSTABLE + options. + Return: @@ -117,11 +140,28 @@ Example: - MinVal1 := MIN(Trades,Trades.trd_rate); -MinVal2 := MIN(4,8,16,2,1); //returns 1 + MinVal2 := MIN(4,8,16,2,1); SetVals := [4,8,16,2,1]; -MinVal3 := MIN(SetVals); //returns 1 +MinVal3 := MIN(SetVals); + +OUTPUT(MinVal2); //returns 1 +OUTPUT(MinVal3); //returns 1 + +//example using a DATASET +SalesRecord := RECORD + INTEGER OrderNumber; + INTEGER SaleAmount; +END; +Sales := DATASET([{923,1001}, + {924,23}, + {925,3000}, + {926,3423}, + {927,9999}, + {931,113}], SalesRecord); + +OUTPUT(MIN(Sales,Sales.SaleAmount)); //returns 23 - See Also: MAX, AVE + See Also: MAX, AVE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOFOLD.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOFOLD.xml index 2c68487086d..c44e3538eb9 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOFOLD.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOFOLD.xml @@ -45,7 +45,7 @@ Example: - OUTPUT(2 * 2); // is normally constant folded to: + OUTPUT(2 * 2); // is normally constant folded to: OUTPUT(4); // at compile time. //However adding NOFOLD() around one argument prevents that @@ -56,6 +56,5 @@ OUTPUT(NOFOLD(2) * 2); OUTPUT(NOFOLD(2 * 2)); //is the same as OUTPUT(NOFOLD(4)); - diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOLOCAL.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOLOCAL.xml index 5b1e19b3ac6..1265b660afa 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOLOCAL.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOLOCAL.xml @@ -40,7 +40,9 @@ Example: - ds := JOIN(SomeData,NOLOCAL(SomeIndex), LEFT.ID = RIGHT.ID); + ds := JOIN(SomeData,NOLOCAL(SomeIndex), LEFT.ID = RIGHT.ID); - See Also: ALLNODES, THISNODE, LOCAL + See Also: ALLNODES, THISNODE, LOCAL diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NONEMPTY.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NONEMPTY.xml index a1a652344f7..4c371e44cb1 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NONEMPTY.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NONEMPTY.xml @@ -40,9 +40,20 @@ Example: - ds := NONEMPTY(SomeData(SomeFilter), - SomeData(SomeOtherFilter), - SomeOtherData(YetAnotherFilter)); + SalesRecord := RECORD + INTEGER OrderNumber; + INTEGER SaleAmount; +END; +Sales := DATASET([{923,1001}, + {924,23}, + {925,3000}, + {926,3423}, + {927,9999}, + {931,113}], SalesRecord); +ds := NONEMPTY(Sales(SaleAmount>20000), + Sales(SaleAmount>10000), + Sales(SaleAmount>3000)); +OUTPUT(ds); See Also: EXISTS diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NORMALIZE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NORMALIZE.xml index 8acab1fa827..0ef5828bb53 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NORMALIZE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NORMALIZE.xml @@ -9,13 +9,21 @@ NORMALIZE function (recordset, expression, transform - [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + [, UNORDERED | ORDERED( + bool ) ] [, STABLE | UNSTABLE ] + [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name + ) ] ) NORMALIZE(recordset, LEFT LEFT - .childdataset, transform - [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + .childdataset, transform + [, UNORDERED | ORDERED( bool + ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ + ( numthreads ) ] ] [, + ALGORITHM( name ) ] + ) @@ -50,50 +58,70 @@ The field name of a child DATASET in the recordset. This must use the keyword LEFT as its qualifier. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -151,7 +179,7 @@ Example: - //Form 1 example + //Form 1 example NamesRec := RECORD UNSIGNED1 numRows; @@ -180,18 +208,19 @@ SELF.addr := CHOOSE(C, L.addr1, L.addr2, L.addr3, END; NormAddrs := - NORMALIZE(namesTable,LEFT.numRows,NormIt(LEFT,COUNTER - COUNTER - )); -/* the result is: numRows thename - addr -1 Kevin 10 Malt Lane -2 Liz 10 Malt Lane -2 Liz 3 The cottages -4 Anywhere Here -4 Anywhere There -4 Anywhere Near -4 Anywhere Far */ + NORMALIZE(namesTable,LEFT.numRows,NormIt(LEFT,COUNTER)); +OUTPUT(NormAddrs); +/* the result is: +numRows thename addr +1 Kevin 10 Malt Lane +2 Liz 10 Malt Lane +2 Liz 3 The cottages +4 Anywhere Here +4 Anywhere There +4 Anywhere Near +4 Anywhere Far +*/ + //************************ //Form 2 example ChildRec := RECORD @@ -217,8 +246,11 @@ ChildRec NewChildren(ChildRec R) := TRANSFORM SELF := R; END; NewChilds := NORMALIZE(ds,LEFT.Children,NewChildren(RIGHT)); +OUTPUT(NewChilds); - See Also: TRANSFORM Structure, RECORD Structure, DENORMALIZE + See Also: TRANSFORM + Structure, RECORD + Structure, DENORMALIZE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOTIFY.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOTIFY.xml index fa5fc20270c..74980e7cfb3 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOTIFY.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-NOTIFY.xml @@ -66,7 +66,8 @@ Example: - doMyService := FUNCTION + //run this first +doMyService := FUNCTION O := OUTPUT('Did a Service for: ' + 'EVENTNAME=' + EVENTNAME); N := NOTIFY(EVENT('MyServiceComplete', '<Event><returnTo>FRED</returnTo></Event>'), @@ -74,8 +75,11 @@ RETURN WHEN(EVENTEXTRA('returnTo'),ORDERED(O,N)); END; OUTPUT(doMyService) : WHEN('MyService'); + + + Then: -// and a call (in a separate workunit): + // run this in a separate workunit after the first part above completes: NOTIFY('MyService', '<Event><returnTo>'+ WORKUNIT + '</returnTo></Event>'); WAIT('MyServiceComplete'); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ORDERED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ORDERED.xml index 3c5a50eea21..a8cc915d85f 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ORDERED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ORDERED.xml @@ -51,17 +51,13 @@ Example: - Act1 := - OUTPUT(A_People,OutputFormat1,'//hold01/fred.out'); -Act2 := - OUTPUT(Person,{Person.per_first_name,Person.per_last_name}) -Act2 := OUTPUT(Person,{Person.per_last_name}))); -//by naming these actions, they become inactive - attributes -//that only execute when the attribute names are called as - actions -ORDERED(Act1,PARALLEL(Act2,Act3)); -//executes Act1 alone, and then executes Act2 and Act3 together + Action1 := OUTPUT(A_People,OutputFormat1,'//hold01/fred.out'); +Action2 := OUTPUT(Person,{Person.per_first_name,Person.per_last_name}) +Action2 := OUTPUT(Person,{Person.per_last_name}))); + //by naming these actions, they become inactive attributes + //that only execute when the attribute names are called as actions +ORDERED(Action1,PARALLEL(Action2,Action3)); + //executes Action1 alone, and then executes Action2 and Action3 together See Also: PARALLEL, Field names in an "on the fly" record format {...} must be unique or a syntax error results. For example: - OUTPUT(person(), {module1.attr1, module2.attr1}); + OUTPUT(person(), {module1.attr1, module2.attr1}); will result in a syntax error. Output Field Names are assumed from the definition names. @@ -417,7 +417,7 @@ To get around this situation, you can specify a unique name for the output field in the on-the-fly record format, like this: - OUTPUT(person(), {module1.attr1, name := module2.attr1}); + OUTPUT(person(), {module1.attr1, name := module2.attr1}); @@ -552,7 +552,7 @@ Example: - OutputFormat1 := RECORD + OutputFormat1 := RECORD People.firstname; People.lastname; END; @@ -848,11 +848,12 @@ OUTPUT(People(Attr1=FALSE)); If none of the ASCII, EBCDIC, or UNICODE options are specified, the default output is in ASCII format with any UNICODE fields in UTF8 format. - The other default csvoptions are: CSV(HEADING('',''), SEPARATOR(','), TERMINATOR('\n'), QUOTE()) + The other default csvoptions are: CSV(HEADING('',''), SEPARATOR(','), TERMINATOR('\n'), QUOTE()) Example: - //SINGLE option writes the header only to the first file part: + //SINGLE option writes the header only to the first file part: OUTPUT(ds,,'~thor::outdata.csv',CSV(HEADING(SINGLE))); //This example writes the header and footer to every file part: @@ -1055,11 +1056,11 @@ OUTPUT(ds,,'~thor::outdata.csv',CSV(HEADING(FORMAT(STD.Str.ToUpperCase)))); If no xmloptions are specified, the defaults are: - XML('Row',HEADING('<Dataset>\n','</Dataset>\n')) + XML('Row',HEADING('<Dataset>\n','</Dataset>\n')) Example: - R := {STRING10 fname,STRING12 lname}; + R := {STRING10 fname,STRING12 lname}; B := DATASET([{'Fred','Bell'},{'George','Blanda'},{'Sam',''}],R); OUTPUT(B,,'fred1.xml', XML); // writes B to the fred1.xml file @@ -1281,11 +1282,11 @@ OUTPUT(B,,'fred3.xml',XML('MyRow',TRIM,OPT)); If no jsonoptions are specified, the defaults are: - JSON('Row',HEADING('[',']')) + JSON('Row',HEADING('[',']')) Example: - R := {STRING10 fname,STRING12 lname}; + R := {STRING10 fname,STRING12 lname}; B := DATASET([{'Fred','Bell'},{'George','Blanda'},{'Sam',''}],R); OUTPUT(B,,'fred1.json', JSON); // writes B to the fred1.json file @@ -1380,7 +1381,7 @@ OUTPUT(B,,'fred2.json',JSON('MyResult', HEADING('[', ']'))); Example: - OUTPUT(A_People,,PIPE('MyCommandLIneProgram'),OVERWRITE); + OUTPUT(A_People,,PIPE('MyCommandLIneProgram'),OVERWRITE); // sends the A_People to MyCommandLIneProgram as // standard in @@ -1420,10 +1421,10 @@ OUTPUT(B,,'fred2.json',JSON('MyResult', HEADING('[', ']'))); Example: - OUTPUT(CHOOSEN(people(firstname[1]='A'),10)); - // writes the A People to the query builder + OUTPUT(CHOOSEN(people(firstname[1]='A'),10)); + // writes the A People to the workunit OUTPUT(CHOOSEN(people(firstname[1]='A'),10),ALL); - // writes all the A People to the query builder + // writes all the A People to the workunit OUTPUT(CHOOSEN(people(firstname[1]='A'),10),NAMED('fred')); // writes the A People to the fred named output @@ -1471,7 +1472,7 @@ rptErrMsg(102, 'And again'); Example: - OUTPUT(10) // scalar value output + OUTPUT(10) // scalar value output OUTPUT('Fred') // scalar value output @@ -1499,7 +1500,7 @@ OUTPUT('Fred') // scalar value output Example: - OUTPUT(Person(per_st='FL'), THOR) + OUTPUT(Person(per_st='FL'), THOR) // output records to screen, but store the // result on disk instead of in the workunit diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARALLEL.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARALLEL.xml index 39af4dd81dc..ea47b2af895 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARALLEL.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARALLEL.xml @@ -46,7 +46,7 @@ Example: - Act1 := + Act1 := OUTPUT(A_People,OutputFormat1,'//hold01/fred.out'); Act2 := OUTPUT(Person,{Person.per_first_name,Person.per_last_name}); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARSE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARSE.xml index 97a3b26ae5b..08600805456 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARSE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PARSE.xml @@ -422,7 +422,7 @@ Example: - rec := {STRING10000 line}; + rec := {STRING10000 line}; datafile := DATASET([ {'Ge 34:2 And when Shechem the son of Hamor the Hivite, prince of the country, saw her,'+ ' he took her, and lay with her, and defiled her.'}, diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PIPE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PIPE.xml index 0b0fecc4ee5..31640533371 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PIPE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PIPE.xml @@ -26,7 +26,11 @@ ( CSV | XML ) ] [, GROUP GROUP - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) @@ -40,10 +44,10 @@ The name of a program to execute, which must take any input data through stdin and produce its output through stdout. This - program must have already been deployed on the HPCC Systems cluster in the - Thor instance directory (such as: /var/lib/HPCCSystems/mythor/) but that can be - overridden by the externalProgDir environment setting for the Thor - cluster). + program must have already been deployed on the HPCC Systems + cluster in the Thor instance directory (such as: + /var/lib/HPCCSystems/mythor/) but that can be overridden by the + externalProgDir environment setting for the Thor cluster). @@ -96,50 +100,70 @@ Optional. Specifies each result record is generated in a separate GROUP (only if REPEAT is specified). + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -166,7 +190,7 @@ Example: - namesRecord := RECORD + namesRecord := RECORD STRING10 forename; STRING10 surname; STRING2 nl := '\r\n'; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-POWER.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-POWER.xml index 5580fa0e132..f9910e07aa6 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-POWER.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-POWER.xml @@ -45,8 +45,12 @@ Example: - MyCube := POWER(2.0,3.0); // = 8 -MySquare := POWER(3.0,2.0); // = 9 - - See Also: SQRT, EXP, LN + MyCube := POWER(2.0,3.0); // = 8.0 +MySquare := POWER(3.0,2.0); // = 9.0 +OUTPUT(MyCube); +OUTPUT(MySquare); + + + See Also: SQRT, EXP, LN diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PRELOAD.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PRELOAD.xml index 2c2693ab18e..1e77c586368 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PRELOAD.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PRELOAD.xml @@ -45,12 +45,12 @@ The PRELOAD function leaves the file in memory after loading (valid only for Data - Delivery Engine use). This is exactly equivalent to using the PRELOAD option - on the DATASET definition. + Delivery Engine (Roxie) use). This is exactly equivalent to using the + PRELOAD option on the DATASET definition. Example: - MyFile := DATASET('MyFile',{STRING20 F1, STRING20 F2},THOR); + MyFile := DATASET('MyFile',{STRING20 F1, STRING20 F2},THOR); COUNT(PRELOAD(MyFile)) See Also: DATASET diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROCESS.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROCESS.xml index 4d7ba8abc87..b9f855cb605 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROCESS.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROCESS.xml @@ -12,7 +12,11 @@ role="bold"> datasettransform, rowtransform [, LOCAL LOCAL - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) @@ -56,50 +60,70 @@ with all other nodes to acquire data; the operation maintains the distribution of any previous DISTRIBUTE. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -149,9 +173,9 @@ called for the recordset or the current group in the recordset (see the GROUP function). - Example: + Examples: - DSrec := RECORD + DSrec := RECORD STRING4 Letter; STRING4 LeftRecIn := ''; STRING4 RightRecIn := ''; @@ -181,10 +205,16 @@ BBAZ BB AZ CCBA CC BA DDCB DD CB EEDC EE DC */ + -//****************************************************************** -// This examples uses different information for state tracking -// (the point of the PROCESS function) through the input record set. + + + + + /* ***************************************************************** + This example uses different information for state tracking + (the point of the PROCESS function) through the input record set. +******************************************************************** */ w1 := RECORD STRING v{MAXLENGTH(100)}; @@ -217,9 +247,11 @@ B*** A C*** D -*/ - +*/ - See Also: TRANSFORM Structure, RECORD Structure, ROW, ITERATE + See Also: TRANSFORM + Structure, RECORD + Structure, ROW, ITERATE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROJECT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROJECT.xml index e69d7dcf36e..79bb8e29e7e 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROJECT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PROJECT.xml @@ -18,14 +18,22 @@ KEYED ] [, LOCAL LOCAL - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) PROJECT( recordset, record [, PREFETCH PREFETCH [ (lookahead [, PARALLEL]) ] ] [, KEYED ] [, - LOCAL ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + LOCAL ] [, UNORDERED | ORDERED( + bool ) ] [, STABLE | UNSTABLE ] + [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name + ) ] ) @@ -98,50 +106,70 @@ RECORD structure to use for each record in the recordset. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -191,7 +219,7 @@ Example: - //form one example ********************************** + //form one example ********************************** Ages := RECORD STRING15 per_first_name; STRING25 per_last_name; @@ -271,7 +299,10 @@ Rec# Value1 Value2 CatValues */ - See Also: TRANSFORM Structure, RECORD Structure, ROW, DATASET + See Also: TRANSFORM + Structure, RECORD + Structure, ROW, DATASET @@ -365,6 +396,9 @@ myService(myInterface myArgs) := FUNCTION myService(myInterface myArgs) := childService(PROJECT(myArgs, childInterface)); - See Also: MODULE Structure, INTERFACE Structure, FUNCTION Structure, STORED + See Also: MODULE Structure, + INTERFACE Structure, FUNCTION Structure, STORED diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PULL.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PULL.xml index 1bfafb958d8..348819b51b4 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PULL.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-PULL.xml @@ -37,11 +37,11 @@ The PULL function is a meta-operation intended only to hint that the dataset should be fully loaded into the Data Refinery before continuing the operation in Data - Refinery. + Refinery. Example: - MySet := PULL(Person); + MySet := PULL(Person); //load Person into Data Refinery before continuing See Also: diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANDOM.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANDOM.xml index 672bff7da56..3406d0f53d3 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANDOM.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANDOM.xml @@ -31,7 +31,10 @@ Example: - MySet := DISTRIBUTE(Person,RANDOM()); //random distribution + INTEGER1 Random1 := (RANDOM() % 25) + 1; +OUTPUT(Random1); // results are random +OUTPUT(Random1); +OUTPUT(Random1); See Also: DISTRIBUTE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANGE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANGE.xml index 56508a2b5a9..fc3f1abc4f5 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANGE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANGE.xml @@ -8,8 +8,12 @@ RANGE RANGE function - ( setofdatasets, - setofintegers [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ( setofdatasets, setofintegers + [, UNORDERED | ORDERED( bool + ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ + ( numthreads ) ] ] [, + ALGORITHM( name ) ] + ) @@ -29,50 +33,70 @@ A set of integers. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -92,7 +116,7 @@ Example: - r := {STRING1 Letter}; + r := {STRING1 Letter}; ds1 := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'}],r); ds2 := DATASET([{'F'},{'G'},{'H'},{'I'},{'J'}],r); ds3 := DATASET([{'K'},{'L'},{'M'},{'N'},{'O'}],r); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANK.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANK.xml index 3f2e76eb534..84b75e45b3a 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANK.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-RANK.xml @@ -57,12 +57,16 @@ Example: - Ranking := RANK(1,[20,30,10,40]); + Ranking1 := RANK(1,[20,30,10,40]); // returns 2 - 1st element (20) in unsorted set is // 2nd element after sorting to [10,20,30,40] -Ranking := RANK(1,[20,30,10,40],DESCEND); + +Ranking2 := RANK(1,[20,30,10,40],DESCEND); // returns 3 - 1st element (20) in unsorted set is // 3rd element after sorting to [40,30,20,10] + +OUTPUT(Ranking1); +OUTPUT(Ranking2); See Also: RANKED, Example: - Ranking := RANKED(1,[20,30,10,40]); + Ranking1 := RANKED(1,[20,30,10,40]); // returns 3 - 1st element (10) in sorted set [10,20,30,40] // was 3rd element in unsorted set -Ranking := RANKED(1,[20,30,10,40],DESCEND); +Ranking2 := RANKED(1,[20,30,10,40],DESCEND); // returns 4 - 1st element (40) in sorted set [40,30,20,10] -// was 4th element in unsorted set +// was 4th element in unsorted set + +OUTPUT(Ranking1); +OUTPUT(Ranking2); See Also: RANK, SORT, SORTED, Example: - REAL8 Float := 1000.0063; -STRING12 FloatStr12 := REALFORMAT(float,12,6); + REAL8 MyFloat := 1000.0063; +STRING12 FloatStr12 := REALFORMAT(MyFloat,12,6); OUTPUT(FloatStr12); //results in ' 1000.006300' See Also: INTFORMAT diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFIND.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFIND.xml index f42e9b692e4..aaa12e9d202 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFIND.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFIND.xml @@ -81,29 +81,27 @@ Example: - namesRecord := RECORD + namesRecord := RECORD STRING20 surname; STRING10 forename; STRING10 userdate; END; -namesTbl := DATASET([ {'Halligan','Kevin','10/14/1998'}, -{'Halligan','Liz','12/01/1998'}, -{'Halligan','Jason','01/01/2000'}, -{'MacPherson','Jimmy','03/14/2003'} ], -namesRecord); +namesTbl := DATASET([{'Halligan','Kevin','10/14/1998'}, + {'Halligan','Liz','12/01/1998'}, + {'Halligan','Jason','01/01/2000'}, + {'MacPherson','Jimmy','03/14/2003'} ],namesRecord); searchpattern := '^(.*)/(.*)/(.*)$'; search := '10/14/1998'; filtered := namesTbl(REGEXFIND('^(Mc|Mac)', surname)); -OUTPUT(filtered); //1 record -- MacPherson +OUTPUT(filtered); //returns 1 record -- MacPherson, Jimmy OUTPUT(namesTbl,{(string30)REGEXFIND(searchpattern,userdate,0), -(string30)REGEXFIND(searchpattern,userdate,1), -(string30)REGEXFIND(searchpattern,userdate,2), -(string30)REGEXFIND(searchpattern,userdate,3)}); + (string30)REGEXFIND(searchpattern,userdate,1), + (string30)REGEXFIND(searchpattern,userdate,2), + (string30)REGEXFIND(searchpattern,userdate,3)}); -REGEXFIND(searchpattern, search, 0); //returns - '10/14/1998' +REGEXFIND(searchpattern, search, 0); //returns '10/14/1998' REGEXFIND(searchpattern, search, 1); //returns '10' REGEXFIND(searchpattern, search, 2); //returns '14' REGEXFIND(searchpattern, search, 3); //returns '1998' diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFINDSET.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFINDSET.xml index 8bcb1a4dd8b..193b7084759 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFINDSET.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGEXFINDSET.xml @@ -69,7 +69,7 @@ Example: - sampleStr := + sampleStr := 'To: jane@example.com From: john@example.com This is the winter of our discontent.'; eMails:=REGEXFINDSET('\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}' , sampleStr); OUTPUT(eMails); @@ -78,7 +78,6 @@ UNICODE sampleStr2:= U'To: janë@example.com From john@example.com This is the winter of our discontent.'; eMails2:= REGEXFINDSET(U'\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}', sampleStr2); OUTPUT(eMails2); - See Also: PARSE, Example: - REGEXREPLACE('(.a)t', 'the cat sat on the mat', '$1p'); + REGEXREPLACE('(.a)t', 'the cat sat on the mat', '$1p'); //ASCII REGEXREPLACE(u'(.a)t', u'the cat sat on the mat', u'$1p'); //UNICODE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGROUP.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGROUP.xml index 64c59132135..532548b3e70 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGROUP.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REGROUP.xml @@ -111,7 +111,7 @@ Example: - inrec := {UNSIGNED6 did}; + inrec := {UNSIGNED6 did}; outrec := RECORD(inrec) STRING20 name; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REJECTED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REJECTED.xml index 363c8244682..48062b98a9f 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REJECTED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-REJECTED.xml @@ -43,10 +43,11 @@ Example: - Rejects := REJECTED(Person.first_name <> 'Fred', -Person.first_name <> 'Sue'); + Rejects := REJECTED(Person.first_name <> 'Fred',Person.first_name <> 'Sue'); // Rejects receives 0 for everyone except those named Fred or Sue - See Also: WHICH, MAP, CHOOSE, IF, CASE + See Also: WHICH, MAP, CHOOSE, IF, CASE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROLLUP.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROLLUP.xml index dab7de1e6c3..ac7ec8d250a 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROLLUP.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROLLUP.xml @@ -11,16 +11,27 @@ (recordset, condition, transform [, LOCAL LOCAL - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) ROLLUP(recordset, - transform, fieldlist [, LOCAL] - [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + transform, fieldlist [, LOCAL] [, UNORDERED + | ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) ROLLUP(recordset, GROUP GROUP - , transform [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + , transform [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) @@ -78,50 +89,70 @@ the ROLLUP operation will produce a single output record for each group. If this is not the case, an error occurs. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -143,24 +174,23 @@ transform function, ROLLUP can keep the LEFT or RIGHT record, or any mixture of data from both. - - The first form of ROLLUP tests a condition using values from the records that - would be passed as LEFT and RIGHT to the transform. - The records are combined if the condition is true. - The second form of ROLLUP compares values from adjacent records in the input - recordset, and combines them if they are the same. - These two forms will behave differently if the transform - modifies some of the fields used in the matching condition (see example below). - - - For the first pair of candidate records, the LEFT record passed to the transform - is the first record of the pair, and the RIGHT record is the second. - For subsequent matches of the same values, - the LEFT record passed is the result record from the previous call to the + The first form of ROLLUP tests a condition using values from the + records that would be passed as LEFT and RIGHT to the + transform. The records are combined if the condition is + true. The second form of ROLLUP compares values from adjacent records in the + input recordset, and combines them if they are the + same. These two forms will behave differently if the + transform modifies some of the fields used in the + matching condition (see example below). + + For the first pair of candidate records, the LEFT record passed to the + transform is the first record of the pair, and the RIGHT record is the + second. For subsequent matches of the same values, the LEFT record passed is + the result record from the previous call to the transform and the RIGHT record is the next record in the recordset, as in this example: - ds := DATASET([{1,10},{1,20},{1,30},{3,40},{4,50}], + ds := DATASET([{1,10},{1,20},{1,30},{3,40},{4,50}], {UNSIGNED r, UNSIGNED n}); d t(ds L, ds R) := TRANSFORM SELF.r := L.r + R.r; @@ -209,7 +239,7 @@ ROLLUP(ds, LEFT.r = RIGHT.r,t(LEFT, RIGHT)); Example: - //a crosstab table of last names and the number of times they occur + //a crosstab table of last names and the number of times they occur MyRec := RECORD Person.per_last_name; INTEGER4 PersonCount := 1; @@ -241,7 +271,7 @@ XtabOut := ROLLUP(SortedTable, Example: - rec := {STRING1 str1,STRING1 str2,STRING1 str3}; + rec := {STRING1 str1,STRING1 str2,STRING1 str3}; ds := DATASET([{'a', 'b', 'c'},{'a', 'b', 'c'}, {'a', 'c', 'c'},{'a', 'c', 'd'}], rec); rec tr(rec L, rec R) := TRANSFORM @@ -268,6 +298,13 @@ r6 := ROLLUP(ds, tr(LEFT, RIGHT), str1 + str2); r7 := ROLLUP(ds, tr(LEFT, RIGHT), Cat(str1,str2)); //equivalent to Cat(LEFT.str1,LEFT.str2) = // Cat(RIGHT.str1,RIGHT.str2 ) +OUTPUT(r1); +OUTPUT(r2); +OUTPUT(r3); +OUTPUT(r4); +OUTPUT(r5); +OUTPUT(r6); +OUTPUT(r7); @@ -285,7 +322,7 @@ r7 := ROLLUP(ds, tr(LEFT, RIGHT), Cat(str1,str2)); Example: - inrec := RECORD + inrec := RECORD UNSIGNED6 did; END; @@ -354,6 +391,7 @@ finalRec doRollup(outRec l, DATASET(outRec) allRows) := END; results := ROLLUP(combined, GROUP, doRollup(LEFT,ROWS(LEFT))); +OUTPUT(results); See Also: TRANSFORM diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROUND.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROUND.xml index 821859ac4d0..ced66e02712 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROUND.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROUND.xml @@ -49,7 +49,7 @@ Example: - SomeRealValue1 := 3.14159; + SomeRealValue1 := 3.14159; INTEGER4 MyVal1 := ROUND(SomeRealValue1); // MyVal1 is 3 REAL MyVal2 := ROUND(SomeRealValue1,2); // MyVal2 is 3.14 @@ -61,6 +61,11 @@ INTEGER4 MyVal4 := ROUND(SomeRealValue3); // MyVal is -1 SomeRealValue4 := -1.8; INTEGER4 MyVal5 := ROUND(SomeRealValue4); // MyVal is -2 +OUTPUT(MyVal1); +OUTPUT(MyVal2); +OUTPUT(MyVal3); +OUTPUT(MyVal4); +OUTPUT(MyVal5); See Also: ROUNDUP, The ROUNDUP function returns the - rounded integer of the realvalue - realvalue - by rounding any decimal portion to the next larger integer - value, regardless of sign. + rounded integer of the realvalue by rounding any + decimal portion to the next larger integer value, regardless of sign. - Example: + Example: SomeRealValue := 3.14159; -INTEGER4 MyVal := ROUNDUP(SomeRealValue); // MyVal is 4 +INTEGER4 MyVal1 := ROUNDUP(SomeRealValue); // MyVal is 4 -SomeRealValue := -3.9; -INTEGER4 MyVal := ROUNDUP(SomeRealValue); // MyVal is -4 +SomeRealValue2 := -3.9; +INTEGER4 MyVal2 := ROUNDUP(SomeRealValue2); // MyVal is -4 + +OUTPUT(MyVal1); +OUTPUT(MyVal2); - See Also: ROUND, TRUNCATE + See Also: ROUND, TRUNCATE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROW.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROW.xml index 23447786b0d..26e8b26e5db 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROW.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROW.xml @@ -95,7 +95,7 @@ Example: - AkaRec := {STRING20 forename,STRING20 surname}; + AkaRec := {STRING20 forename,STRING20 surname}; outputRec := RECORD UNSIGNED id; DATASET(AkaRec) kids; @@ -113,6 +113,7 @@ outputRec makeChildren(outputRec L, outputRec R) := TRANSFORM SELF.kids := L.kids + ROW({R.kids[1].forename,R.kids[1].surname},AkaRec); END; r := ROLLUP(fatIn, id, makeChildren(LEFT, RIGHT)); +OUTPUT(r); @@ -128,7 +129,7 @@ r := ROLLUP(fatIn, id, makeChildren(LEFT, RIGHT)); Example: - AkaRec := {STRING20 forename,STRING20 surname}; + AkaRec := {STRING20 forename,STRING20 surname}; outputRec := RECORD UNSIGNED id; DATASET(AkaRec) children; @@ -149,6 +150,7 @@ outputRec makeChildren(outputRec L, outputRec R) := TRANSFORM END; r := ROLLUP(fatIn, id, makeChildren(LEFT, RIGHT)); +OUTPUT(r); @@ -163,7 +165,7 @@ r := ROLLUP(fatIn, id, makeChildren(LEFT, RIGHT)); Example: - + IMPORT Std; NameRec := RECORD STRING5 title; STRING20 fname; @@ -261,7 +263,6 @@ myRecord t3(myRecord L) := TRANSFORM END; y3 := PROJECT(x, t3(LEFT)); - OUTPUT(y3); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROWDIFF.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROWDIFF.xml index 2f2c45713b7..6478ce432ce 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROWDIFF.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ROWDIFF.xml @@ -57,7 +57,7 @@ Example: - FullName := RECORD + FullName := RECORD STRING30 forename; STRING20 surname; IFBLOCK(SELF.surname <> 'Windsor') diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SAMPLE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SAMPLE.xml index 44a0595a25c..5c86963da19 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SAMPLE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SAMPLE.xml @@ -9,8 +9,12 @@ SAMPLE function (recordset, interval [, which ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + role="bold">[, which ] + [, UNORDERED | ORDERED( + bool ) ] [, STABLE | UNSTABLE ] + [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name + ) ] ) @@ -40,50 +44,70 @@ sample set to return. This is used to obtain multiple non-overlapping samples from the same recordset. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -100,7 +124,23 @@ Example: - MySample := SAMPLE(Person,10,1) // get every 10th record + personRecord := RECORD + STRING UID; + STRING first_name; + STRING last_name; + STRING address; + STRING city; + STRING state; + STRING zip; +END; +person := DATASET([{'923','James','Jones','123 Elm Street','Hollywood','FL','33022'}, + {'924','Sally','Jones','22 Main Street','Tampa','FL','33604'}, + {'925','Jose','Gomez','111 Biscaya Lane','Miami','FL','33101'}, + {'926','Adam','Wesson','77 Sunset Blvd','Boston','MA','02108'}, + {'927','Evelyn','Murray','740 SW 10th Street','Boston ','MA','02116'}, + {'928','Tom','Murray','740 SW 10th Street','Boston ','MA','02116'}, + {'929','Joe','Yung','7511 Simson Avenue','Chicago','IL','60131'}], personRecord); +MySample1 := SAMPLE(Person,3,1); // returns every 3rd record SomeFile := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'}, {'F'},{'G'},{'H'},{'I'},{'J'}, @@ -108,8 +148,12 @@ SomeFile := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'}, {'P'},{'Q'},{'R'},{'S'},{'T'}, {'U'},{'V'},{'W'},{'X'},{'Y'}], {STRING1 Letter}); -Set1 := SAMPLE(SomeFile,5,1); // returns A, F, K, P, U +MySample2 := SAMPLE(SomeFile,5,1); // returns A, F, K, P, U + +OUTPUT(MySample1); +OUTPUT(MySample2); - See Also: CHOOSEN, ENTH + See Also: CHOOSEN, ENTH diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SET.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SET.xml index 0156f25d816..75b6e834e27 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SET.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SET.xml @@ -119,14 +119,14 @@ One common problem is the use of the SET function in a filter condition, like this: - MyDS := myDataset(myField IN SET(anotherDataset, someField)); + MyDS := myDataset(myField IN SET(anotherDataset, someField)); The code generated for this is inefficient if "anotherDataset" contains a large number of elements, and may also cause a "Dataset too large to output to workunit" error. A better way to recode the expression would be this: - MyDS := JOIN(myDataset, anotherDataset, LEFT.myField = RIGHT.someField, TRANSFORM(LEFT), LOOKUP) ; + MyDS := JOIN(myDataset, anotherDataset, LEFT.myField = RIGHT.someField, TRANSFORM(LEFT), LOOKUP) ; The end result is the same, the set of "myDataset" records where the "myField" value is one of the "someField" values from "anotherDataset," but @@ -134,7 +134,7 @@ You can construct a DATASET from a SET. - ds := DATASET([{'X',1},{'B',3},{'C',2},{'B',5}, + ds := DATASET([{'X',1},{'B',3},{'C',2},{'B',5}, {'C',4},{'D',6},{'E',2}], {STRING1 Ltr, INTEGER1 Val}); s1 := SET(ds,Ltr); //a SET of just the Ltr field values: @@ -142,14 +142,14 @@ DATASET(s1,{STRING1 Ltr}); //a DATASET from the SET Example: - ds := DATASET([{'X',1},{'B',3},{'C',2},{'B',5}, + ds := DATASET([{'X',1},{'B',3},{'C',2},{'B',5}, {'C',4},{'D',6},{'E',2}], {STRING1 Ltr, INTEGER1 Val}); //a SET of just the Ltr field values: s1 := SET(ds,Ltr); COUNT(s1); //results in 7 -s1; //results in ['X','B','C','B','C','D','E'] +OUTPUT(s1); //results in ['X','B','C','B','C','D','E'] //a simple way to get just the unique elements //is to use a crosstab TABLE: @@ -157,16 +157,17 @@ t := TABLE(ds,{Ltr},Ltr); //order indeterminant s2 := SET(t,Ltr); COUNT(s2); //results in 5 -s2; //results in ['D','X','C','E','B'] +OUTPUT(s2); //results in ['D','X','C','E','B'] //sorted unique elements s3 := SET(SORT(t,Ltr),Ltr); COUNT(s3); //results in 5 -s3; //results in ['B','C','D','E','X'] +OUTPUT(s3); //results in ['B','C','D','E','X'] //a SET of expression values: s4 := SET(ds,Ltr+Val); -s4; // results in ['X1','B3','C2','B5','C4','D6','E2'] +OUTPUT(s4); // results in ['X1','B3','C2','B5','C4','D6','E2'] + See Also: Sets and Filters, SET OF, Set diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SIN.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SIN.xml index dcd07236a43..5e9774f1a38 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SIN.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SIN.xml @@ -38,13 +38,11 @@ Example: - Rad2Deg := 57.295779513082; //number of degrees in a radian - + Rad2Deg := 57.295779513082; //number of degrees in a radian Deg2Rad := 0.0174532925199; //number of radians in a degree - Angle45 := 45 * Deg2Rad; //translate 45 degrees into radians - Sine45 := SIN(Angle45); //get sine of the 45 degree angle +OUTPUT(Sine45); See Also: ACOS, Example: - Rad2Deg := 57.295779513082; //number of degrees in a radian - + Rad2Deg := 57.295779513082; //number of degrees in a radian Deg2Rad := 0.0174532925199; //number of radians in a degree - Angle45 := 45 * Deg2Rad; //translate 45 degrees into radians - HyperbolicSine45 := SINH(Angle45); //get hyperbolic sine of the angle +OUTPUT(HyperbolicSine45); See Also: ACOS, Example: - MyRec := RECORD + MyRec := RECORD INTEGER1 F1; INTEGER5 F2; STRING1 F3; @@ -59,41 +59,26 @@ STRING10 F4; QSTRING12 F5; VARSTRING12 F6; END; -MyData := - DATASET([{1,33333333333,'A','A','A',V'A'}],MyRec); -SIZEOF(MyRec); //result is 39 -SIZEOF(MyData.F1); //result is 1 -SIZEOF(MyData.F2); //result is 5 -SIZEOF(MyData.F3); //result is 1 -SIZEOF(MyData.F4); //result is 10 -SIZEOF(MyData.F5); //result is 9 -12 chars stored in 9 - bytes -SIZEOF(MyData.F6); //result is 13 -12 chars plus null - terminator - -Layout_People := RECORD -STRING15 first_name; -STRING15 middle_name; -STRING25 last_name; -STRING2 suffix; -STRING42 street; -STRING20 city; -STRING2 st; -STRING5 zip; -STRING1 sex; -STRING3 age; -STRING8 dob; -BOOLEAN age_flag; -UNSIGNED8 __filepos { VIRTUAL(fileposition)}; -END; -File_People := DATASET('ecl_training::People', Layout_People, - FLAT); -SIZEOF(File_People); //result is 147 -SIZEOF(File_People.street); //result is 42 -SIZEOF('abc' + '123'); //result is 6 -SIZEOF(person.per_cid); //result is 9 - Person.per_cid is - DATA9 +MyData := DATASET([{1,33333333333,'A','A','A',V'A'}],MyRec); +size0 := SIZEOF(MyRec); //result is 39 +size1 := SIZEOF(MyData.F1); //result is 1 +size2 := SIZEOF(MyData.F2); //result is 5 +size3 := SIZEOF(MyData.F3); //result is 1 +size4 := SIZEOF(MyData.F4); //result is 10 +size5 := SIZEOF(MyData.F5); //result is 9 -12 chars stored in 9 bytes +size6 := SIZEOF(MyData.F6); //result is 13 -12 chars plus null terminator +size7 := SIZEOF('abc' + '123'); //result is 6 +OUTPUT(size0); +OUTPUT(size1); +OUTPUT(size2); +OUTPUT(size3); +OUTPUT(size4); +OUTPUT(size5); +OUTPUT(size6); +OUTPUT(size7); + + See Also: LENGTH diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SOAPCALL.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SOAPCALL.xml index bb131408b44..f048d319d72 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SOAPCALL.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SOAPCALL.xml @@ -68,7 +68,8 @@ the target systems in the list. These URLs may contain standard form usernames and passwords, if required. If calling an ESP Web service, you can append the ver_=n.nn parameter to specify the - version of the service. For example: SOAPCALL('http://127.0.0.1:8010/Wsdfu/?ver_=1.22', + version of the service. For example: SOAPCALL('http://127.0.0.1:8010/Wsdfu/?ver_=1.22', 'DFUSearchData', instructure,DATASET(outsructure)); @@ -439,7 +440,7 @@ Example: - OutRec1 := RECORD + OutRec1 := RECORD STRING500 OutData{XPATH('OutData')}; UNSIGNED4 Latency{XPATH('_call_latency')}; END; @@ -522,7 +523,7 @@ OUTPUT(SOAPCALL(ds, ip, svc, inRecord, t(LEFT),DATASET(outRecord), ONFAIL(SKIP), Example: - //1 rec in, no result + //1 rec in, no result SOAPCALL( 'https://127.0.0.1:8022/','MyModule.SomeService', {STRING500 InData := 'Some Input Data'}); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORT.xml index aacfa7acf8e..4a7dc994ab7 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORT.xml @@ -35,7 +35,11 @@ role="bold"> )] | UNSTABLE UNSTABLE [ ( algorithm )] ] [, UNORDERED | ORDERED( bool ) ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + role="bold"> )] ] [, UNORDERED | + ORDERED( bool ) ] [, + PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name + ) ] ) @@ -166,40 +170,56 @@ in any order. Ignored if not supported by the target platform. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -446,7 +466,7 @@ Example: - MySet1 := SORT(Person,-last_name, first_name); + MySet1 := SORT(Person,-last_name, first_name); // descending last name, ascending first name MySet2 := SORT(Person,RECORD,EXCEPT per_sex,per_marital_status); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORTED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORTED.xml index 3d1bdc1ffd7..811d5a49d33 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORTED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SORTED.xml @@ -71,7 +71,7 @@ Example: - InputRec := RECORD + InputRec := RECORD INTEGER4 Attr1; STRING20 Attr2; INTEGER8 Cid; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SQRT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SQRT.xml index 5bb96a27773..268ba13aaba 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SQRT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SQRT.xml @@ -38,7 +38,11 @@ Example: - MyRoot := SQRT(16.0); + MyRoot := SQRT(16.0); +OUTPUT(MyRoot); // result is 4.0 + - See Also: POWER, EXP, LN, LOG + See Also: POWER, EXP, LN, LOG diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STEPPED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STEPPED.xml index 1b3e2baaa28..3ffa8d82d4b 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STEPPED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STEPPED.xml @@ -123,7 +123,7 @@ Example: - DataFile := '~RTTEST::TestStepped'; + DataFile := '~RTTEST::TestStepped'; KeyFile := '~RTTEST::TestSteppedKey'; Rec := RECORD STRING2 state; @@ -131,7 +131,7 @@ STRING20 city; STRING25 lname; STRING15 fname; END; -ds := DATASET(DataFile, +ds := DATASET(DataFile,s {Rec,UNSIGNED8 RecPos {VIRTUAL(fileposition)}}, THOR); IDX := INDEX(ds,{state,city,lname,fname,RecPos},KeyFile); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STORED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STORED.xml index 1c4c5663f7d..b22c0cf95bb 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STORED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-STORED.xml @@ -24,7 +24,7 @@ Example: - Iname := INTERFACE + Iname := INTERFACE EXPORT STRING20 Name; EXPORT BOOLEAN KeepName := TRUE; END; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SUM.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SUM.xml index 0433697ee08..0835515cc02 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SUM.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-SUM.xml @@ -14,8 +14,12 @@ KEYED ]) - SUM( valuelist - [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + SUM( valuelist + [, UNORDERED | ORDERED( bool + ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ + ( numthreads ) ] ] [, + ALGORITHM( name ) ] + ) @@ -64,50 +68,70 @@ A comma-delimited list of expressions to find the sum of. This may also be a SET of values. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -125,11 +149,27 @@ Example: - MySum := SUM(Person,Person.Salary); // total all salaries - -SumVal2 := SUM(4,8,16,2,1); //returns 31 + personRecord := RECORD + STRING UID; + STRING first_name; + STRING last_name; + INTEGER hourly_wage; +END; +person := DATASET([{'923','James','Jones',15}, + {'924','Sally','Jones',15}, + {'925','Jose','Gomez',17}, + {'926','Adam','Wesson',77}, + {'927','Evelyn','Murray',74}, + {'928','Tom','Murray',74}, + {'929','Joe','Yung',75}], personRecord); +SumOfHourlyWage := SUM(person,person.hourly_wage); // total all hourly wage values +OUTPUT(SumOfHourlyWage); + +SumVal1 := SUM(4,8,16,2,1); //returns 31 SetVals := [4,8,16,2,1]; -SumVal3 := SUM(SetVals); //returns 31 +SumVal2 := SUM(SetVals); //returns 31 +OUTPUT(SumVal1); +OUTPUT(SumVal2); See Also: COUNT, Example: - //"vertical slice" form: + //"vertical slice" form: MyFormat := RECORD STRING25 Lname := Person.per_last_name; Person.per_first_name; @@ -283,8 +283,7 @@ Person.per_st; StCnt := COUNT(GROUP); END Mytable := TABLE(Person,rec,per_st,FEW); -// group persons by state in Mytable to produce a - crosstab +// group persons by state in Mytable to produce a crosstab See Also: OUTPUT, Example: - Rad2Deg := 57.295779513082; //number of degrees in a radian - + Rad2Deg := 57.295779513082; //number of degrees in a radian Deg2Rad := 0.0174532925199; //number of radians in a degree - Angle45 := 45 * Deg2Rad; //translate 45 degrees into radians - Tangent45 := TAN(Angle45); //get tangent of the 45 degree angle +OUTPUT(Tangent45); // 0.9999999999961035 See Also: ACOS, Example: - Rad2Deg := 57.295779513082; //number of degrees in a radian - + Rad2Deg := 57.295779513082; //number of degrees in a radian Deg2Rad := 0.0174532925199; //number of radians in a degree - Angle45 := 45 * Deg2Rad; //translate 45 degrees into radians - HyperbolicTangent45 := TANH(Angle45); //get hyperbolic tangent of the angle +OUTPUT(HyperbolicTangent45); // 0.655794202631562 See Also: ACOS, Example: - ds := ALLNODES(JOIN(THISNODE(GetData(SomeData)), + ds := ALLNODES(JOIN(THISNODE(GetData(SomeData)), THISNODE(GetIDX(SomeIndex)), LEFT.ID = RIGHT.ID)); - See Also: ALLNODES, LOCAL, NOLOCAL + See Also: ALLNODES, LOCAL, NOLOCAL diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOJSON.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOJSON.xml index c1118fdcaba..7a014dca0f6 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOJSON.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOJSON.xml @@ -39,7 +39,7 @@ Example: - namesRec1 := RECORD + namesRec1 := RECORD UNSIGNED2 EmployeeID{xpath('EmpID')}; STRING10 Firstname{xpath('FName')}; STRING10 Lastname{xpath('LName')}; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOPN.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOPN.xml index 6c724277e5a..cfdfff668a9 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOPN.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOPN.xml @@ -15,7 +15,11 @@ role="bold"> ) ] [,LOCAL LOCAL - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) @@ -75,50 +79,70 @@ with all other nodes to acquire data; the operation maintains the distribution of any previous DISTRIBUTE. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -141,7 +165,7 @@ Example: - y := TOPN(Person,1000,state,sex); //first 1000 recs in state, sex order + y := TOPN(Person,1000,state,sex); //first 1000 recs in state, sex order z := TOPN(Person,1000,sex,BEST('F')); //first 1000 females See Also: CHOOSEN, Example: - DATA5 x := FROMUNICODE(u'ABCDE','UTF-8'); - //results in 4142434445 -y := TOUNICODE(x,'US-ASCII'); + DATA5 x := FROMUNICODE(u'ABCDE','UTF-8'); +y := TOUNICODE(x,'US-ASCII'); - See Also: FROMUNICODE, UNICODEORDER +OUTPUT(x); //results in 4142434445 +OUTPUT(y); //results in 'ABCDE' + + See Also: FROMUNICODE, UNICODEORDER diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOXML.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOXML.xml index 6345217af93..ffd8290038a 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOXML.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TOXML.xml @@ -42,7 +42,7 @@ Example: - namesRec1 := RECORD + namesRec1 := RECORD UNSIGNED2 EmployeeID{xpath('EmpID')}; STRING10 Firstname{xpath('FName')}; STRING10 Lastname{xpath('LName')}; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRACE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRACE.xml index 77005b6a629..b58da1b0d3e 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRACE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRACE.xml @@ -51,7 +51,7 @@ Tracing is written to log files, in the form: - TRACE: <name><fieldname>value</fieldname>...</name> + TRACE: <name><fieldname>value</fieldname>...</name> Tracing is not output by default even if TRACE statements are present; tracing is only output when the workunit debug value traceEnabled is set or @@ -62,14 +62,14 @@ It is therefore possible to leave TRACE statements in the ECL without any detectable overhead until tracing is enabled. To enable tracing: - #OPTION ('traceEnabled' + #OPTION ('traceEnabled' traceEnabled , 1) // trace statements enabled It is also possible to override the default value for KEEP at a global, per-workunit, or per-query level. - #OPTION ('traceLimit' + #OPTION ('traceLimit' traceLimit , 100) // overrides the default KEEP value (10) @@ -135,7 +135,7 @@ Example: - #OPTION ('traceEnabled', TRUE); //TRACE writes to log only if TRUE + #OPTION ('traceEnabled', TRUE); //TRACE writes to log only if TRUE FilterValue := 4; myRec := { STRING Name, REAL x, REAL y }; ds := DATASET([ {'Jim' , 1, 1.00039}, diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRANSFER.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRANSFER.xml index 010fe81913a..08f0ec3657f 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRANSFER.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRANSFER.xml @@ -45,12 +45,12 @@ Example: - INTEGER1 MyInt := 65; //MyInt is an integer whose value is 65 - -STRING1 MyVal := TRANSFER(MyInt,STRING1); //MyVal is "A" (ASCII 65) - -INTEGER1 MyVal2 := (INTEGER)MyVal; //MyVal2 is 0 (zero) because - "A" is not a numeric character + INTEGER1 MyInt := 65; //MyInt is an integer whose value is 65 +STRING1 MyVal1 := TRANSFER(MyInt,STRING1); //MyVal is "A" (ASCII 65) +INTEGER1 MyVal2 := (INTEGER)MyVal1; //MyVal2 is 0 (zero) because + // "A" is not a numeric character +OUTPUT(MyVal1); // returns A +OUTPUT(MyVal2); // returns 0 (zero) See Also: Type Casting diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRIM.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRIM.xml index b23cc68d584..198b852b35b 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRIM.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-TRIM.xml @@ -66,17 +66,18 @@ Example: - STRING20 SomeStringValue := 'ABC'; - //contains 17 trailing spaces - - VARSTRING MyVal := TRIM(SomeStringValue); - // MyVal is "ABC" with no trailing spaces - - STRING20 SomeStringValue := ' ABC DEF'; - //contains 2 leading and 11 trailing spaces - - VARSTRING MyVal := TRIM(SomeStringValue,LEFT,RIGHT); - // MyVal is "ABC DEF" with no trailing spaces + STRING20 MyString1 := 'ABC'; + //contains 17 trailing spaces +VARSTRING MyTrimmedVarString1 := TRIM(MyString1); + // MyVal is "ABC" with no trailing spaces +STRING20 MyString2 := ' ABC DEF'; + //contains 2 leading and 11 trailing spaces +VARSTRING MyTrimmedVarString2 := TRIM(MyString2,LEFT,RIGHT); + // MyVal is "ABC DEF" with no trailing spaces +OUTPUT(MyString1); +OUTPUT(MyTrimmedVarString1); +OUTPUT(MyString2); +OUTPUT(MyTrimmedVarString2); See Also: STRING, Example: - SomeRealValue := 3.75; -INTEGER4 MyVal := TRUNCATE(SomeRealValue); // MyVal is 3 + MyRealValue := 3.75; +INTEGER4 MyValue := TRUNCATE(MyRealValue); +OUTPUT(MyValue); // MyValue is 3 - See Also: ROUND, ROUNDUP + See Also: ROUND, ROUNDUP diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNGROUP.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNGROUP.xml index efe464c9c32..741f89367f7 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNGROUP.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNGROUP.xml @@ -6,7 +6,12 @@ UNGROUP UNGROUP - ( recordset [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ( recordset [, UNORDERED | ORDERED( bool + ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ + ( numthreads ) ] ] [, + ALGORITHM( name ) ] + ) @@ -20,50 +25,70 @@ The set of previously GROUPed records. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -84,22 +109,33 @@ Example: - MyRec := RECORD - STRING20 Last; - STRING20 First; - END; - - SortedSet := SORT(Person,Person.last_name); //sort by last - name - GroupedSet := GROUP(SortedSet,last_name); //then group - them - - SecondSort := SORT(GroupedSet,Person.first_name); - //sorts by first name within each last name group - // this is a "sort within group" - - UnGroupedSet := UNGROUP(GroupedSet); //ungroup the - dataset + personRecord := RECORD +STRING UID; +STRING first_name; +STRING last_name; +STRING address; +STRING city; +STRING state; +STRING zip; +END; +person := DATASET([{'923','James','Jones','123 Elm Street','Hollywood','FL','33022'}, + {'924','Sally','Jones','22 Main Street','Tampa','FL','33604'}, + {'925','Jose','Gomez','111 Biscaya Lane','Miami','FL','33101'}, + {'926','Adam','Wesson','77 Sunset Blvd','Boston','MA','02108'}, + {'927','Evelyn','Gomez','740 SW 10th Street','Boston ','MA','02116'}, + {'928','Joe','Yung','7511 Simson Avenue','Chicago','IL','60131'}], personRecord); + +SortedSet := SORT(person,last_name); //sort by last name +GroupedSet := GROUP(SortedSet,last_name); //then group them +SecondSort := SORT(GroupedSet,first_name); //sorts by first name within each last name group + // this is a "sort within group" +UnGroupedSet := UNGROUP(GroupedSet); //ungroup the dataset + +OUTPUT(person); +OUTPUT(SortedSet); +OUTPUT(GroupedSet); +OUTPUT(SecondSort); +OUTPUT(UnGroupedSet); See Also: GROUP diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNICODEORDER.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNICODEORDER.xml index 67545b01b7d..b29fadad581 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNICODEORDER.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNICODEORDER.xml @@ -59,14 +59,18 @@ Example: - UNICODE1 x := u'a'; - UNICODE1 y := u'b'; - UNICODE1 z := u'a'; - - a := UNICODEORDER(x , y, 'es'); // returns -1 - b := UNICODEORDER(x , z, 'es'); // returns 0 - c := UNICODEORDER(y , z, 'es'); // returns 1 + UNICODE1 x := u'a'; +UNICODE1 y := u'b'; +UNICODE1 z := u'a'; +a := UNICODEORDER(x , y, 'es'); // returns -1 +b := UNICODEORDER(x , z, 'es'); // returns 0 +c := UNICODEORDER(y , z, 'es'); // returns 1 + +OUTPUT(a); +OUTPUT(b); +OUTPUT(c); - See Also: FROMUNICODE, TOUNICODE + See Also: FROMUNICODE, TOUNICODE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNORDERED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNORDERED.xml index e7716b33ba2..446eea43df7 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNORDERED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-UNORDERED.xml @@ -34,8 +34,8 @@ Example: - Def1 := UNORDERED(MyDataset); -//the order of MyDataset is not significant, -//so the code generator can perform optimizations based on that + Def1 := UNORDERED(MyDataset); + //indicates that the order of MyDataset is not significant, + //so the code generator can perform optimizations based on that diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-VARIANCE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-VARIANCE.xml index 42bc68b8b84..1fef7cc1887 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-VARIANCE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-VARIANCE.xml @@ -10,7 +10,11 @@ role="bold">[ , expresssion] [, KEYED KEYED - ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] ) + ] [, UNORDERED | + ORDERED( bool ) ] [, + STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads + ) ] ] [, ALGORITHM( + name ) ] ) @@ -55,50 +59,70 @@ operation, which allows the optimizer to generate optimal code for the operation. + UNORDERED - Optional. Specifies the output record order is not significant. + Optional. Specifies the output record order is not + significant. + ORDERED - Specifies the significance of the output record order. + Specifies the significance of the output record + order. + bool - When False, specifies the output record order is not significant. When True, specifies the default output record order. + When False, specifies the output record order is not + significant. When True, specifies the default output record + order. + STABLE - Optional. Specifies the input record order is significant. + Optional. Specifies the input record order is + significant. + UNSTABLE - Optional. Specifies the input record order is not significant. + Optional. Specifies the input record order is not + significant. + PARALLEL - Optional. Try to evaluate this activity in parallel. + Optional. Try to evaluate this activity in + parallel. + numthreads - Optional. Try to evaluate this activity using numthreads threads. + Optional. Try to evaluate this activity using + numthreads threads. + ALGORITHM - Optional. Override the algorithm used for this activity. + Optional. Override the algorithm used for this + activity. + name - The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. + The algorithm to use for this activity. Must be from the + list of supported algorithms for the SORT function's STABLE and + UNSTABLE options. @@ -115,10 +139,8 @@ Example: - pointRec := { REAL x, REAL y }; - - analyse( ds) := MACRO - + pointRec := {REAL x, REAL y}; +analyse( ds) := MACRO #uniquename(stats) %stats% := TABLE(ds, { c := COUNT(GROUP), sx := SUM(GROUP, x), @@ -134,38 +156,32 @@ // Following should be zero - OUTPUT(%stats%, { varx - (sxx-sx*sx/c)/c, - vary - (syy-sy*sy/c)/c, - varxy - (sxy-sx*sy/c)/c, - rc - (varxy/SQRT(varx*vary)) }); - - OUTPUT(%stats%, { 'bestFit: y=' + - (STRING)((sy-sx*varxy/varx)/c) + - ' + ' + - (STRING)(varxy/varx)+'x' }); - ENDMACRO; - ds1 := DATASET([{1,1},{2,2},{3,3},{4,4},{5,5},{6,6}], - pointRec); - - ds2 := DATASET([ {1.93896e+009, 2.04482e+009}, - {1.77971e+009, 8.54858e+008}, - {2.96181e+009, 1.24848e+009}, - {2.7744e+009, 1.26357e+009}, - {1.14416e+009, 4.3429e+008}, - {3.38728e+009, 1.30238e+009}, - {3.19538e+009, 1.71177e+009} ], pointRec); - - ds3 := DATASET([ {1, 1.00039}, - {2, 2.07702}, - {3, 2.86158}, - {4, 3.87114}, - {5, 5.12417}, - {6, 6.20283} ], pointRec); + OUTPUT(%stats%, {varx - (sxx-sx*sx/c)/c, vary - (syy-sy*sy/c)/c,varxy + - (sxy-sx*sy/c)/c,rc - (varxy/SQRT(varx*vary)) }); + OUTPUT(%stats%, {'bestFit: y=' + (STRING)((sy-sx*varxy/varx)/c) + + ' + ' + (STRING)(varxy/varx)+'x' }); +ENDMACRO; + +ds1 := DATASET([{1,1},{2,2},{3,3},{4,4},{5,5},{6,6}], pointRec); +ds2 := DATASET([{1.93896e+009, 2.04482e+009}, + {1.77971e+009, 8.54858e+008}, + {2.96181e+009, 1.24848e+009}, + {2.7744e+009, 1.26357e+009}, + {1.14416e+009, 4.3429e+008}, + {3.38728e+009, 1.30238e+009}, + {3.19538e+009, 1.71177e+009} ], pointRec); +ds3 := DATASET([{1, 1.00039}, + {2, 2.07702}, + {3, 2.86158}, + {4, 3.87114}, + {5, 5.12417}, + {6, 6.20283} ], pointRec); - analyse(ds1); - analyse(ds2); - analyse(ds3); +analyse(ds1); +analyse(ds2); +analyse(ds3); - See Also: CORRELATION, COVARIANCE + See Also: CORRELATION, COVARIANCE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WAIT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WAIT.xml index 35951478a0f..383ca7a3086 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WAIT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WAIT.xml @@ -5,44 +5,44 @@ WAIT - WAIT - WAIT - - WAIT Function - (event) - - - - - - - - - - event - - A string constant containing the name of the event to wait - for. - - - - - - The WAIT action is similar to the - WHEN workflow service, but may be used within conditional code. - - Example: - - //You can either do this: - action1; - action2 : WHEN('expectedEvent'); - - //can also be written as: - SEQUENTIAL(action1,WAIT('expectedEvent'),action2); + WAIT + WAIT + + WAIT Function + (event) + + + + + + + + + + event + + A string constant containing the name of the event to + wait for. + + + + + + The WAIT action is similar to the + WHEN workflow service, but may be used within conditional code. + + Example: + + //You can either do this: +action1; +action2 : WHEN('expectedEvent'); +//can also be written as: +SEQUENTIAL(action1,WAIT('expectedEvent'),action2); + - See Also: EVENT, NOTIFY, WHEN, CRON + linkend="NOTIFY">NOTIFY, WHEN, CRON diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHEN.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHEN.xml index 9c910f337cf..e62470378dd 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHEN.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHEN.xml @@ -67,7 +67,7 @@ Example: - //a FUNCTION with side-effect Action + //a FUNCTION with side-effect Action namesTable := FUNCTION namesRecord := RECORD STRING20 surname; diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHICH.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHICH.xml index a67513b7811..d6c7335c953 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHICH.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WHICH.xml @@ -43,10 +43,11 @@ Example: - Accept := WHICH(Person.per_first_name = 'Fred', - Person.per_first_name = 'Sue'); - //Accept is 0 for everyone but those named Fred or Sue + Accept := WHICH(Person.per_first_name = 'Fred',Person.per_first_name = 'Sue'); + //Accept is 0 for everyone but those named Fred or Sue - See Also: REJECTED, MAP, CHOOSE, IF, CASE + See Also: REJECTED, MAP, CHOOSE, IF, CASE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WORKUNIT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WORKUNIT.xml index 932eedd3be2..3ecaf994d91 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WORKUNIT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-WORKUNIT.xml @@ -56,21 +56,20 @@ Example: - wuid := WORKUNIT; //get WUID - + wuid := WORKUNIT; //get WUID namesRecord := RECORD STRING20 surname; STRING10 forename; INTEGER2 age; END; - namesTable := DATASET([{'Halligan','Kevin',31}, {'Halligan','Liz',30}, {'Salter','Abi',10}, {'X','Z',42}], namesRecord); - +OUTPUT(wuid); DISTRIBUTION(namesTable, surname, forename,NAMED('Stats')); -WORKUNIT('Stats',STRING); +WORKUNIT('Stats',STRING); + See Also: #WORKUNIT, OUTPUT, Example: - d := XMLENCODE('<xml version 1><tag>data</tag>'); - e := XMLDECODE(d); + encoded := XMLENCODE('<xml version 1><tag>data</tag>'); +decoded := XMLDECODE(encoded); + +OUTPUT(encoded); //results in '&lt;xml version 1&gt;&lt;tag&gt;data&lt;/tag&gt;' +OUTPUT(decoded); // results in '<xml version 1><tag>data</tag>' + See Also: XMLENCODE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-XMLENCODE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-XMLENCODE.xml index af5ce938d4b..7caf84301d3 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-XMLENCODE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-XMLENCODE.xml @@ -50,8 +50,11 @@ Example: - d := XMLENCODE('<xml version 1><tag>data</tag>'); - e := XMLDECODE(d); + encoded := XMLENCODE('<xml version 1><tag>data</tag>'); +decoded := XMLDECODE(encoded); + +OUTPUT(encoded); //results in '&lt;xml version 1&gt;&lt;tag&gt;data&lt;/tag&gt;' +OUTPUT(decoded); // results in '<xml version 1><tag>data</tag>' See Also: XMLDECODE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-APPEND.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-APPEND.xml index 3a7f2ba872e..77cee3178c5 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-APPEND.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-APPEND.xml @@ -39,10 +39,12 @@ Example: - #DECLARE(MySymbol); //declare a symbol named "MySymbol" - #SET(MySymbol,'Hello'); //initialize MySymbol to "Hello" - #APPEND(MySymbol,' World'); //make MySymbol's value "Hello World" + #DECLARE(MySymbol); //declare a symbol named "MySymbol" +#SET(MySymbol,'Hello'); //initialize MySymbol to "Hello" +#APPEND(MySymbol,' World'); //make MySymbol's value "Hello World" +OUTPUT(%'MySymbol'%); - See Also: #DECLARE, #SET + See Also: #DECLARE, #SET diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-CONSTANT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-CONSTANT.xml index 96dde507336..c4ae3929ee8 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-CONSTANT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-CONSTANT.xml @@ -41,9 +41,10 @@ Example: - PersonCount := 0 : STORED('myname'); - #CONSTANT('myname',100); - //make stored PersonCount attribute value to 100 + PersonCount := 0 : STORED('myCount'); +#CONSTANT('myCount',100); + //set the stored PersonCount attribute value to 100 +OUTPUT(PersonCount); See Also: #STORED diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DECLARE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DECLARE.xml index 7f8ac0e766b..fff3ac4cbf7 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DECLARE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DECLARE.xml @@ -33,9 +33,11 @@ Example: - #DECLARE(MySymbol); //declare a symbol named "MySymbol" - #SET(MySymbol,1); //initialize MySymbol to 1 + #DECLARE(MySymbol); //declare a symbol named "MySymbol" +#SET(MySymbol,11); //initialize MySymbol to 11 +OUTPUT(%'MySymbol'%) - See Also: #SET, #APPEND + See Also: #SET, #APPEND diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DEMANGLE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DEMANGLE.xml index 55cdfca5b1a..ab916f9a19a 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DEMANGLE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-DEMANGLE.xml @@ -32,18 +32,16 @@ Example: - #DECLARE (mstg); - #DECLARE (dmstg); - #SET (mstg, #MANGLE('SECTION_STATES/AREACODES')); - - export res1 := %'mstg'%; - res1; //res1 = 'SECTION_5fSTATES_2fAREACODES' - + #DECLARE (mstg); +#DECLARE (dmstg); +#SET (mstg, #MANGLE('SECTION_STATES/AREACODES')); +EXPORT res1 := %'mstg'%; +OUTPUT(res1); //res1 = 'SECTION_5fSTATES_2fAREACODES' + // Do some processing with ECL Valid Label name "mstg" - - #SET (dmstg, #DEMANGLE(%'mstg'%)); - export res2 := %'dmstg'%; - res2; //res2 = 'SECTION_STATES/AREACODES' +#SET (dmstg, #DEMANGLE(%'mstg'%)); +EXPORT res2 := %'dmstg'%; +OUTPUT(res2); //res2 = 'SECTION_STATES/AREACODES' See Also: #MANGLE, Example: - #IF(TRUE) - #ERROR('broken'); - OUTPUT('broken'); - #ELSE - #WARNING('maybe broken'); - OUTPUT('maybe broken'); - #END; + a := TRUE; // pick one of these +//a := FALSE; +#IF(a) + #ERROR('broken'); + OUTPUT('broken'); +#ELSE + #WARNING('maybe broken'); + OUTPUT('maybe broken'); +#END; See Also: #WARNING diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPAND.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPAND.xml index 8e7fa9b1c92..d0909d7798c 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPAND.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPAND.xml @@ -32,15 +32,15 @@ Example: - MAC_join(attrname, leftDS, rightDS, linkflags) := MACRO - attrname := JOIN(leftDS,rightDS,#EXPAND(linkflags)); - ENDMACRO; + MAC_join(attrname, leftDS, rightDS, linkflags) := MACRO + attrname := JOIN(leftDS,rightDS,#EXPAND(linkflags)); +ENDMACRO; - MAC_join(J1,People,Property,'LEFT.ID=RIGHT.PeopleID,LEFT OUTER') +MAC_join(J1,People,Property,'LEFT.ID=RIGHT.PeopleID,LEFT OUTER') //expands out to: // J1 := JOIN(People,Property,LEFT.ID=RIGHT.PeopleID,LEFT OUTER); - MAC_join(J2,People,Property,'LEFT.ID=RIGHT.PeopleID') +MAC_join(J2,People,Property,'LEFT.ID=RIGHT.PeopleID') //expands out to: // J2 := JOIN(People,Property,LEFT.ID=RIGHT.PeopleID); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPORT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPORT.xml index 82057d5dd46..faabdb5f671 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPORT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-EXPORT.xml @@ -39,7 +39,7 @@ The XML output is generated with the following format: - <Data> + <Data> <Field label="<label-of-field>" name="<name-of-field>" position="<n>" @@ -59,27 +59,27 @@ Example: - NamesRecord := RECORD - STRING10 first; - STRING20 last; - END; - r := RECORD - UNSIGNED4 dg_parentid; - STRING10 dg_firstname; - STRING dg_lastname; - UNSIGNED1 dg_prange; - IFBLOCK(SELF.dg_prange % 2 = 0) - STRING20 extrafield; - END; - NamesRecord namerec; - DATASET(NamesRecord) childNames; + NamesRecord := RECORD + STRING10 first; + STRING20 last; +END; +r := RECORD + UNSIGNED4 dg_parentid; + STRING10 dg_firstname; + STRING dg_lastname; + UNSIGNED1 dg_prange; + IFBLOCK(SELF.dg_prange % 2 = 0) + STRING20 extrafield; END; + NamesRecord namerec; + DATASET(NamesRecord) childNames; +END; - ds := DATASET('~RTTEST::OUT::ds', r, thor); +ds := DATASET('~RTTEST::OUT::ds', r, thor); - #DECLARE(out); - #EXPORT(out, r); - OUTPUT(%'out'%); +#DECLARE(out); +#EXPORT(out, r); +OUTPUT(%'out'%); /* produces this result: <Data> <Field label="DG_ParentID" @@ -156,23 +156,23 @@ */ //which you can then process ;ike this: - LOADXML(%'out'%, 'Fred'); - #FOR (Fred) - #FOR (Field) +LOADXML(%'out'%, 'Fred'); +#FOR (Fred) + #FOR (Field) #IF (%'{@isEnd}'% <> '') - OUTPUT('END'); + OUTPUT('END'); #ELSE - OUTPUT(%'{@type}'% - #IF (%'{@size}'% <> '-15' AND - %'{@isRecord}'%='' AND - %'{@isDataset}'%='') - + %'{@size}'% - #END - + ' ' + %'{@label}'% + ';'); + OUTPUT(%'{@type}'% + #IF (%'{@size}'% <> '-15' AND + %'{@isRecord}'%='' AND + %'{@isDataset}'%='') + + %'{@size}'% + #END + + ' ' + %'{@label}'% + ';'); #END - #END #END - OUTPUT('Done'); +#END +OUTPUT('Done'); See Also: LOADXML, Example: - // This script processes XML and generates ECL COUNT statements + // This script processes XML and generates ECL COUNT statements // which run against the datasets and filters specified in the XML. XMLstuff := '<section>'+ diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-GETDATATYPE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-GETDATATYPE.xml index 5630cb8af09..f61e533840c 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-GETDATATYPE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-GETDATATYPE.xml @@ -33,13 +33,13 @@ Example: - person := DATASET([{D'6789ABCDE6789ABCDE'}],{DATA9 per_cid}); - #DECLARE(fieldtype); - #DECLARE(field); - #SET(field, 'person.per_cid'); - #SET(fieldtype, #GETDATATYPE(%field%)); - res := %'fieldtype'%; - res; // Output: res = 'data9' + person := DATASET([{D'6789ABCDE6789ABCDE'}],{DATA9 per_cid}); +#DECLARE(fieldtype); +#DECLARE(field); +#SET(field, 'person.per_cid'); +#SET(fieldtype, #GETDATATYPE(%field%)); +res := %'fieldtype'%; +OUTPUT(res); // 'data9' See Also: Value Types diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-IF.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-IF.xml index 273e56550ac..8b406768925 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-IF.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-IF.xml @@ -88,29 +88,28 @@ Example: - // This script creates a set attribute definition of the 1st 10 - // natural numbers and defines an attribute named "Set10" - - #DECLARE (SetString); - #DECLARE (Ndx); - #SET (SetString, '['); //initialize SetString to [ - #SET (Ndx, 1); //initialize Ndx to 1 - #LOOP - #IF (%Ndx% > 9) //if we've iterated 9 times - #BREAK // break out of the loop - #ELSE //otherwise - #APPEND (SetString, %'Ndx'% + ','); - //append Ndx and comma to SetString - #SET (Ndx, %Ndx% + 1); - //and increment the value of Ndx - #END + // This script creates a set attribute definition of the 1st 10 +// natural numbers and defines an attribute named "Set10" + +#DECLARE (SetString); +#DECLARE (Ndx); +#SET (SetString, '['); //initialize SetString to [ +#SET (Ndx, 1); //initialize Ndx to 1 +#LOOP + #IF (%Ndx% > 9) //if we've iterated 9 times + #BREAK // break out of the loop + #ELSE //otherwise + #APPEND (SetString, %'Ndx'% + ','); + //append Ndx and comma to SetString + #SET (Ndx, %Ndx% + 1); + //and increment the value of Ndx #END - - #APPEND (SetString, %'Ndx'% + ']'); //add 10th element and closing ] - - EXPORT Set10 := %'SetString'%; //generate the ECL code +#END +#APPEND (SetString, %'Ndx'% + ']'); //add 10th element and closing ] +EXPORT Set10 := %'SetString'%; //generate the ECL code // This generates: // EXPORT Set10 := [1,2,3,4,5,6,7,8,9,10]; +OUTPUT(Set10); // [1,2,3,4,5,6,7,8,9,10] See Also: #LOOP, defaultValue - The default value to use if the definition does not exist. - + The default value to use if the definition does not + exist. @@ -40,7 +40,7 @@ Example: - definitions := MODULE + definitions := MODULE EXPORT val1 := 'hi'; END; root := MODULE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-INMODULE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-INMODULE.xml index b8928b1f97f..31e8d1c0560 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-INMODULE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-INMODULE.xml @@ -39,26 +39,20 @@ Example: - #DECLARE (mod) - #DECLARE (attr) - #DECLARE (stg) + #DECLARE (mod) +#DECLARE (attr) +#DECLARE (stg) - #SET(mod, 'default') - #SET(attr, 'YearOf') +#SET(mod, 'default') +#SET(attr, 'YearOf') - #IF( #INMODULE(%mod%, %attr%) ) - #SET(stg, %'attr'% + ' Exists In Module ' + %'mod'%); - #ELSE - #SET(stg, %'attr'% + ' Does Not Exist In Module ' + %'mod'%); - #END +#IF(#INMODULE(%mod%, %attr%) ) + #SET(stg, %'attr'% + ' Exists In Module ' + %'mod'%); +#ELSE + #SET(stg, %'attr'% + ' Does Not Exist In Module ' + %'mod'%); +#END - export res := %'stg'%; - res; - - // Output: (For 'default.YearOf') - // stg = 'YearOf Exists In Module default' - // - // Output: (For 'default.Fred') - // stg = 'Fred Does Not Exist In Module default' +EXPORT res := %'stg'%; +OUTPUT(res); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-LOOP-BREAK.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-LOOP-BREAK.xml index 569c7d90f53..87300d6af06 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-LOOP-BREAK.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-LOOP-BREAK.xml @@ -59,29 +59,28 @@ Example: - // This script creates a set attribute definition of the 1st 10 - // natural numbers and defines an attribute named "Set10" - - #DECLARE (SetString) - #DECLARE (Ndx) - #SET (SetString, '['); //initialize SetString to [ - #SET (Ndx, 1); //initialize Ndx to 1 - #LOOP - #IF (%Ndx% > 9) //if we've iterated 9 times - #BREAK // break out of the loop - #ELSE //otherwise - #APPEND (SetString, %'Ndx'% + ','); - //append Ndx and comma to SetString - #SET (Ndx, %Ndx% + 1) - //and increment the value of Ndx - #END + // This script creates a set attribute definition of the 1st 10 +// natural numbers and defines an attribute named "Set10" + +#DECLARE (SetString) +#DECLARE (Ndx) +#SET (SetString, '['); //initialize SetString to [ +#SET (Ndx, 1); //initialize Ndx to 1 +#LOOP + #IF (%Ndx% > 9) //if we've iterated 9 times + #BREAK // break out of the loop + #ELSE //otherwise + #APPEND (SetString, %'Ndx'% + ','); + //append Ndx and comma to SetString + #SET (Ndx, %Ndx% + 1) + //and increment the value of Ndx #END - - #APPEND (SetString, %'Ndx'% + ']'); //add 10th element and closing ] - - EXPORT Set10 := %'SetString'%; //generate the ECL code - // This generates: - // EXPORT Set10 := [1,2,3,4,5,6,7,8,9,10]; +#END +#APPEND (SetString, %'Ndx'% + ']'); //add 10th element and closing ] +EXPORT Set10 := %'SetString'%; //generate the ECL code + // This generates: + // EXPORT Set10 := [1,2,3,4,5,6,7,8,9,10]; +OUTPUT(Set10); // [1,2,3,4,5,6,7,8,9,10] See Also: #FOR, Example: - #DECLARE (mstg) - #DECLARE (dmstg) - - #SET (mstg, #MANGLE('SECTION_STATES/AREACODES')); - export res1 := %'mstg'%; - res1; //res1 = 'SECTION_5fSTATES_2fAREACODES' - + #DECLARE (mstg); +#DECLARE (dmstg); +#SET (mstg, #MANGLE('SECTION_STATES/AREACODES')); +EXPORT res1 := %'mstg'%; +OUTPUT(res1); //res1 = 'SECTION_5fSTATES_2fAREACODES' + // Do some processing with ECL Valid Label name "mstg" - - #SET (dmstg, #DEMANGLE(%'mstg'%)); - export res2 := %'dmstg'%; - res2; //res2 = 'SECTION_STATES/AREACODES' +#SET (dmstg, #DEMANGLE(%'mstg'%)); +EXPORT res2 := %'dmstg'%; +OUTPUT(res2); //res2 = 'SECTION_STATES/AREACODES' + + + See Also: #DEMANGLE, Attribute Names diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-ONWARNING.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-ONWARNING.xml index 2827704e26d..ff8dfcae9a7 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-ONWARNING.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-ONWARNING.xml @@ -43,10 +43,10 @@ Example: - #ONWARNING(1041, error); + #ONWARNING(1041, error); //globally promote "Record doesn't have an explicit // maximum record size" warnings to errors - rec := { STRING x } : ONWARNING(1041, ignore); +rec := { STRING x } : ONWARNING(1041, ignore); //ignore "Record doesn't have an explicit maximum // record size" warning on this attribute, only diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-OPTION.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-OPTION.xml index 9e64d244ca9..1ad8b55791f 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-OPTION.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-OPTION.xml @@ -1564,59 +1564,57 @@ - Example: + Examples: - #OPTION('traceRowXml', TRUE); - #OPTION('_Probe', TRUE); - - my_rec := RECORD - STRING20 lname; - STRING20 fname; - STRING2 age; - END; + #OPTION('traceRowXml', TRUE); +#OPTION('_Probe', TRUE); + +my_rec := RECORD + STRING20 lname; + STRING20 fname; + STRING2 age; +END; - d := DATASET([{ 'PORTLY', 'STUART' , '39'}, +d := DATASET([{ 'PORTLY', 'STUART' , '39'}, { 'PORTLY', 'STACIE' , '36'}, { 'PORTLY', 'DARA' , ' 1'}, { 'PORTLY', 'GARRETT', ' 4'}], my_rec); - OUTPUT(d(d.age > ' 1'), {lname, fname, age} ); - - //************************************ - //This example demonstrates Logical Graphs and - // Javadoc-style comment blocks - #OPTION('generateLogicalGraphOnly',TRUE); - #OPTION('logicalGraphDisplayJavadocParameters',TRUE); - - /** - * Defines a record that contains information about a person - */ - namesRecord := - RECORD +OUTPUT(d(d.age > ' 1'), {lname, fname, age} ); + + + + + //************************************ +//This example demonstrates Logical Graphs and +// Javadoc-style comment blocks +#OPTION('generateLogicalGraphOnly',TRUE); +#OPTION('logicalGraphDisplayJavadocParameters',TRUE); +/** + * Defines a record that contains information about a person +*/ +namesRecord := RECORD string20 surname; string10 forename; integer2 age := 25; - END; - - /** - Defines a table that can be used to read the information from the file - and then do something with it. - */ - namesTable := DATASET('x',namesRecord,FLAT); - - - /** - Allows the name table to be filtered. +END; - @param ages The ages that are allowed to be processed. - badForename Forname to avoid. +/** +Defines a table that can be used to read the information from the file +and then do something with it. +*/ +namesTable := DATASET('x',namesRecord,FLAT); - @return the filtered dataset. - */ - namesTable filtered(SET OF INTEGER2 ages, STRING badForename) := - namesTable(age in ages, forename != badForename); - OUTPUT(filtered([10,20,33], '')); - +/** + Allows the name table to be filtered. + @param ages The ages that are allowed to be processed. + @param badForename Forname to avoid. + @return the filtered dataset. +*/ +namesTable filtered(SET OF INTEGER2 ages, STRING badForename) := + namesTable(age in ages, forename != badForename); +OUTPUT(filtered([10,20,33], '')); + diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-SET.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-SET.xml index 175309fb8fd..1a9530608e1 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-SET.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-SET.xml @@ -38,8 +38,10 @@ Example: - #DECLARE(MySymbol); //declare a symbol named "MySymbol" - #SET(MySymbol,1); //initialize MySymbol to 1 + #DECLARE(MySymbol); //declare a symbol named "MySymbol" +#SET(MySymbol,11); //initialize MySymbol to 11 +OUTPUT(%'MySymbol'%) - See Also: #DECLARE, #APPEND + See Also: #DECLARE, #APPEND diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-STORED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-STORED.xml index ca6f806eb83..a552f8bb762 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-STORED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-STORED.xml @@ -41,9 +41,10 @@ Example: - PersonCount := COUNT(person) : STORED('myname'); - #STORED('myname',100); + PersonCount := 0 : STORED('myCount'); +#STORED('myCount',100); //change stored PersonCount attribute value to 100 +OUTPUT(PersonCount); See Also: STORED, Example: - extractFields(ds, outDs, f1, f2='?') := MACRO + extractFields(ds, outDs, f1, f2='?') := MACRO #UNIQUENAME(r); %r% := RECORD f1 := ds.f1; - #IF (#TEXT(f2)<>'?') - #TEXT(f2)+':'; - f2 := ds.f2; - #END - END; - + #IF (#TEXT(f2)<>'?') + #TEXT(f2)+':'; + f2 := ds.f2; + #END + END; outDs := TABLE(ds, %r%); - ENDMACRO; - - extractFields(people, justSurname, lastname); - OUTPUT(justSurname); - - extractFields(people, justName, lastname, firstname); - OUTPUT(justName); +ENDMACRO; + +extractFields(people, justSurname, lastname); +OUTPUT(justSurname); +extractFields(people, justName, lastname, firstname); +OUTPUT(justName); See Also: MACRO diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-UNIQUENAME.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-UNIQUENAME.xml index b475deecedc..8a2a4551b78 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-UNIQUENAME.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-UNIQUENAME.xml @@ -52,18 +52,16 @@ Example: - IMPORT Training_Compare; - EXPORT MAC_Compare_Result(module_name, attribute_name) := MACRO - + IMPORT Training_Compare; +EXPORT MAC_Compare_Result(module_name, attribute_name) := MACRO #UNIQUENAME(compare_file); %compare_file% := Training_Compare.File_Compare_Master; - #UNIQUENAME(layout_per_attr); #UNIQUENAME(compare_attr, _MyField_$_); //the compare_attr fieldname is generated like: _MyField_1_ %layout_per_attr% := RECORD - person.per_cid; - %compare_attr% := module_name.attribute_name; + person.per_cid; + %compare_attr% := module_name.attribute_name; END; #UNIQUENAME(person_attr_out); @@ -74,16 +72,16 @@ #UNIQUENAME(layout_match_out); %layout_match_out% := RECORD - data9 per_cid; - boolean ValuesMatchFlag; - TYPEOF(module_name.attribute_name) MyValue; - TYPEOF(%compare_file%.attribute_name) CompareValue; + data9 per_cid; + boolean ValuesMatchFlag; + TYPEOF(module_name.attribute_name) MyValue; + TYPEOF(%compare_file%.attribute_name) CompareValue; END; #UNIQUENAME(layout_compare); %layout_compare% := RECORD - %compare_file%.per_cid; - %compare_file%.attribute_name; + %compare_file%.per_cid; + %compare_file%.attribute_name; END; #UNIQUENAME(compare_table); @@ -93,18 +91,17 @@ #UNIQUENAME(compare_attr_to_field); %layout_match_out% %compare_attr_to_field%(%person_attr_out% L, %compare_table% R) := TRANSFORM - SELF.ValuesMatchFlag := (L.%compare_attr% = R.attribute_name); - SELF.MyValue := L.%compare_attr%; - SELF.CompareValue := R.attribute_name; - SELF := L; + SELF.ValuesMatchFlag := (L.%compare_attr% = R.attribute_name); + SELF.MyValue := L.%compare_attr%; + SELF.CompareValue := R.attribute_name; + SELF := L; END; #UNIQUENAME(compare_out); %compare_out% := JOIN(%person_attr_out_dist%, - %compare_table_dist%, - LEFT.per_cid = RIGHT.per_cid, - %compare_attr_to_field%(LEFT, RIGHT), - LOCAL); + %compare_table_dist%, + LEFT.per_cid = RIGHT.per_cid, + %compare_attr_to_field%(LEFT, RIGHT),LOCAL); #UNIQUENAME(match_out); #UNIQUENAME(nomatch_out); @@ -115,8 +112,7 @@ OUTPUT(CHOOSEN(%match_out%, 50)); COUNT(%nomatch_out%); OUTPUT(CHOOSEN(%nomatch_out%, 50)); - - ENDMACRO; +ENDMACRO; See Also: MACRO diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WARNING.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WARNING.xml index 8dfc3c4542a..f510e444270 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WARNING.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WARNING.xml @@ -33,13 +33,15 @@ Example: - #IF(TRUE) - #ERROR('broken'); - OUTPUT('broken'); - #ELSE - #WARNING('maybe broken'); - OUTPUT('maybe broken'); - #END; + a := TRUE; // pick one of these +//a := FALSE; +#IF(a) + #ERROR('broken'); + OUTPUT('broken'); +#ELSE + #WARNING('maybe broken'); + OUTPUT('maybe broken'); +#END; See Also: #ERROR diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WEBSERVICE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WEBSERVICE.xml index b30dea6b89f..6c79b7e444a 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WEBSERVICE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WEBSERVICE.xml @@ -73,7 +73,7 @@ Example: - #WEBSERVICE(FIELDS('Field1','AddThem','Field2'), + #WEBSERVICE(FIELDS('Field1','AddThem','Field2'), HELP('Enter Integer Values'), DESCRIPTION('If AddThem is TRUE, this adds the two integers')); Field1 := 1 : Stored('Field1'); diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WORKUNIT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WORKUNIT.xml index 88ba522ac4c..b122f2b6560 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WORKUNIT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/Templ-WORKUNIT.xml @@ -83,7 +83,7 @@ The value parameter is a string constant containing the scope value to use to override the workunit's default scope (the user ID of the submitting person). This is a Workunit Security - feature and requires a system which is LDAP-enabled. + feature and requires a system which is LDAP-enabled. @@ -91,7 +91,7 @@ Example: - #WORKUNIT('cluster','400way'); //run the job on the 400-way target cluster + #WORKUNIT('cluster','400way'); //run the job on the 400-way target cluster #WORKUNIT('protect',true); //disallow deletion or archiving by Sasha #WORKUNIT('name','My Job'); //name it "My Job" #WORKUNIT('priority','high'); //run before other lower-priority jobs diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-CheckPoint.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-CheckPoint.xml index b50d64f8ac8..e65ef52bec0 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-CheckPoint.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-CheckPoint.xml @@ -55,7 +55,7 @@ Example: - CountPeople := COUNT(Person) : CHECKPOINT('PeopleCount'); + CountPeople := COUNT(Person) : CHECKPOINT('PeopleCount'); //Makes CountPeople available for reuse if // the job does not complete diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-DEPRECATED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-DEPRECATED.xml index 4193e330427..c8cb6a6e1fd 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-DEPRECATED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-DEPRECATED.xml @@ -52,36 +52,27 @@ Example: - OldSort := SORT(Person,Person.per_first_name) : DEPRECATED('Use NewSort instead.'); - NewSort := SORT(Person,-Person.per_first_name); + personRecord := RECORD +STRING UID; +STRING first_name; +STRING last_name; +STRING address; +STRING city; +STRING state; +STRING zip; +END; +person := DATASET([{'923','James','Jones','123 Elm Street','Hollywood','FL','33022'}, +{'924','Sally','Jones','22 Main Street','Tampa','FL','33604'}, +{'925','Jose','Gomez','111 Biscaya Lane','Miami','FL','33101'}, +{'926','Adam','Wesson','77 Sunset Blvd','Boston','MA','02108'}, +{'927','Evelyn','Murray','740 SW 10th Street','Boston ','MA','02116'}, +{'928','Joe','Yung','7511 Simson Avenue','Chicago','IL','60131'}], personRecord); + +OldSort := SORT(person,first_name) : DEPRECATED('Use NewSort instead.'); +NewSort := SORT(person,-first_name); - OUTPUT(OldSort); +OUTPUT(OldSort); //produces this warning: - // Attribute OldSort is marked as deprecated. Use NewSort instead. - - //********************************************** - ds := DATASET(['A','B','C'],{STRING1 letter}); - - R1 := RECORD - STRING1 letter; - END : DEPRECATED('Use R2 now.'); - - R2 := RECORD - STRING1 letter; - INTEGER number; - END; - - R1 Xform1(ds L) := TRANSFORM - SELF.letter := Std.Str.ToLowerCase(L.letter); - END : DEPRECATED('Use Xform2 now.'); - - R2 Xform2(ds L, integer C) := TRANSFORM - SELF.letter := Std.Str.ToLowerCase(L.letter); - SELF.number := C; - END; - - OUTPUT(PROJECT(ds,Xform1(LEFT))); //produces these warnings: - // Attribute r1 is marked as deprecated. Use R2 now. - // Attribute Xform1 is marked as deprecated. Use Xform2 now. + // Definition OldSort is marked as deprecated. Use NewSort instead. diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-FAILURE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-FAILURE.xml index 295eae135c9..3d4b0ebb335 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-FAILURE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-FAILURE.xml @@ -50,12 +50,12 @@ Example: - sPeople := SORT(Person,Person.per_first_name); - nUniques := COUNT(DEDUP(sPeople,Person.per_first_name AND - Person.address)) - : FAILURE(Email.simpleSend(SystemsPersonel, - SystemsPersonel.email,'ouch.htm')); + sPeople := SORT(Person,Person.per_first_name); +nUniques := COUNT(DEDUP(sPeople,Person.per_first_name AND + Person.address)): FAILURE(Email.simpleSend(SystemsPersonel, + SystemsPersonel.email,'ouch.htm')); - See Also: SUCCESS, RECOVERY + See Also: SUCCESS, RECOVERY diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-GLOBAL.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-GLOBAL.xml index c049fb9c02d..1686910dae4 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-GLOBAL.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-GLOBAL.xml @@ -70,7 +70,7 @@ Example: - I := RANDOM() : INDEPENDENT; //calculated once, period + I := RANDOM() : INDEPENDENT; //calculated once, period G := RANDOM() : GLOBAL; //calculated once in each graph ds := @@ -83,8 +83,8 @@ RECORDOF(ds) XF(ds L) := TRANSFORM SELF := L; END; -P1 := PROJECT(ds,XF(left)) : PERSIST('~RTTEST::PERSIST::IndependentVsGlobal1'); -P2 := PROJECT(ds,XF(left)) : PERSIST('~RTTEST::PERSIST::IndependentVsGlobal2'); +P1 := PROJECT(ds,XF(left)) : PERSIST('~TEMP::PERSIST::IndependentVsGlobal1'); +P2 := PROJECT(ds,XF(left)) : PERSIST('~TEMP::PERSIST::IndependentVsGlobal2'); OUTPUT(P1); OUTPUT(P2); //this gets the same Ival values as P1, but the Gval value is different than P1 diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-INDEPENDENT.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-INDEPENDENT.xml index 2d024093bc4..81766013906 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-INDEPENDENT.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-INDEPENDENT.xml @@ -53,34 +53,30 @@ it should be executed the first time it is used). It will not share any code with any other workflow items. - One use would be to provide a mechanism for commoning up code that is + One use would be to provide a mechanism to common up code that is shared between different arguments to a SEQUENTIAL action--normally they are evaluated completely independently. Example: - IMPORT STD; - File1 := 'names1.txt'; - File2 := 'names2.txt'; - - SrcIP := '10.239.219.2'; - SrcPath := '/var/lib/HPCCSystems/mydropzone/'; - DestPath := '~THOR::IN::'; - ESPportIP := 'http://192.168.56.120:8010/FileSpray'; - - DeleteOldFiles := - PARALLEL(STD.File.DeleteLogicalFile(DestPath+File1), - STD.File.DeleteLogicalFile(DestPath+File2)) - : INDEPENDENT; - SprayNewFiles := - PARALLEL(STD.File.SprayFixed(SrcIP,SrcPath+File1,11, - 'mythor',DestPath+File1, - -1,ESPportIP), - STD.File.SprayFixed(SrcIP,SrcPath+File2,11, - 'mythor',DestPath+File2, - -1,ESPportIP)) - : INDEPENDENT; - SEQUENTIAL(DeleteOldFiles,SprayNewFiles); + I := RANDOM() : INDEPENDENT; //calculated once, period +G := RANDOM() : GLOBAL; //calculated once in each graph + +ds := + DATASET([{1,0,0,0},{2,0,0,0}],{UNSIGNED1 rec,UNSIGNED Ival, UNSIGNED Gval , UNSIGNED Aval }); + +RECORDOF(ds) XF(ds L) := TRANSFORM + SELF.Ival := I; + SELF.Gval := G; + SELF.Aval := RANDOM(); //calculated each time used + SELF := L; +END; + +P1 := PROJECT(ds,XF(left)) : PERSIST('~TEMP::PERSIST::IndependentVsGlobal1'); +P2 := PROJECT(ds,XF(left)) : PERSIST('~TEMP::PERSIST::IndependentVsGlobal2'); + +OUTPUT(P1); +OUTPUT(P2); //this gets the same Ival values as P1, but the Gval value is different than P1 See Also: GLOBAL diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONCE.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONCE.xml index d04b8e96f47..b5139e4f2fe 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONCE.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONCE.xml @@ -42,14 +42,13 @@ Example: - InlineDCT := DICTIONARY([{0 => 'Black' , 'Greys'}, + InlineDCT := DICTIONARY([{0 => 'Black' , 'Greys'}, {1 => 'Brown' , 'Earth'}, {2 => 'Red' , 'Reds'}, {3 => 'White' , 'Greys'} ], {UNSIGNED code => STRING10 color ,STRING10 Tone}) : ONCE; UNSIGNED v := 0 : STORED('v'); - OUTPUT(InlineDCT[v].color); See Also: INDEPENDENT diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONWARNING.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONWARNING.xml index 33b027d42f8..3f89ef08663 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONWARNING.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-ONWARNING.xml @@ -58,7 +58,7 @@ Example: - rec := { STRING x } : ONWARNING(1041, ignore); + rec := { STRING x } : ONWARNING(1041, ignore); //ignore "Record doesn't have an explicit maximum record size" warning diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PERSIST.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PERSIST.xml index 3e364c3f6d5..cbc1dd33cfc 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PERSIST.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PERSIST.xml @@ -181,31 +181,26 @@ Persisted attributes can still be subject to the ordering requirements of SEQUENTIAL. However, since PERSISTs are shared between workunits, there is no guarantee that the attribute will be evaluated within any given - evaluation order. + evaluation order. You can use #OPTION to override the default settings, as shown in the example. Example: - // #OPTION ('multiplePersistInstances', true|false); // if true retains MULTIPLE, if false SINGLE + // #OPTION ('multiplePersistInstances', true|false); // if true retains MULTIPLE, if false SINGLE // #OPTION ('defaultNumPersistInstances', <n>); // the number to retain if MULTIPLE allowed. // Defaults to -1 (retain all) - CountPeople := COUNT(Person) : PERSIST('PeopleCount'); +CountPeople := COUNT(Person) : PERSIST('PeopleCount'); //Makes CountPeople available for use in all subsequent work units - sPeople := SORT(Person,Person.per_first_name) : - PERSIST('SortPerson'),WHEN(Daily); +sPeople := SORT(Person,first_name): PERSIST('SortPerson'),WHEN(Daily); //Makes sPeople available for use in all subsequent work units - s1 := SORT(Person,Person.per_first_name) : - PERSIST('SortPerson1','OtherThor'); +s1 := SORT(Person,first_name): PERSIST('SortPerson1','OtherThor'); //run the code on the OtherThor cluster - s2 := SORT(Person,Person.per_first_name) : - PERSIST('SortPerson2', - 'OtherThor', - CLUSTER('AnotherThor')); +s2 := SORT(Person,first_name): PERSIST('SortPerson2','OtherThor',CLUSTER('AnotherThor')); //run the code on the OtherThor cluster // and write the file to the AnotherThor cluster diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PRIORITY.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PRIORITY.xml index f9c48a95b01..3ef47eb01c9 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PRIORITY.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-PRIORITY.xml @@ -46,11 +46,26 @@ Example: - OUTPUT(Person(per_st='NY')) : PRIORITY(30); -OUTPUT(Person(per_st='CA')) : PRIORITY(60); -OUTPUT(Person(per_st='FL')) : PRIORITY(90); - //The Florida + personRecord := RECORD + STRING UID; + STRING first_name; + STRING last_name; + STRING address; + STRING city; + STRING state; + STRING zip; +END; +person := DATASET([{'923','James','Jones','123 Elm Street','Hollywood','FL','33022'}, + {'924','Sally','Jones','22 Main Street','Tampa','FL','33604'}, + {'925','Jose','Gomez','111 Biscaya Lane','Miami','FL','33101'}, + {'926','Adam','Wesson','77 Sunset Blvd','Boston','MA','02108'}, + {'927','Evelyn','Murray','740 SW 10th Street','Boston ','MA','02116'}, + {'928','Joe','Yung','7511 Simson Avenue','Chicago','IL','60131'}], personRecord); +OUTPUT(Person(state='MA')) : PRIORITY(30); +OUTPUT(Person(state='IL')) : PRIORITY(60); +OUTPUT(Person(state='FL')) : PRIORITY(90); - See Also: OUTPUT, #OPTION + See Also: OUTPUT, #OPTION diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-RECOVERY.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-RECOVERY.xml index 45d3e781133..ee25da6cfb5 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-RECOVERY.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-RECOVERY.xml @@ -61,16 +61,13 @@ Example: - DoSomethingToFixIt := TRUE; //some action to repair the input - - SPeople := SORT(Person,Person.per_first_name); - - nUniques := DEDUP(sPeople,Person.per_first_name AND Person.address) - :RECOVERY(DoSomethingToFixIt,2), - FAILURE(Email.simpleSend(SystemsPersonel, - SystemsPersonel.email, - 'ouch.htm')); + DoSomethingToFixIt := TRUE; //some action to repair the input +SPeople := SORT(Person,first_name); +nUniques := DEDUP(sPeople,first_name) + : RECOVERY(DoSomethingToFixIt,2), + FAILURE(Email.simpleSend(SystemsPersonel,SystemsPersonel.email,'ouch.htm')); - See Also: SUCCESS, FAILURE + See Also: SUCCESS, FAILURE diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-STORED.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-STORED.xml index f16e5b8ec1b..95510e4cf4c 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-STORED.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-STORED.xml @@ -168,38 +168,36 @@ Example: - COUNT(person) : STORED('myname'); - // Name in work unit is myname, + COUNT(person) : STORED('myCount'); + // Name in workunit is myCount, // stored value accessible only outside ECL - fred := COUNT(person) : STORED('fred'); - // Name in work unit is fred - fred := COUNT(person) : STORED('mindy'); - // Name in work unit is mindy +fred := COUNT(person) : STORED('fred'); + // Name in workunit is fred +fred := COUNT(person) : STORED('mindy'); + // Name in workunit is mindy //FORMAT options for WsECL form - - Password :='' := STORED('Password',FORMAT(SEQUENCE(1),PASSWORD)); +Password :='' := STORED('Password',FORMAT(SEQUENCE(1),PASSWORD)); //password entry box on form - Field1 := 1 : STORED('Field1',FORMAT(SEQUENCE(10))); - Field2 := 2 : STORED('Field2',FORMAT(SEQUENCE(20))); - AddThem := TRUE :STORED ('AddThem',FORMAT(SEQUENCE(15))); +Field1 := 1 : STORED('Field1',FORMAT(SEQUENCE(10))); +Field2 := 2 : STORED('Field2',FORMAT(SEQUENCE(20))); +AddThem := TRUE :STORED ('AddThem',FORMAT(SEQUENCE(15))); // places field in between Field1 and Field2 - HiddenValue := 12 :STORED ('HiddenValue',FORMAT(NOINPUT)); // not on form - TextField1 :='Fill in description' :Stored('Description', +HiddenValue := 12 :STORED ('HiddenValue',FORMAT(NOINPUT)); // not on form +TextField1 :='Fill in description' :Stored('Description', FORMAT(FIELDWIDTH(25),FIELDHEIGHT(2), SEQUENCE(5))); //Creates 25 char wide, 2 row high input box - //SELECT options - UNSIGNED8 u8 := 0 : STORED('u8', FORMAT(fieldwidth(8), - SEQUENCE(18), - SELECT('one=1,two=2,three=3,*four=4'))); - STRING ch1 := 'ban' : STORED('ch1', FORMAT(SELECT('apple=app,pear,*banana=ban'))); +UNSIGNED8 u8 := 0 : STORED('u8', FORMAT(fieldwidth(8), + SEQUENCE(18), + SELECT('one=1,two=2,three=3,*four=4'))); +STRING ch1 := 'ban' : STORED('ch1', FORMAT(SELECT('apple=app,pear,*banana=ban'))); //banana is default - STRING ch2 := '' : STORED('ch2', FORMAT(SELECT(',apple=app,pear,banana=ban'))); +STRING ch2 := '' : STORED('ch2', FORMAT(SELECT(',apple=app,pear,banana=ban'))); //starts empty, no specified default - STRING ch3 := '' : STORED('ch3', FORMAT(SELECT('apple=app,pear,*,banana=ban'))); +STRING ch3 := '' : STORED('ch3', FORMAT(SELECT('apple=app,pear,*,banana=ban'))); //empty in middle, empty is default diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-SUCCESS.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-SUCCESS.xml index 4baf6fdb1e5..2114bf74bb5 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-SUCCESS.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-SUCCESS.xml @@ -50,12 +50,12 @@ Example: - SPeople := SORT(Person,Person.first_name); - nUniques := COUNT(DEDUP(sPeople,Person.per_first_name AND - Person.address)) + SPeople := SORT(Person,Person.first_name); +nUniques := COUNT(DEDUP(sPeople,Person.per_first_name AND Person.address)) : SUCCESS(Email.simpleSend(SystemsPersonel, SystemsPersonel.email,'yeah.htm')); - See Also: FAILURE, RECOVERY + See Also: FAILURE, RECOVERY diff --git a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-WHEN.xml b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-WHEN.xml index 36eba1909e2..db264f5e606 100644 --- a/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-WHEN.xml +++ b/docs/EN_US/ECLLanguageReference/ECLR_mods/WkFlo-WHEN.xml @@ -63,33 +63,33 @@ Example: - IMPORT STD; + IMPORT STD; IF (STD.File.FileExists('test::myfile'), STD.File.DeleteLogicalFile('test::myfile')); //deletes the file if it already exists - STD.File.MonitorLogicalFileName('MyFileEvent','test::myfile'); +STD.File.MonitorLogicalFileName('MyFileEvent','test::myfile'); //sets up monitoring and the event name //to fire when the file is found - OUTPUT('File Created') : WHEN(EVENT('MyFileEvent','*')); +OUTPUT('File Created') : WHEN(EVENT('MyFileEvent','*')); //this OUTPUT occurs only after the event has fired //may also be coded in this shorthand form: // OUTPUT('File Created') : WHEN('MyFileEvent'); - afile := DATASET([{ 'A', '0'}], {STRING10 key,STRING10 val}); - OUTPUT(afile,,'test::myfile'); +afile := DATASET([{ 'A', '0'}], {STRING10 key,STRING10 val}); +OUTPUT(afile,,'test::myfile'); //this creates a file that the DFU file monitor will find //when it periodically polls //********************************** - EXPORT events := MODULE +EXPORT events := MODULE EXPORT dailyAtMidnight := CRON('0 0 * * *'); EXPORT dailyAt( INTEGER hour, INTEGER minute=0) := EVENT('CRON', (STRING)minute + ' ' + (STRING)hour + ' * * *'); EXPORT dailyAtMidday := dailyAt(12, 0); - END; - BUILD(teenagers) : WHEN(events.dailyAtMidnight); - BUILD(oldies) : WHEN(events.dailyAt(6)); - BUILD(oldies) : WHEN(EVENT('FileDropped', 'x')); +END; +BUILD(teenagers) : WHEN(events.dailyAtMidnight); +BUILD(oldies) : WHEN(events.dailyAt(6)); +BUILD(oldies) : WHEN(EVENT('FileDropped', 'x')); See Also: EVENT, Date: Fri, 8 Sep 2023 13:19:47 +0100 Subject: [PATCH 10/20] HPCC-30247 Fix centos8 std::tuple build issue Signed-off-by: Jake Smith --- ecl/agentexec/agentexec.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ecl/agentexec/agentexec.cpp b/ecl/agentexec/agentexec.cpp index b6b8abb3246..dd6b1298428 100644 --- a/ecl/agentexec/agentexec.cpp +++ b/ecl/agentexec/agentexec.cpp @@ -223,7 +223,7 @@ int CEclAgentExecutionServer::run() //--------------------------------------------------------------------------------- -typedef std::tuple, unsigned, const char *, const char *> ThreadCtx; +typedef std::tuple ThreadCtx; // NB: WaitThread only used by if pool created (see CEclAgentExecutionServer ctor) class WaitThread : public CInterfaceOf @@ -237,7 +237,9 @@ class WaitThread : public CInterfaceOf virtual void init(void *param) override { auto &context = *static_cast(param); - std::tie(item, wfid, wuid, graphName) = context; + IJobQueueItem *tmpItem; + std::tie(tmpItem, wfid, wuid, graphName) = context; + item.set(tmpItem); } virtual bool stop() override { From fdae91ccfd76a3786af37bd59782255137231ac5 Mon Sep 17 00:00:00 2001 From: Anthony Fishbeck Date: Fri, 8 Sep 2023 11:37:57 -0400 Subject: [PATCH 11/20] HPCC-30232 Add Roxie support for case-insensitive HTTP headers Signed-off-by: Anthony Fishbeck --- common/thorhelper/roxiehelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/thorhelper/roxiehelper.cpp b/common/thorhelper/roxiehelper.cpp index 2872c94bc2b..2590a908a57 100644 --- a/common/thorhelper/roxiehelper.cpp +++ b/common/thorhelper/roxiehelper.cpp @@ -2858,7 +2858,7 @@ void loadHttpHeaders(IProperties *p, const char *finger) void HttpHelper::parseRequestHeaders(const char *headers) { if (!reqHeaders) - reqHeaders.setown(createProperties()); + reqHeaders.setown(createProperties(true)); loadHttpHeaders(reqHeaders, headers); const char *val = queryRequestHeader("Content-Type"); if (val) From b322268ec666f2ccabdfec9ad7a321b0858c1502 Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:06:17 -0400 Subject: [PATCH 12/20] HPCC-30224 ECL Watch v9 fix Format dropdown in import dialogs Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- .../components/forms/landing-zone/DelimitedImportForm.tsx | 8 +++----- .../components/forms/landing-zone/JsonImportForm.tsx | 8 +++----- .../components/forms/landing-zone/VariableImportForm.tsx | 8 +++----- .../components/forms/landing-zone/XmlImportForm.tsx | 8 +++----- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/esp/src/src-react/components/forms/landing-zone/DelimitedImportForm.tsx b/esp/src/src-react/components/forms/landing-zone/DelimitedImportForm.tsx index d9428553c5b..6642c9aa843 100644 --- a/esp/src/src-react/components/forms/landing-zone/DelimitedImportForm.tsx +++ b/esp/src/src-react/components/forms/landing-zone/DelimitedImportForm.tsx @@ -255,7 +255,7 @@ export const DelimitedImportForm: React.FunctionComponent { - onChange(option.key); - }} + selectedKey={value} + onChange={(evt, option) => onChange(option.key)} errorMessage={error && error?.message} />} rules={{ diff --git a/esp/src/src-react/components/forms/landing-zone/JsonImportForm.tsx b/esp/src/src-react/components/forms/landing-zone/JsonImportForm.tsx index ac52da461a2..b17288a1d97 100644 --- a/esp/src/src-react/components/forms/landing-zone/JsonImportForm.tsx +++ b/esp/src/src-react/components/forms/landing-zone/JsonImportForm.tsx @@ -257,7 +257,7 @@ export const JsonImportForm: React.FunctionComponent = ({ field: { onChange, name: fieldName, value }, fieldState: { error } }) => = ({ { key: "8", text: "UTF-32LE" }, { key: "9", text: "UTF-32BE" } ]} - defaultSelectedKey="1" - onChange={(evt, option) => { - onChange(option.key); - }} + selectedKey={value} + onChange={(evt, option) => onChange(option.key)} errorMessage={error && error?.message} />} rules={{ diff --git a/esp/src/src-react/components/forms/landing-zone/VariableImportForm.tsx b/esp/src/src-react/components/forms/landing-zone/VariableImportForm.tsx index 862c9349312..31dfca1fa5d 100644 --- a/esp/src/src-react/components/forms/landing-zone/VariableImportForm.tsx +++ b/esp/src/src-react/components/forms/landing-zone/VariableImportForm.tsx @@ -236,7 +236,7 @@ export const VariableImportForm: React.FunctionComponent { - onChange(option.key); - }} + selectedKey={value} + onChange={(evt, option) => onChange(option.key)} errorMessage={error && error?.message} />} rules={{ diff --git a/esp/src/src-react/components/forms/landing-zone/XmlImportForm.tsx b/esp/src/src-react/components/forms/landing-zone/XmlImportForm.tsx index e587758a835..c8629698fdd 100644 --- a/esp/src/src-react/components/forms/landing-zone/XmlImportForm.tsx +++ b/esp/src/src-react/components/forms/landing-zone/XmlImportForm.tsx @@ -255,7 +255,7 @@ export const XmlImportForm: React.FunctionComponent = ({ field: { onChange, name: fieldName, value }, fieldState: { error } }) => = ({ { key: "8", text: "UTF-32LE" }, { key: "9", text: "UTF-32BE" } ]} - defaultSelectedKey="1" - onChange={(evt, option) => { - onChange(option.key); - }} + selectedKey={value} + onChange={(evt, option) => onChange(option.key)} errorMessage={error && error?.message} />} rules={{ From b79e64be96fe2e2402a8860bf7aac97dd8733761 Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:01:44 -0400 Subject: [PATCH 13/20] HPCC-30264 ECL Watch v9 fix Filter failure on Landing Zone Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/LandingZone.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/esp/src/src-react/components/LandingZone.tsx b/esp/src/src-react/components/LandingZone.tsx index 37c7aca6da3..62d1ed83a06 100644 --- a/esp/src/src-react/components/LandingZone.tsx +++ b/esp/src/src-react/components/LandingZone.tsx @@ -33,12 +33,9 @@ function formatQuery(targetDropzones, filter): QueryRequest { return { id: "*", filter: (filter?.DropZoneName && dropzones.length && machines.length) ? { - filter: { - DropZoneName: filter.DropZoneName, - Server: filter.Server, - NameFilter: filter.NameFilter, - ECLWatchVisibleOnly: true - }, + DropZoneName: filter.DropZoneName, + Server: filter.Server, + NameFilter: filter.NameFilter, ECLWatchVisibleOnly: true, __dropZone: { ...targetDropzones.filter(row => row.Name === filter?.DropZoneName)[0], @@ -104,9 +101,14 @@ export const LandingZone: React.FunctionComponent = ({ // Grid --- const store = useConst(FileSpray.CreateLandingZonesStore({})); + + const query = React.useMemo(() => { + return formatQuery(targetDropzones, filter); + }, [filter, targetDropzones]); + const { Grid, selection, refreshTable, copyButtons } = useGrid({ store, - query: formatQuery(targetDropzones, filter), + query, sort: { attribute: "modifiedtime", descending: true }, filename: "landingZones", getSelected: function () { From 53ec2b8821f5268d65f600257584d9cea7e04d14 Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:08:08 -0400 Subject: [PATCH 14/20] HPCC-30263 ECL Watch v9 Landing Zone unsortable This was an oversight, the "tree" grid on the Landing Zone is not sortable, as is the case in previous versions of the UI. Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/LandingZone.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp/src/src-react/components/LandingZone.tsx b/esp/src/src-react/components/LandingZone.tsx index 37c7aca6da3..8c9c0e7695b 100644 --- a/esp/src/src-react/components/LandingZone.tsx +++ b/esp/src/src-react/components/LandingZone.tsx @@ -162,13 +162,13 @@ export const LandingZone: React.FunctionComponent = ({ } }), filesize: { - label: nlsHPCC.Size, width: 100, + label: nlsHPCC.Size, width: 100, sortable: false, renderCell: React.useCallback(function (object, value, node, options) { domClass.add(node, "justify-right"); node.innerText = Utility.convertedSize(value); }, []), }, - modifiedtime: { label: nlsHPCC.Date, width: 162 } + modifiedtime: { label: nlsHPCC.Date, width: 162, sortable: false } } }); From 7dcee2fdcd5cc10c02617e45b992d105710472a8 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Fri, 8 Sep 2023 15:34:37 +0100 Subject: [PATCH 15/20] HPCC-30248 auto update Dali plane groups Signed-off-by: Jake Smith --- dali/base/dasds.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dali/base/dasds.cpp b/dali/base/dasds.cpp index 56722d7c0f4..3ad59c4fa26 100644 --- a/dali/base/dasds.cpp +++ b/dali/base/dasds.cpp @@ -5735,6 +5735,24 @@ IStoreHelper *createStoreHelper(const char *storeName, const char *location, con /////////////// +static CConfigUpdateHook configUpdateHook; +static void initializeStorageGroups(IPropertyTree *oldEnvironment) // oldEnvironment always null in containerized +{ + bool forceGroupUpdate = getComponentConfigSP()->getPropBool("DFS/@forceGroupUpdate"); + initClusterAndStoragePlaneGroups(forceGroupUpdate, oldEnvironment); + if (isContainerized()) + { + auto updateFunc = [](const IPropertyTree *oldComponentConfiguration, const IPropertyTree *oldGlobalConfiguration) + { + bool forceGroupUpdate = getComponentConfigSP()->getPropBool("DFS/@forceGroupUpdate"); + initClusterAndStoragePlaneGroups(forceGroupUpdate, nullptr); + }; + configUpdateHook.installOnce(updateFunc, false); + } +} + +/////////////// + #ifdef _MSC_VER #pragma warning (push) #pragma warning (disable : 4355) // 'this' : used in base member initializer list @@ -6397,8 +6415,7 @@ void CCovenSDSManager::loadStore(const char *storeName, const bool *abort) Owned conn = connect("/", 0, RTM_INTERNAL, INFINITE); initializeInternals(conn->queryRoot()); conn.clear(); - bool forceGroupUpdate = config.getPropBool("DFS/@forceGroupUpdate"); - initClusterAndStoragePlaneGroups(forceGroupUpdate, oldEnvironment); + initializeStorageGroups(oldEnvironment); } void CCovenSDSManager::saveStore(const char *storeName, bool currentEdition) From 826b8322f78e96124768c9ebdde5925e4c379e20 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 7 Sep 2023 15:09:35 +0100 Subject: [PATCH 16/20] HPCC-30230 Sorting grid resets columns widths Remove additional flickering Signed-off-by: Gordon Smith --- .../src-react/components/DESDLDefinitions.tsx | 30 ++- esp/src/src-react/components/DFUWorkunits.tsx | 7 +- .../src-react/components/EventScheduler.tsx | 4 +- esp/src/src-react/components/FileBlooms.tsx | 30 ++- .../src-react/components/FileDetailsGraph.tsx | 34 ++- esp/src/src-react/components/FileHistory.tsx | 30 ++- esp/src/src-react/components/FileParts.tsx | 38 +-- esp/src/src-react/components/Files.tsx | 7 +- esp/src/src-react/components/GroupMembers.tsx | 4 +- esp/src/src-react/components/Groups.tsx | 4 +- esp/src/src-react/components/Helpers.tsx | 40 +-- esp/src/src-react/components/InfoGrid.tsx | 49 ++-- esp/src/src-react/components/LogViewer.tsx | 37 +-- esp/src/src-react/components/Logs.tsx | 4 +- esp/src/src-react/components/Monitoring.tsx | 57 +++-- .../src-react/components/PackageMapParts.tsx | 37 +-- esp/src/src-react/components/PackageMaps.tsx | 42 ++-- esp/src/src-react/components/Pods.tsx | 29 ++- esp/src/src-react/components/ProtectedBy.tsx | 31 ++- esp/src/src-react/components/Queries.tsx | 4 +- esp/src/src-react/components/QueryErrors.tsx | 30 ++- esp/src/src-react/components/QueryGraphs.tsx | 34 ++- .../components/QueryLibrariesUsed.tsx | 30 ++- .../components/QueryLogicalFiles.tsx | 36 ++- .../components/QuerySummaryStats.tsx | 30 ++- .../src-react/components/QuerySuperFiles.tsx | 36 ++- esp/src/src-react/components/Resources.tsx | 36 ++- esp/src/src-react/components/Results.tsx | 46 ++-- esp/src/src-react/components/Scopes.tsx | 49 ++-- esp/src/src-react/components/Search.tsx | 38 +-- esp/src/src-react/components/Services.tsx | 31 ++- esp/src/src-react/components/SourceFiles.tsx | 42 ++-- esp/src/src-react/components/SubFiles.tsx | 61 ++--- esp/src/src-react/components/SuperFiles.tsx | 36 ++- esp/src/src-react/components/UserGroups.tsx | 37 ++- esp/src/src-react/components/Users.tsx | 4 +- esp/src/src-react/components/Variables.tsx | 32 ++- esp/src/src-react/components/Workflows.tsx | 40 +-- esp/src/src-react/components/Workunits.tsx | 13 +- .../src-react/components/XrefDirectories.tsx | 48 ++-- esp/src/src-react/components/XrefErrors.tsx | 50 ++-- .../src-react/components/XrefFoundFiles.tsx | 35 ++- .../src-react/components/XrefLostFiles.tsx | 33 ++- .../src-react/components/XrefOrphanFiles.tsx | 32 ++- esp/src/src-react/components/Xrefs.tsx | 37 ++- .../src-react/components/controls/Grid.tsx | 146 ++++++++++- esp/src/src-react/hooks/grid.tsx | 233 +----------------- 47 files changed, 1010 insertions(+), 783 deletions(-) diff --git a/esp/src/src-react/components/DESDLDefinitions.tsx b/esp/src/src-react/components/DESDLDefinitions.tsx index a12424326c8..f9e6414869a 100644 --- a/esp/src/src-react/components/DESDLDefinitions.tsx +++ b/esp/src/src-react/components/DESDLDefinitions.tsx @@ -4,9 +4,9 @@ import { scopedLogger } from "@hpcc-js/util"; import nlsHPCC from "src/nlsHPCC"; import * as WsESDLConfig from "src/WsESDLConfig"; import { useConfirm } from "../hooks/confirm"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; import { ReflexContainer, ReflexElement, ReflexSplitter } from "../layouts/react-reflex"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; import { selector } from "./DojoGrid"; import { XMLSourceEditor } from "./SourceEditor"; @@ -28,22 +28,22 @@ export const DESDLDefinitions: React.FunctionComponent = ( const [showAddBinding, setShowAddBinding] = React.useState(false); const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort: { attribute: "Name", descending: false }, - filename: "esdlDefinitions", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: selector({ width: 30, selectorType: "radio", unhidable: true }), Name: { label: nlsHPCC.Process, width: 140 }, PublishBy: { label: nlsHPCC.PublishedBy, width: 140 }, CreatedTime: { label: nlsHPCC.CreatedTime, width: 140 }, LastEditBy: { label: nlsHPCC.LastEditedBy, width: 140 }, LastEditTime: { label: nlsHPCC.LastEditTime, width: 140 } - } - }); + }; + }, []); // Selection --- React.useEffect(() => { @@ -125,6 +125,8 @@ export const DESDLDefinitions: React.FunctionComponent = ( }, ], [refreshData, setShowDeleteConfirm, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "esdlDefinitions"); + React.useEffect(() => { refreshData(); }, [refreshData]); @@ -135,7 +137,15 @@ export const DESDLDefinitions: React.FunctionComponent = ( main={ - + diff --git a/esp/src/src-react/components/DFUWorkunits.tsx b/esp/src/src-react/components/DFUWorkunits.tsx index ce4a7097d28..94401b8541b 100644 --- a/esp/src/src-react/components/DFUWorkunits.tsx +++ b/esp/src/src-react/components/DFUWorkunits.tsx @@ -10,7 +10,7 @@ import { useConfirm } from "../hooks/confirm"; import { useMyAccount } from "../hooks/user"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushParams } from "../util/history"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { Filter } from "./forms/Filter"; import { Fields } from "./forms/Fields"; import { ShortVerticalDivider } from "./Common"; @@ -90,7 +90,7 @@ export const DFUWorkunits: React.FunctionComponent = ({ return formatQuery(filter); }, [filter]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { col1: selector({ width: 27, @@ -135,9 +135,6 @@ export const DFUWorkunits: React.FunctionComponent = ({ StateMessage: { label: nlsHPCC.State, width: 70 }, PCTDone: { label: nlsHPCC.PctComplete, width: 80, sortable: true, - formatter: (value, row) => { - return Utility.valueCleanUp(row.PercentDone); - } }, TimeStarted: { label: nlsHPCC.TimeStarted, width: 100, sortable: true }, TimeStopped: { label: nlsHPCC.TimeStopped, width: 100, sortable: true }, diff --git a/esp/src/src-react/components/EventScheduler.tsx b/esp/src/src-react/components/EventScheduler.tsx index 9195c4bf68e..4321b9b6301 100644 --- a/esp/src/src-react/components/EventScheduler.tsx +++ b/esp/src/src-react/components/EventScheduler.tsx @@ -7,7 +7,7 @@ import nlsHPCC from "src/nlsHPCC"; import * as WsWorkunits from "src/WsWorkunits"; import { useConfirm } from "../hooks/confirm"; import { HolyGrail } from "../layouts/HolyGrail"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { pushParams } from "../util/history"; import { Fields } from "./forms/Fields"; import { Filter } from "./forms/Filter"; @@ -70,7 +70,7 @@ export const EventScheduler: React.FunctionComponent = ({ return store ? store : CreateEventScheduleStore({}); }, [store]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { col1: { width: 16, diff --git a/esp/src/src-react/components/FileBlooms.tsx b/esp/src/src-react/components/FileBlooms.tsx index 5708a8cce56..f72bcaf37f4 100644 --- a/esp/src/src-react/components/FileBlooms.tsx +++ b/esp/src/src-react/components/FileBlooms.tsx @@ -2,9 +2,9 @@ import * as React from "react"; import { CommandBar, ICommandBarItemProps } from "@fluentui/react"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { useFile } from "../hooks/file"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; interface FileBloomsProps { cluster?: string; @@ -22,19 +22,19 @@ export const FileBlooms: React.FunctionComponent = ({ const [file, , , refreshData] = useFile(cluster, logicalFile); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "FieldNames", - sort, - filename: "fileBlooms", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { FieldNames: { label: nlsHPCC.FieldNames, sortable: true, width: 320 }, Limit: { label: nlsHPCC.Limit, sortable: true, width: 180 }, Probability: { label: nlsHPCC.Probability, sortable: true, width: 180 }, - } - }); + }; + }, []); React.useEffect(() => { const fileBlooms = file?.Blooms?.DFUFileBloom; @@ -56,10 +56,20 @@ export const FileBlooms: React.FunctionComponent = ({ }, ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "fileBlooms"); + return } main={ - + } />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/FileDetailsGraph.tsx b/esp/src/src-react/components/FileDetailsGraph.tsx index 4bce6680412..e568fd9a1dd 100644 --- a/esp/src/src-react/components/FileDetailsGraph.tsx +++ b/esp/src/src-react/components/FileDetailsGraph.tsx @@ -3,9 +3,9 @@ import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, Image, Link } import * as Utility from "src/Utility"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { useFile } from "../hooks/file"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; function getStateImageName(row) { @@ -40,30 +40,30 @@ export const FileDetailsGraph: React.FunctionComponent = const [file, , , refreshData] = useFile(cluster, logicalFile); const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - sort, - primaryID: "Name", - filename: "graphs", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: { width: 27, selectorType: "checkbox" }, Name: { label: nlsHPCC.Name, sortable: true, - formatter: React.useCallback(function (Name, row) { + formatter: (Name, row) => { return <>   {Name} ; - }, []) + } } - } - }); + }; + }, []); // Command Bar --- const buttons = React.useMemo((): ICommandBarItemProps[] => [ @@ -106,10 +106,20 @@ export const FileDetailsGraph: React.FunctionComponent = })); }, [file?.Graphs?.ECLGraph, file?.Wuid]); + const copyButtons = useCopyButtons(columns, selection, "graphs"); + return } main={ - + } />; }; diff --git a/esp/src/src-react/components/FileHistory.tsx b/esp/src/src-react/components/FileHistory.tsx index b8c7e0d5e1f..6bce7f58c78 100644 --- a/esp/src/src-react/components/FileHistory.tsx +++ b/esp/src/src-react/components/FileHistory.tsx @@ -4,8 +4,8 @@ import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; import { useConfirm } from "../hooks/confirm"; import { useFileHistory } from "../hooks/file"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; interface FileHistoryProps { @@ -25,13 +25,13 @@ export const FileHistory: React.FunctionComponent = ({ // Grid --- const [history, eraseHistory, refreshData] = useFileHistory(cluster, logicalFile); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort, - filename: "filehistory", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Name: { label: nlsHPCC.Name, sortable: false }, IP: { label: nlsHPCC.IP, sortable: false }, Operation: { label: nlsHPCC.Operation, sortable: false }, @@ -39,8 +39,8 @@ export const FileHistory: React.FunctionComponent = ({ Path: { label: nlsHPCC.Path, sortable: false }, Timestamp: { label: nlsHPCC.TimeStamp, sortable: false }, Workunit: { label: nlsHPCC.Workunit, sortable: false } - } - }); + }; + }, []); const [DeleteConfirm, setShowDeleteConfirm] = useConfirm({ title: nlsHPCC.EraseHistory, @@ -65,11 +65,21 @@ export const FileHistory: React.FunctionComponent = ({ }, ], [history?.length, refreshData, setShowDeleteConfirm]); + const copyButtons = useCopyButtons(columns, selection, "filehistory"); + return } main={ <> - + } diff --git a/esp/src/src-react/components/FileParts.tsx b/esp/src/src-react/components/FileParts.tsx index 21928adc6d1..6cde024778f 100644 --- a/esp/src/src-react/components/FileParts.tsx +++ b/esp/src/src-react/components/FileParts.tsx @@ -3,9 +3,9 @@ import { ICommandBarItemProps, CommandBar } from "@fluentui/react"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; import * as Utility from "src/Utility"; -import { useFluentGrid } from "../hooks/grid"; import { useFile } from "../hooks/file"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; interface FilePartsProps { cluster?: string; @@ -23,32 +23,32 @@ export const FileParts: React.FunctionComponent = ({ const [file, , , refreshData] = useFile(cluster, logicalFile); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "Id", - sort, - filename: "fileParts", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Id: { label: nlsHPCC.Part, sortable: true, width: 80 }, Copy: { label: nlsHPCC.Copy, sortable: true, width: 80 }, Ip: { label: nlsHPCC.IP, sortable: true, width: 80 }, Cluster: { label: nlsHPCC.Cluster, sortable: true, width: 280 }, PartsizeInt64: { label: nlsHPCC.Size, sortable: true, width: 120, - formatter: React.useCallback(function (value, row) { + formatter: (value, row) => { return Utility.safeFormatNum(value); - }, []), + } }, CompressedSize: { label: nlsHPCC.CompressedSize, sortable: true, width: 120, - formatter: React.useCallback(function (value, row) { + formatter: (value, row) => { return Utility.safeFormatNum(value); - }, []) + } }, - } - }); + }; + }, []); React.useEffect(() => { const fileParts = file?.fileParts() ?? []; @@ -72,10 +72,20 @@ export const FileParts: React.FunctionComponent = ({ } ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "fileParts"); + return } main={ - + } />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/Files.tsx b/esp/src/src-react/components/Files.tsx index 81315898f1d..907327039a6 100644 --- a/esp/src/src-react/components/Files.tsx +++ b/esp/src/src-react/components/Files.tsx @@ -11,7 +11,7 @@ import { useConfirm } from "../hooks/confirm"; import { useMyAccount } from "../hooks/user"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushParams } from "../util/history"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { AddToSuperfile } from "./forms/AddToSuperfile"; import { CopyFile } from "./forms/CopyFile"; import { DesprayFile } from "./forms/DesprayFile"; @@ -125,7 +125,7 @@ export const Files: React.FunctionComponent = ({ return formatQuery(filter); }, [filter]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { col1: { width: 16, @@ -191,9 +191,6 @@ export const Files: React.FunctionComponent = ({ }, Parts: { label: nlsHPCC.Parts, width: 40, - formatter: (value, row) => { - return Utility.valueCleanUp(value); - }, }, MinSkew: { label: nlsHPCC.MinSkew, width: 60, formatter: (value, row) => value ? `${Utility.formatDecimal(value / 100)}%` : "" diff --git a/esp/src/src-react/components/GroupMembers.tsx b/esp/src/src-react/components/GroupMembers.tsx index 731d679b561..5830ceb9dfe 100644 --- a/esp/src/src-react/components/GroupMembers.tsx +++ b/esp/src/src-react/components/GroupMembers.tsx @@ -9,7 +9,7 @@ import { useConfirm } from "../hooks/confirm"; import { useBuildInfo } from "../hooks/platform"; import { pushUrl } from "../util/history"; import { HolyGrail } from "../layouts/HolyGrail"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { GroupAddUserForm } from "./forms/GroupAddUser"; import { QuerySortItem } from "src/store/Store"; @@ -55,7 +55,7 @@ export const GroupMembers: React.FunctionComponent = ({ return store ? store : CreateGroupMemberStore(); }, [store]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { username: { label: nlsHPCC.UserName, diff --git a/esp/src/src-react/components/Groups.tsx b/esp/src/src-react/components/Groups.tsx index 9168fca6bf6..3bca83f8067 100644 --- a/esp/src/src-react/components/Groups.tsx +++ b/esp/src/src-react/components/Groups.tsx @@ -8,7 +8,7 @@ import { GroupStore, CreateGroupStore } from "src/ws_access"; import { ShortVerticalDivider } from "./Common"; import { useConfirm } from "../hooks/confirm"; import { useBuildInfo } from "../hooks/platform"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { AddGroupForm } from "./forms/AddGroup"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushUrl } from "../util/history"; @@ -51,7 +51,7 @@ export const Groups: React.FunctionComponent = ({ return store ? store : CreateGroupStore(); }, [store]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { check: { width: 27, label: " ", selectorType: "checkbox" }, name: { diff --git a/esp/src/src-react/components/Helpers.tsx b/esp/src/src-react/components/Helpers.tsx index 1e686d13819..7e391bc9223 100644 --- a/esp/src/src-react/components/Helpers.tsx +++ b/esp/src/src-react/components/Helpers.tsx @@ -1,11 +1,9 @@ import * as React from "react"; import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, Link, ScrollablePane, Sticky } from "@fluentui/react"; -import * as domClass from "dojo/dom-class"; import * as ESPRequest from "src/ESPRequest"; -import * as Utility from "src/Utility"; import nlsHPCC from "src/nlsHPCC"; -import { useFluentGrid } from "../hooks/grid"; import { HelperRow, useWorkunitHelpers } from "../hooks/workunit"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; function canShowContent(type: string) { @@ -118,13 +116,14 @@ export const Helpers: React.FunctionComponent = ({ const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [helpers, refreshData] = useWorkunitHelpers(wuid); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "id", - filename: "helpers", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { sel: { width: 27, selectorType: "checkbox" @@ -132,14 +131,14 @@ export const Helpers: React.FunctionComponent = ({ Type: { label: nlsHPCC.Type, width: 160, - formatter: React.useCallback(function (Type, row) { + formatter: (Type, row) => { const target = getTarget(row.id, row); if (target) { const linkText = Type.replace("Slave", "Worker") + (row?.Description ? " (" + row.Description + ")" : ""); return {linkText}; } return Type; - }, []) + } }, Description: { label: nlsHPCC.Description @@ -147,13 +146,10 @@ export const Helpers: React.FunctionComponent = ({ FileSize: { label: nlsHPCC.FileSize, width: 90, - renderCell: React.useCallback(function (object, value, node, options) { - domClass.add(node, "justify-right"); - node.innerText = Utility.valueCleanUp(value); - }, []), + justify: "right" } - } - }); + }; + }, []); // Command Bar --- const buttons = React.useMemo((): ICommandBarItemProps[] => [ @@ -208,6 +204,8 @@ export const Helpers: React.FunctionComponent = ({ ], [refreshData, selection, uiState.canShowContent, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "helpers"); + // Selection --- React.useEffect(() => { const state = { ...defaultUIState }; @@ -229,6 +227,14 @@ export const Helpers: React.FunctionComponent = ({ - + ; }; diff --git a/esp/src/src-react/components/InfoGrid.tsx b/esp/src/src-react/components/InfoGrid.tsx index 96b0ddc8020..65d763cb4da 100644 --- a/esp/src/src-react/components/InfoGrid.tsx +++ b/esp/src/src-react/components/InfoGrid.tsx @@ -1,9 +1,8 @@ import * as React from "react"; import { Checkbox, CommandBar, ICommandBarItemProps, Link } from "@fluentui/react"; -import * as domClass from "dojo/dom-class"; import nlsHPCC from "src/nlsHPCC"; -import { useFluentGrid } from "../hooks/grid"; import { useWorkunitExceptions } from "../hooks/workunit"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { HolyGrail } from "../layouts/HolyGrail"; function extractGraphInfo(msg) { @@ -36,6 +35,10 @@ export const InfoGrid: React.FunctionComponent = ({ const [filterCounts, setFilterCounts] = React.useState({}); const [exceptions] = useWorkunitExceptions(wuid); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Command Bar --- const buttons = React.useMemo((): ICommandBarItemProps[] => [ @@ -46,34 +49,28 @@ export const InfoGrid: React.FunctionComponent = ({ ], [filterCounts.error, filterCounts.info, filterCounts.other, filterCounts.warning]); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "id", - filename: "errorwarnings", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Severity: { label: nlsHPCC.Severity, field: "", width: 72, sortable: false, - renderCell: React.useCallback(function (object, value, node, options) { + className: (value, row) => { switch (value) { case "Error": - domClass.add(node, "ErrorCell"); - break; + return "ErrorCell"; case "Alert": - domClass.add(node, "AlertCell"); - break; + return "AlertCell"; case "Warning": - domClass.add(node, "WarningCell"); - break; + return "WarningCell"; } - node.innerText = value; - }, []) + return ""; + } }, Source: { label: nlsHPCC.Source, field: "", width: 144, sortable: false }, Code: { label: nlsHPCC.Code, field: "", width: 45, sortable: false }, Message: { label: nlsHPCC.Message, field: "", sortable: false, - formatter: React.useCallback(function (Message, idx) { + formatter: (Message, idx) => { const info = extractGraphInfo(Message); if (info.graphID && info.subgraphID) { let txt = `Graph ${info.graphID}[${info.subgraphID}]`; @@ -83,13 +80,15 @@ export const InfoGrid: React.FunctionComponent = ({ return <>{info?.prefix}{txt}{info?.message}; } return Message; - }, [wuid]) + } }, Column: { label: nlsHPCC.Col, field: "", width: 36, sortable: false }, LineNo: { label: nlsHPCC.Line, field: "", width: 36, sortable: false }, FileName: { label: nlsHPCC.FileName, field: "", width: 360, sortable: false } - } - }); + }; + }, [wuid]); + + const copyButtons = useCopyButtons(columns, selection, "errorwarnings"); React.useEffect(() => { const filterCounts = { @@ -153,7 +152,15 @@ export const InfoGrid: React.FunctionComponent = ({ return } main={ - + } />; }; diff --git a/esp/src/src-react/components/LogViewer.tsx b/esp/src/src-react/components/LogViewer.tsx index 88c6c912a78..127ac38c5aa 100644 --- a/esp/src/src-react/components/LogViewer.tsx +++ b/esp/src/src-react/components/LogViewer.tsx @@ -1,11 +1,11 @@ import * as React from "react"; import { Checkbox, CommandBar, ICommandBarItemProps } from "@fluentui/react"; +import { Level } from "@hpcc-js/util"; +import { logColor } from "src/Utility"; import nlsHPCC from "src/nlsHPCC"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; import { useECLWatchLogger } from "../hooks/logging"; -import { Level } from "@hpcc-js/util"; -import { logColor } from "src/Utility"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; interface LogViewerProps { } @@ -20,6 +20,10 @@ export const LogViewer: React.FunctionComponent = ({ const [filterCounts, setFilterCounts] = React.useState({}); const [log, lastUpdate] = useECLWatchLogger(); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Command Bar --- const buttons = React.useMemo((): ICommandBarItemProps[] => [ @@ -30,26 +34,25 @@ export const LogViewer: React.FunctionComponent = ({ ], [filterCounts.error, filterCounts.info, filterCounts.other, filterCounts.warning]); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "dateTime", - filename: "errorwarnings", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { dateTime: { label: nlsHPCC.Time, width: 160, sortable: false }, level: { label: nlsHPCC.Severity, width: 112, sortable: false, - formatter: React.useCallback(level => { + formatter: level => { const colors = logColor(level); const styles = { backgroundColor: colors.background, padding: "2px 6px", color: colors.foreground }; return {Level[level].toUpperCase()}; - }, []) + } }, id: { label: nlsHPCC.Source, width: 212, sortable: false }, message: { label: nlsHPCC.Message, sortable: false } - } - }); + }; + }, []); + + const copyButtons = useCopyButtons(columns, selection, "errorwarnings"); React.useEffect(() => { const filterCounts = { @@ -98,7 +101,13 @@ export const LogViewer: React.FunctionComponent = ({ return } main={ - - } + } />; }; diff --git a/esp/src/src-react/components/Logs.tsx b/esp/src/src-react/components/Logs.tsx index ef60514ad05..f404080986c 100644 --- a/esp/src/src-react/components/Logs.tsx +++ b/esp/src/src-react/components/Logs.tsx @@ -8,7 +8,7 @@ import nlsHPCC from "src/nlsHPCC"; import { logColor } from "src/Utility"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushParams } from "../util/history"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { Filter } from "./forms/Filter"; import { Fields } from "./forms/Fields"; import { ShortVerticalDivider } from "./Common"; @@ -113,7 +113,7 @@ export const Logs: React.FunctionComponent = ({ return formatQuery(filter); }, [filter, now, wuid]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { timestamp: { label: nlsHPCC.TimeStamp, width: 140, sortable: false, }, message: { label: nlsHPCC.Message, sortable: false, }, diff --git a/esp/src/src-react/components/Monitoring.tsx b/esp/src/src-react/components/Monitoring.tsx index 832fb1b9b08..09495e61115 100644 --- a/esp/src/src-react/components/Monitoring.tsx +++ b/esp/src/src-react/components/Monitoring.tsx @@ -2,11 +2,11 @@ import * as React from "react"; import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, Image, Link } from "@fluentui/react"; import { MachineService } from "@hpcc-js/comms"; import { ShortVerticalDivider } from "./Common"; -import { tree } from "./DojoGrid"; -import { useFluentGrid } from "../hooks/grid"; -import { HolyGrail } from "../layouts/HolyGrail"; import * as Utility from "src/Utility"; import nlsHPCC from "src/nlsHPCC"; +import { tree } from "./DojoGrid"; +import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; function getStatusImageName(row) { switch (row.Status) { @@ -36,53 +36,50 @@ export const Monitoring: React.FunctionComponent = ({ const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort: { attribute: "Name", "descending": false }, - filename: "monitoring", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { StatusID: { label: "", width: 0, sortable: false, hidden: true }, ComponentType: tree({ label: "Name", sortable: true, width: 200, - formatter: function (Name, row) { + formatter: (Name, row) => { return ; } }), StatusDetails: { label: "Details", sortable: false }, URL: { label: "URL", width: 200, sortable: false, - formatter: React.useCallback(function (Name, row) { + formatter: (Name, row) => { if (Name) { return {Name}; } else { return ""; } - }, []) + } }, EndPoint: { label: "IP", sortable: true, width: 140 }, TimeReportedStr: { label: "Time Reported", width: 140, sortable: true }, Status: { label: nlsHPCC.Severity, width: 130, sortable: false, - formatter: React.useCallback(function (object, value, node, options) { + className: (value, row) => { switch (value) { case "Error": - node.classList.add("ErrorCell"); - break; + return "ErrorCell"; + case "Alert": + return "AlertCell"; case "Warning": - node.classList.add("WarningCell"); - break; - case "Normal": - node.classList.add("NormalCell"); - break; + return "WarningCell"; } - node.innerText = value; - }, []) + return ""; + } } - } - }); + }; + }, []); const refreshData = React.useCallback(() => { machine.GetComponentStatus({ @@ -127,6 +124,8 @@ export const Monitoring: React.FunctionComponent = ({ } ], [refreshData, selection, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "monitoring"); + // Selection --- React.useEffect(() => { const state = { ...defaultUIState }; @@ -137,7 +136,15 @@ export const Monitoring: React.FunctionComponent = ({ return } main={ - + } />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/PackageMapParts.tsx b/esp/src/src-react/components/PackageMapParts.tsx index 111d712b261..45a6dfaf52a 100644 --- a/esp/src/src-react/components/PackageMapParts.tsx +++ b/esp/src/src-react/components/PackageMapParts.tsx @@ -6,12 +6,12 @@ import * as parser from "dojox/xml/parser"; import * as WsPackageMaps from "src/WsPackageMaps"; import nlsHPCC from "src/nlsHPCC"; import { useConfirm } from "../hooks/confirm"; -import { useFluentGrid } from "../hooks/grid"; import { pushUrl } from "../util/history"; +import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; import { AddPackageMapPart } from "./forms/AddPackageMapPart"; import { selector } from "./DojoGrid"; -import { HolyGrail } from "../layouts/HolyGrail"; const logger = scopedLogger("../components/PackageMapParts.tsx"); @@ -31,23 +31,23 @@ export const PackageMapParts: React.FunctionComponent = ({ const [showAddPartForm, setShowAddPartForm] = React.useState(false); const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "Part", - sort: { attribute: "Part", descending: false }, - filename: "packageMapParts", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: selector({ width: 27, selectorType: "checkbox" }), Part: { label: nlsHPCC.Parts, - formatter: React.useCallback(function (part, row) { + formatter: (part, row) => { return {part}; - }, [name]) + } }, - } - }); + }; + }, [name]); const refreshData = React.useCallback(() => { WsPackageMaps.getPackageMapById({ packageMap: name }) @@ -122,6 +122,8 @@ export const PackageMapParts: React.FunctionComponent = ({ }, ], [name, refreshData, selection, setShowDeleteConfirm, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "packageMapParts"); + React.useEffect(() => { WsPackageMaps.PackageMapQuery({}) .then(({ ListPackagesResponse }) => { @@ -147,8 +149,15 @@ export const PackageMapParts: React.FunctionComponent = ({ } main={ - - } + } /> } = ({ const [activeMapValidationResult, setActiveMapValidationResult] = React.useState(nlsHPCC.ValidateResultHere); const [contentsXml, setContentsXml] = React.useState(""); const [contentsValidationResult, setContentsValidationResult] = React.useState(nlsHPCC.ValidateResultHere); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); const changeActiveMapTarget = React.useCallback((evt, option) => { setActiveMapTarget(option.key.toString()); @@ -184,36 +188,32 @@ export const PackageMaps: React.FunctionComponent = ({ const [data, setData] = React.useState([]); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "Id", - sort: { attribute: "Id", descending: true }, - filename: "packageMaps", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: selector({ width: 27, selectorType: "checkbox" }), Id: { label: nlsHPCC.PackageMap, - formatter: React.useCallback(function (Id, row) { + formatter: (Id, row) => { return {Id}; - }, []) + } }, Target: { label: nlsHPCC.Target }, Process: { label: nlsHPCC.ProcessFilter }, Active: { label: nlsHPCC.Active, - formatter: React.useCallback(function (active) { + formatter: (active) => { if (active === true) { return "A"; } return ""; - }, []) + } }, Description: { label: nlsHPCC.Description } - } - }); + }; + }, []); const refreshData = React.useCallback(() => { packageService.ListPackages({ @@ -338,6 +338,8 @@ export const PackageMaps: React.FunctionComponent = ({ }, ], [hasFilter, refreshData, selection, setShowDeleteConfirm, store, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "packageMaps"); + // Filter --- const filterFields: Fields = {}; for (const field in FilterFields) { @@ -416,7 +418,15 @@ export const PackageMaps: React.FunctionComponent = ({ } - main={} + main={} /> diff --git a/esp/src/src-react/components/Pods.tsx b/esp/src/src-react/components/Pods.tsx index 3d69afffdc9..69d369bb94d 100644 --- a/esp/src/src-react/components/Pods.tsx +++ b/esp/src/src-react/components/Pods.tsx @@ -4,7 +4,7 @@ import { SizeMe } from "react-sizeme"; import nlsHPCC from "src/nlsHPCC"; import { HolyGrail } from "../layouts/HolyGrail"; import { usePods } from "../hooks/cloud"; -import { useFluentGrid } from "../hooks/grid"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; import { JSONSourceEditor } from "./SourceEditor"; @@ -21,13 +21,14 @@ export const PodsJSON: React.FunctionComponent = ({ export const Pods: React.FunctionComponent = ({ }) => { const [pods, refreshData] = usePods(); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data: pods, - primaryID: "name", - filename: "pods", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { name: { label: nlsHPCC.Name, width: 300 }, container: { label: nlsHPCC.Container, width: 120 }, port: { label: nlsHPCC.Port, width: 64 }, @@ -35,8 +36,8 @@ export const Pods: React.FunctionComponent = ({ status: { label: nlsHPCC.Status, width: 90 }, restarts: { label: nlsHPCC.Restarts, width: 64 }, age: { label: nlsHPCC.Age, width: 90 } - } - }); + }; + }, []); // Command Bar --- const buttons = React.useMemo((): ICommandBarItemProps[] => [ @@ -47,13 +48,23 @@ export const Pods: React.FunctionComponent = ({ { key: "divider_1", itemType: ContextualMenuItemType.Divider, onRender: () => }, ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "pods"); + return } main={ {({ size }) =>
- +
}
diff --git a/esp/src/src-react/components/ProtectedBy.tsx b/esp/src/src-react/components/ProtectedBy.tsx index 6a432070a02..9d92fef5d73 100644 --- a/esp/src/src-react/components/ProtectedBy.tsx +++ b/esp/src/src-react/components/ProtectedBy.tsx @@ -2,9 +2,9 @@ import * as React from "react"; import { CommandBar, ICommandBarItemProps } from "@fluentui/react"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { useFile } from "../hooks/file"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; interface ProtectedByProps { cluster: string; @@ -22,18 +22,18 @@ export const ProtectedBy: React.FunctionComponent = ({ const [file, , , refreshData] = useFile(cluster, logicalFile); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "Owner", - sort, - filename: "protectedBy", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Owner: { label: nlsHPCC.Owner, width: 320 }, Modified: { label: nlsHPCC.Modified, width: 320 }, - } - }); + }; + }, []); React.useEffect(() => { const results = file?.ProtectList?.DFUFileProtect; @@ -56,10 +56,19 @@ export const ProtectedBy: React.FunctionComponent = ({ }, ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "protectedBy"); + return } main={ - - } + } />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/Queries.tsx b/esp/src/src-react/components/Queries.tsx index 38ccc364f4a..c3421a928b5 100644 --- a/esp/src/src-react/components/Queries.tsx +++ b/esp/src/src-react/components/Queries.tsx @@ -8,7 +8,7 @@ import { useConfirm } from "../hooks/confirm"; import { useMyAccount } from "../hooks/user"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushParams } from "../util/history"; -import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState } from "./controls/Grid"; +import { FluentPagedGrid, FluentPagedFooter, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { Fields } from "./forms/Fields"; import { Filter } from "./forms/Filter"; import { ShortVerticalDivider } from "./Common"; @@ -85,7 +85,7 @@ export const Queries: React.FunctionComponent = ({ return formatQuery(filter); }, [filter]); - const columns = React.useMemo(() => { + const columns = React.useMemo((): FluentColumns => { return { col1: { width: 16, diff --git a/esp/src/src-react/components/QueryErrors.tsx b/esp/src/src-react/components/QueryErrors.tsx index 21192d10414..67e7eaa87ac 100644 --- a/esp/src/src-react/components/QueryErrors.tsx +++ b/esp/src/src-react/components/QueryErrors.tsx @@ -4,8 +4,8 @@ import { scopedLogger } from "@hpcc-js/util"; import * as ESPQuery from "src/ESPQuery"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; const logger = scopedLogger("../components/QueryErrors.tsx"); @@ -27,19 +27,19 @@ export const QueryErrors: React.FunctionComponent = ({ return ESPQuery.Get(querySet, queryId); }, [querySet, queryId]); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort, - filename: "queryErrors", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Cluster: { label: nlsHPCC.Cluster, width: 140 }, Errors: { label: nlsHPCC.Errors }, State: { label: nlsHPCC.State, width: 120 }, - } - }); + }; + }, []); const refreshData = React.useCallback(() => { query?.getDetails() @@ -72,8 +72,18 @@ export const QueryErrors: React.FunctionComponent = ({ }, ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "queryErrors"); + return } - main={} + main={} />; }; diff --git a/esp/src/src-react/components/QueryGraphs.tsx b/esp/src/src-react/components/QueryGraphs.tsx index 1205e942cd7..8535274f47b 100644 --- a/esp/src/src-react/components/QueryGraphs.tsx +++ b/esp/src/src-react/components/QueryGraphs.tsx @@ -5,8 +5,8 @@ import * as ESPQuery from "src/ESPQuery"; import * as Utility from "src/Utility"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; const logger = scopedLogger("src-react/components/QueryGraphs.tsx"); @@ -39,28 +39,28 @@ export const QueryGraphs: React.FunctionComponent = ({ return ESPQuery.Get(querySet, queryId); }, [querySet, queryId]); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort, - filename: "queryGraphs", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: { width: 27, selectorType: "checkbox" }, Name: { label: nlsHPCC.Name, - formatter: React.useCallback(function (Name, row) { + formatter: (Name, row) => { return <>   {Name} ; - }, []) + } }, Type: { label: nlsHPCC.Type, width: 72 }, - } - }); + }; + }, []); const refreshData = React.useCallback(() => { query?.getDetails() @@ -96,8 +96,18 @@ export const QueryGraphs: React.FunctionComponent = ({ }, ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "queryGraphs"); + return } - main={} + main={} />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/QueryLibrariesUsed.tsx b/esp/src/src-react/components/QueryLibrariesUsed.tsx index c398a35e01a..8c15d9b9b5b 100644 --- a/esp/src/src-react/components/QueryLibrariesUsed.tsx +++ b/esp/src/src-react/components/QueryLibrariesUsed.tsx @@ -4,8 +4,8 @@ import { scopedLogger } from "@hpcc-js/util"; import * as ESPQuery from "src/ESPQuery"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; const logger = scopedLogger("src-react/components/QueryLibrariesUsed.tsx"); @@ -27,17 +27,17 @@ export const QueryLibrariesUsed: React.FunctionComponent([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort, - filename: "queryLibraries", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Name: { label: nlsHPCC.LibrariesUsed } - } - }); + }; + }, []); const refreshData = React.useCallback(() => { query?.getDetails() @@ -68,8 +68,18 @@ export const QueryLibrariesUsed: React.FunctionComponent} - main={} + main={} />; }; diff --git a/esp/src/src-react/components/QueryLogicalFiles.tsx b/esp/src/src-react/components/QueryLogicalFiles.tsx index 8865fae7d28..68f678e5ec9 100644 --- a/esp/src/src-react/components/QueryLogicalFiles.tsx +++ b/esp/src/src-react/components/QueryLogicalFiles.tsx @@ -4,10 +4,10 @@ import { scopedLogger } from "@hpcc-js/util"; import * as ESPQuery from "src/ESPQuery"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushUrl } from "../util/history"; import { ShortVerticalDivider } from "./Common"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; const logger = scopedLogger("../components/QueryLogicalFiles.tsx"); @@ -34,23 +34,23 @@ export const QueryLogicalFiles: React.FunctionComponent }, [querySet, queryId]); const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort, - filename: "queryLogicalFiles", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: { selectorType: "checkbox", width: 25 }, File: { label: nlsHPCC.File, - formatter: React.useCallback(function (item, row) { + formatter: (item, row) => { return {item}; - }, []) - }, - } - }); + } + } + }; + }, []); const refreshData = React.useCallback(() => { query?.getDetails() @@ -94,6 +94,8 @@ export const QueryLogicalFiles: React.FunctionComponent }, ], [querySet, refreshData, selection, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "queryLogicalFiles"); + // Selection --- React.useEffect(() => { const state = { ...defaultUIState }; @@ -107,6 +109,14 @@ export const QueryLogicalFiles: React.FunctionComponent return } - main={} + main={} />; }; diff --git a/esp/src/src-react/components/QuerySummaryStats.tsx b/esp/src/src-react/components/QuerySummaryStats.tsx index 38eadd5dcf9..d944e84813b 100644 --- a/esp/src/src-react/components/QuerySummaryStats.tsx +++ b/esp/src/src-react/components/QuerySummaryStats.tsx @@ -2,8 +2,8 @@ import * as React from "react"; import { CommandBar, ICommandBarItemProps } from "@fluentui/react"; import { Query } from "@hpcc-js/comms"; import nlsHPCC from "src/nlsHPCC"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; interface QuerySummaryStatsProps { querySet: string; @@ -19,14 +19,14 @@ export const QuerySummaryStats: React.FunctionComponent return Query.attach({ baseUrl: "" }, querySet, queryId); }, [querySet, queryId]); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort: { attribute: "__hpcc_id", descending: false }, - filename: "querySummaryStats", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { Endpoint: { label: nlsHPCC.EndPoint, width: 72, sortable: true }, Status: { label: nlsHPCC.Status, width: 72, sortable: true }, StartTime: { label: nlsHPCC.StartTime, width: 160, sortable: true }, @@ -40,8 +40,8 @@ export const QuerySummaryStats: React.FunctionComponent TimeMaxTotalExecuteMinutes: { label: nlsHPCC.TimeMaxTotalExecuteMinutes, width: 88, sortable: true }, Percentile97: { label: nlsHPCC.Percentile97, width: 80, sortable: true }, Percentile97Estimate: { label: nlsHPCC.Percentile97Estimate, sortable: true } - } - }); + }; + }, []); const refreshData = React.useCallback(() => { query?.fetchSummaryStats().then(({ StatsList }) => { @@ -80,8 +80,18 @@ export const QuerySummaryStats: React.FunctionComponent }, ], [refreshData]); + const copyButtons = useCopyButtons(columns, selection, "querySummaryStats"); + return } - main={} + main={} />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/QuerySuperFiles.tsx b/esp/src/src-react/components/QuerySuperFiles.tsx index c9214986114..6c200e7fd6f 100644 --- a/esp/src/src-react/components/QuerySuperFiles.tsx +++ b/esp/src/src-react/components/QuerySuperFiles.tsx @@ -4,10 +4,10 @@ import { scopedLogger } from "@hpcc-js/util"; import * as ESPQuery from "src/ESPQuery"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { HolyGrail } from "../layouts/HolyGrail"; import { pushUrl } from "../util/history"; import { ShortVerticalDivider } from "./Common"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; const logger = scopedLogger("src-react/components/QuerySuperFiles.tsx"); @@ -34,23 +34,23 @@ export const QuerySuperFiles: React.FunctionComponent = ({ }, [querySet, queryId]); const [uiState, setUIState] = React.useState({ ...defaultUIState }); const [data, setData] = React.useState([]); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "__hpcc_id", - sort, - filename: "querySuperFiles", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: { selectorType: "checkbox", width: 25 }, File: { label: nlsHPCC.File, - formatter: React.useCallback(function (item, row) { + formatter: (item, row) => { return {item}; - }, []) - }, - } - }); + } + } + }; + }, []); const refreshData = React.useCallback(() => { query?.getDetails() @@ -93,6 +93,8 @@ export const QuerySuperFiles: React.FunctionComponent = ({ }, ], [querySet, refreshData, selection, uiState.hasSelection]); + const copyButtons = useCopyButtons(columns, selection, "querySuperFiles"); + // Selection --- React.useEffect(() => { const state = { ...defaultUIState }; @@ -106,6 +108,14 @@ export const QuerySuperFiles: React.FunctionComponent = ({ return } - main={} + main={} />; }; \ No newline at end of file diff --git a/esp/src/src-react/components/Resources.tsx b/esp/src/src-react/components/Resources.tsx index b17a5ae143d..08797dc3315 100644 --- a/esp/src/src-react/components/Resources.tsx +++ b/esp/src/src-react/components/Resources.tsx @@ -2,9 +2,9 @@ import * as React from "react"; import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, Link, ScrollablePane, Sticky } from "@fluentui/react"; import nlsHPCC from "src/nlsHPCC"; import { QuerySortItem } from "src/store/Store"; -import { useFluentGrid } from "../hooks/grid"; import { useWorkunitResources } from "../hooks/workunit"; import { updateParam } from "../util/history"; +import { FluentGrid, useCopyButtons, useFluentStoreState, FluentColumns } from "./controls/Grid"; import { ShortVerticalDivider } from "./Common"; import { IFrame } from "./IFrame"; @@ -33,27 +33,26 @@ export const Resources: React.FunctionComponent = ({ const [resources, , , refreshData] = useWorkunitResources(wuid); const [data, setData] = React.useState([]); const [webUrl, setWebUrl] = React.useState(""); + const { + selection, setSelection, + setTotal, + refreshTable } = useFluentStoreState({}); // Grid --- - const { Grid, selection, copyButtons } = useFluentGrid({ - data, - primaryID: "DisplayPath", - alphaNumColumns: { Name: true, Value: true }, - sort, - filename: "resources", - columns: { + const columns = React.useMemo((): FluentColumns => { + return { col1: { width: 27, selectorType: "checkbox" }, DisplayPath: { label: nlsHPCC.Name, sortable: true, - formatter: React.useCallback(function (url, row) { + formatter: (url, row) => { return {url}; - }, [wuid]) + } } - } - }); + }; + }, [wuid]); // Command Bar --- const buttons = React.useMemo((): ICommandBarItemProps[] => [ @@ -82,6 +81,8 @@ export const Resources: React.FunctionComponent = ({ }, ], [refreshData, selection, uiState.hasSelection, wuid, preview]); + const copyButtons = useCopyButtons(columns, selection, "resources"); + // Selection --- React.useEffect(() => { const state = { ...defaultUIState }; @@ -113,6 +114,15 @@ export const Resources: React.FunctionComponent = ({ {preview && webUrl ?