Autodocs for <CODE>Grid Engine Mirror Interface</CODE>:

[Top] | [Contents] | [Index] | [ ? ]

# Autodocs for `Grid Engine Mirror Interface`

This document describes `Grid Engine Mirror Interface` version SGE pre6.0 (Maintrunk).

Copyright © The Grid Engine Team

> 1. Eventmirror |  |
> 1.1 --Eventmirror |  |
> 1.2 -Eventmirror-Typedefs |  |
> 1.3 host |  |
> 1.4 ja_task |  |
> 1.5 job |  |
> 1.6 pe_task |  |
> 1.7 queue |  |
> 1.8 schedd_conf |  |
> 1.9 sge_mirror_get_type_descr |  |
> 1.10 sge_mirror_get_type_key_nm |  |
> 1.11 sge_mirror_get_type_master_list |  |
> 1.12 sge_mirror_get_type_name |  |
> 1.13 sge_mirror_initialize |  |
> 1.14 sge_mirror_process_events |  |
> 1.15 sge_mirror_shutdown |  |
> 1.16 sge_mirror_strerror |  |
> 1.17 sge_mirror_subscribe |  |
> 1.18 sge_mirror_unsubscribe |  |
> 1.19 sge_mirror_update_master_list |  |
> 1.20 sge_mirror_update_master_list_host_key |  |
> 1.21 sge_mirror_update_master_list_str_key |  |
> 1.22 sharetree |  |

> Function Index |  |

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 1. Eventmirror

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.1 --Eventmirror

NAME

      Eventmirror -- mirroring of master lists through event client interface

FUNCTION

      The event mirror interface provides a means to easily implement
      Grid Engine components that need to have access to the masters
      object lists and therefore have to mirror them.

      Such components can be schedulers, proxies, monitoring tools etc.

      It is designed as a layer above the event client interface.

      Mirroring can be restricted to certain event types / object types.
      Callback functions can be installed to perform actions additional to
      pure mirroring.

BUGS

      Not yet operable on the usermapping related objects and lists.

SEE ALSO
  - 1.2 -Eventmirror-Typedefs.
  - 1.13 sge_mirror_initialize.
  - 1.15 sge_mirror_shutdown.
  - 1.17 sge_mirror_subscribe.
  - 1.18 sge_mirror_unsubscribe.
  - 1.14 sge_mirror_process_events.
  - 1.19 sge_mirror_update_master_list.
  - 1.20 sge_mirror_update_master_list_host_key.
  - 1.21 sge_mirror_update_master_list_str_key.
  - 1.16 sge_mirror_strerror.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.2 -Eventmirror-Typedefs

NAME

      Eventmirror -- mirroring of master lists through event client interface

SYNOPSIS

      typedef enum {
         ...
      } sge_event_type;

      typedef enum {
         ...
      } sge_event_action;

      typedef enum {
         ...
      } sge_mirror_error;

      typedef int (*sge_mirror_callback)(sge_event_type type,
                                         sge_event_action action,
                                         lListElem *event, void *clientdata);

FUNCTION

      The following types are defined for use with the event mirroring
      interface:

      The enumeration sge_event_type defines different classes of events.
      These classes mostly reflect the different object types defined in
      libgdi, e.g. job, host, queue ...

      The following event_types are defined:
         SGE_EMT_ADMINHOST
         SGE_EMT_CALENDAR
         SGE_EMT_CKPT
         SGE_EMT_COMPLEX
         SGE_EMT_CONFIG
         SGE_EMT_GLOBAL_CONFIG
         SGE_EMT_EXECHOST
         SGE_EMT_JATASK
         SGE_EMT_PETASK
         SGE_EMT_JOB
         SGE_EMT_JOB_SCHEDD_INFO
         SGE_EMT_MANAGER
         SGE_EMT_OPERATOR
         SGE_EMT_SHARETREE
         SGE_EMT_PE
         SGE_EMT_PROJECT
         SGE_EMT_QUEUE
         SGE_EMT_SCHEDD_CONF
         SGE_EMT_SCHEDD_MONITOR
         SGE_EMT_SHUTDOWN
         SGE_EMT_QMASTER_GOES_DOWN
         SGE_EMT_SUBMITHOST
         SGE_EMT_USER
         SGE_EMT_USERSET

      If usermapping is enabled, two additional event types are defined:
         SGE_EMT_USERMAPPING
         SGE_EMT_HOSTGROUP

      The last value defined as event type is SGE_EMT_ALL. It can be used to
      subscribe all event types.

      Different event actions are defined in the enumeration sge_event_action:
         SGE_EMA_LIST      - the whole master list has been sent
                             (used at initialization)
         SGE_EMA_ADD       - a new object has been created
         SGE_EMA_MOD       - an object has been modified
         SGE_EMA_DEL       - an object has been deleted
         SGE_EMA_TRIGGER   - a certain action has been triggered,
                             e.g. a scheduling run or a shutdown.

      Most functions of the event mirroring interface return error codes that
      are defined in the enumeration sge_mirror_error:
         SGE_EM_OK              - action performed successfully
         SGE_EM_NOT_INITIALIZED - the interface is not yet initialized
         SGE_EM_BAD_ARG         - some input parameter was incorrect
         SGE_EM_TIMEOUT         - a timeout occured
         SGE_EM_DUPLICATE_KEY   - an object should be added, but an object
                                  with the same unique identifier already
                                  exists.
         SGE_EM_KEY_NOT_FOUND   - an object with the given key was not found.
         SGE_EM_CALLBACK_FAILED - a callback function failed
         SGE_EM_PROCESS_ERRORS  - an error occured during event processing

      The event mirroring interface allows to install callback funktions for
      actions on certain event types. These callback functions have to have
      the same prototype as given by the function typedef sge_mirror_callback.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.3 host

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.3.1 host_update_master_list

NAME

      host_update_master_list() -- update the master hostlists

SYNOPSIS

      bool
      host_update_master_list(sge_event_type type, sge_event_action action,
                              lListElem *event, void *clientdata)

FUNCTION

      Update the global master lists of hosts
      based on an event.
      The function is called from the event mirroring interface.
      Updates admin, submit or execution host list depending
      on the event received.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      bool - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.
  - 1.19 sge_mirror_update_master_list.
  - 1.20 sge_mirror_update_master_list_host_key.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.4 ja_task

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.4.1 ja_task_update_master_list

NAME

      ja_task_update_master_list() -- update array tasks of a job

SYNOPSIS

      bool
      ja_task_update_master_list(sge_event_type type, sge_event_action action,
                                 lListElem *event, void *clientdata)

FUNCTION

      Update the list of array tasks of a job
      based on an event.
      The function is called from the event mirroring interface.

      An array tasks list of parallel tasks and the
      scaled usage list are not updated in this function,
      as this data is maintained by separate events.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      bool - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.
  - 1.19 sge_mirror_update_master_list.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.4.2 ja_task_update_master_list_usage

NAME

      ja_task_update_master_list_usage() -- update an array tasks usage

SYNOPSIS

      bool
      ja_task_update_master_list_usage(lListElem *event)

FUNCTION

      Updates the scaled usage of an array task (also task data structure
      of a non array job).

INPUTS

      lListElem *event - event object containing the new usage list

RESULT

      bool - true, if the operation succeeds, else false

SEE ALSO
  - 1.5.2 job_update_master_list_usage.
  - See ``Eventmirror/ja_task/pe_task_update_master_list_usage`'

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.5 job

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.5.1 job_update_master_list

NAME

      job_update_master_list() -- update the master list of jobs

SYNOPSIS

      bool job_update_master_list(sge_event_type type,
                                      sge_event_action action,
                                      lListElem *event, void *clientdata)

FUNCTION

      Update the global master list of jobs
      based on an event.
      The function is called from the event mirroring interface.

      A jobs array tasks are not updated by this function,
      as they are maintained by separate events.
      In addition, some scheduler specific attributes, that
      are only used in scheduler, are not updated.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      bool - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.
  - 1.19 sge_mirror_update_master_list.
  - 1.5.2 job_update_master_list_usage.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.5.2 job_update_master_list_usage

NAME

      job_update_master_list_usage() -- update usage for a jobs tasks

SYNOPSIS

      int job_update_master_list_usage(lListElem *event)

FUNCTION

      Events containing usage reports are sent for a jobs tasks.
      This can be array tasks (where a non array job has a single
      array task) or tasks of a parallel job.
      This function decides which type of task has to receive
      the updated usage report and passes the event
      information to the corresponding update functions.

INPUTS

      lListElem *event - event object containing the new usage list

RESULT

      int - true, if the operation succeeds, else false

SEE ALSO
  - See ``Eventmirror/ja_task/pe_task_update_master_list_usage`'
  - 1.6.2 pe_task_update_master_list_usage.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.6 pe_task

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.6.1 pe_task_update_master_list

NAME

      pe_task_update_master_list() -- update parallel tasks of an array task

SYNOPSIS

      bool
      pe_task_update_master_list(sge_event_type type, sge_event_action action,
                                 lListElem *event, void *clientdata)

FUNCTION

      Update the list of parallel tasks of an array task
      based on an event.
      The function is called from the event mirroring interface.

      The scaled usage list of a parallel task is not updated
      by this function, as this data is maintained by a
      separate event.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      bool - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.
  - 1.19 sge_mirror_update_master_list.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.6.2 pe_task_update_master_list_usage

NAME

      pe_task_update_master_list_usage() -- update a parallel tasks usage

SYNOPSIS

      bool
      pe_task_update_master_list_usage(lListElem *event)

FUNCTION

      Updates the scaled usage of a parallel task.

INPUTS

      lListElem *event - event object containing the new usage list

RESULT

      bool - true, if the operation succeeds, else false

SEE ALSO
  - 1.5.2 job_update_master_list_usage.
  - 1.4.2 ja_task_update_master_list_usage.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.7 queue

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.7.1 queue_update_master_list

NAME

      queue_update_master_list() -- update the master list of queues

SYNOPSIS

      bool
      queue_update_master_list(sge_event_type type, sge_event_action action,
                               lListElem *event, void *clientdata)

FUNCTION

      Update the global master list of queues
      based on an event.
      The function is called from the event mirroring interface.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      int - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.
  - 1.19 sge_mirror_update_master_list.
  - 1.21 sge_mirror_update_master_list_str_key.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.8 schedd_conf

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.8.1 schedd_conf_update_master_list

NAME

      schedd_conf_update_master_list() -- update the scheduler configuration

SYNOPSIS

      bool
      schedd_conf_update_master_list(sge_event_type type,
                                     sge_event_action action,
                                     lListElem *event, void *clientdata)

FUNCTION

      Update the global master list of scheduler configurations
      based on an event.
      The function is called from the event mirroring interface.
      The list only contains one element that is replaced when a
      modify event arrives.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      bool - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.9 sge_mirror_get_type_descr

NAME

      sge_mirror_get_type_descr() -- get the descriptor for an event type

SYNOPSIS

      const lDescr* sge_mirror_get_type_descr(const sge_event_type type)

FUNCTION

      Returns the CULL element descriptor for the object type associated with
      the given event.

INPUTS

      const sge_event_type type - the event type

RESULT

      const lDescr* - the descriptor, or NULL, if no descriptor is associated
                      with the type

EXAMPLE

      sge_mirror_get_type_descr(SGE_EMT_JOB) will return the descriptor JB_Type,
      sge_mirror_get_type_descr(SGE_EMT_SHUTDOWN) will return NULL

SEE ALSO
  - 1.11 sge_mirror_get_type_master_list.
  - 1.12 sge_mirror_get_type_name.
  - 1.10 sge_mirror_get_type_key_nm.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.10 sge_mirror_get_type_key_nm

NAME

      sge_mirror_get_type_key_nm() -- get the primary key attribute for a type

SYNOPSIS

      int sge_mirror_get_type_key_nm(const sge_event_type type)

FUNCTION

      Returns the primary key attribute for the object type associated with
      the given event type.

INPUTS

      const sge_event_type type - event type

RESULT

      int - the key number (struct element nm of the descriptor), or
            -1, if no object type is associated with the event type

EXAMPLE

      sge_mirror_get_type_key_nm(SGE_EMT_JOB) will return JB_job_number
      sge_mirror_get_type_key_nm(SGE_EMT_SHUTDOWN) will return -1

SEE ALSO
  - 1.11 sge_mirror_get_type_master_list.
  - 1.12 sge_mirror_get_type_name.
  - 1.9 sge_mirror_get_type_descr.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.11 sge_mirror_get_type_master_list

NAME

      sge_mirror_get_type_master_list() -- get master list for an event type

SYNOPSIS

      lList** sge_mirror_get_type_master_list(const sge_event_type type)

FUNCTION

      Returns a pointer to the master list holding objects that are manipulated
      by events of the given type.

INPUTS

      const sge_event_type type - the event type

RESULT

      lList** - the corresponding master list, or NULL, if the event type has no
                associated master list

EXAMPLE

      sge_mirror_get_type_master_list(SGE_EMT_JOB) will return a pointer to the
      Master_Job_List.

      sge_mirror_get_type_master_list(SGE_EMT_SHUTDOWN) will return NULL,
      as this event type has no associated master list.

NOTES

      This and the following utility functions should be moved to some more
      general object type handling.

SEE ALSO
  - 1.11 sge_mirror_get_type_master_list.
  - 1.12 sge_mirror_get_type_name.
  - 1.9 sge_mirror_get_type_descr.
  - 1.10 sge_mirror_get_type_key_nm.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.12 sge_mirror_get_type_name

NAME

      sge_mirror_get_type_name() -- get a printable name for an event type

SYNOPSIS

      const char* sge_mirror_get_type_name(const sge_event_type type)

FUNCTION

      Returns a printable name for an event type.

INPUTS

      const sge_event_type type - the event type

RESULT

      const char* - string describing the type

EXAMPLE

      sge_mirror_get_type_name(SGE_EMT_JOB) will return "JOB"

SEE ALSO
  - 1.11 sge_mirror_get_type_master_list.
  - 1.9 sge_mirror_get_type_descr.
  - 1.10 sge_mirror_get_type_key_nm.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.13 sge_mirror_initialize

NAME

      sge_mirror_initialize() -- initialize the event mirror interface

SYNOPSIS

      sge_mirror_error sge_mirror_initialize(ev_registration_id id,
                                             const char *name)

FUNCTION

      Initializes internal data structures and registers with qmaster
      using the event client mechanisms.

      Events covering shutdown requests and qmaster shutdown notification
      are subscribed.

INPUTS

      ev_registration_id id - id used to register with qmaster
      const char *name      - name used to register with qmaster

RESULT

      sge_mirror_error - SGE_EM_OK or an error code

