jobid format and parse
This commit is contained in:
parent
26e3c21c87
commit
3488b62716
6 changed files with 212 additions and 15 deletions
|
|
@ -41,16 +41,21 @@ typedef uint64_t jobid_t;
|
|||
|
||||
#define N_ARRAY_IDX_BITS (15)
|
||||
|
||||
#define N_SEQENCE_BITS \
|
||||
#define N_SEQUENCE_BITS \
|
||||
(N_JOBID_BITS - N_CLUSTER_ID_BITS - N_APISERVER_ID_BITS - N_TIMESTAMP_BITS \
|
||||
- N_TAG_BITS)
|
||||
|
||||
#define SEQUENCE_HIGH_SHIFT (N_ARRAY_IDX_BITS)
|
||||
|
||||
#define UMAX_BITS(w) ((((uint64_t)0x01) << (int)w) - 1)
|
||||
#define N_MAX_FIELDS_JOBID (5)
|
||||
|
||||
#define UMAX_BITS(w) ((((uint64_t)0x01) << ((int)w)) - 1)
|
||||
|
||||
#define MAX_CLUSTER_ID (UMAX_BITS(N_CLUSTER_ID_BITS))
|
||||
#define MAX_APISERVER_ID (UMAX_BITS(N_APISERVER_ID_BITS))
|
||||
#define MAX_ARRAY_IDX (UMAX_BITS(N_ARRAY_IDX_BITS))
|
||||
|
||||
#define REGEX_JOBID "[ \t]*([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)[ \t]*"
|
||||
#define REGEX_JOBARRAY_ID "[ \t]*([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\\[([0-9]+)\\][ \t]*"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue