Fork me on GitHub

Chapter 14
C Admin API

14.1 Operations

14.1.1 read_only

Change the cluster to and from read-only mode. Definition: 

  int64_t hyperdex_admin_read_only(struct hyperdex_admin* admin,
          int ro,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.2 wait_until_stable

Wait until the cluster is stable. The cluster is considered stable when all servers acknowledge the current configuration, and all initiated in previous configurations complete. Definition: 

  int64_t hyperdex_admin_wait_until_stable(struct hyperdex_admin* admin,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.3 fault_tolerance

Change the fault tolerance of space to the specified fault tolerance threshold. Definition: 

  int64_t hyperdex_admin_fault_tolerance(struct hyperdex_admin* admin,
          const char* space,
          uint64_t ft,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.4 validate_space

Validate the provided space description. Definition: 

  int hyperdex_admin_validate_space(struct hyperdex_admin* admin,
          const char* description,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.5 add_space

Add a new space to the cluster, using the provided space description. Definition: 

  int64_t hyperdex_admin_add_space(struct hyperdex_admin* admin,
          const char* description,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.6 rm_space

Remove space from the configuration and make it inaccessible to future operations. Definition: 

  int64_t hyperdex_admin_rm_space(struct hyperdex_admin* admin,
          const char* space,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.7 mv_space

Move space from name source to name target. This is a metadata operation and has the same cost as add_space, even for populated spaces. Definition: 

  int64_t hyperdex_admin_mv_space(struct hyperdex_admin* admin,
          const char* source,
          const char* target,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.8 list_spaces

List all spaces held by the cluster. Definition: 

  int64_t hyperdex_admin_list_spaces(struct hyperdex_admin* admin,
          enum hyperdex_admin_returncode* status,
          const char** spaces);
Parameters:  Returns: 

14.1.9 list_indices

XXX Definition: 

  int64_t hyperdex_admin_list_indices(struct hyperdex_admin* admin,
          const char* space,
          enum hyperdex_admin_returncode* status,
          const char** indexes);
Parameters:  Returns: 

14.1.10 list_subspaces

XXX Definition: 

  int64_t hyperdex_admin_list_subspaces(struct hyperdex_admin* admin,
          const char* space,
          enum hyperdex_admin_returncode* status,
          const char** subspaces);
Parameters:  Returns: 

14.1.11 add_index

Add a new index on a HyperDex attribute or document Definition: 

  int64_t hyperdex_admin_add_index(struct hyperdex_admin* admin,
          const char* space,
          const char* attribute,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.12 rm_index

Remove an existing index Definition: 

  int64_t hyperdex_admin_rm_index(struct hyperdex_admin* admin,
          uint64_t idxid,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.13 server_register

Manually register a new server with token bound to address. Definition: 

  int64_t hyperdex_admin_server_register(struct hyperdex_admin* admin,
          uint64_t token,
          const char* address,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.14 server_online

Manually set server token to state AVAILABLE. Definition: 

  int64_t hyperdex_admin_server_online(struct hyperdex_admin* admin,
          uint64_t token,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.15 server_offline

Manually mark server token as OFFLINE. Definition: 

  int64_t hyperdex_admin_server_offline(struct hyperdex_admin* admin,
          uint64_t token,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.16 server_forget

Completely remove all state associated token from the cluster. Definition: 

  int64_t hyperdex_admin_server_forget(struct hyperdex_admin* admin,
          uint64_t token,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.17 server_kill

Manually change server token into the KILLED state. Definition: 

  int64_t hyperdex_admin_server_kill(struct hyperdex_admin* admin,
          uint64_t token,
          enum hyperdex_admin_returncode* status);
Parameters:  Returns: 

14.1.18 backup

Initiate a cluster-wide backup named backup. This has the same behavior as the hyperdex backup command discussed in Chapter 10. Definition: 

  int64_t hyperdex_admin_backup(struct hyperdex_admin* admin,
          const char* backup,
          enum hyperdex_admin_returncode* status,
          const char** backups);
Parameters:  Returns: 

14.1.19 enable_perf_counters

Start collecting performance counters from all servers in the cluster. Definition: 

  int64_t hyperdex_admin_enable_perf_counters(struct hyperdex_admin* admin,
          enum hyperdex_admin_returncode* status,
          struct hyperdex_admin_perf_counter* pc);
Parameters:  Returns: 

14.1.20 disable_perf_counters

Stop collecting performance counters from all servers in the cluster. Definition: 

  void hyperdex_admin_disable_perf_counters(struct hyperdex_admin* admin);
Parameters:  Returns:  Nothing