Class SchemaPartitionTable
- java.lang.Object
-
- org.apache.iotdb.commons.partition.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 StorageGroupvoiddeserialize(java.io.InputStream inputStream, org.apache.thrift.protocol.TProtocol protocol)Only for Snapshotvoiddeserialize(java.nio.ByteBuffer buffer)Only for ConsensusRequestbooleanequals(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)booleangetSchemaPartition(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots, SchemaPartitionTable schemaPartitionTable)Thread-safely get SchemaPartition within the specific StorageGroupjava.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()inthashCode()voidserialize(java.io.OutputStream outputStream, org.apache.thrift.protocol.TProtocol protocol)
-
-
-
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- SeriesPartitionSlotsschemaPartitionTable- 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.IOExceptionorg.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.TExceptionOnly for Snapshot- Throws:
java.io.IOExceptionorg.apache.thrift.TException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-