Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-8.12.x' into candidate…
Browse files Browse the repository at this point in the history
…-8.12.0

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Jan 24, 2023
2 parents a36de72 + 5a0c476 commit cac5791
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 71 deletions.
13 changes: 12 additions & 1 deletion docs/EN_US/ECLLanguageReference/ECLR_mods/Basics-Constants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,18 @@ MyDec2 := 3.14159265358979323846d // value of MyDec2 is the DECIMAL
</tgroup>
</informaltable>Example:</para>

<para><programlisting>IMPORT STD;
<para><programlisting>// Any modules referenced inside the condition must be declared outside of the condition
// This will avoid syntax errors
prod_thor_dali := _Control.IPAddress.prod_thor_dali;
#IF(_TARGET_PLATFORM_ in ['thorlcr'])
Output('thor');
prod_thor_dali;
#ELSE
Output('not thor');
#END

//Second example
IMPORT STD;
STRING14 fGetDateTimeString() :=
#IF(__ECL_VERSION_MAJOR__ &gt; 5) or ((__ECL_VERSION_MAJOR__ = 5) AND (__ECL_VERSION_MINOR__ &gt;= 2))
STD.Date.SecondsToString(STD.Date.CurrentSeconds(true), '%Y%m%d%H%M%S');
Expand Down
100 changes: 67 additions & 33 deletions docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-AGGREGATE.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
<primary>RIGHT1</primary>
</indexterm>,RIGHT2<indexterm>
<primary>RIGHT2</primary>
</indexterm>) ] [,</emphasis> <emphasis>groupingfields</emphasis>
<emphasis role="bold">] [, LOCAL<indexterm>
</indexterm>) |</emphasis> <emphasis>groupingfields</emphasis> <emphasis
role="bold">] [, LOCAL<indexterm>
<primary>LOCAL</primary>
</indexterm> | FEW<indexterm>
<primary>FEW</primary>
</indexterm> | MANY<indexterm>
<primary>MANY</primary>
</indexterm>] [, UNORDERED | ORDERED(</emphasis> <emphasis>bool </emphasis><emphasis role="bold">) ] [, STABLE | UNSTABLE ] [, PARALLEL [ (</emphasis> <emphasis>numthreads </emphasis><emphasis role="bold">) ] ] [, ALGORITHM(</emphasis> <emphasis>name </emphasis><emphasis role="bold">) ] )</emphasis></para>
</indexterm>] [, UNORDERED | ORDERED(</emphasis> <emphasis>bool
</emphasis><emphasis role="bold">) ] [, STABLE | UNSTABLE ] [, PARALLEL [
(</emphasis> <emphasis>numthreads </emphasis><emphasis role="bold">) ] ] [,
ALGORITHM(</emphasis> <emphasis>name </emphasis><emphasis role="bold">) ]
)</emphasis></para>

<para><informaltable colsep="1" frame="all" rowsep="1">
<tgroup cols="2">
Expand Down Expand Up @@ -93,50 +97,70 @@
<entry>Optional. Indicates that the expression will result in more
than 10,000 records.</entry>
</row>

<row>
<entry><emphasis role="bold">UNORDERED</emphasis></entry>

<entry>Optional. Specifies the output record order is not significant.</entry>
<entry>Optional. Specifies the output record order is not
significant.</entry>
</row>

<row>
<entry><emphasis role="bold">ORDERED</emphasis></entry>

<entry>Specifies the significance of the output record order.</entry>
<entry>Specifies the significance of the output record
order.</entry>
</row>

<row>
<entry><emphasis>bool</emphasis></entry>

<entry>When False, specifies the output record order is not significant. When True, specifies the default output record order.</entry>
<entry>When False, specifies the output record order is not
significant. When True, specifies the default output record
order.</entry>
</row>

<row>
<entry><emphasis role="bold">STABLE</emphasis></entry>

<entry>Optional. Specifies the input record order is significant.</entry>
<entry>Optional. Specifies the input record order is
significant.</entry>
</row>

<row>
<entry><emphasis role="bold">UNSTABLE</emphasis></entry>

<entry>Optional. Specifies the input record order is not significant.</entry>
<entry>Optional. Specifies the input record order is not
significant.</entry>
</row>

<row>
<entry><emphasis role="bold">PARALLEL</emphasis></entry>

