Kaynağa Gözat

Merge branch 'candidate-7.4.x'

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 yıl önce
ebeveyn
işleme
840785da94

+ 4 - 4
common/environment/environment.cpp

@@ -1241,7 +1241,7 @@ public:
     {
         return root->getPropInt("@SPARK_EXECUTOR_CORES", 0);
     }
-    virtual unsigned long getSparkExecutorMemory() const
+    virtual unsigned __int64 getSparkExecutorMemory() const
     {
         return readSizeSetting(root->queryProp("@SPARK_EXECUTOR_MEMORY"), 0);
     }
@@ -1257,7 +1257,7 @@ public:
     {
         return root->getPropInt("@SPARK_WORKER_CORES", 0);
     }
-    virtual unsigned long getSparkWorkerMemory() const
+    virtual unsigned __int64 getSparkWorkerMemory() const
     {
         return readSizeSetting(root->queryProp("@SPARK_WORKER_MEMORY"), 0);
     }
@@ -2493,7 +2493,7 @@ extern ENVIRONMENT_API void closeEnvironment()
     }
 }
 
-extern ENVIRONMENT_API unsigned long readSizeSetting(const char * sizeStr, const unsigned long defaultSize)
+extern ENVIRONMENT_API unsigned __int64 readSizeSetting(const char * sizeStr, const unsigned long defaultSize)
 {
     StringBuffer buf(sizeStr);
     buf.trim();
@@ -2515,7 +2515,7 @@ extern ENVIRONMENT_API unsigned long readSizeSetting(const char * sizeStr, const
 
     char c = ptr[0];
     buf.setLength(ptrAfterDigit - ptrStart);
-    unsigned long size = atol(buf);
+    unsigned __int64 size = atoll(buf);
     switch (c)
     {
     case 'k':

+ 3 - 3
common/environment/environment.hpp

@@ -156,11 +156,11 @@ interface IConstSparkThorInfo : extends IConstEnvBase
     virtual IStringVal & getBuild(IStringVal & str) const = 0;
     virtual IStringVal & getThorClusterName(IStringVal & str) const = 0;
     virtual unsigned getSparkExecutorCores() const = 0;
-    virtual unsigned long getSparkExecutorMemory() const = 0;
+    virtual unsigned __int64 getSparkExecutorMemory() const = 0;
     virtual unsigned getSparkMasterPort() const = 0;
     virtual unsigned getSparkMasterWebUIPort() const = 0;
     virtual unsigned getSparkWorkerCores() const = 0;
-    virtual unsigned long getSparkWorkerMemory() const = 0;
+    virtual unsigned __int64 getSparkWorkerMemory() const = 0;
     virtual unsigned getSparkWorkerPort() const = 0;
     virtual IConstInstanceInfoIterator * getInstanceIterator() const = 0;
 };
@@ -227,7 +227,7 @@ class StringBuffer;
 extern "C" ENVIRONMENT_API IEnvironmentFactory * getEnvironmentFactory(bool update);
 extern "C" ENVIRONMENT_API void closeEnvironment();
 
-extern ENVIRONMENT_API unsigned long readSizeSetting(const char * sizeStr, const unsigned long defaultSize);
+extern ENVIRONMENT_API unsigned __int64 readSizeSetting(const char * sizeStr, const unsigned long defaultSize);
 
 extern ENVIRONMENT_API unsigned getAccessibleServiceURLList(const char *serviceType, std::vector<std::string> &list);
 

+ 11 - 0
docs/EN_US/ECLStandardLibraryReference/SLR-Mods/SprayFixed.xml

@@ -25,6 +25,8 @@
   role="bold">[</emphasis><emphasis>failIfNoSourceFile</emphasis><emphasis
   role="bold">] </emphasis>,<emphasis
   role="bold">[</emphasis><emphasis>expireDays</emphasis><emphasis
+  role="bold">] , </emphasis><emphasis role="bold">[</emphasis>
+  <emphasis>dfuServerQueue</emphasis><emphasis
   role="bold">])</emphasis></para>
 
   <para><emphasis>dfuwuid</emphasis> <emphasis role="bold"> :=
@@ -49,6 +51,8 @@
   role="bold">[</emphasis><emphasis>failIfNoSourceFile</emphasis><emphasis
   role="bold">]</emphasis>, <emphasis
   role="bold">[</emphasis><emphasis>expireDays</emphasis><emphasis
+  role="bold">] , </emphasis><emphasis role="bold">[</emphasis>
+  <emphasis>dfuServerQueue</emphasis><emphasis
   role="bold">])</emphasis></para>
 
   <informaltable colsep="1" frame="all" rowsep="1">
@@ -158,6 +162,13 @@
         </row>
 
         <row>
+          <entry><emphasis>dfuServerQueue</emphasis></entry>
+
+          <entry>Name of target DFU Server queue. Default is '' (empty) for
+          the first DFU queue in the environment.</entry>
+        </row>
+
+        <row>
           <entry><emphasis>dfuwuid</emphasis></entry>
 
           <entry>The attribute name to receive the null-terminated string

+ 17 - 5
docs/EN_US/ECLStandardLibraryReference/SLR-Mods/SprayVariable.xml

@@ -39,8 +39,11 @@
   <emphasis role="bold">]</emphasis>, <emphasis role="bold"> [</emphasis>
   <emphasis> quotedTerminator </emphasis> <emphasis role="bold">]</emphasis>,
   <emphasis role="bold"> [</emphasis> <emphasis> encoding </emphasis>
-  <emphasis role="bold">]</emphasis><emphasis role="bold">[</emphasis>
-  <emphasis>expireDays</emphasis> <emphasis role="bold">])</emphasis></para>
+  <emphasis role="bold">]</emphasis><emphasis role="bold"> , [</emphasis>
+  <emphasis>expireDays</emphasis> <emphasis role="bold">] ,
+  </emphasis><emphasis role="bold">[</emphasis>
+  <emphasis>dfuServerQueue</emphasis><emphasis
+  role="bold">])</emphasis></para>
 
   <para><emphasis>dfuwuid</emphasis> <emphasis role="bold"> :=
   STD.File.fSprayDelimited<indexterm>
@@ -75,9 +78,11 @@
   role="bold">]</emphasis>, <emphasis role="bold"> [</emphasis> <emphasis>
   recordStructurePresent </emphasis> <emphasis role="bold">]</emphasis>,
   <emphasis role="bold"> [</emphasis> <emphasis> quotedTerminator </emphasis>
-  <emphasis role="bold">]</emphasis>, <emphasis role="bold"> [</emphasis>
-  <emphasis> encoding </emphasis> <emphasis role="bold">]</emphasis> <emphasis
-  role="bold">[</emphasis> <emphasis>expireDays</emphasis> <emphasis
+  <emphasis role="bold">]</emphasis> , <emphasis role="bold"> [</emphasis>
+  <emphasis> encoding </emphasis> <emphasis role="bold">]</emphasis> ,
+  <emphasis role="bold">[</emphasis> <emphasis>expireDays</emphasis> <emphasis
+  role="bold">] , </emphasis><emphasis role="bold">[</emphasis>
+  <emphasis>dfuServerQueue</emphasis><emphasis
   role="bold">])</emphasis></para>
 
   <informaltable colsep="1" frame="all" rowsep="1">
@@ -241,6 +246,13 @@
         </row>
 
         <row>
+          <entry><emphasis>dfuServerQueue</emphasis></entry>
+
+          <entry>Name of target DFU Server queue. Default is '' (empty) for
+          the first DFU queue in the environment.</entry>
+        </row>
+
+        <row>
           <entry><emphasis>dfuwuid</emphasis></entry>
 
           <entry>The definition name to receive the null-terminated string

+ 12 - 1
docs/EN_US/ECLStandardLibraryReference/SLR-Mods/SprayXML.xml

@@ -31,6 +31,8 @@
   role="bold">[</emphasis><emphasis>failIfNoSourceFile</emphasis><emphasis
   role="bold">]</emphasis>, <emphasis
   role="bold">[</emphasis><emphasis>expireDays</emphasis><emphasis
+  role="bold">] , </emphasis><emphasis role="bold">[</emphasis>
+  <emphasis>dfuServerQueue</emphasis><emphasis
   role="bold">])</emphasis></para>
 
   <para><emphasis>dfuwuid</emphasis> <emphasis role="bold"> :=
@@ -60,6 +62,8 @@
   role="bold">[</emphasis><emphasis>failIfNoSourceFile</emphasis><emphasis
   role="bold">]</emphasis>, <emphasis
   role="bold">[</emphasis><emphasis>expireDays</emphasis><emphasis
+  role="bold">] , </emphasis><emphasis role="bold">[</emphasis>
+  <emphasis>dfuServerQueue</emphasis><emphasis
   role="bold">])</emphasis></para>
 
   <informaltable colsep="1" frame="all" rowsep="1">
@@ -115,7 +119,7 @@
           <entry><emphasis>destinationlogicalname</emphasis></entry>
 
           <entry>A null-terminated string containing the logical name of the
-          file. </entry>
+          file.</entry>
         </row>
 
         <row>
@@ -183,6 +187,13 @@
         </row>
 
         <row>
+          <entry><emphasis>dfuServerQueue</emphasis></entry>
+
+          <entry>Name of target DFU Server queue. Default is '' (empty) for
+          the first DFU queue in the environment.</entry>
+        </row>
+
+        <row>
           <entry><emphasis>dfuwuid</emphasis></entry>
 
           <entry>The attribute name to recieve the null-terminated string

Dosya farkı çok büyük olduğundan ihmal edildi
+ 3 - 3
ecllibrary/std/File.ecl


+ 1 - 1
esp/bindings/http/platform/httpbinding.cpp

@@ -1670,7 +1670,7 @@ int EspHttpBinding::getWsdlOrXsd(IEspContext &context, CHttpRequest* request, CH
 
         if (!qualifyServiceName(context, service, method, serviceQName, &methodQName))
         {
-            response->setStatus(HTTP_STATUS_NOT_FOUND);
+            return onGetNotFound(context, request,  response, service);
         }
         else
         {

+ 50 - 27
esp/src/eclwatch/ClusterProcessesQueryWidget.js

@@ -51,7 +51,7 @@ define([
             this.machineFilter = new MachineInformationWidget({});
 
             this.configurationButton = new Button({
-                label:  this.i18n.OpenConfiguration,
+                label: this.i18n.OpenConfiguration,
                 onClick: function(event) {
                     context._onOpenConfiguration()
                 }
@@ -197,6 +197,11 @@ define([
                 }
             }, domID);
 
+            retVal.on(".dgrid-cell img:click", function (evt) {
+                var item = retVal.row(evt).data;
+                context._onOpenConfiguration(item);
+            });
+
             retVal.on(".dgrid-row-url:click", function (evt) {
                 if (context._onRowDblClick) {
                     var item = retVal.row(evt).data;
@@ -225,27 +230,37 @@ define([
             return retVal;
         },
 
-        _onOpenConfiguration: function (event) {
+        _onOpenConfiguration: function (data) {
             var context = this;
             var selections = this.grid.getSelected();
             var firstTab = null;
-            for (var i = 0; i < selections.length; ++i) {
-                WsTopology.TpGetComponentFile({
-                    request: {
-                        FileType: "cfg",
-                        CompType: selections[i].Component,
-                        CompName: selections[i].Name,
-                        Directory: selections[i].Directory,
-                        OsType: selections[i].OS
-                    }
-                }).then(function(response){
-                    var tab = context.ensureConfigurationPane(selections[i].Component + "_" + selections[i].Name , {
-                        Component: selections[i].Component,
-                        Name: selections[i].Name,
-                        Usergenerated: response
-                    });
-                });
+
+            if (!data) {
+                data = this.grid.row(selections[0].hpcc_id).data;
             }
+
+            WsTopology.TpGetComponentFile({
+                request: {
+                    FileType: "cfg",
+                    CompType: data.Component,
+                    CompName: data.Name,
+                    Directory: data.Directory,
+                    OsType: data.OS
+                }
+            }).then(function(response) {
+                var tab = context.ensureConfigurationPane(data.Component + "_" + data.Name , {
+                    Component: data.Component,
+                    Name: data.Name,
+                    Usergenerated: response
+                });
+
+                if (firstTab === null) {
+                    firstTab = tab;
+                }
+                if (firstTab) {
+                    context.selectChild(firstTab);
+                }
+            });
         },
 
         _onRefresh: function () {
@@ -264,18 +279,26 @@ define([
             var isProcess = false;
 
             for (var i = 0; i < selection.length; ++i) {
-                if (selection[i] && selection[i].type === "clusterProcess") {
-                    isTarget = true;
-                    isProcess = false;
-
+                if (selection.length > 1) {
+                    if (selection[i].type) {
+                        isTarget = false;
+                        isProcess = false;
+                    } else if (!selection[i].type) {
+                        isTarget = true;
+                        isProcess = false;
+                    }    
                 } else {
-                    isTarget = false;
-                    isProcess = true;
+                    if (selection[i] && selection[i].type === "targetClusterProcess") {
+                        isTarget = true;
+                        isProcess = false;
+                    } else {
+                        isTarget = false;
+                        isProcess = true;
+                    }
                 }
             }
-
-            this.machineFilter.disable(!isProcess);
-            this.configurationButton.set("disabled", !isTarget);
+            this.machineFilter.disable(!isTarget);
+            this.configurationButton.set("disabled", !isProcess);
         },
 
         ensureConfigurationPane: function (id, params) {

+ 1 - 1
esp/src/eclwatch/ShowIndividualPermissionsWidget.js

@@ -32,7 +32,7 @@ define([
             init: function (params) {
                 if (this.inherited(arguments))
                     return;
-                this.store = WsAccess.CreateIndividualPermissionsStore(params.Basedn, params.Rtype, params.Rtitle, params.Name);
+                this.store = WsAccess.CreateIndividualPermissionsStore(params.Basedn, params.Name);
                 this.grid.setStore(this.store);
                 this._refreshActionState();
             },

+ 46 - 31
esp/src/eclwatch/TargetClustersQueryWidget.js

@@ -190,6 +190,11 @@ define([
                 }
             }, domID);
 
+            retVal.on(".dgrid-cell img:click", function (evt) {
+                var item = retVal.row(evt).data;
+                context._onOpenConfiguration(item);
+            });
+
             retVal.on(".dgrid-row-url:click", function (evt) {
                 if (context._onRowDblClick) {
                     var item = retVal.row(evt).data;
@@ -224,34 +229,36 @@ define([
             });
         },
 
-        _onOpenConfiguration: function (event) {
+        _onOpenConfiguration: function (data) {
             var context = this;
             var selections = this.grid.getSelected();
             var firstTab = null;
-            for (var i = 0; i < selections.length; ++i) {
-                var data = this.grid.row(selections[i].hpcc_id).data;
-                WsTopology.TpGetComponentFile({
-                    request: {
-                        NetAddress: data.Netaddress,
-                        FileType: "cfg",
-                        Directory: data.Directory,
-                        CompType: data.Type,
-                        OsType: data.OS,
-                    }
-                }).then(function(response) {
-                    var tab = context.ensureConfigurationPane(data.Parent.Name + "-" + data.Type , {
-                        Component: data.Type,
-                        Name: data.Parent.Name,
-                        Usergenerated: response
-                    });
-                    if (i === 0) {
-                        firstTab = tab;
-                    }
-                });
-            }
-            if (firstTab) {
-                this.selectChild(firstTab);
+
+            if (!data) {
+                data = this.grid.row(selections[0].hpcc_id).data;
             }
+
+            WsTopology.TpGetComponentFile({
+                request: {
+                    NetAddress: data.Netaddress,
+                    FileType: "cfg",
+                    Directory: data.Directory,
+                    CompType: data.Type,
+                    OsType: data.OS,
+                }
+            }).then(function(response) {
+                var tab = context.ensureConfigurationPane(data.Parent.Name + "-" + data.Type , {
+                    Component: data.Type,
+                    Name: data.Parent.Name,
+                    Usergenerated: response
+                });
+                if (firstTab === null) {
+                    firstTab = tab;
+                }
+                if (firstTab) {
+                    context.selectChild(firstTab);
+                }
+            });
         },
 
         _onRowDblClick: function (item) {
@@ -271,16 +278,24 @@ define([
             var isProcess = false;
 
             for (var i = 0; i < selection.length; ++i) {
-                if (selection[i] && selection[i].type === "targetClusterProcess") {
-                    isTarget = true;
-                    isProcess = false;
-
+                if (selection.length > 1) {
+                    if (!selection[i].type) { // is a process
+                        isTarget = false;
+                        isProcess = false;
+                    } else if (selection[i].type) {
+                        isTarget = true;
+                        isProcess = false;
+                    }    
                 } else {
-                    isTarget = false;
-                    isProcess = true;
+                    if (selection[i] && selection[i].type === "clusterProcess") {
+                        isTarget = true;
+                        isProcess = false;
+                    } else {
+                        isTarget = false;
+                        isProcess = true;
+                    }
                 }
             }
-
             this.machineFilter.disable(!isTarget);
             this.configurationButton.set("disabled", !isProcess);
         },

+ 14 - 27
esp/src/eclwatch/UserQueryWidget.js

@@ -108,12 +108,8 @@ define([
         _onFileScopeDefaultPermissions: function () {
             var row = this.getRow("FileScope");
             if (row) {
-                var clean = row.basedn.split(/,(.+)?/)[1] //the request does not like the ou with prefix have to issue JIRA to fix this
-                var fileScopeDefaultPermissionsTab = this.ensurePermissionsPane(row.basedn + "FileScope", {
-                    Basedn: clean,
-                    Rtype: "file",
-                    Rtitle: "",
-                    Name: "files",
+                var fileScopeDefaultPermissionsTab = this.ensurePermissionsPane(row.Basedn + "FileScope", {
+                    Basedn: row.Basedn,
                     TabName: this.i18n.title_FileScopeDefaultPermissions,
                     DefaultPermissions: true
                 });
@@ -124,12 +120,8 @@ define([
         _onWorkunitScopeDefaultPermissions: function () {
             var row = this.getRow("WorkunitScope");
             if (row) {
-                var clean = row.basedn.split(/,(.+)?/)[1] //the request does not like the ou with prefix have to issue JIRA to fix this
-                var workunitScopeDefaultPermissionsTab = this.ensurePermissionsPane(row.basedn + "WUScope", {
-                    Basedn: clean,
-                    Rtype: "workunit",
-                    Rtitle: "",
-                    Name: "workunits",
+                var workunitScopeDefaultPermissionsTab = this.ensurePermissionsPane(row.Basedn + "WUScope", {
+                    Basedn: row.Basedn,
                     TabName: this.i18n.title_WorkunitScopeDefaultPermissions,
                     DefaultPermissions: true
                 });
@@ -140,10 +132,8 @@ define([
         _onPhysicalFiles: function () {
             var row = this.getRow("FileScope");
             if (row) {
-                var physicalPermissionsTab = this.ensurePermissionsPane(row.basedn + "PhysicalFiles", {
-                    Basedn: row.basedn,
-                    Rtype: "file",
-                    Rtitle: "FileScope",
+                var physicalPermissionsTab = this.ensurePermissionsPane(row.Basedn + "PhysicalFiles", {
+                    Basedn: row.Basedn,
                     Name: "file",
                     TabName: "Physical Files"
                 });
@@ -374,7 +364,8 @@ define([
         },
 
         _onAddPermissionSubmit: function (event) {
-            var selRow = this.addPermissionType.__hpcc_data[this.addPermissionType.get("value")];
+            var selRow = {}
+            selRow["BasednName"] = this.addPermissionType.get("value");
             if (selRow) {
                 var request = lang.mixin(selRow, domForm.toObject(this.id + "AddPermissionForm"));
                 var context = this;
@@ -433,11 +424,9 @@ define([
             }
         },
 
-        _onPermissionsRowDblClick: function (basedn, rtype, rtitle, name, description) {
+        _onPermissionsRowDblClick: function (basedn, name, description) {
             var permissionsTab = this.ensurePermissionsPane(name, {
                 Basedn: basedn,
-                Rtype: rtype,
-                Rtitle: rtitle,
                 Name: name,
                 Description: description
             });
@@ -719,9 +708,9 @@ define([
                     arrayUtil.forEach(response.BasednsResponse.Basedns.Basedn, function (item, idx) {
                         options.push({
                             label: item.name,
-                            value: item.basedn
+                            value: item.name
                         });
-                        optionMap[item.basedn] = item;
+                        optionMap[item.name] = item;
                     }, this);
                 }
                 this.addPermissionType.set("options", options);
@@ -776,13 +765,13 @@ define([
             this.permissionsGrid.on(".dgrid-row-url:click", function (evt) {
                 if (context._onPermissionsRowDblClick) {
                     var item = context.permissionsGrid.row(evt).data;
-                    context._onPermissionsRowDblClick(item.__hpcc_parent.basedn, item.__hpcc_parent.rtype, item.__hpcc_parent.rtitle, item.name, item.DisplayName);
+                    context._onPermissionsRowDblClick(item.__hpcc_parent.name, item.name, item.DisplayName);
                 }
             });
             this.permissionsGrid.on(".dgrid-row:dblclick", function (evt) {
                 if (context._onPermissionsRowDblClick) {
                     var item = context.permissionsGrid.row(evt).data;
-                    context._onPermissionsRowDblClick(item.__hpcc_parent.basedn, item.__hpcc_parent.rtype, item.__hpcc_parent.rtitle, item.name, item.DisplayName);
+                    context._onPermissionsRowDblClick(item.__hpcc_parent.name, item.name, item.DisplayName);
                 }
             });
             this.permissionsGrid.onSelectionChanged(function (event) {
@@ -878,9 +867,7 @@ define([
                 var context = this;
                 WsAccess.Resources({
                     request: {
-                        basedn: event.rows[0].id,
-                        rtype: "file",
-                        rtitle: "FileScope"
+                        name: event.rows[0].data.Basedn
                     }
                 }).then(function (response) {
                     if (lang.exists("ResourcesResponse.scopeScansStatus", response)) {

+ 2 - 2
esp/src/eclwatch/nls/hpcc.js

@@ -133,7 +133,7 @@ define({root:
     DaliIP: "DaliIP",
     DataPatterns: "Data Patterns",
     DataPatternsNotStarted: "Analysis not found.  To start, press Analyze button above.",
-    DataPatternsStarted: "Analysing.  Once complete report will display here.",
+    DataPatternsStarted: "Analyzing.  Once complete report will display here.",
     dataset: ":=dataset*",
     Date: "Date",
     Day: "Day",
@@ -610,7 +610,7 @@ define({root:
     Replicate: "Replicate",
     ReplicatedLost: "Replicated Lost",
     ReplicateOffset: "Replicate Offset",
-   Report: "Report",
+    Report: "Report",
     RepresentsASubset: "represent a subset of the total number of matches. Using a correct filter may reduce the number of matches.",
     RequestSchema: "Request Schema",
     RequiredForFixedSpray: "Required for fixed spray",

+ 32 - 69
esp/src/src/ws_access.ts

@@ -58,9 +58,7 @@ var ResourcesStore = declare([Memory], {
         var request = {
             account_name: this.groupname ? this.groupname : this.username,
             account_type: this.groupname ? 1 : 0,
-            basedn: row.__hpcc_parent.basedn,
-            rtitle: row.__hpcc_parent.rtitle,
-            rtype: row.__hpcc_parent.rtype,
+            BasednName: row.__hpcc_parent.name,
             rname: row.name,
             action: "update"
         };
@@ -79,7 +77,7 @@ var ResourcesStore = declare([Memory], {
         ]).then(lang.hitch(this, function (response) {
             var accountPermissions = {};
             arrayUtil.forEach(response[1], function (item, idx) {
-                accountPermissions[item.PermissionName] = item;
+                accountPermissions[item.ResourceName] = item;
             }, this);
 
             var data = [];
@@ -111,9 +109,7 @@ var ResourcesStore = declare([Memory], {
     refreshResources: function (query) {
         return Resources({
             request: {
-                basedn: this.parentRow.basedn,
-                rtype: this.parentRow.rtype,
-                rtitle: this.parentRow.rtitle
+                name: this.parentRow.name
             }
         }).then(lang.hitch(this, function (response) {
             if (lang.exists("ResourcesResponse.Resources.Resource", response)) {
@@ -152,10 +148,8 @@ var InheritedPermissionStore = declare([Memory], {
         this.get(row.__hpcc_id);
         var retVal = inherited(arguments);
         var request = {
-            basedn: row.basedn,
-            rtype: row.rtype,
-            rname: row.rname,
-            rtitle: row.rtitle,
+            BasednName: row.BasednName,
+            rname: row.ResourceName,
             account_name: row.account_name,
             account_type: 0,
             action: "update"
@@ -174,13 +168,11 @@ var InheritedPermissionStore = declare([Memory], {
         ]).then(lang.hitch(this, function (response) {
             var accountPermissions = {};
             arrayUtil.forEach(response[0], function (item, idx) {
-                accountPermissions[item.PermissionName] = item;
+                accountPermissions[item.ResourceName] = item;
                 data.push(lang.mixin(item, {
                     __hpcc_type: "InheritedPermissions",
-                    __hpcc_id: this.TabName + CONCAT_SYMBOL + this.AccountName + CONCAT_SYMBOL + item.PermissionName + CONCAT_SYMBOL + idx,
-                    rname: item.PermissionName,
-                    rtype: item.RType,
-                    rtitle: item.ResourceName,
+                    __hpcc_id: this.TabName + CONCAT_SYMBOL + this.AccountName + CONCAT_SYMBOL + item.ResourceName + CONCAT_SYMBOL + idx,
+                    rname: item.ResourceName,
                     account_name: this.TabName,
                     allow_access: item ? item.allow_access : false,
                     allow_read: item ? item.allow_read : false,
@@ -234,12 +226,9 @@ var AccountResourcesStore = declare([Memory], {
         this.get(row.__hpcc_id);
         var retVal = inherited(arguments);
         var request = {
-            basedn: row.basedn,
-            rtype: row.rtype,
-            rname: row.rname,
-            rtitle: row.rtitle,
+            BasednName: row.BasednName,
+            rname: row.ResourceName,
             account_name: row.account_name,
-            account_type: 0,
             action: "update"
         };
         lang.mixin(request, row);
@@ -256,13 +245,11 @@ var AccountResourcesStore = declare([Memory], {
         ]).then(lang.hitch(this, function (response) {
             var accountPermissions = {};
             arrayUtil.forEach(response[0], function (item, idx) {
-                accountPermissions[item.PermissionName] = item;
+                accountPermissions[item.ResourceName] = item;
                 data.push(lang.mixin(item, {
                     __hpcc_type: "AccountPermissions",
-                    __hpcc_id: this.AccountName + CONCAT_SYMBOL + item.PermissionName + CONCAT_SYMBOL + idx,
-                    rname: item.PermissionName,
-                    rtype: item.RType,
-                    rtitle: item.ResourceName,
+                    __hpcc_id: this.AccountName + CONCAT_SYMBOL + item.ResourceName + CONCAT_SYMBOL + idx,
+                    rname: item.ResourceName,
                     account_name: this.AccountName,
                     allow_access: item ? item.allow_access : false,
                     allow_read: item ? item.allow_read : false,
@@ -310,10 +297,9 @@ var IndividualPermissionsStore = declare([Memory], {
         this.get(row.__hpcc_id);
         var retVal = inherited(arguments);
         var request = {
-            basedn: row.basedn,
-            rtype: row.rtype,
-            rtitle: row.rtitle,
-            rname: row.name,
+            BasednName: row.BasednName,
+            rname: row.rname,
+            account_name: row.account_name,
             action: "update"
         };
         lang.mixin(request, row);
@@ -334,9 +320,7 @@ var IndividualPermissionsStore = declare([Memory], {
                 data.push(lang.mixin(item, {
                     __hpcc_type: "IndividualPermissions",
                     __hpcc_id: this.name + CONCAT_SYMBOL + idx,
-                    basedn: this.basedn,
-                    rtype: this.rtype,
-                    rtitle: this.rtitle,
+                    BasednName: this.basedn,
                     rname: this.name,
                     account_name: item.account_name,
                     allow_access: item ? item.allow_access : false,
@@ -362,11 +346,8 @@ var IndividualPermissionsStore = declare([Memory], {
         }
         return ResourcePermissions({
             request: {
-                basedn: this.basedn,
-                rtype: this.rtype,
-                rtitle: this.rtitle,
-                name: this.name
-
+                name: this.name,
+                BasednName: this.basedn
             }
         }).then(lang.hitch(this, function (response) {
             if (lang.exists("ResourcePermissionsResponse.Permissions.Permission", response)) {
@@ -428,9 +409,11 @@ var PermissionsStore = declare([Memory], {
                         __hpcc_type: "Permission",
                         __hpcc_id: item.basedn,
                         DisplayName: item.name,
-                        children: lang.mixin(CreateResourcesStore(this.groupname, this.username, item.basedn), {
+                        Basedn: item.name,
+                        children: lang.mixin(CreateResourcesStore(this.groupname, this.username, item.name, item.rname), {
                             parent: this,
-                            parentRow: item
+                            parentRow: item,
+                            Basedn: item.name
                         })
                     }));
                 }, this);
@@ -551,7 +534,11 @@ export function ResourcePermissions(params) {
 }
 
 export function Resources(params) {
-    return _doCall("Resources", params);
+    return _doCall("Resources", {
+        request: {
+            BasednName: params.request.name
+        }
+    });
 }
 
 export function ResourceAdd(params) {
@@ -594,29 +581,6 @@ export function DisableScopeScans() {
     });
 }
 
-export function DefaultPermissions() {
-    return _doCall("ResourcePermissions", {
-        request: {
-            basedn: "ou=ecl,dc=hpccdev,dc=local",
-            rtype: "file",
-            name: "files",
-            action: "Default Permissions"
-        }
-    });
-}
-
-export function PhysicalFiles() {
-    return _doCall("ResourcePermissions", {
-        request: {
-            basedn: "ou=files,ou=ecl,dc=hpccdev,dc=local",
-            rtype: "file",
-            rtitle: "FileScope",
-            name: "file",
-            action: "Physical Files"
-        }
-    });
-}
-
 export function CheckFilePermissions() {
     return _doCall("FilePermission", {
         request: {
@@ -667,19 +631,18 @@ export function CreateInheritedPermissionsStore(IsGroup, IncludeGroup, AccountNa
     return Observable(store);
 }
 
-export function CreateIndividualPermissionsStore(basedn, rtype, rtitle, name) {
+export function CreateIndividualPermissionsStore(basedn, name) {
     var store = new IndividualPermissionsStore();
     store.basedn = basedn;
-    store.rtype = rtype;
-    store.rtitle = rtitle;
     store.name = name;
     return Observable(store);
 }
 
-export function CreateResourcesStore(groupname, username, basedn) {
+export function CreateResourcesStore(groupname, username, basedn, name) {
     var store = new ResourcesStore();
     store.groupname = groupname;
     store.username = username;
     store.basedn = basedn;
+    store.name = name;
     return Observable(store);
-}
+}

+ 9 - 0
plugins/javaembed/HpccClassLoader.java

@@ -69,6 +69,7 @@ public class HpccClassLoader extends java.lang.ClassLoader
         bytecodeLen = _bytecodeLen;
         bytecode = _bytecode;
     }
+    @Override
     public synchronized Class<?> findClass(String className) throws ClassNotFoundException
     {
         String luName = className.replace(".","/");
@@ -85,6 +86,14 @@ public class HpccClassLoader extends java.lang.ClassLoader
         }
         return result; 
     }
+    @Override
+    public URL getResource(String path)
+    {
+        URL ret = pathLoader.getResource(path);
+        if (ret == null)
+            ret = super.getResource(path);
+        return ret;
+    }
     public static HpccClassLoader newInstance(String classPath, ClassLoader parent, int _bytecodeLen, long _bytecode, String dllname)
     {
         return new HpccClassLoader(classPath, parent, _bytecodeLen, _bytecode, dllname); 

+ 1 - 2
plugins/javaembed/HpccUtils.java

@@ -36,8 +36,6 @@ public class HpccUtils  implements Iterator, ActivityContext
         handle = _handle;
     }
     public native void remove();
-    {
-    }
     public boolean hasNext()
     {
         return _hasNext(handle);
@@ -49,6 +47,7 @@ public class HpccUtils  implements Iterator, ActivityContext
            throw new NoSuchElementException();
         return ret;
     }
+    public native static void log(String msg);
     
     public boolean isLocal() { return _isLocal(handle); }
     public int numSlaves() { return _numSlaves(handle); }

+ 68 - 1
plugins/javaembed/javaembed.cpp

@@ -86,6 +86,10 @@ static void UNSUPPORTED(const char *feature)
 namespace javaembed {
 
 static jmethodID throwable_toString;
+static jmethodID throwable_getStackTrace;
+static jmethodID throwable_getCause;
+static jmethodID frame_toString;
+
 
 static void forceGC(class CheckedJNIEnv* JNIenv);
 
@@ -120,12 +124,59 @@ public:
         }
         return ret;
     }
+
+    void checkUnexpectedException()
+    {
+        if (JNIEnv::ExceptionCheck())
+        {
+            DBGLOG("javaembed: Uunexpected java exception while processing exception");
+            JNIEnv::ExceptionDescribe();
+            JNIEnv::ExceptionClear();
+            throwUnexpected();
+        }
+    }
+
+    void traceException(jthrowable exception)
+    {
+        // Don't use auto-checking in here, as we are already inside exception-checking code
+        jstring msg = (jstring) JNIEnv::CallObjectMethod(exception, throwable_toString);
+        checkUnexpectedException();
+        const char *text = JNIEnv::GetStringUTFChars(msg, 0);
+        DBGLOG("javaembed: exception: %s", text);
+        JNIEnv::ReleaseStringUTFChars(msg, text);
+        checkUnexpectedException();
+        JNIEnv::DeleteLocalRef(msg);
+
+        jobjectArray frames = (jobjectArray) JNIEnv::CallObjectMethod(exception, throwable_getStackTrace);
+        checkUnexpectedException();
+        jsize length = JNIEnv::GetArrayLength(frames);
+        for (jsize i = 0; i < length; i++)
+        {
+            jobject frame = JNIEnv::GetObjectArrayElement(frames, i);
+            checkUnexpectedException();
+            msg = (jstring) JNIEnv::CallObjectMethod(frame, frame_toString);
+            text = JNIEnv::GetStringUTFChars(msg, 0);
+            DBGLOG("javaembed: exception: stack: %s", text);
+            JNIEnv::ReleaseStringUTFChars(msg, text);
+            checkUnexpectedException();
+            JNIEnv::DeleteLocalRef(msg);
+            JNIEnv::DeleteLocalRef(frame);
+        }
+        jthrowable cause = (jthrowable) JNIEnv::CallObjectMethod(exception, throwable_getCause);
+        if (cause && cause != exception)
+        {
+            DBGLOG("javaembed: exception: Caused by:");
+            traceException(cause);
+        }
+    }
+
     void checkException()
     {
         if (JNIEnv::ExceptionCheck())
         {
             jthrowable exception = JNIEnv::ExceptionOccurred();
             JNIEnv::ExceptionClear();
+            traceException(exception);
             jstring cause = (jstring) JNIEnv::CallObjectMethod(exception, throwable_toString);
             JNIEnv::ExceptionClear();
             const char *text = JNIEnv::GetStringUTFChars(cause, 0);
@@ -675,7 +726,8 @@ static jclass langStringClass;
 static jclass netURLClass;
 static jmethodID netURL_constructor;
 static jclass throwableClass;
-//static jmethodID throwable_toString;  declared above
+//static jmethodID throwable_toString; and others declared above
+static jclass stackTraceElementClass;
 static jclass langIllegalArgumentExceptionClass;
 
 static void forceGC(CheckedJNIEnv* JNIenv)
@@ -690,6 +742,10 @@ static void setupGlobals(CheckedJNIEnv *J)
         // Load this first as we can't report errors on the others sensibly if this one not loaded!
         throwableClass = J->FindGlobalClass("java/lang/Throwable");
         throwable_toString = J->GetMethodID(throwableClass, "toString", "()Ljava/lang/String;");
+        throwable_getStackTrace = J->GetMethodID(throwableClass, "getStackTrace", "()[Ljava/lang/StackTraceElement;");
+        throwable_getCause = J->GetMethodID(throwableClass, "getCause", "()Ljava/lang/Throwable;");
+        stackTraceElementClass = J->FindGlobalClass("java/lang/StackTraceElement");
+        frame_toString = J->GetMethodID(stackTraceElementClass, "toString", "()Ljava/lang/String;");
 
         systemClass = J->FindGlobalClass("java/lang/System");
         system_gc = J->GetStaticMethodID(systemClass, "gc", "()V");
@@ -4898,6 +4954,7 @@ extern "C" {
 JNIEXPORT jboolean JNICALL Java_com_HPCCSystems_HpccUtils__1hasNext (JNIEnv *, jclass, jlong);
 JNIEXPORT jobject JNICALL Java_com_HPCCSystems_HpccUtils__1next (JNIEnv *, jclass, jlong);
 JNIEXPORT jclass JNICALL Java_com_HPCCSystems_HpccClassLoader_defineClassForEmbed(JNIEnv *env, jobject loader, jint bytecodeLen, jlong bytecode, jstring name);
+JNIEXPORT void JNICALL Java_com_HPCCSystems_HpccUtils_log(JNIEnv *JNIenv, jclass, jstring msg);
 
 JNIEXPORT jboolean JNICALL Java_com_HPCCSystems_HpccUtils__1isLocal (JNIEnv *, jclass, jlong);
 JNIEXPORT jint JNICALL Java_com_HPCCSystems_HpccUtils__1numSlaves (JNIEnv *, jclass, jlong);
@@ -4971,6 +5028,16 @@ JNIEXPORT jclass JNICALL Java_com_HPCCSystems_HpccClassLoader_defineClassForEmbe
 
 }
 
+JNIEXPORT void JNICALL Java_com_HPCCSystems_HpccUtils_log(JNIEnv *JNIenv, jclass, jstring msg)
+{
+    if (msg)
+    {
+        const char *text = JNIenv->GetStringUTFChars(msg, 0);
+        DBGLOG("javaembed: user: %s", text);
+        JNIenv->ReleaseStringUTFChars(msg, text);
+    }
+}
+
 JNIEXPORT jboolean JNICALL Java_com_HPCCSystems_HpccUtils__1isLocal(JNIEnv *JNIenv, jclass, jlong proxy)
 {
     const IThorActivityContext *a = (IThorActivityContext *) proxy;

+ 2 - 2
system/jlib/jdebug.cpp

@@ -4025,7 +4025,7 @@ jlib_decl IUserMetric *createUserMetric(const char *name, const char *matchStrin
     return new UserMetricMsgHandler(name, matchString);
 }
 
-jlib_decl bool printProcessHandles(pid_t pid)
+jlib_decl bool printProcessHandles(unsigned pid)
 {
 #if defined(__linux__)
     StringBuffer curFilePathSB("/proc/");
@@ -4073,7 +4073,7 @@ jlib_decl bool printProcessHandles(pid_t pid)
     return true;
 }
 
-jlib_decl bool printLsOf(pid_t pid)
+jlib_decl bool printLsOf(unsigned pid)
 {
 #if defined(__linux__)
     if (!pid)

+ 2 - 2
system/jlib/jdebug.hpp

@@ -440,8 +440,8 @@ extern jlib_decl void clearAffinityCache(); // should be called whenever the pro
 extern jlib_decl void printProcMap(const char *fn, bool printbody, bool printsummary, StringBuffer *lnout, MemoryBuffer *mb, bool useprintf);
 extern jlib_decl void PrintMemoryReport(bool full=true);
 extern jlib_decl void printAllocationSummary();
-extern jlib_decl bool printProcessHandles(pid_t pid=0); // returns false if fails
-extern jlib_decl bool printLsOf(pid_t pid=0); // returns false if fails
+extern jlib_decl bool printProcessHandles(unsigned pid=0); // returns false if fails
+extern jlib_decl bool printLsOf(unsigned pid=0); // returns false if fails
 extern jlib_decl bool areTransparentHugePagesEnabled(HugePageMode mode);
 extern jlib_decl HugePageMode queryTransparentHugePagesMode();
 extern jlib_decl memsize_t getHugePageSize();

+ 1 - 1
system/tbb_sm/tbb

@@ -1 +1 @@
-Subproject commit 4bdba61bafc6ba2d636f31564f1de5702d365cf7
+Subproject commit e8b3e241ca2c006919797dadfa3bdc91b93bf690

+ 5 - 0
testing/regress/ecl/javaembed.ecl

@@ -27,10 +27,15 @@ string jcat(string a, string b) := EMBED(java)
 ENDEMBED;
 
 integer jadd(integer a, integer b) := EMBED(java)
+import com.HPCCSystems.HpccUtils;
+class MyClass
+{
   public static int jadd(int a, int b)
   {
+    HpccUtils.log("In jadd");
     return a + b;
   }
+}
 ENDEMBED;
 integer jaddL(integer a, integer b) := EMBED(java)
   public static long jaddL(int a, int b)

+ 0 - 1
testing/regress/hpcc/util/ecl/command.py

@@ -45,7 +45,6 @@ class ECLcmd(Shell):
         args.append('-fpickBestEngine=false')
         args.append('--target=' + engine)
         args.append('--cluster=' + cluster)
-        #args.append('--cluster=' + cluster + "_160")
         args.append('--port=' + self.config.espSocket)
         if self.config.useSsl.lower() == 'true':
             args.append('--ssl')

+ 13 - 2
testing/regress/hpcc/util/util.py

@@ -365,15 +365,26 @@ def isSudoer(testId = -1):
     retVal = False
     if 'linux' in sys.platform :
         tryCount = 5
+        cmd = "timeout -k 2 2 sudo id && echo Access granted || echo Access denied"
         while tryCount > 0:
-            myProc = subprocess.Popen(["timeout -k 2 2 sudo id && echo Access granted || echo Access denied"], shell=True, bufsize=8192, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+            tryCount -= 1
+            
+            myProc = subprocess.Popen([cmd], shell=True, bufsize=8192, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
             (myStdout,  myStderr) = myProc.communicate()
             result = "returncode:" + str(myProc.returncode) + ", stdout:\n'" + myStdout + "', stderr:\n'" + myStderr + "'."
             logging.debug("%3d. isSudoer() result is: '%s' (try count is:%d)", testId, result, tryCount)
+            
+            if 'timeout: invalid option' in myStderr:
+                logging.debug("%3d. isSudoer() result is: '%s'", testId, result)
+                cmd = "timeout 2 sudo id && echo Access granted || echo Access denied"
+                logging.debug("%3d. try is without '-k 2' parameter: '%s'", testId, cmd)
+                continue
+                
             if 'Access denied' not in myStdout:
                 retVal = True
                 break
-            tryCount -= 1
+
+
 
         if retVal == False:
             logging.debug("%3d. isSudoer() result is: '%s'", testId, result)