Skip to content

Commit 9372506

Browse files
committed
fix comments
1 parent 35e7f59 commit 9372506

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

internal/cacct/CmdArgParser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ Fields are identified by a percent sign (%) followed by a character or string.
117117
Use a dot (.) and a number between % and the format character or string to specify a minimum width for the field.
118118
Supported format identifiers or string, string case insensitive:
119119
%a/%Account - Display the account associated with the job.
120-
%c/%AllocCpus - Display the number of allocated CPUs, formatted to two decimal places.
121120
%C/%ReqCpus - Display the number of requested CPUs, formatted to two decimal places
121+
%c/%AllocCpus - Display the number of allocated CPUs, formatted to two decimal places.
122122
%D/%ElapsedTime - Display the elapsed time from the start of the job.
123123
%E/%EndTime - Display the end time of the job.
124124
%e/%ExitCode - Display the exit code of the job.

internal/cbatch/cbatch.go

+3
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ func ProcessCbatchArgs(cmd *cobra.Command, args []CbatchArg) (bool, *protos.Task
252252
if FlagComment != "" {
253253
structExtraFromCli.Comment = FlagComment
254254
}
255+
if FlagExclusive {
256+
task.Exclusive = true
257+
}
255258
if FlagOpenMode != "" {
256259
if FlagOpenMode == util.OpenModeAppend {
257260
task.GetBatchMeta().OpenModeAppend = proto.Bool(true)

internal/cqueue/CmdArgParser.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func init() {
114114
115115
Supported format identifiers or string, string case insensitive:
116116
%a/%Account - Display the account associated with the job.
117-
%C/%AllocCpus - Display the cpus allocated to the job.
118-
%c/%CpuPerNode - Display the requested cpu per node of the job.
117+
%C/%ReqCpus - Display the cpus requested to the job.
118+
%c/%AllocCpus - Display the cpus allocated to the job.
119119
%e/%ElapsedTime - Display the elapsed time from the start of the job.
120120
%h/%Held - Display the hold state of the job.
121121
%j/%JobID - Display the ID of the job.
@@ -128,7 +128,7 @@ Supported format identifiers or string, string case insensitive:
128128
%n/%Name - Display the name of the job.
129129
%P/%Partition - Display the partition the job is running in.
130130
%p/%Priority - Display the priority of the job.
131-
%Q/%ReqCpus - Display the cpus requested to the job.
131+
%Q/%CpuPerNode - Display the requested cpu per node of the job.
132132
%q/%QoS - Display the Quality of Service level for the job.
133133
%R/%Reason - Display the reason of pending.
134134
%r/%ReqNodes - Display the reqnodes of the job.

internal/cqueue/cqueue.go

+10-9
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,11 @@ var fieldMap = map[string]FieldProcessor{
455455
"account": {"Account", ProcessAccount},
456456

457457
// 'c' group
458-
"c": {"ReqCpuPerNode", ProcessReqCpuPerNode},
459-
"reqcpupernode": {"ReqCpuPerNode", ProcessReqCpuPerNode},
460-
"C": {"AllocCpus", ProcessAllocCpus},
458+
"c": {"AllocCpus", ProcessAllocCpus},
461459
"alloccpus": {"AllocCpus", ProcessAllocCpus},
460+
"C": {"ReqCpus", ProcessReqCPUs},
461+
"reqcpus": {"ReqCpus", ProcessReqCPUs},
462+
462463

463464
// 'e' group
464465
"e": {"ElapsedTime", ProcessElapsedTime},
@@ -503,8 +504,8 @@ var fieldMap = map[string]FieldProcessor{
503504
// 'q' group
504505
"q": {"QoS", ProcessQoS},
505506
"qos": {"QoS", ProcessQoS},
506-
"Q": {"ReqCpus", ProcessReqCPUs},
507-
"reqcpus": {"ReqCpus", ProcessReqCPUs},
507+
"Q": {"ReqCpuPerNode", ProcessReqCpuPerNode},
508+
"reqcpupernode": {"ReqCpuPerNode", ProcessReqCpuPerNode},
508509

509510
// 'r' group
510511
"r": {"ReqNodes", ProcessReqNodes},
@@ -594,14 +595,14 @@ func FormatData(reply *protos.QueryTasksInfoReply) (header []string, tableData [
594595
field = strings.ToLower(field)
595596
}
596597

597-
//a/Account, c/ReqCpuPerNode, C/AllocCPUs, e/ElapsedTime, h/Held, j/JobID, l/TimeLimit, L/NodeList, k/Comment,
598-
//m/AllocMemPerNode, M/ReqMemPerNode, n/Name, N/NodeNum, p/Priority, P/Partition, q/Qos, Q/ReqCpus, r/ReqNodes,
598+
//a/Account, C/ReqCpus, c/AllocCPUs, e/ElapsedTime, h/Held, j/JobID, l/TimeLimit, L/NodeList, k/Comment,
599+
//m/AllocMemPerNode, M/ReqMemPerNode, n/Name, N/NodeNum, p/Priority, P/Partition, q/Qos, Q/ReqCpuPerNode, r/ReqNodes,
599600
//R/Reason, s/SubmitTime, S/StartTime, t/State, T/JobType, u/User, U/Uid, x/ExcludeNodes, X/Exclusive.
600601
fieldProcessor, found := fieldMap[field]
601602
if !found {
602603
log.Errorf("Invalid format specifier or string : %s, string unfold case insensitive, reference:\n"+
603-
"a/Account, c/ReqCpuPerNode, C/AllocCPUs, e/ElapsedTime, h/Held, j/JobID, l/TimeLimit, L/NodeList, k/Comment,\n"+
604-
"m/AllocMemPerNode, M/ReqMemPerNode, n/Name, N/NodeNum, p/Priority, P/Partition, q/Qos, Q/ReqCpus, r/ReqNodes,\n"+
604+
"a/Account, C/ReqCpus, c/AllocCPUs, e/ElapsedTime, h/Held, j/JobID, l/TimeLimit, L/NodeList, k/Comment,\n"+
605+
"m/AllocMemPerNode, M/ReqMemPerNode, n/Name, N/NodeNum, p/Priority, P/Partition, q/Qos, Q/ReqCpuPerNode, r/ReqNodes,\n"+
605606
"R/Reason, s/SubmitTime, S/StartTime, t/State, T/JobType, u/User, U/Uid, x/ExcludeNodes, X/Exclusive.", field)
606607
os.Exit(util.ErrorInvalidFormat)
607608
}

0 commit comments

Comments
 (0)