style(frontend): gofmt the apiserver and xcecli sources
Formatting only (gofmt -w on the 29 non-vendored, non-generated files gofmt -l reported); swag-generated apiserver/docs/docs.go left as is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b57ce6d6a9
commit
3615c7c0fb
29 changed files with 1280 additions and 1285 deletions
|
|
@ -23,10 +23,10 @@ config_file:
|
||||||
}
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
user string
|
user string
|
||||||
pass string
|
pass string
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
{"valid admin", "admin", "secret", false},
|
{"valid admin", "admin", "secret", false},
|
||||||
{"valid viewer", "viewer", "pass", false},
|
{"valid viewer", "viewer", "pass", false},
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
_ "apiserver/docs"
|
|
||||||
"apiserver/backend"
|
"apiserver/backend"
|
||||||
"apiserver/backend/auth"
|
"apiserver/backend/auth"
|
||||||
|
_ "apiserver/docs"
|
||||||
"apiserver/middleware"
|
"apiserver/middleware"
|
||||||
"apiserver/router"
|
"apiserver/router"
|
||||||
"apiserver/store"
|
"apiserver/store"
|
||||||
|
|
|
||||||
|
|
@ -44,16 +44,16 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SUCCESS_CODE = 200
|
SUCCESS_CODE = 200
|
||||||
CREATED = 201
|
CREATED = 201
|
||||||
ACCEPTED = 202
|
ACCEPTED = 202
|
||||||
StatusPartialContent = 206
|
StatusPartialContent = 206
|
||||||
ERROR_CODE = 500
|
ERROR_CODE = 500
|
||||||
INVALID_PARAMS_CODE = 400
|
INVALID_PARAMS_CODE = 400
|
||||||
ERROR_AUTH_CHECK_TOKEN_CODE = 401
|
ERROR_AUTH_CHECK_TOKEN_CODE = 401
|
||||||
ERROR_AUTH_CODE = 403
|
ERROR_AUTH_CODE = 403
|
||||||
ERROR_NOT_FOUND_CODE = 404
|
ERROR_NOT_FOUND_CODE = 404
|
||||||
ERROR_TOO_MANY_REQUESTS_CODE = 429
|
ERROR_TOO_MANY_REQUESTS_CODE = 429
|
||||||
|
|
||||||
//read file error
|
//read file error
|
||||||
ERROR_READ_FILE_CODE = 501
|
ERROR_READ_FILE_CODE = 501
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
//TODO: Need assign clusterID globally.
|
//TODO: Need assign clusterID globally.
|
||||||
clusterID = 1
|
clusterID = 1
|
||||||
apiserverID = 0
|
apiserverID = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -3190,4 +3190,3 @@ func GetHostList(hosts []string) ([]string, error) {
|
||||||
}
|
}
|
||||||
return execHosts, nil
|
return execHosts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"apiserver/backend"
|
"apiserver/backend"
|
||||||
"apiserver/models"
|
"apiserver/models"
|
||||||
"apiserver/store"
|
"apiserver/store"
|
||||||
"apiserver/utils"
|
"apiserver/utils"
|
||||||
|
"errors"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -242,4 +242,3 @@ func parseJobIDParam(jobidStr string) (models.JobInfo, error) {
|
||||||
ArrayIdx: 0, // peek defaults to base job; array idx can be added later
|
ArrayIdx: 0, // peek defaults to base job; array idx can be added later
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ func TestGetJobOutput_DefaultPathFallback(t *testing.T) {
|
||||||
// Use a real-ish packed job ID: cluster=1, apiserver=0, ts=1778311965, seq=0
|
// Use a real-ish packed job ID: cluster=1, apiserver=0, ts=1778311965, seq=0
|
||||||
// FormatJobID → "1-0-1778311965-0"
|
// FormatJobID → "1-0-1778311965-0"
|
||||||
// WorkerDefaultOutputPath → "/tmp/job_1-0-1778311965-0_task0.out"
|
// WorkerDefaultOutputPath → "/tmp/job_1-0-1778311965-0_task0.out"
|
||||||
const uniqueID = int64(0x0100000006A04BDD<<0) // MakeJobID(1,0,1778311965,0,0)
|
const uniqueID = int64(0x0100000006A04BDD << 0) // MakeJobID(1,0,1778311965,0,0)
|
||||||
// Use backend.MakeJobID directly for clarity; compute inline:
|
// Use backend.MakeJobID directly for clarity; compute inline:
|
||||||
// clusterID=1 at bit 56, timestamp=1778311965 at bit 20
|
// clusterID=1 at bit 56, timestamp=1778311965 at bit 20
|
||||||
// packed = (1 << 56) | (1778311965 << 20)
|
// packed = (1 << 56) | (1778311965 << 20)
|
||||||
|
|
@ -512,4 +512,3 @@ func TestGetJobOutput_DoneJob(t *testing.T) {
|
||||||
t.Errorf("job_status = %q, want DONE", resp.Data.JobStatus)
|
t.Errorf("job_status = %q, want DONE", resp.Data.JobStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,46 +7,46 @@ import (
|
||||||
|
|
||||||
func TestClusterInfo_NewFields(t *testing.T) {
|
func TestClusterInfo_NewFields(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
cluster ClusterInfo
|
cluster ClusterInfo
|
||||||
field string
|
field string
|
||||||
want interface{}
|
want interface{}
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "HeartbeatInterval field exists and serializes",
|
name: "HeartbeatInterval field exists and serializes",
|
||||||
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 30},
|
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 30},
|
||||||
field: "heartbeat_interval",
|
field: "heartbeat_interval",
|
||||||
want: float64(30),
|
want: float64(30),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Vcpus field exists and serializes",
|
name: "Vcpus field exists and serializes",
|
||||||
cluster: ClusterInfo{ClusterName: "test", Vcpus: 16},
|
cluster: ClusterInfo{ClusterName: "test", Vcpus: 16},
|
||||||
field: "vcpus",
|
field: "vcpus",
|
||||||
want: float64(16),
|
want: float64(16),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "InactiveHeartbeatCount field exists and serializes",
|
name: "InactiveHeartbeatCount field exists and serializes",
|
||||||
cluster: ClusterInfo{ClusterName: "test", InactiveHeartbeatCount: 3},
|
cluster: ClusterInfo{ClusterName: "test", InactiveHeartbeatCount: 3},
|
||||||
field: "inactive_heartbeat_count",
|
field: "inactive_heartbeat_count",
|
||||||
want: float64(3),
|
want: float64(3),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "HeartbeatInterval zero value serializes as 0 not omitted",
|
name: "HeartbeatInterval zero value serializes as 0 not omitted",
|
||||||
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 0, Vcpus: 0, InactiveHeartbeatCount: 0},
|
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 0, Vcpus: 0, InactiveHeartbeatCount: 0},
|
||||||
field: "heartbeat_interval",
|
field: "heartbeat_interval",
|
||||||
want: float64(0),
|
want: float64(0),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Vcpus zero value serializes as 0 not omitted",
|
name: "Vcpus zero value serializes as 0 not omitted",
|
||||||
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 0, Vcpus: 0, InactiveHeartbeatCount: 0},
|
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 0, Vcpus: 0, InactiveHeartbeatCount: 0},
|
||||||
field: "vcpus",
|
field: "vcpus",
|
||||||
want: float64(0),
|
want: float64(0),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "InactiveHeartbeatCount zero value serializes as 0 not omitted",
|
name: "InactiveHeartbeatCount zero value serializes as 0 not omitted",
|
||||||
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 0, Vcpus: 0, InactiveHeartbeatCount: 0},
|
cluster: ClusterInfo{ClusterName: "test", HeartbeatInterval: 0, Vcpus: 0, InactiveHeartbeatCount: 0},
|
||||||
field: "inactive_heartbeat_count",
|
field: "inactive_heartbeat_count",
|
||||||
want: float64(0),
|
want: float64(0),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,9 @@ type HostInfo struct {
|
||||||
NumSSusp int `json:"num_ssusp"`
|
NumSSusp int `json:"num_ssusp"`
|
||||||
NumUSusp int `json:"num_ususp"`
|
NumUSusp int `json:"num_ususp"`
|
||||||
//NumRsv int `json:"num_rsv"`
|
//NumRsv int `json:"num_rsv"`
|
||||||
NumDone int `json:"num_done"`
|
NumDone int `json:"num_done"`
|
||||||
Topology string `json:"topology"` // JSONB
|
Topology string `json:"topology"` // JSONB
|
||||||
SchedStop string `json:"sched_stop"` // JSONB
|
SchedStop string `json:"sched_stop"` // JSONB
|
||||||
ResourceValues []ResourceDistributionInfo `json:"resource_values"` // per-worker resource values
|
ResourceValues []ResourceDistributionInfo `json:"resource_values"` // per-worker resource values
|
||||||
//RealLoad string `json:"real_load"` // JSONB
|
//RealLoad string `json:"real_load"` // JSONB
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -591,32 +591,32 @@ type ArrayJobInfo struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type JobAdditionalFields struct {
|
type JobAdditionalFields struct {
|
||||||
JobID int64 `json:"job_id"`
|
JobID int64 `json:"job_id"`
|
||||||
SubmitUser string `json:"submit_user"`
|
SubmitUser string `json:"submit_user"`
|
||||||
JobStatus int `json:"job_status"`
|
JobStatus int `json:"job_status"`
|
||||||
SubmitTime int64 `json:"submit_time"`
|
SubmitTime int64 `json:"submit_time"`
|
||||||
FromHost string `json:"from_host"`
|
FromHost string `json:"from_host"`
|
||||||
ExecHosts string `json:"exec_hosts"`
|
ExecHosts string `json:"exec_hosts"`
|
||||||
|
|
||||||
StartTime int64 `json:"start_time"`
|
StartTime int64 `json:"start_time"`
|
||||||
EndTime int64 `json:"end_time"`
|
EndTime int64 `json:"end_time"`
|
||||||
JobRusage Jsonb `json:"job_rusage"`
|
JobRusage Jsonb `json:"job_rusage"`
|
||||||
MaxMem float64 `json:"max_mem"`
|
MaxMem float64 `json:"max_mem"`
|
||||||
AvgMem float64 `json:"avg_mem"`
|
AvgMem float64 `json:"avg_mem"`
|
||||||
UsedMem float64 `json:"used_mem"`
|
UsedMem float64 `json:"used_mem"`
|
||||||
CPUTime int `json:"cpu_time"`
|
CPUTime int `json:"cpu_time"`
|
||||||
PeakCPUTime int `json:"peak_cpu_time"`
|
PeakCPUTime int `json:"peak_cpu_time"`
|
||||||
PeakCPUDuration float64 `json:"peak_cpu_duration"`
|
PeakCPUDuration float64 `json:"peak_cpu_duration"`
|
||||||
MemEfficiency float64 `json:"mem_efficiency"` // Memory efficiency in percentage
|
MemEfficiency float64 `json:"mem_efficiency"` // Memory efficiency in percentage
|
||||||
AvgCPUEfficiency float64 `json:"avg_cpu_efficiency"` // Average CPU efficiency in percentage
|
AvgCPUEfficiency float64 `json:"avg_cpu_efficiency"` // Average CPU efficiency in percentage
|
||||||
PeakCPUEfficiency float64 `json:"peak_cpu_efficiency"` // Peak CPU efficiency in percentage
|
PeakCPUEfficiency float64 `json:"peak_cpu_efficiency"` // Peak CPU efficiency in percentage
|
||||||
NumHosts int `json:"num_hosts"` // Number of hosts used by the job
|
NumHosts int `json:"num_hosts"` // Number of hosts used by the job
|
||||||
FirstHost string `json:"first_host"` // First host where the job ran
|
FirstHost string `json:"first_host"` // First host where the job ran
|
||||||
AllocSlot string `json:"alloc_slots"` // Allocated slot information
|
AllocSlot string `json:"alloc_slots"` // Allocated slot information
|
||||||
PIDInfo Jsonb `json:"pid_info"`
|
PIDInfo Jsonb `json:"pid_info"`
|
||||||
Pids []int `json:"pids"` // List of process IDs associated with the job
|
Pids []int `json:"pids"` // List of process IDs associated with the job
|
||||||
Pgids []int `json:"pgids"` // List of process group IDs associated with the job
|
Pgids []int `json:"pgids"` // List of process group IDs associated with the job
|
||||||
InteractiveJobURL string `json:"interactive_job_url"`
|
InteractiveJobURL string `json:"interactive_job_url"`
|
||||||
// CoreLimit/MemLimit: JobInfo has no equivalent field (these are
|
// CoreLimit/MemLimit: JobInfo has no equivalent field (these are
|
||||||
// submission-time resource limits, not job-state fields), but xcecli's
|
// submission-time resource limits, not job-state fields), but xcecli's
|
||||||
// JobFieldsMap accepts them as valid -o/-l display fields (bug-1674) --
|
// JobFieldsMap accepts them as valid -o/-l display fields (bug-1674) --
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ func TestIntegration_ConcurrentResourceValuePushes(t *testing.T) {
|
||||||
ResourceName: "mem",
|
ResourceName: "mem",
|
||||||
Location: "node01",
|
Location: "node01",
|
||||||
NumericValue: float64(idx + 1),
|
NumericValue: float64(idx + 1),
|
||||||
ValueType: 1, // NUMERIC
|
ValueType: 1, // NUMERIC
|
||||||
IsDynamic: true,
|
IsDynamic: true,
|
||||||
})
|
})
|
||||||
count.Add(1)
|
count.Add(1)
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,16 @@ import "apiserver/models"
|
||||||
|
|
||||||
// Global store instances.
|
// Global store instances.
|
||||||
var (
|
var (
|
||||||
Jobs *DataStore[uint64, models.JobInfo]
|
Jobs *DataStore[uint64, models.JobInfo]
|
||||||
ArrayJobs *DataStore[uint64, models.ArrayJobInfo]
|
ArrayJobs *DataStore[uint64, models.ArrayJobInfo]
|
||||||
Queues *DataStore[string, models.QueueInfo]
|
Queues *DataStore[string, models.QueueInfo]
|
||||||
Hosts *DataStore[string, models.HostInfo]
|
Hosts *DataStore[string, models.HostInfo]
|
||||||
Resources *DataStore[string, models.ResourceDefinitionInfo]
|
Resources *DataStore[string, models.ResourceDefinitionInfo]
|
||||||
ResourceLocations *DataStore[string, models.ResourceDistributionInfo]
|
ResourceLocations *DataStore[string, models.ResourceDistributionInfo]
|
||||||
Clusters *DataStore[string, models.ClusterInfo]
|
Clusters *DataStore[string, models.ClusterInfo]
|
||||||
JobExecHosts *DataStore[int64, models.JobExecHosts]
|
JobExecHosts *DataStore[int64, models.JobExecHosts]
|
||||||
Roles *DataStore[string, RoleEntry]
|
Roles *DataStore[string, RoleEntry]
|
||||||
UserRoles *DataStore[string, []string] // user_name → role_names
|
UserRoles *DataStore[string, []string] // user_name → role_names
|
||||||
)
|
)
|
||||||
|
|
||||||
// RoleEntry holds a role's permissions.
|
// RoleEntry holds a role's permissions.
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ Use 'xce resources definition list' to query resources definition information.`,
|
||||||
distributionCmd := &cobra.Command{
|
distributionCmd := &cobra.Command{
|
||||||
Use: "distribution",
|
Use: "distribution",
|
||||||
Short: "Manage resource distribution",
|
Short: "Manage resource distribution",
|
||||||
Long: `Manage resource distribution information.
|
Long: `Manage resource distribution information.
|
||||||
Use 'xce resources distribution list' to query resources distribution information.`,
|
Use 'xce resources distribution list' to query resources distribution information.`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
// Display help when no subcommand is specified
|
// Display help when no subcommand is specified
|
||||||
|
|
@ -39,7 +39,7 @@ Use 'xce resources distribution list' to query resources distribution informatio
|
||||||
definitionCmd := &cobra.Command{
|
definitionCmd := &cobra.Command{
|
||||||
Use: "definition",
|
Use: "definition",
|
||||||
Short: "Manage resource definition",
|
Short: "Manage resource definition",
|
||||||
Long: `Manage resource definition information.
|
Long: `Manage resource definition information.
|
||||||
Use 'xce resources definition list' to query resources definition information.`,
|
Use 'xce resources definition list' to query resources definition information.`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
// Display help when no subcommand is specified
|
// Display help when no subcommand is specified
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,6 @@ var JobLoadSchedulingHeaders = []string{
|
||||||
HEADER_JOB_MEM,
|
HEADER_JOB_MEM,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for array jobs
|
// for array jobs
|
||||||
const (
|
const (
|
||||||
HEADER_ARRAY_JOB_JOBID = "JOBID"
|
HEADER_ARRAY_JOB_JOBID = "JOBID"
|
||||||
|
|
@ -93,96 +91,96 @@ type Jsonb struct {
|
||||||
|
|
||||||
// Job define the data structure in the job info
|
// Job define the data structure in the job info
|
||||||
type QueryJob struct {
|
type QueryJob struct {
|
||||||
JobID int64 `json:"job_id"`
|
JobID int64 `json:"job_id"`
|
||||||
SubmitUser string `json:"submit_user"`
|
SubmitUser string `json:"submit_user"`
|
||||||
JobStatus string `json:"job_status"`
|
JobStatus string `json:"job_status"`
|
||||||
JobName string `json:"job_name"`
|
JobName string `json:"job_name"`
|
||||||
Command string `json:"command"`
|
Command string `json:"command"`
|
||||||
QueueName string `json:"queue_name"`
|
QueueName string `json:"queue_name"`
|
||||||
ProjectName string `json:"project_name"`
|
ProjectName string `json:"project_name"`
|
||||||
UserGroup string `json:"user_group"`
|
UserGroup string `json:"user_group"`
|
||||||
LicenseProject string `json:"license_project"`
|
LicenseProject string `json:"license_project"`
|
||||||
JobDescription string `json:"job_description"`
|
JobDescription string `json:"job_description"`
|
||||||
Resreq string `json:"resreq"`
|
Resreq string `json:"resreq"`
|
||||||
RsvID string `json:"rsv_id"`
|
RsvID string `json:"rsv_id"`
|
||||||
SLA string `json:"sla"`
|
SLA string `json:"sla"`
|
||||||
MaxNumProcessors int `json:"maxnum_processors"`
|
MaxNumProcessors int `json:"maxnum_processors"`
|
||||||
NumProcessors int `json:"num_processors"`
|
NumProcessors int `json:"num_processors"`
|
||||||
AskedHosts string `json:"asked_hosts"`
|
AskedHosts string `json:"asked_hosts"`
|
||||||
BeginTime string `json:"begin_time"`
|
BeginTime string `json:"begin_time"`
|
||||||
TermTime string `json:"term_time"`
|
TermTime string `json:"term_time"`
|
||||||
UserPriority int `json:"user_priority"`
|
UserPriority int `json:"user_priority"`
|
||||||
DependCond string `json:"depend_cond"`
|
DependCond string `json:"depend_cond"`
|
||||||
SubmitTime int64 `json:"submit_time"`
|
SubmitTime int64 `json:"submit_time"`
|
||||||
ReserveTime int64 `json:"reserve_time"`
|
ReserveTime int64 `json:"reserve_time"`
|
||||||
StartTime int64 `json:"start_time"`
|
StartTime int64 `json:"start_time"`
|
||||||
EndTime int64 `json:"end_time"`
|
EndTime int64 `json:"end_time"`
|
||||||
JobRusage string `json:"job_rusage"`
|
JobRusage string `json:"job_rusage"`
|
||||||
MaxMem float64 `json:"max_mem"`
|
MaxMem float64 `json:"max_mem"`
|
||||||
AvgMem float64 `json:"avg_mem"`
|
AvgMem float64 `json:"avg_mem"`
|
||||||
UsedMem float64 `json:"used_mem"`
|
UsedMem float64 `json:"used_mem"`
|
||||||
CPUTime int `json:"cpu_time"`
|
CPUTime int `json:"cpu_time"`
|
||||||
PeakCPUTime int `json:"peak_cpu_time"`
|
PeakCPUTime int `json:"peak_cpu_time"`
|
||||||
PeakCPUDuration float64 `json:"peak_cpu_duration"`
|
PeakCPUDuration float64 `json:"peak_cpu_duration"`
|
||||||
MemEfficiency float64 `json:"mem_efficiency"` // Memory efficiency in percentage
|
MemEfficiency float64 `json:"mem_efficiency"` // Memory efficiency in percentage
|
||||||
AvgCPUEfficiency float64 `json:"avg_cpu_efficiency"` // Average CPU efficiency in percentage
|
AvgCPUEfficiency float64 `json:"avg_cpu_efficiency"` // Average CPU efficiency in percentage
|
||||||
PeakCPUEfficiency float64 `json:"peak_cpu_efficiency"` // Peak CPU efficiency in percentage
|
PeakCPUEfficiency float64 `json:"peak_cpu_efficiency"` // Peak CPU efficiency in percentage
|
||||||
NumHosts int `json:"num_hosts"` // Number of hosts used by the job
|
NumHosts int `json:"num_hosts"` // Number of hosts used by the job
|
||||||
FirstHost string `json:"first_host"` // First host where the job ran
|
FirstHost string `json:"first_host"` // First host where the job ran
|
||||||
AllocSlot string `json:"alloc_slots"` // Allocated slot information
|
AllocSlot string `json:"alloc_slots"` // Allocated slot information
|
||||||
Duration int `json:"duration"`
|
Duration int `json:"duration"`
|
||||||
Umask int `json:"umask"`
|
Umask int `json:"umask"`
|
||||||
CWD string `json:"cwd"`
|
CWD string `json:"cwd"`
|
||||||
SubmitHomeDir string `json:"submit_home_dir"`
|
SubmitHomeDir string `json:"submit_home_dir"`
|
||||||
FromHost string `json:"from_host"`
|
FromHost string `json:"from_host"`
|
||||||
ExecHosts ExecHosts `json:"exec_hosts"`
|
ExecHosts ExecHosts `json:"exec_hosts"`
|
||||||
ExitStatus ExitStatusValue `json:"exit_status"`
|
ExitStatus ExitStatusValue `json:"exit_status"`
|
||||||
ExecUID int `json:"exec_uid"`
|
ExecUID int `json:"exec_uid"`
|
||||||
ExecHome string `json:"exec_home"`
|
ExecHome string `json:"exec_home"`
|
||||||
ExecCWD string `json:"exec_cwd"`
|
ExecCWD string `json:"exec_cwd"`
|
||||||
ExecUserName string `json:"exec_user_name"`
|
ExecUserName string `json:"exec_user_name"`
|
||||||
JobPriority int `json:"job_priority"`
|
JobPriority int `json:"job_priority"`
|
||||||
ChargedSAAP string `json:"charged_SAAP"`
|
ChargedSAAP string `json:"charged_SAAP"`
|
||||||
PreExecCmd string `json:"pre_exec_cmd"`
|
PreExecCmd string `json:"pre_exec_cmd"`
|
||||||
PostExecCmd string `json:"post_exec_cmd"`
|
PostExecCmd string `json:"post_exec_cmd"`
|
||||||
RequeueErrorValues string `json:"requeue_error_values"`
|
RequeueErrorValues string `json:"requeue_error_values"`
|
||||||
NumLicenses int `json:"num_licenses"`
|
NumLicenses int `json:"num_licenses"`
|
||||||
LicenseNames []string `json:"license_names"`
|
LicenseNames []string `json:"license_names"`
|
||||||
RunTime int `json:"run_time"`
|
RunTime int `json:"run_time"`
|
||||||
RunTimeEstimation int `json:"run_time_estimation"`
|
RunTimeEstimation int `json:"run_time_estimation"`
|
||||||
MigThreshold int `json:"mig_threshold"`
|
MigThreshold int `json:"mig_threshold"`
|
||||||
ChkpntPeriod int `json:"chkpnt_period"`
|
ChkpntPeriod int `json:"chkpnt_period"`
|
||||||
ChkpntDir string `json:"chkpnt_dir"`
|
ChkpntDir string `json:"chkpnt_dir"`
|
||||||
OutDir string `json:"out_dir"`
|
OutDir string `json:"out_dir"`
|
||||||
InFile string `json:"in_file"`
|
InFile string `json:"in_file"`
|
||||||
OutFile string `json:"out_file"`
|
OutFile string `json:"out_file"`
|
||||||
ErrFile string `json:"err_file"`
|
ErrFile string `json:"err_file"`
|
||||||
MailUser string `json:"mail_user"`
|
MailUser string `json:"mail_user"`
|
||||||
LoginShell string `json:"login_shell"`
|
LoginShell string `json:"login_shell"`
|
||||||
ExceptList string `json:"except_list"`
|
ExceptList string `json:"except_list"`
|
||||||
RLimits64 []int64 `json:"rlimits64"`
|
RLimits64 []int64 `json:"rlimits64"`
|
||||||
SubEnvVars string `json:"sub_env_vars"`
|
SubEnvVars string `json:"sub_env_vars"`
|
||||||
PendingReason string `json:"pending_reason"`
|
PendingReason string `json:"pending_reason"`
|
||||||
JobStartInfo string `json:"job_start_info"`
|
JobStartInfo string `json:"job_start_info"`
|
||||||
JobExecInfo string `json:"job_exec_info"`
|
JobExecInfo string `json:"job_exec_info"`
|
||||||
CoreLimit float64 `json:"core_limit"`
|
CoreLimit float64 `json:"core_limit"`
|
||||||
CPULimit string `json:"cpu_limit"`
|
CPULimit string `json:"cpu_limit"`
|
||||||
RunLimit string `json:"run_limit"`
|
RunLimit string `json:"run_limit"`
|
||||||
FileLimit float64 `json:"file_limit"`
|
FileLimit float64 `json:"file_limit"`
|
||||||
DataLimit float64 `json:"data_limit"`
|
DataLimit float64 `json:"data_limit"`
|
||||||
StackLimit float64 `json:"stack_limit"`
|
StackLimit float64 `json:"stack_limit"`
|
||||||
MemLimit float64 `json:"mem_limit"`
|
MemLimit float64 `json:"mem_limit"`
|
||||||
SwapLimit float64 `json:"swap_limit"`
|
SwapLimit float64 `json:"swap_limit"`
|
||||||
ProcessLimit float64 `json:"process_limit"`
|
ProcessLimit float64 `json:"process_limit"`
|
||||||
ThreadLimit float64 `json:"thread_limit"`
|
ThreadLimit float64 `json:"thread_limit"`
|
||||||
NumFiles int `json:"num_files"`
|
NumFiles int `json:"num_files"`
|
||||||
ArrayIdx int `json:"array_idx"` //
|
ArrayIdx int `json:"array_idx"` //
|
||||||
UniqueJobID int64 `json:"unique_job_id"` //
|
UniqueJobID int64 `json:"unique_job_id"` //
|
||||||
ExtendData JobExtendData `json:"extend_data"`
|
ExtendData JobExtendData `json:"extend_data"`
|
||||||
InteractiveJobURL string `json:"interactive_job_url"`
|
InteractiveJobURL string `json:"interactive_job_url"`
|
||||||
PGIDs IntSlice `json:"pgids"`
|
PGIDs IntSlice `json:"pgids"`
|
||||||
PID IntSlice `json:"pids"`
|
PID IntSlice `json:"pids"`
|
||||||
LaunchType string `json:"launch_type"`
|
LaunchType string `json:"launch_type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var JobFieldsMap = map[string]string{
|
var JobFieldsMap = map[string]string{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue