GridGain Developers Hub

System Views

GridGain provides a number of built-in SQL views that provide information on the cluster’s state and provide real-time insight into the status of its components. These views are available in the SYSTEM schema.

Getting Data

You access system views in GridGain by using SQL and selecting data from the system view like you would from any other table. For example, you can get a list of all available system views in the following way:

SELECT * FROM system.system_views

You can also use joins to combine data from multiple views. The example below returns all columns of a view that was found in the SYSTEM_VIEWS view:

SELECT svc.*
  FROM system.system_view_columns svc
  JOIN system.system_views sv ON svc.view_id = sv.id
 WHERE sv.name = 'SYSTEM_VIEWS'

Available Views

GLOBAL_PARTITION_STATES

Column Data Type Description

ZONE_NAME

STRING

The name of the distribution zone the partition belongs to.

TABLE_NAME

STRING

The name of the table stored in the partition.

PARTITION_ID

INT32

The unique identifier of the partition.

STATE

STRING

Partition status. Possible values: AVAILABLE, DEGRADED, READ_ONLY, UNAVAILABLE. See Disaster Recovery documentation for more information.

INDEXES

Column Data Type Description

INDEX_ID

INT32

Unique index identifier.

INDEX_NAME

STRING

The name of the index.

TABLE_ID

INT32

Unique table identifier.

TABLE_NAME

STRING

The name of the table.

SCHEMA_ID

INT32

Unique schema identifier.

SCHEMA_NAME

STRING

The name of the schema.

TYPE

STRING

The type of the index. Possible values: HASH, SORTED.

IS_UNIQUE

BOOLEAN

If the index is unique.

COLUMNS

STRING

The list of indexed columns.

STATUS

STRING

Current status of the index. Possible values:

  • REGISTERED - Index has been registered and is awaiting the start of building,

  • BUILDING - Index is being built,

  • AVAILABLE - Index is built and is ready to use,

  • STOPPING - DROP INDEX command has been executed, index is waiting for running transactions to finish.

LICENSES

Column Data Type Description

ID

STRING

The license ID.

INFOS

STRING

A list of key-value pairs providing information about the license requester/owner.

LIMITS

STRING

A list of key-value pairs providing information about the license validity period, cores and heap size limits, etc.

FEATURES

STRING

A list of GridGain features the license grants to the user.

LOCAL_PARTITION_STATES

Column Data Type Description

ZONE_NAME

STRING

The name of the distribution zone the partition belongs to.

TABLE_NAME

STRING

The name of the table stored in the partition.

PARTITION_ID

INT32

The unique identifier of the partition.

STATE

STRING

Partition status. Possible values: AVAILABLE, DEGRADED, READ_ONLY, UNAVAILABLE. See Disaster Recovery documentation for more information.

SEQUENCES

Column Data Type Description

ID

INT32

The ID of the sequence.

NAME

STRING

The name of the sequence.

SCHEMA_ID

INT32

The id of the schema used by the sequence.

SCHEMA_NAME

STRING

The name of the schema used by the sequence.

DATA_TYPE

STRING

The sequence data type.

INCREMENT

INT64

How much the sequence is incremented by each time.

MINIMUM_VALUE

INT64

Minimum sequence value.

MAXIMUM_VALUE

INT64

Maximum sequence value.

START_VALUE

INT64

The starting value of the sequence.

CACHE_VALUE

INT64

The amount of sequence numbers that are pre-allocated and stored in memory.

SYSTEM_VIEWS

Describes available system views.

Column Data Type Description

ID

INT32

System view ID.

SCHEMA

STRING

Name of the schema used. Default is SYSTEM.

NAME

STRING

System view name.

TYPE

STRING

System view type. Possible values:

  • NODE - The view provides node-specific information. Data will be collected from all nodes, and represented in the view.

  • CLUSTER - The view provides cluster-wide information. Data will be collected from one node, chosen to represent the cluster.

SYSTEM_VIEW_COLUMNS

Describes available system view columns.

Column Data Type Description

VIEW_ID

INT32

System view ID.

NAME

STRING

Column name.

TYPE

STRING

Column type. Can by any of the supported types.

NULLABLE

BOOLEAN

Defines if the column can be empty.

PRECISION

INT32

Maximum number of digits.

SCALE

INT32

Maximum number of decimal places.

LENGTH

INT32

Maximum length of the value. Symbols for string values or bytes for binary values.

ZONES

Column Data Type Description

NAME

STRING

The name of the distribution zone.

PARTITIONS

INT32

The number of partitions in the distribution zone.

REPLICAS

STRING

The number of copies of each partition in the distribution zone.

DATA_NODES_AUTO_ADJUST_SCALE_UP

INT32

The delay in seconds between the new node joining and the start of data zone adjustment.

DATA_NODES_AUTO_ADJUST_SCALE_DOWN

INT32

The delay in seconds between the node leaving the cluster and the start of data zone adjustment.

DATA_NODES_FILTER

STRING

The filter that specifies what nodes will be used by the distribution zone.

IS_DEFAULT_ZONE

BOOLEAN

Defines if the data zone is used by default.