Skip to content

Commit

Permalink
Update terminology to be more inclusive (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmyth-aquaq authored Jul 15, 2020
1 parent 79321c5 commit 40b62bd
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions code/common/help.q
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TXT,:(enlist`cmdline)!enlist(
"-P N printdigits, default 7, 0=>all";
"-q quiet, no startup banner text";
"-r :H:P replicate from :host:port ";
"-s N slaves for parallel execution";
"-s N secondary processes for parallel execution";
"-t N timer milliseconds";
"-T N timeout seconds(applies to all client queries)";
"-u F usr:pwd file, no access above start directory";
Expand Down Expand Up @@ -275,7 +275,7 @@ TXT,:(enlist`syscmd)!enlist(
"\\p [i] port (0 turns off)";
"\\P [7] print digits(0-all)";
"\\r old new unix mv ";
"\\s number of slaves (query only) ";
"\\s number of secondary processes (query only) ";
"\\S [-314159] seed";
"\\t [i] timer [x] milliseconds (1st fire after delay)";
"\\t expr time expression ";
Expand Down
2 changes: 1 addition & 1 deletion code/handlers/permissions.q
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ err[`size]:{"pm: returned value exceeds maximum permitted size"}
/ determine whether the system outputs booleans (permission check only) or evaluates query
runmode:@[value;`runmode;1b]

/ determine whether unlisted variables are auto-whitelisted
/ determine whether unlisted variables are auto-allowlisted
permissivemode:@[value; `permissivemode; 0b]

/ schema
Expand Down
16 changes: 8 additions & 8 deletions code/processes/wdb.q
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ tpconnsleepintv:@[value;`tpconnsleepintv;10]; /-num
tpcheckcycles:@[value;`tpcheckcycles;0W]; /-number of attempts to connect to tp before process is killed

sorttypes:@[value;`sorttypes;`sort]; /-list of sort types to look for upon a sort
sortslavetypes:@[value;`sortslavetypes;`sortslave]; /-list of sort types to look for upon a sort being called with slave process
sortworkertypes:@[value;`sortworkertypes;`sortworker]; /-list of sort types to look for upon a sort being called with worker process

subtabs:@[value;`subtabs;`]; /-list of tables to subscribe for
subsyms:@[value;`subsyms;`]; /-list of syms to subscription to
Expand Down Expand Up @@ -73,10 +73,10 @@ eodwaittime:@[value;`eodwaittime;0D00:00:10.000]; /-len

/ - end of default parameters

/ - define .z.pd in order to connect to any slave processes
/ - define .z.pd in order to connect to any worker processes
.z.pd:{$[.z.K<3.3;
`u#`int$();
`u#exec w from .servers.getservers[`proctype;sortslavetypes;()!();1b;0b]]
`u#exec w from .servers.getservers[`proctype;sortworkertypes;()!();1b;0b]]
}