SEE ALSO
  - 1.15 sge_mirror_shutdown.
  - See ``Eventclient/-ID-numbers`'

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.14 sge_mirror_process_events

NAME

      sge_mirror_process_events() -- retrieve and process events

SYNOPSIS

      sge_mirror_error sge_mirror_process_events(void)

FUNCTION

      Retrieves new events from qmaster.
      If new events have arrived from qmaster, they are processed,
      that means, for each event
      - if installed, a "before mirroring" callback is called
      - the event is mirrored into the corresponding master list
      - if installed, a "after mirroring" callback is called

      If retrieving new events from qmaster fails over a time period
      of 10 times the configured event delivery interval (see event
      client interface, function ec_get_edtime), a timeout warning
      is generated and a new registration of the event client is
      prepared.

RESULT

      sge_mirror_error - SGE_EM_OK or an error code

SEE ALSO
  - 1.1 --Eventmirror.
  - See ``Eventclient/Client/ec_get_edtime`'
  - See ``Eventclient/Client/ec_set_edtime`'

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.15 sge_mirror_shutdown

NAME

      sge_mirror_shutdown() -- shutdown mirroring

SYNOPSIS

      sge_mirror_error sge_mirror_shutdown(void)

FUNCTION

      Shuts down the event mirroring mechanism:
      Unsubscribes all events, deletes contents of the corresponding
      object lists and deregisteres from qmaster.

RESULT

      sge_mirror_error - SGE_EM_OK or error code

SEE ALSO
  - 1.13 sge_mirror_initialize.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.16 sge_mirror_strerror

NAME

      sge_mirror_strerror() -- map errorcode to error message

SYNOPSIS

      const char* sge_mirror_strerror(sge_mirror_error num)

FUNCTION

      Returns a string describing a given error number.
      This function can be used to output error messages
      if a function of the event mirror interface fails.

INPUTS

      sge_mirror_error num - error number

RESULT

      const char* - corresponding error message

SEE ALSO
  - 1.2 -Eventmirror-Typedefs.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.17 sge_mirror_subscribe

NAME

      sge_mirror_subscribe() -- subscribe certain event types

SYNOPSIS

      sge_mirror_error sge_mirror_subscribe(sge_event_type type,
                                            sge_mirror_callback callback_before,
                                            sge_mirror_callback callback_after,
                                            void *clientdata)

FUNCTION

      Subscribe a certain event type.
      Callback functions can be specified, that can be executed before the
      mirroring action and/or after the mirroring action.

      The corresponding data structures are initialized,
      the events associated with the event type are subscribed with the
      event client interface.

INPUTS

      sge_event_type type                 - event type to subscribe or
                                            SGE_EMT_ALL
      sge_mirror_callback callback_before - callback to be executed before
                                            mirroring
      sge_mirror_callback callback_after  - callback to be executed after
                                            mirroring
      void *clientdata                    - clientdata to be passed to the
                                            callback functions

RESULT

      sge_mirror_error - SGE_EM_OK or an error code

SEE ALSO
  - 1.2 -Eventmirror-Typedefs.
  - See ``Eventclient/-Subscription`'
  - See ``Eventclient/-Events`'
  - 1.18 sge_mirror_unsubscribe.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.18 sge_mirror_unsubscribe

NAME

      sge_mirror_unsubscribe() -- unsubscribe event types

SYNOPSIS

      sge_mirror_error sge_mirror_unsubscribe(sge_event_type type)

FUNCTION

      Unsubscribes a certain event type or all if SGE_EMT_ALL is given as type.

      Unsubscribes the corresponding events in the underlying event client
      interface and frees data stored in the corresponding mirrored list(s).@end smallexample

INPUTS

      sge_event_type type - the event type to unsubscribe or SGE_EMT_ALL

RESULT

      sge_mirror_error - SGE_EM_OK or an error code

SEE ALSO
  - 1.2 -Eventmirror-Typedefs.
  - See ``Eventclient/-Subscription`'
  - See ``Eventclient/-Events`'
  - 1.17 sge_mirror_subscribe.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.19 sge_mirror_update_master_list

NAME

      sge_mirror_update_master_list() -- update a master list

SYNOPSIS

      sge_mirror_error sge_mirror_update_master_list(lList **list,
                                                     lDescr *list_descr,
                                                     lListElem *ep,
                                                     const char *key,
                                                     sge_event_action action,
                                                     lListElem *event)

FUNCTION

      Updates a given master list according to the given event information.
      The following actions are performed (depending on parameter action):
      - SGE_EMA_LIST: an existing mirrored list is completely replaced
      - SGE_EMA_ADD:  a new element is added to the mirrored list
      - SGE_EMA_MOD:  a given element is modified
      - SGE_EMA_DEL:  a given element is deleted

INPUTS

      lList **list            - mirrored list to manipulate
      lDescr *list_descr      - descriptor of mirrored list
      lListElem *ep           - element to manipulate or NULL
      const char *key         - key of an element to manipulate
      sge_event_action action - action to perform
      lListElem *event        - raw event

RESULT

      sge_mirror_error - SGE_EM_OK, or an error code

SEE ALSO
  - 1.21 sge_mirror_update_master_list_str_key.
  - 1.20 sge_mirror_update_master_list_host_key.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.20 sge_mirror_update_master_list_host_key

NAME

      sge_mirror_update_master_list_host_key() -- update a master list

SYNOPSIS

      sge_mirror_error sge_mirror_update_master_list_host_key(lList **list,
                                                             lDescr *list_descr,
                                                             int key_nm,
                                                             const char *key,
                                                             sge_event_action action,
                                                             lListElem *event)

FUNCTION

      Updates a certain element in a certain mirrored list.
      Which element to update is specified by a given hostname.

INPUTS

      lList **list            - the master list to update
      lDescr *list_descr      - descriptor of the master list
      int key_nm              - field identifier of the key
      const char *key         - value of the key (a hostname)
      sge_event_action action - action to perform on list
      lListElem *event        - raw event element

RESULT

      sge_mirror_error - SGE_EM_OK or an error code

SEE ALSO
  - 1.19 sge_mirror_update_master_list.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.21 sge_mirror_update_master_list_str_key

NAME

      sge_mirror_update_master_list_str_key() -- update a master list

SYNOPSIS

      sge_mirror_error sge_mirror_update_master_list_str_key(lList **list,
                                                             lDescr *list_descr,
                                                             int key_nm,
                                                             const char *key,
                                                             sge_event_action action,
                                                             lListElem *event)

FUNCTION

      Updates a certain element in a certain mirrored list.
      Which element to update is specified by a given string key.

INPUTS

      lList **list            - the master list to update
      lDescr *list_descr      - descriptor of the master list
      int key_nm              - field identifier of the key
      const char *key         - value of the key
      sge_event_action action - action to perform on list
      lListElem *event        - raw event element

RESULT

      sge_mirror_error - SGE_EM_OK or an error code

SEE ALSO
  - 1.19 sge_mirror_update_master_list.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 1.22 sharetree

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.22.1 sharetree_update_master_list

NAME

      sharetree_update_master_list() -- update the master sharetree list

SYNOPSIS

      bool
      sharetree_update_master_list(sge_event_type type, sge_event_action action,
                                   lListElem *event, void *clientdata)

FUNCTION

      Update the global master list for the sharetree
      based on an event.
      The function is called from the event mirroring interface.
      Sharetree events always contain the whole sharetree, that
      replaces an existing sharetree in the master list.

INPUTS

      sge_event_type type     - event type
      sge_event_action action - action to perform
      lListElem *event        - the raw event
      void *clientdata        - client data

RESULT

      bool - true, if update is successfull, else false

NOTES

      The function should only be called from the event mirror interface.

SEE ALSO
  - 1.1 --Eventmirror.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# Function Index

Jump to: | - H J P Q S

| Index Entry | Section
- |  |
| `--Eventmirror` | 1.1 --Eventmirror
| `-Eventmirror-Typedefs` | 1.2 -Eventmirror-Typedefs
H |  |
| `host_update_master_list` | 1.3.1 host_update_master_list
J |  |
| `ja_task_update_master_list` | 1.4.1 ja_task_update_master_list
| `ja_task_update_master_list_usage` | 1.4.2 ja_task_update_master_list_usage
| `job_update_master_list` | 1.5.1 job_update_master_list
| `job_update_master_list_usage` | 1.5.2 job_update_master_list_usage
P |  |
| `pe_task_update_master_list` | 1.6.1 pe_task_update_master_list
| `pe_task_update_master_list_usage` | 1.6.2 pe_task_update_master_list_usage
Q |  |
| `queue_update_master_list` | 1.7.1 queue_update_master_list
S |  |
| `schedd_conf_update_master_list` | 1.8.1 schedd_conf_update_master_list
| `sge_mirror_get_type_descr` | 1.9 sge_mirror_get_type_descr
| `sge_mirror_get_type_key_nm` | 1.10 sge_mirror_get_type_key_nm
| `sge_mirror_get_type_master_list` | 1.11 sge_mirror_get_type_master_list
| `sge_mirror_get_type_name` | 1.12 sge_mirror_get_type_name
| `sge_mirror_initialize` | 1.13 sge_mirror_initialize
| `sge_mirror_process_events` | 1.14 sge_mirror_process_events
| `sge_mirror_shutdown` | 1.15 sge_mirror_shutdown
| `sge_mirror_strerror` | 1.16 sge_mirror_strerror
| `sge_mirror_subscribe` | 1.17 sge_mirror_subscribe
| `sge_mirror_unsubscribe` | 1.18 sge_mirror_unsubscribe
| `sge_mirror_update_master_list` | 1.19 sge_mirror_update_master_list
| `sge_mirror_update_master_list_host_key` | 1.20 sge_mirror_update_master_list_host_key
| `sge_mirror_update_master_list_str_key` | 1.21 sge_mirror_update_master_list_str_key
| `sharetree_update_master_list` | 1.22.1 sharetree_update_master_list

Jump to: | - H J P Q S

[Top] | [Contents] | [Index] | [ ? ]

# Table of Contents

> 1. Eventmirror

> > 1.1 --Eventmirror
> > 1.2 -Eventmirror-Typedefs
> > 1.3 host

> > > 1.3.1 host_update_master_list

> > 1.4 ja_task

> > > 1.4.1 ja_task_update_master_list
> > > 1.4.2 ja_task_update_master_list_usage

> > 1.5 job

> > > 1.5.1 job_update_master_list
> > > 1.5.2 job_update_master_list_usage

> > 1.6 pe_task

> > > 1.6.1 pe_task_update_master_list
> > > 1.6.2 pe_task_update_master_list_usage

> > 1.7 queue

> > > 1.7.1 queue_update_master_list

> > 1.8 schedd_conf

> > > 1.8.1 schedd_conf_update_master_list

> > 1.9 sge_mirror_get_type_descr
> > 1.10 sge_mirror_get_type_key_nm
> > 1.11 sge_mirror_get_type_master_list
> > 1.12 sge_mirror_get_type_name
> > 1.13 sge_mirror_initialize
> > 1.14 sge_mirror_process_events
> > 1.15 sge_mirror_shutdown
> > 1.16 sge_mirror_strerror
> > 1.17 sge_mirror_subscribe
> > 1.18 sge_mirror_unsubscribe
> > 1.19 sge_mirror_update_master_list
> > 1.20 sge_mirror_update_master_list_host_key
> > 1.21 sge_mirror_update_master_list_str_key
> > 1.22 sharetree

> > > 1.22.1 sharetree_update_master_list

> Function Index

[Top] | [Contents] | [Index] | [ ? ]

# Short Table of Contents

> 1. Eventmirror
> Function Index

[Top] | [Contents] | [Index] | [ ? ]

# About this document

This document was generated using texi2html

The buttons in the navigation panels have the following meaning:

Button | Name | Go to | From 1.2.3 go to
--- | --- | --- | ---
[ < ] | Back | previous section in reading order | 1.2.2
[ > ] | Forward | next section in reading order | 1.2.4
[ << ] | FastBack | previous or up-and-previous section | 1.1
[ Up ] | Up | up section | 1.2
[ >> ] | FastForward | next or up-and-next section | 1.3
[Top] | Top | cover (top) of document |
[Contents] | Contents | table of contents |
[Index] | Index | concept index |
[ ? ] | About | this page |

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

- 1. Section One

- 1.1 Subsection One-One

- ...

- 1.2 Subsection One-Two

- 1.2.1 Subsubsection One-Two-One
- 1.2.2 Subsubsection One-Two-Two
- 1.2.3 Subsubsection One-Two-Three <== Current Position
- 1.2.4 Subsubsection One-Two-Four

- 1.3 Subsection One-Three

- ...

- 1.4 Subsection One-Four

This document was generated by Joachim Gabler on February, 24 2003 using texi2html