Przeglądaj źródła

Merge branch 'candidate-5.2.4' into candidate-5.4.0

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 lat temu
rodzic
commit
1688731889

+ 18 - 12
docs/ECLLanguageReference/ECLR_mods/BltInFunc-MERGEJOIN.xml

@@ -184,17 +184,22 @@ ds2 := DATASET([{'A',2},{'B',2},{'H',2},{'I',2},{'J',2}],Rec);
 ds3 := DATASET([{'B',3},{'C',3},{'M',3},{'N',3},{'O',3}],Rec);
 ds4 := DATASET([{'A',4},{'B',4},{'R',4},{'S',4},{'T',4}],Rec);
 ds5 := DATASET([{'B',5},{'V',5},{'W',5},{'X',5},{'Y',5}],Rec);
-SetDS := [ds1,ds2,ds3,ds4,ds5];j1 := MERGEJOIN(SetDS,
-      STEPPED(LEFT.Letter=RIGHT.Letter),
-      SORTED(Letter));j2 := MERGEJOIN(SetDS,
-      STEPPED(LEFT.Letter=RIGHT.Letter),
-      SORTED(Letter),LEFT OUTER);j3 := MERGEJOIN(SetDS,
-      STEPPED(LEFT.Letter=RIGHT.Letter),
-      SORTED(Letter),LEFT ONLY);j4 := MERGEJOIN(SetDS,
-      STEPPED(LEFT.Letter=RIGHT.Letter),
-      SORTED(Letter),MOFN(3));j5 := MERGEJOIN(SetDS,
-      STEPPED(LEFT.Letter=RIGHT.Letter),
-      SORTED(Letter),MOFN(3,4));
+SetDS := [ds1,ds2,ds3,ds4,ds5];
+j1 := MERGEJOIN(SetDS,
+                STEPPED(LEFT.Letter=RIGHT.Letter),
+                SORTED(Letter));
+j2 := MERGEJOIN(SetDS,
+                STEPPED(LEFT.Letter=RIGHT.Letter),
+                SORTED(Letter),LEFT OUTER);
+j3 := MERGEJOIN(SetDS,
+                STEPPED(LEFT.Letter=RIGHT.Letter),
+                SORTED(Letter),LEFT ONLY);
+j4 := MERGEJOIN(SetDS,
+                STEPPED(LEFT.Letter=RIGHT.Letter),
+                SORTED(Letter),MOFN(3));
+j5 := MERGEJOIN(SetDS,
+                STEPPED(LEFT.Letter=RIGHT.Letter),
+                SORTED(Letter),MOFN(3,4));
 OUTPUT(j1);
 OUTPUT(j2);
 OUTPUT(j3);
@@ -202,6 +207,7 @@ OUTPUT(j4);
 OUTPUT(j5);
 </programlisting>
 
-    <para>See Also: <link linkend="MERGE">MERGE</link>, <link linkend="JOIN">JOIN</link>, <link linkend="STEPPED">STEPPED</link></para>
+    <para>See Also: <link linkend="MERGE">MERGE</link>, <link
+    linkend="JOIN">JOIN</link>, <link linkend="STEPPED">STEPPED</link></para>
   </sect2>
 </sect1>

+ 4 - 0
esp/src/eclwatch/ESPWorkunit.js