<entry>Optional. Try to evaluate this activity in parallel.</entry>
<entry>Optional. Try to evaluate this activity in
parallel.</entry>
</row>

<row>
<entry><emphasis>numthreads</emphasis></entry>

<entry>Optional. Try to evaluate this activity using <emphasis>numthreads</emphasis> threads.</entry>
<entry>Optional. Try to evaluate this activity using
<emphasis>numthreads</emphasis> threads.</entry>
</row>

<row>
<entry><emphasis role="bold">ALGORITHM</emphasis></entry>

<entry>Optional. Override the algorithm used for this activity.</entry>
<entry>Optional. Override the algorithm used for this
activity.</entry>
</row>

<row>
<entry><emphasis>name</emphasis></entry>

<entry>The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options.</entry>
<entry>The algorithm to use for this activity. Must be from the
list of supported algorithms for the SORT function's STABLE and
UNSTABLE options.</entry>
</row>

<row>
Expand All @@ -159,7 +183,7 @@
<para>The operation is implicitly local, in that the
<emphasis>maintransform</emphasis> is called to process records locally on
each node, and the result records on each node are then merged to produce
the global result. </para>
the global result.</para>

<sect2 id="TRANSFORM_Function_Requirements_Aggregate">
<title>TRANSFORM Function Requirements - AGGREGATE</title>
Expand Down Expand Up @@ -216,38 +240,48 @@
<emphasis>maintransform</emphasis>. If it can't, then the user will need
to specify one.</para>

<programlisting>inRecord := RECORD
<programlisting>//Example 1: Produce a list of box contents by concatenating a string:
IMPORT Std;
inRec := RECORD
UNSIGNED box;
STRING text{MAXLENGTH(10)};
STRING text{MAXLENGTH(100)};
END;
inTable := DATASET([{1,'Fred'},{1,'Freddy'},
{2,'Freddi'},{3,'Fredrik'},{1,'FredJon'}], inRecord);

//Example 1: Produce a list of box contents by concatenating a string:

outRecord1 := RECORD
inds := DATASET([{1,'Fred1'},{1,'Freddy1'},{1,'FredJon1'},
{3,'Fred3'},{3,'Freddy3'},{3,'FredJon3'},
{4,'Fred4'},{4,'Freddy4'},{4,'FredJon4'},
{2,'Freddi'},{2,'Fredrik'}], inRec,DISTRIBUTED);
outRec := RECORD
UNSIGNED box;
STRING contents{MAXLENGTH(200)};
END;
outRecord1 t1(inRecord l, outRecord1 r) := TRANSFORM
outRec t1(inds l, outRec r) := TRANSFORM
SELF.box := l.box;
SELF.contents := r.contents + IF(r.contents &lt;&gt; '', ',', '') + l.text;
SELF.contents:= r.contents +IF(r.contents &lt;&gt; '', ',', '') +l.text +'-' +(Std.System.ThorLib.Node()+1);
END;

outRecord1 t2(outRecord1 r1, outRecord1 r2) := TRANSFORM
outRec t2(outRec r1, outRec r2) := TRANSFORM
SELF.box := r1.box;
SELF.contents := r1.contents + ',' + r2.contents;
SELF.contents := r1.contents + '::' + r2.contents;
END;
OUTPUT(AGGREGATE(inTable, outRecord1, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2), LEFT.box));

//This example could eliminate the merge transform if the SELF.contents expression in
//the t1 TRANSFORM were simpler, like this:
// SELF.contents := r.contents + ',' + l.text;
//which would make the AGGREGATE function like this:
// OUTPUT(AGGREGATE(inTable, outRecord1, t1(LEFT, RIGHT), LEFT.box));

OUTPUT(AGGREGATE(inds, outRec, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2), LEFT.box));
//because there is a "group by" field, this will never call the second TRANSFORM
//because "group by" puts all grouped recs on a single node
//and it produces one result rec for each unique "group by" value

OUTPUT(AGGREGATE(inds, outRec, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2)));
//without the "group by" field, this calls the second TRANSFORM on a multi-node cluster
//and the second TRANSFORM produces a single result record after merging the results from
//each node


