All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.taobao.drc.clusterclient.clustermanager.BatchGetPartitionResponse Maven / Gradle / Ivy

There is a newer version: 5.0.0.1.beta
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy