com.taobao.drc.clusterclient.clustermanager.BatchGetPartitionResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of consumer-core Show documentation
Show all versions of consumer-core Show documentation
The java consumer core component for Data Transmission Service
package com.taobao.drc.clusterclient.clustermanager;
import com.alibaba.fastjson.annotation.JSONField;
import com.taobao.drc.clusterclient.partition.PartitionRef;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author yangyang
* @since 17/6/20
*/
public class BatchGetPartitionResponse extends AbstractControllerResponse {
@JSONField(name = "data")
private List partitionInfoList;
public List getPartitionInfoList() {
return partitionInfoList;
}
public void setPartitionInfoList(List partitionInfoList) {
this.partitionInfoList = partitionInfoList;
}
public Map groupPartitionInfoMap() {
Map ret = new HashMap();
for (PartitionInfo partitionInfo : partitionInfoList) {
PartitionRef ref = new PartitionRef(partitionInfo.getGuid(), partitionInfo.getGroup(), partitionInfo.getPartition());
ret.put(ref, partitionInfo);
}
return ret;
}
}