Class ClientSchemaAndIndexesGetRequest

java.lang.Object
org.apache.ignite.client.handler.requests.table.ClientSchemaAndIndexesGetRequest

public class ClientSchemaAndIndexesGetRequest extends Object
Client request: fetch a table's latest schema together with its full index set, resolved at a single catalog version.

Adding an index bumps the catalog version but not the table's schema version, so the schema-version handshake cannot describe the index set. This op returns both from one catalog snapshot, keyed by catalog version, so the client can build index-shaped requests (e.g. PREPARE_FOR_INSERT) against a known, mutually consistent view.

Wire request (in order):

  • int table id;
  • int catalog version to resolve at, or ClientCommon.LATEST_CATALOG_VERSION (-1) for the latest (active-at-current-time) catalog.

Wire response (in order):

  • int resolved catalog version (echoes the request, or the active version when -1 was sent);
  • the table's latest schema as of that catalog version, encoded by ClientTableCommon.writeSchema(org.apache.ignite.internal.client.proto.ClientMessagePacker, int, org.apache.ignite.internal.schema.SchemaDescriptor): int schema version, int column count, then per column a property count and its properties, then the write mode;
  • int index count, then per index (in ascending index-id order): int property count (leading scalar properties, currently just the id — a newer server may append more that older clients skip), int index id, int column count, then that many string indexed column names in index column order.
  • Constructor Details

    • ClientSchemaAndIndexesGetRequest

      public ClientSchemaAndIndexesGetRequest()
  • Method Details

    • process

      public static CompletableFuture<ResponseWriter> process(org.apache.ignite.internal.client.proto.ClientMessageUnpacker in, org.apache.ignite.internal.table.IgniteTablesInternal tables, org.apache.ignite.internal.catalog.CatalogService catalogService, org.apache.ignite.internal.schema.SchemaSyncService schemaSyncService, org.apache.ignite.internal.hlc.ClockService clockService)
      Processes the request.
      Parameters:
      in - Unpacker.
      tables - Ignite tables.
      catalogService - Catalog service.
      schemaSyncService - Schema sync service.
      clockService - Clock service.
      Returns:
      Future.