Class SchemaPartitionTable


  • public class SchemaPartitionTable
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SchemaPartitionTable()  
      SchemaPartitionTable​(java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> schemaPartitionMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​java.util.concurrent.atomic.AtomicLong>> createSchemaPartition​(SchemaPartitionTable assignedSchemaPartition)
      Create SchemaPartition within the specific StorageGroup
      void deserialize​(java.io.InputStream inputStream, org.apache.thrift.protocol.TProtocol protocol)
      Only for Snapshot
      void deserialize​(java.nio.ByteBuffer buffer)
      Only for ConsensusRequest
      boolean equals​(java.lang.Object o)  
      java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> filterUnassignedSchemaPartitionSlots​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots)
      Only Leader use this interface.
      java.util.List<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> getRegionId​(org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesSlotId)  
      boolean getSchemaPartition​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots, SchemaPartitionTable schemaPartitionTable)
      Thread-safely get SchemaPartition within the specific StorageGroup
      java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> getSchemaPartitionMap()  
      java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> getSeriesSlotList()  
      int hashCode()  
      void serialize​(java.io.OutputStream outputStream, org.apache.thrift.protocol.TProtocol protocol)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SchemaPartitionTable

        public SchemaPartitionTable()
      • SchemaPartitionTable

        public SchemaPartitionTable​(java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> schemaPartitionMap)
    • Method Detail

      • getSchemaPartitionMap

        public java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> getSchemaPartitionMap()
      • getSchemaPartition

        public boolean getSchemaPartition​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots,
                                          SchemaPartitionTable schemaPartitionTable)
        Thread-safely get SchemaPartition within the specific StorageGroup
        Parameters:
        partitionSlots - SeriesPartitionSlots
        schemaPartitionTable - Store the matched SchemaPartitions
        Returns:
        True if all the SeriesPartitionSlots are matched, false otherwise
      • createSchemaPartition

        public java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​java.util.concurrent.atomic.AtomicLong>> createSchemaPartition​(SchemaPartitionTable assignedSchemaPartition)
        Create SchemaPartition within the specific StorageGroup
        Parameters:
        assignedSchemaPartition - assigned result
        Returns:
        Map>
      • filterUnassignedSchemaPartitionSlots

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> filterUnassignedSchemaPartitionSlots​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots)
        Only Leader use this interface. Filter unassigned SchemaPartitionSlots within the specific StorageGroup.
        Parameters:
        partitionSlots - List
        Returns:
        Unassigned PartitionSlots
      • getRegionId

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> getRegionId​(org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesSlotId)
      • getSeriesSlotList

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> getSeriesSlotList()
      • serialize

        public void serialize​(java.io.OutputStream outputStream,
                              org.apache.thrift.protocol.TProtocol protocol)
                       throws java.io.IOException,
                              org.apache.thrift.TException
        Throws:
        java.io.IOException
        org.apache.thrift.TException
      • deserialize

        public void deserialize​(java.nio.ByteBuffer buffer)
        Only for ConsensusRequest
      • deserialize

        public void deserialize​(java.io.InputStream inputStream,
                                org.apache.thrift.protocol.TProtocol protocol)
                         throws java.io.IOException,
                                org.apache.thrift.TException
        Only for Snapshot
        Throws:
        java.io.IOException
        org.apache.thrift.TException
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object