//Example 2: A PIGMIX style grouping operation:
inRecord := RECORD
UNSIGNED box;
STRING text{MAXLENGTH(10)};
END;
inTable := DATASET([{1,'Fred'},{1,'Freddy'},
{2,'Freddi'},{3,'Fredrik'},{1,'FredJon'}], inRecord);

outRecord2 := RECORD
UNSIGNED box;
DATASET(inRecord) items;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<para>Standard arithmetic operators<indexterm>
<primary>arithmetic operators</primary>
</indexterm> are supported for use in expressions, listed here in their
evaluation precedence. </para>
evaluation precedence.</para>

<para><variablelist>
<varlistentry>
Expand Down Expand Up @@ -324,7 +324,9 @@
<para>The Greater Than or Equal operator <emphasis
role="underline">must</emphasis> have the Greater Than (&gt;) sign first.
For the expression a &lt;=&gt; b, the Equivalence Comparison operator
returns -1 if a&lt;b, 0 if a=b, and 1 if a&gt;b. When STRINGs are compared
for equivalence, trailing spaces are ignored.</para>
returns -1 if a&lt;b, 0 if a=b, and 1 if a&gt;b. When STRINGs are
compared, trailing spaces are generally ignored. Standard library
functions, such as Std.Str.Find(), may consider trailing spaces. See the
Standard Library Reference for specific details.</para>
</sect2>
</sect1>
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
records. If the <emphasis>condition</emphasis> expression references
<emphasis>fields</emphasis> in the RECORD preceding the IFBLOCK,
those references must use SELF. prepended to the fieldname to
disambiguate the reference.</entry>
disambiguate the reference. This is only for use in RECORD
structures that define files on disk.</entry>
</row>

<row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ OUTPUT(i2);
TRANSFORM(RECORDOF(ProgGuide.Accounts),
SELF := LEFT));
ds0 := DISTRIBUTE(bf,RANDOM()) : PERSIST('~PROGGUIDE::PERSIST::TestGroupSort');
ds1 := DISTRIBUTE(ds,HASH32(personid));
ds1 := DISTRIBUTE(ds0,HASH32(personid));

// do a global sort
s1 := SORT(ds0,personid,opendate,-balance);
Expand Down
5 changes: 3 additions & 2 deletions docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Copy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@

<entry>Optional. A boolean TRUE or FALSE flag indicating whether to
execute the copy process on the source nodes and push to the targets
instead of executing on the targets and pulling from the source. If
omitted, the default is FALSE.</entry>
instead of executing on the targets and pulling from the source.
This option is only valid within the same environment. If omitted,
the default is FALSE.</entry>
</row>

<row>
Expand Down
3 changes: 2 additions & 1 deletion docs/EN_US/ECLStandardLibraryReference/SLR-Mods/Find.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
specified <emphasis>instance</emphasis> is greater than the number of
occurrences of the <emphasis>target</emphasis> in the
<emphasis>source</emphasis>, <emphasis role="bold">Find</emphasis> returns
zero (0).</para>
zero (0). Trailing spaces are considered to be significant when
comparing.</para>

<para>Example:</para>

