Class RemoteLogSegmentId
java.lang.Object
org.apache.kafka.server.log.remote.storage.RemoteLogSegmentId
This class represents a universally unique identifier associated to a topic partition's log segment. This will be
regenerated for every attempt of copying a specific log segment in
RemoteStorageManager.copyLogSegmentData(RemoteLogSegmentMetadata, LogSegmentData).
Once it is stored in remote storage, it is used to access that segment later from remote log metadata storage.-
Constructor Summary
ConstructorsConstructorDescriptionRemoteLogSegmentId(org.apache.kafka.common.TopicIdPartition topicIdPartition, org.apache.kafka.common.Uuid id) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RemoteLogSegmentIdgenerateNew(org.apache.kafka.common.TopicIdPartition topicIdPartition) Creates a newRemoteLogSegmentIdfor the providedTopicIdPartitionwith a random Uuid.inthashCode()org.apache.kafka.common.Uuidid()org.apache.kafka.common.TopicIdPartitiontoString()
-
Constructor Details
-
RemoteLogSegmentId
public RemoteLogSegmentId(org.apache.kafka.common.TopicIdPartition topicIdPartition, org.apache.kafka.common.Uuid id)
-
-
Method Details
-
generateNew
public static RemoteLogSegmentId generateNew(org.apache.kafka.common.TopicIdPartition topicIdPartition) Creates a newRemoteLogSegmentIdfor the providedTopicIdPartitionwith a random Uuid.- Parameters:
topicIdPartition- TopicIdPartition of this remote log segment.- Returns:
- generated RemoteLogSegmentId.
-
topicIdPartition
public org.apache.kafka.common.TopicIdPartition topicIdPartition()- Returns:
- TopicIdPartition of this remote log segment.
-
id
public org.apache.kafka.common.Uuid id()- Returns:
- Universally Unique Id of this remote log segment.
-
toString
-
equals
-
hashCode
public int hashCode()
-