소스 검색

Merge branch 'candidate-7.2.x'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 년 전
부모
커밋
0c91dcd18a

+ 6 - 0
cmake_modules/dependencies/disco.cmake

@@ -0,0 +1,6 @@
+# Ubuntu 19.04
+SET_DEPENDENCIES ( CPACK_DEBIAN_PACKAGE_DEPENDS g++ openssh-client openssh-server expect rsync libapr1 python psmisc curl )
+
+if(SPARK)
+    SET_DEPENDENCIES ( CPACK_DEBIAN_PACKAGE_DEPENDS "openjdk-11-jdk" )
+endif(SPARK)

+ 1 - 1
common/thorhelper/thorcommon.cpp

@@ -2025,7 +2025,7 @@ static IOutputMetaData *_getDaliLayoutInfo(MemoryBuffer &layoutBin, IPropertyTre
             props.getProp("ECL", layoutECL);
             MultiErrorReceiver errs;
             Owned<IHqlExpression> expr = parseQuery(layoutECL.str(), &errs);
-            if (errs.errCount() == 0)
+            if (expr && (errs.errCount() == 0))
             {
                 if (props.hasProp("_record_layout"))  // Some old indexes need the payload count patched in from here
                 {

+ 1 - 1
docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml

@@ -200,6 +200,6 @@
 
   <para>Example:</para>
 
-  <programlisting format="linespecific">STD.File.Copy('OUT::MyFile','400way','OUT::MyNewFile');
+  <programlisting format="linespecific">STD.File.Copy('OUT::MyFile',STD.System.Thorlib.Group(),'OUT::MyNewFile');
 </programlisting>
 </sect1>

+ 47 - 0
docs/EN_US/ECLWatch/ECLWa_mods/ECLWatchSrc.xml

@@ -1387,6 +1387,53 @@
           <para>Press the <emphasis role="bold">Copy</emphasis> button to
           display the copy drop menu, with additional file copy
           options.</para>
+
+          <para><itemizedlist>
+              <listitem>
+                <para>Check the<emphasis role="bold"> Overwrite</emphasis> box
+                to overwrite files of the same name.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> Compress</emphasis> box
+                to compress the file copy.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> Retain Superfile
+                Structure</emphasis> box for the copy to retain the structure
+                of a Superfile.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> Replicate</emphasis> box
+                to create backup copies of all file parts.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> No Split</emphasis> box
+                to to prevent splitting up the file copy into parts.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> Wrap</emphasis> box to
+                keep the number of parts the same and wrap if the target
+                cluster is smaller than the original.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> Preserve
+                Compression</emphasis> box to retain the file
+                compression.</para>
+              </listitem>
+
+              <listitem>
+                <para>Check the<emphasis role="bold"> Expire in
+                (days)</emphasis> box to enter a number of days before
+                automatically removing the file. If omitted, the default is -1
+                (never expires).</para>
+              </listitem>
+            </itemizedlist></para>
         </sect3>
 
         <sect3 id="LogicalFile_Sorting">

+ 6 - 16
esp/src/eclwatch/DFUQueryWidget.js

@@ -447,12 +447,6 @@ define([
                     this.checkIfWarning();
                 }
 
-                ESPUtil.MonitorVisibility(this.workunitsTab, function (visibility) {
-                    if (visibility) {
-                        context.checkIfWarning();
-                    }
-                });
-
                 this.filter.on("clear", function (evt) {
                     context.refreshHRef();
                     context.refreshGrid();
@@ -660,23 +654,19 @@ define([
                                 return node;
                             }
                         }),
-                        Owner: { label: this.i18n.Owner, width: 72 },
+                        Owner: { label: this.i18n.Owner, width: 75 },
                         SuperOwners: { label: this.i18n.SuperOwner, width: 150 },
-                        Description: { label: this.i18n.Description, width: 153 },
+                        Description: { label: this.i18n.Description, width: 150 },
                         NodeGroup: { label: this.i18n.Cluster, width: 108 },
-                        RecordCount: { label: this.i18n.Records, width: 72 },
+                        RecordCount: { label: this.i18n.Records, width: 85 },
                         IntSize: {
                             label: this.i18n.Size, width: 100,
                             formatter: function (intsize, row) {
-                                if (intsize === null || intsize === undefined) {
-                                    return 0;
-                                } else {
-                                    return Utility.convertedSize(intsize);
-                                }
+                                return Utility.convertedSize(intsize);
                             }
                         },
-                        Parts: { label: this.i18n.Parts, width: 45 },
-                        Modified: { label: this.i18n.ModifiedUTCGMT, width: 155 }
+                        Parts: { label: this.i18n.Parts, width: 60 },
+                        Modified: { label: this.i18n.ModifiedUTCGMT, width: 162 }
                     }
                 }, this.id + "WorkunitsGrid");
                 this.workunitsGrid.on(".dgrid-row-url:click", function (evt) {

+ 9 - 1
esp/src/eclwatch/LFDetailsWidget.js

@@ -409,7 +409,7 @@ define([
                     var superOwner = [];
                     if (newValue.DFULogicalFile.length > 0) {
                         this.setDisabled(this.id + "_FileBelongs", false);
-                        for (var i = 0; newValue.DFULogicalFile.length; ++i) {
+                        for (var i = 0; i < newValue.DFULogicalFile.length; ++i) {
                             superOwner.push(newValue.DFULogicalFile[i].Name);
                             this.updateInput("SuperOwner", oldValue, superOwner);
                         }
@@ -462,6 +462,14 @@ define([
                 this.setDisabled(this.id + "_Workunit", this.logicalFile.isDeleted());
                 this.setDisabled(this.id + "_DFUWorkunit", this.logicalFile.isDeleted());
                 this.setDisabled(this.id + "ReplicateDropDown", !this.logicalFile.CanReplicateFlag || this.logicalFile.ReplicateFlag === false);
+
+                if (this.params.Name) {
+                    var nameParts = this.params.Name.split("::");
+                    if (nameParts.length) {
+                        var filename = nameParts[nameParts.length - 1];
+                        registry.byId(this.id + "DesprayTargetName").set("value", filename);
+                    }
+                }
             }
         });
     });

+ 2 - 1
esp/src/eclwatch/templates/DFUQueryWidget.html

@@ -162,7 +162,8 @@
                         </select>
                         <input id="${id}FirstN" title="${i18n.FirstN}:" name="FirstN" colspan="2" style="width:15%" data-dojo-props="trim: true, placeHolder:'-1'" data-dojo-type="dijit.form.TextBox" />
                         <select id="${id}Sortby" title="" name="Sortby" colspan="2" data-dojo-type="dijit.form.Select">
-                            <option value="Newest" selected="selected">${i18n.Newest}</option>
+                            <option value="" selected="Selected"></option>
+                            <option value="Newest">${i18n.Newest}</option>
                             <option value="Oldest">${i18n.Oldest}</option>
                             <option value="Smallest">${i18n.Smallest}</option>
                             <option value="Largest">${i18n.Largest}</option>

+ 6 - 2
esp/src/src/Utility.ts

@@ -99,8 +99,12 @@ export function espTime2SecondsTests() {
 
 export function convertedSize(intsize: number): string {
     const unitConversion = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
-    const x = Math.floor(Math.log(intsize) / Math.log(1024));
-    return (intsize / Math.pow(1024, x)).toFixed(2) + " " + unitConversion[x];
+    if (intsize === null || intsize === undefined) {
+        return "";
+    } else {
+        const x = Math.floor(Math.log(intsize) / Math.log(1024));
+        return (intsize / Math.pow(1024, x)).toFixed(2) + " " + unitConversion[x];
+    }
 }
 
 export function unitTest(size, unit) {

+ 16 - 3
system/jlib/jsocket.cpp

@@ -4617,13 +4617,18 @@ class CSocketSelectHandler: implements ISocketSelectHandler, public CInterface
     CIArrayOf<CSocketSelectThread> threads;
     CriticalSection sect;
     bool started;
+    std::atomic<bool> stopped;
     StringAttr selecttrace;
 public:
     IMPLEMENT_IINTERFACE;
     CSocketSelectHandler(const char *trc)
-        : selecttrace(trc)
+        : started(false), stopped(false), selecttrace(trc)
     {
-        started = false;
+    }
+    ~CSocketSelectHandler()
+    {
+        stop(true);
+        threads.kill();
     }
     void start()
     {
@@ -4639,6 +4644,8 @@ public:
     void add(ISocket *sock,unsigned mode,ISocketSelectNotify *nfy)
     {
         CriticalBlock block(sect);
+        if (stopped)
+            return;
         for (;;) {
             bool added=false;
             ForEachItemIn(i,threads) {
@@ -4667,6 +4674,7 @@ public:
     {
         IException *e=NULL;
         CriticalBlock block(sect);
+        stopped = true;
         unsigned i = 0;
         while (i<threads.ordinality()) {
             CSocketSelectThread &t=threads.item(i);
@@ -5195,12 +5203,13 @@ class CSocketEpollHandler: implements ISocketSelectHandler, public CInterface
     CIArrayOf<CSocketEpollThread> threads;
     CriticalSection sect;
     bool started;
+    std::atomic<bool> stopped;
     StringAttr epolltrace;
     unsigned hdlPerThrd;
 public:
     IMPLEMENT_IINTERFACE;
     CSocketEpollHandler(const char *trc, unsigned _hdlPerThrd)
-        : started(false), epolltrace(trc), hdlPerThrd(_hdlPerThrd)
+        : started(false), stopped(false), epolltrace(trc), hdlPerThrd(_hdlPerThrd)
     {
     }
 
@@ -5230,6 +5239,9 @@ public:
             throw MakeStringException(-1,"CSocketEpollHandler::add() invalid sock or nfy or mode");
 
         CriticalBlock block(sect);
+        if (stopped)
+            return;
+
         // Create new handler thread if current one has hdlPerThrd fds.
         // epoll() handles many fds faster than select so this would
         // seem not as important, but we are still serializing on
@@ -5273,6 +5285,7 @@ public:
     void stop(bool wait)
     {
         CriticalBlock block(sect);
+        stopped = true;
         ForEachItemIn(i,threads)
         {
             CSocketEpollThread &t=threads.item(i);