Interface ShardManager

All Known Implementing Classes:
DatabaseShardManager

public interface ShardManager
  • Method Details

    • createTable

      void createTable(long tableId, List<ColumnInfo> columns, boolean bucketed, OptionalLong temporalColumnId)
      Create a table.
    • dropTable

      void dropTable(long tableId)
      Drop a table.
    • addColumn

      void addColumn(long tableId, ColumnInfo column)
      Add a column to the end of the table.
    • commitShards

      void commitShards(long transactionId, long tableId, List<ColumnInfo> columns, Collection<ShardInfo> shards, Optional<String> externalBatchId, long updateTime)
      Commit data for a table.
    • replaceShardUuids

      void replaceShardUuids(long transactionId, long tableId, List<ColumnInfo> columns, Set<UUID> oldShardUuids, Collection<ShardInfo> newShards, OptionalLong updateTime)
      Replace oldShardsUuids with newShards.
    • getShard

      ShardMetadata getShard(UUID shardUuid)
      Get shard metadata for a shard.
    • getNodeShards

      Set<ShardMetadata> getNodeShards(String nodeIdentifier)
      Get shard metadata for shards on a given node.
    • getNodeShards

      Set<ShardMetadata> getNodeShards(String nodeIdentifier, long tableId)
      Get shard metadata for shards on a given node.
    • getShardNodes

      org.jdbi.v3.core.result.ResultIterator<BucketShards> getShardNodes(long tableId, TupleDomain<RaptorColumnHandle> effectivePredicate)
      Return the shard nodes for a non-bucketed table.
    • getShardNodesBucketed

      org.jdbi.v3.core.result.ResultIterator<BucketShards> getShardNodesBucketed(long tableId, boolean merged, List<String> bucketToNode, TupleDomain<RaptorColumnHandle> effectivePredicate)
      Return the shard nodes for a bucketed table.
    • replaceShardAssignment

      void replaceShardAssignment(long tableId, UUID shardUuid, String nodeIdentifier, boolean gracePeriod)
      Remove all old shard assignments and assign a shard to a node
    • getNodeBytes

      Map<String,Long> getNodeBytes()
      Get the number of bytes used by assigned shards per node.
    • beginTransaction

      long beginTransaction()
      Begin a transaction for creating shards.
      Returns:
      transaction ID
    • rollbackTransaction

      void rollbackTransaction(long transactionId)
      Rollback a transaction.
    • createBuckets

      void createBuckets(long distributionId, int bucketCount)
      Create initial bucket assignments for a distribution.
    • getBucketAssignments

      List<String> getBucketAssignments(long distributionId)
      Get map of buckets to node identifiers for a distribution.
    • updateBucketAssignment

      void updateBucketAssignment(long distributionId, int bucketNumber, String nodeId)
      Change the node a bucket is assigned to.
    • getDistributions

      List<Distribution> getDistributions()
      Get all active distributions.
    • getDistributionSizeInBytes

      long getDistributionSizeInBytes(long distributionId)
      Get total physical size of all tables in a distribution.
    • getBucketNodes

      List<BucketNode> getBucketNodes(long distributionId)
      Get list of bucket nodes for a distribution.
    • getExistingShardUuids

      Set<UUID> getExistingShardUuids(long tableId, Set<UUID> shardUuids)
      Return the subset of shard uuids that exist