Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
882068de
Commit
882068de
authored
Jun 15, 2020
by
Michael Ott
Browse files
Add SNG substitution pattern template
parent
bb150e59
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/dcdbslurmjob/dcdbslurmjob.cpp
View file @
882068de
...
...
@@ -152,7 +152,7 @@ int main(int argc, char** argv) {
std
::
string
host
=
"127.0.0.1"
,
cassandraPort
=
"9042"
,
cassandraUser
=
""
,
cassandraPassword
=
""
;
int
brokerPort
=
1883
;
std
::
string
nodelist
=
""
,
jobId
=
""
,
userId
=
""
;
std
::
string
substition
=
""
;
std
::
string
substit
ut
ion
=
""
;
uint64_t
ts
=
0
;
// Defining options
...
...
@@ -227,7 +227,10 @@ int main(int argc, char** argv) {
userId
=
optarg
;
break
;
case
's'
:
substition
=
optarg
;
substitution
=
optarg
;
if
(
substitution
==
"SNG"
)
{
substitution
=
"s%([fi][0-9]{2})(r[0-9]{2})(c[0-9]{2})(s[0-9]{2})%/sng/
\\
1/
\\
2/
\\
3/
\\
4%"
;
}
break
;
case
'h'
:
default:
...
...
@@ -293,12 +296,13 @@ int main(int argc, char** argv) {
DCDB
::
NodeList
nl
;
splitNodeList
(
nodelist
,
nl
);
convertNodeList
(
nl
,
substition
);
convertNodeList
(
nl
,
substit
ut
ion
);
std
::
cout
<<
"JOBID = "
<<
jobId
<<
std
::
endl
;
std
::
cout
<<
"USER = "
<<
userId
<<
std
::
endl
;
std
::
cout
<<
"START = "
<<
ts
<<
std
::
endl
;
std
::
cout
<<
"NODELIST = "
<<
nodelist
<<
std
::
endl
;
std
::
cout
<<
"SUBST = "
<<
substitution
<<
std
::
endl
;
std
::
cout
<<
"NODES ="
;
for
(
auto
&
n
:
nl
)
{
std
::
cout
<<
" "
<<
n
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment