return getOffset(topic, partition, startOffsetTime);
}
public long getOffset( String topic,
int partition, long startOffsetTime) {
TopicAndPartition topicAndPartition = new TopicAndPartition(topic,
partition);
Map<TopicAndPartition, PartitionOffsetRequestInfo> requestInfo = new HashMap<TopicAndPartition, PartitionOffsetRequestInfo>();
requestInfo.put(topicAndPartition, new PartitionOffsetRequestInfo(
startOffsetTime, 1));
OffsetRequest request = new OffsetRequest(requestInfo,