Expand Down
13 changes: 8 additions & 5 deletions esp/platform/application_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,14 @@ void bindAuthResources(IPropertyTree *legacyAuthenticate, IPropertyTree *app, co
if (!appAuth)
throw MakeStringException(-1, "Can't find application Auth settings. To run without security set 'auth: none'");
IPropertyTree *root_access = appAuth->queryPropTree("root_access");
StringAttr required(root_access->queryProp("@required"));
StringAttr description(root_access->queryProp("@description"));
StringAttr resource(root_access->queryProp("@resource"));
VStringBuffer locationXml("<Location path='/' resource='%s' required='%s' description='%s'/>", resource.str(), required.str(), description.str());
legacyAuthenticate->addPropTree("Location", createPTreeFromXMLString(locationXml));
if (root_access)//root_access (feature map, auth map) not required for simple security managers
{
StringAttr required(root_access->queryProp("@required"));
StringAttr description(root_access->queryProp("@description"));
StringAttr resource(root_access->queryProp("@resource"));
VStringBuffer locationXml("<Location path='/' resource='%s' required='%s' description='%s'/>", resource.str(), required.str(), description.str());
legacyAuthenticate->addPropTree("Location", createPTreeFromXMLString(locationXml));
}

VStringBuffer featuresPath("resource_map/%s/Feature", service);
Owned<IPropertyTreeIterator> features = appAuth->getElements(featuresPath);
Expand Down
2 changes: 1 addition & 1 deletion esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ bool CWsESDLConfigEx::onPublishESDLDefinition(IEspContext &context, IEspPublishE
userdesc->set(user, password, context.querySignature());
}

DBGLOG("CWsESDLConfigEx::onPublishESDLDefinition User=%s",user);
DBGLOG("CWsESDLConfigEx::onPublishESDLDefinition User=%s",user ? user : "(null)");

resp.updateStatus().setCode(0);

Expand Down
7 changes: 6 additions & 1 deletion esp/src/src/nls/pt-br/hpcc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Abort: "Abortar",
AbortedBy: "Abortado pelo",
AbortedTime: "Hora de Abortar",
AbortSelectedWorkunits: "Abortar unidade(s) de trabalho selecionada(s)? Seu ID de login será registrado para esta ação no(s) WU(s).",
About: "Sobre Plataforma HPCC",
AboutGraphControl: "Sobre Controle de Gráphico",
AboutHPCCSystems: "Sobre HPCC Systems",
Expand Down Expand Up @@ -111,6 +112,7 @@
Columns: "Colunas",
Command: "Comando",
Comment: "Comentário",
CompileCost: "Custo de compilação",
Compiled: "Compilado",
Compiling: "Compilando",
Completed: "Completo",
Expand Down Expand Up @@ -233,6 +235,7 @@
Downloads: "Abaixamentos",
DownloadSelectionAsCSV: "Baixar seleção como CSV",
DownloadToCSV: "Transferir para o CSV",
DownloadToCSVNonFlatWarning: "Observação: o download de arquivos CVS pode não ser formatado como esperado",
DropZone: "Zona de entrada de arquivos",
DueToInctivity: "Você será desconectado de todas as sessões do ECL Watch em 3 minutos devido a inatividade.",
Duration: "Duração",
Expand Down Expand Up @@ -449,8 +452,8 @@
LocalFileSystemsOnly: "Somente Sistemas de Arquivos Locais",
Location: "Localização",
Lock: "Bloquear",
log_analysis_1: "log_analysis_1*",
Log: "Registro",
log_analysis_1: "log_analysis_1*",
LogAccessType: "Tipo de acesso ao registro",
LogDirectory: "Diretório de Log",
LogFile: "Arquivo de log",
Expand Down Expand Up @@ -641,6 +644,7 @@
PleaseSelectAUserToAdd: "Por favor, selecione um usuário para adicionar",
Plugins: "Plugins",
Pods: "Pods",
PodsAccessError: "Não é possível recuperar a lista de pods",
Port: "Porta",
Prefix: "Prefixo",
PrefixPlaceholder: "&lsquo;nomedoarquivo{:comprimento}, tamanho{:[B|L][1-8]}&rsquo;",
Expand Down Expand Up @@ -876,6 +880,7 @@
ThorProcess: "Processo de Thor",
ThreadID: "ID do Tópico",
Time: "Tempo",
Timeline: "Linha de tempo",
TimeMaxTotalExecuteMinutes: "Tempo Máximo Total de Minutos de Execução",
TimeMeanTotalExecuteMinutes: "Tempo Médio Total de Minutos de Execução",
TimeMinTotalExecuteMinutes: "Tempo Min, Total de Minutos de Execução",
Expand Down
6 changes: 0 additions & 6 deletions initfiles/etc/DIR_NAME/environment.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ jvmoptions=-XX:-UsePerfData
# In most cases, skipping the cleanup is harmless and avoids these lockups
skipPythonCleanup=true

# Although HPCC platform includes plugins for both Python2 and Python3, only one may be safely enabled at a time
# as the Python libraries export the same symbols for both versions. Enabling both may lead to unpredicatable results
# including segfaults or undefined symbol errors.
#
# If you would prefer to use python 2 and disable python3, change the line below to read
# additionalPlugins=python2
#
# Multiple paths can be specified (separate with :, or ; on Windows).
# Relative paths are assumed to be relative to ${INSTALL_DIR}/versioned
Expand Down
Loading

0 comments on commit cac5791

Please sign in to comment.