@@ -48,6 +48,10 @@ define([
             if (request.Sortby && request.Sortby === "TotalClusterTime") {
                 request.Sortby = "ClusterTime";
             }
+            this.busy = true;
+        },
+        preProcessFullResponse: function (response, request, query, options) {
+            this.busy = false;
         },
         create: function (id) {
             return new Workunit({

+ 16 - 3
esp/src/eclwatch/WUQueryWidget.js

@@ -88,7 +88,9 @@ define([
             this._idleWatcher.start();
             var context = this;
             this._idleWatcherHandle = this._idleWatcher.on("idle", function () {
-                context._onRefresh();
+                if (!context.store.busy && !context.filter.exists()) {
+                    context._onRefresh();
+                }
             });
         },
 
@@ -203,6 +205,9 @@ define([
         _onFilterType: function (evt) {
             var filter = this.filter.toObject();
             this.setVisible(this.id + "ArchivedWarning", filter.Type);
+            this.setDisabled(this.id + "ECL", filter.Type);
+            this.setDisabled(this.id + "LogicalFile", filter.Type);
+            this.setDisabled(this.id + "LogicalFileSearchType", filter.Type);
         },
 
         //  Implementation  ---
@@ -212,11 +217,19 @@ define([
                 lang.mixin(retVal, {
                     StartDate: this.getISOString("FromDate", "FromTime")
                 });
+            } else if (retVal.StartDate) {
+                lang.mixin(retVal, {
+                    StartDate: registry.byId(this.id + "FromDate").attr("value").toISOString()
+                });
             }
             if (retVal.EndDate && retVal.ToTime) {
                 lang.mixin(retVal, {
                     EndDate: this.getISOString("ToDate", "ToTime")
                 });
+            } else if (retVal.EndDate) {
+                lang.mixin(retVal, {
+                    EndDate: registry.byId(this.id + "ToDate").attr("value").toISOString()
+                });
             }
             if (retVal.StartDate && retVal.EndDate) {
                 retVal["DateRB"] = "0";
@@ -378,9 +391,9 @@ define([
 
         initWorkunitsGrid: function () {
             var context = this;
-            var store = this.params.searchResults ? this.params.searchResults : new ESPWorkunit.CreateWUQueryStore();
+            this.store = this.params.searchResults ? this.params.searchResults : new ESPWorkunit.CreateWUQueryStore();
             this.workunitsGrid = new declare([ESPUtil.Grid(true, true)])({
-                store: store,
+                store: this.store,
                 query: this.getFilter(),
                 columns: {
                     col1: selector({

+ 2 - 0
plugins/cassandra/cassandraembed.cpp

@@ -430,6 +430,7 @@ static bool isInteger(const CassValue *value)
 {
     switch (cass_value_type(value))
     {
+    case CASS_VALUE_TYPE_TIMESTAMP:
     case CASS_VALUE_TYPE_INT:
     case CASS_VALUE_TYPE_BIGINT:
     case CASS_VALUE_TYPE_COUNTER:
@@ -537,6 +538,7 @@ static __int64 getSignedResult(const RtlFieldInfo *field, const CassValue *value
         check(cass_value_get_int32(value, &output));
         return output;
     }
+    case CASS_VALUE_TYPE_TIMESTAMP:
     case CASS_VALUE_TYPE_BIGINT:
     case CASS_VALUE_TYPE_COUNTER:
     case CASS_VALUE_TYPE_VARINT:

+ 1 - 1
system/jlib/jfile.cpp

@@ -6025,7 +6025,7 @@ public:
     virtual void get(size32_t len, void * ptr)
     {
         if (len>buffer.remaining()) {
-            ERRLOG("CFileSerialStream::get read past end of stream.4(%u,%u)",(unsigned)len,(unsigned)buffer.remaining());
+            ERRLOG("CMemoryBufferSerialStream::get read past end of stream.4(%u,%u)",(unsigned)len,(unsigned)buffer.remaining());
             throw MakeStringException(-1,"CMemoryBufferSerialStream::get read past end of stream (%u,%u)",(unsigned)len,(unsigned)buffer.remaining());
         }
         const void * data = buffer.readDirect(len);

+ 30 - 11
system/jlib/jflz.cpp

@@ -616,6 +616,7 @@ class jlib_decl CFastLZCompressor : public CInterface, public ICompressor
     bool trailing;
     byte *outbuf;
     size32_t outlen;
+    size32_t wrmax;
 
     inline void setinmax()
     {
@@ -637,11 +638,13 @@ class jlib_decl CFastLZCompressor : public CInterface, public ICompressor
         if (trailing)
             return;
         size32_t toflush = (inlenblk==COMMITTED)?inlen:inlenblk;
+        if (toflush == 0)
+            return;
         assertex(outlen+sizeof(size32_t)*2+toflush+fastlzSlack(toflush)<=blksz);
         size32_t *cmpsize = (size32_t *)(outbuf+outlen);
         byte *out = (byte *)(cmpsize+1);
         *cmpsize = (size32_t)fastlz_compress(inbuf, (int)toflush, out, ht);
-        if (*cmpsize<=toflush) {
+        if (*cmpsize<toflush) {
             *(size32_t *)outbuf += toflush;
             outlen += *cmpsize+sizeof(size32_t);
             if (inlenblk==COMMITTED)
@@ -665,6 +668,7 @@ public:
         outlen = 0;
         outbuf = NULL;      // only set on close
         bufalloc = 0;
+        wrmax = 0;          // set at open
     }
 
     virtual ~CFastLZCompressor()
@@ -676,6 +680,7 @@ public:
 
     virtual void open(void *buf,size32_t max)
     {
+        wrmax = max;
         if (buf) {
             if (bufalloc) {
                 free(outbuf);
@@ -723,16 +728,30 @@ public:
 
     size32_t write(const void *buf,size32_t len)
     {
-        if (len+inlen>inmax) {
-            if (trailing)
-                return 0;
-            flushcommitted();
-            if (len+inlen>inmax) 
-                len = inmax-inlen;
+        // no more than wrmax per write
+        size32_t lenb = wrmax;
+        byte *b = (byte *)buf;
+        size32_t written = 0;
+        while (len)
+        {
+            if (len < lenb)
+                lenb = len;
+            if (lenb+inlen>inmax) {
+                if (trailing)
+                    return written;
+                flushcommitted();
+                if (lenb+inlen>inmax)
+                    lenb = inmax-inlen;
+            }
+            if (lenb == 0)
+                return written;
+            memcpy(inbuf+inlen,b,lenb);
+            b += lenb;
+            inlen += lenb;
+            len -= lenb;
+            written += lenb;
         }
-        memcpy(inbuf+inlen,buf,len);
-        inlen += len;
-        return len;
+        return written;
     }
 
     void *  bufptr() 
@@ -791,7 +810,7 @@ public:
     }
 
     virtual void expand(void *buf)
-{
+    {
         if (!outlen)
             return;
         if (buf) {

+ 2 - 2
tools/copyexp/copyexp.cpp

@@ -70,7 +70,7 @@ static const char *formatTime(unsigned t,StringBuffer &str)
     str.clear();
     if (t>100000)
         str.appendf("%ds",t/1000);
-    else if (t>100000)
+    else
         str.appendf("%dms",t);
     return str.str();
 
@@ -99,7 +99,7 @@ static void printStats(offset_t filesize,unsigned start,unsigned startu)
     if (elapsed<1000)
         printf("%" I64F "d bytes copied, at %.2f MB/s in %s\n",filesize,((((double)filesize)/(1024*1024))/elapsedu)*1000000,formatTimeU(elapsedu,tmp));
     else
-        printf("%" I64F "d bytes copied, at %.2f MB/s in %s\n",filesize,((((double)filesize)/(1024*1024))/elapsed)*1000,formatTime(elapsed*1000,tmp));
+        printf("%" I64F "d bytes copied, at %.2f MB/s in %s\n",filesize,((((double)filesize)/(1024*1024))/elapsed)*1000,formatTime(elapsed,tmp));
 }
 
 int copyExpanded(const char *from, const char *to, bool stats)