/- fix any backslashes on windows
Expand Down Expand Up @@ -269,10 +269,10 @@ endofdaysortdate:{[dir;pt;tablist;hdbsettings]
/- sort the table and garbage collect (if enabled)
.lg.o[`sort;"starting to sort data"];
$[count[.z.pd[]]&0>system"s";
[.lg.o[`sort;"sorting on slave sort", string .z.p];
[.lg.o[`sort;"sorting on worker sort", string .z.p];
{(neg x)(`.wdb.reloadsymfile;y);(neg x)(::)}[;.Q.dd[hdbsettings `hdbdir;`sym]] each .z.pd[];
{[x;compression] setcompression compression;.sort.sorttab x;if[gc;.gc.run[]]}[;hdbsettings`compression] peach tablist,'.Q.par[dir;pt;] each tablist];
[.lg.o[`sort;"sorting on master sort"];
[.lg.o[`sort;"sorting on main sort"];
reloadsymfile[.Q.dd[hdbsettings `hdbdir;`sym]];
{[x] .sort.sorttab[x];if[gc;.gc.run[]]} each tablist,'.Q.par[dir;pt;] each tablist]];
.lg.o[`sort;"finished sorting data"];
Expand Down Expand Up @@ -332,10 +332,10 @@ merge:{[dir;pt;tableinfo;mergelimits;hdbsettings]
endofdaymerge:{[dir;pt;tablist;mergelimits;hdbsettings]
/- merge data from partitons
$[(0 < count .z.pd[]) and ((system "s")<0);
[.lg.o[`merge;"merging on slave"];
[.lg.o[`merge;"merging on worker"];
{(neg x)(`.wdb.reloadsymfile;y);(neg x)(::)}[;.Q.dd[hdbsettings `hdbdir;`sym]] each .z.pd[];
merge[dir;pt;;mergelimits;hdbsettings] peach flip (key tablist;value tablist)];
[.lg.o[`merge;"merging on master"];
[.lg.o[`merge;"merging on main"];
reloadsymfile[.Q.dd[hdbsettings `hdbdir;`sym]];
merge[dir;pt;;mergelimits;hdbsettings] each flip (key tablist;value tablist)]];
/- if path exists, delete it
Expand Down Expand Up @@ -511,7 +511,7 @@ getsortparams:{[]
.wdb.currentpartition:.wdb.getpartition[];

/- make sure to request connections for all the correct types
.servers.CONNECTIONS:(distinct .servers.CONNECTIONS,.wdb.hdbtypes,.wdb.rdbtypes,.wdb.gatewaytypes,.wdb.tickerplanttypes,.wdb.sorttypes,.wdb.sortslavetypes) except `
.servers.CONNECTIONS:(distinct .servers.CONNECTIONS,.wdb.hdbtypes,.wdb.rdbtypes,.wdb.gatewaytypes,.wdb.tickerplanttypes,.wdb.sorttypes,.wdb.sortworkertypes) except `

/- setting the upd and .u.end functions as the .wdb versions
.u.end:{[pt]
Expand Down
1 change: 0 additions & 1 deletion config/passwords/sortslave.txt

This file was deleted.

1 change: 1 addition & 0 deletions config/passwords/sortworker.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sortworker:pass
6 changes: 3 additions & 3 deletions config/permissions/default.q
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
.pm.adduser[`chainedtp;`local;`md5;md5"pass"]
.pm.assignrole[`chainedtp;`systemuser]
.pm.addtogroup[`chainedtp;`systemuser]
.pm.adduser[`sortslave;`local;`md5;md5"pass"]
.pm.assignrole[`sortslave;`systemuser]
.pm.addtogroup[`sortslave;`systemuser]
.pm.adduser[`sortworker;`local;`md5;md5"pass"]
.pm.assignrole[`sortworker;`systemuser]
.pm.addtogroup[`sortworker;`systemuser]
.pm.adduser[`discovery;`local;`md5;md5"pass"]
.pm.assignrole[`discovery;`systemuser]
.pm.addtogroup[`discovery;`systemuser]
Expand Down
6 changes: 3 additions & 3 deletions config/settings/sortslave.q → config/settings/sortworker.q
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Sort Slave config
// Sort Worker config

\d .wdb
savedir:hsym`$getenv[`TORQHOME],"/wdbhdb" // location to save wdb data
Expand All @@ -21,10 +21,10 @@ mergenumtab:`quote`trade!10000 50000 // specify number of rows per table
hdbdir:`:hdb // move wdb database to different location
sortcsv:hsym first .proc.getconfigfile["sort.csv"] // location of csv file
gc:1b // garbage collect at appropriate points (after each table save and after sorting data)
tickerplanttypes:rdbtypes:hdbtypes:gatewaytypes:sorttypes:sortslavetypes:() // sortslaves don't need these connections
tickerplanttypes:rdbtypes:hdbtypes:gatewaytypes:sorttypes:sortworkertypes:() // sortworkers don't need these connections

// Server connection details
\d .servers
CONNECTIONS:() // sortslave doesn't need to connect to other processes
CONNECTIONS:() // sortworker doesn't need to connect to other processes
STARTUP:1b // create connections

2 changes: 1 addition & 1 deletion datadog/Example_TorQ_Monitoring_Dashboard.json

Large diffs are not rendered by default.

Binary file modified datadog/monitors/monitors.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/Processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ r result value passes the conditions specified by the resultchecker function.
This example checks whether the trade table within the rdb is larger than 10.
As this is true, the status has been set to 1h and no error message
has been returned. This information is inserted into the `checkstatus` table,
which is the master table where all results are stored.
which is the primary table where all results are stored.

q)checkstatus
checkid| family metric process lastrun nextrun status executiontime totaltime timerstatus running result
Expand Down
2 changes: 1 addition & 1 deletion docs/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A discussion on which method you should use for an end-of-day sort in TorQ.

[ End-of-Day Parallel Sorting ]( http://www.aquaq.co.uk/q/end-of-day-parallel-sorting-in-torq/ )

Details on how TorQ utilises sortslaves to vastly speed up the end-of-day sort.
Details on how TorQ utilises sortworkers to vastly speed up the end-of-day sort.

[ Broadcast Publish ]( http://www.aquaq.co.uk/q/kdb-3-4-broadcast-publish/ )

Expand Down
2 changes: 1 addition & 1 deletion docs/handlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ below.
The permissions script can be set to have permissive mode enabled with
permissivemode:1b (disabled by default). When enabled at script loading,
this bypasses access checks on variables which are not listed in the
access table, effectively auto-whitelisting any variables not listed in
access table, effectively auto-allowlisting any variables not listed in
the access table for all users, which may be useful in partly restricted
development environments.

Expand Down

0 comments on commit 40b62bd

Please sign in to comment.