Search in sources :

Example 16 with UKvBean

use of com.actiontech.dble.config.loader.ucoreprocess.bean.UKvBean in project dble by actiontech.

the class ClusterUcoreSender method getKeyTree.

public static List<UKvBean> getKeyTree(String key) {
    if (!(key.charAt(key.length() - 1) == '/')) {
        key = key + "/";
    }
    List<UKvBean> result = new ArrayList<UKvBean>();
    UcoreInterface.GetKvTreeInput input = UcoreInterface.GetKvTreeInput.newBuilder().setKey(key).build();
    if (stub == null) {
        init();
    }
    UcoreInterface.GetKvTreeOutput output = stub.getKvTree(input);
    for (int i = 0; i < output.getKeysCount(); i++) {
        UKvBean bean = new UKvBean(output.getKeys(i), output.getValues(i), output.getIndex());
        result.add(bean);
    }
    return result;
}
Also used : ArrayList(java.util.ArrayList) UKvBean(com.actiontech.dble.config.loader.ucoreprocess.bean.UKvBean) UcoreInterface(com.actiontech.dble.log.alarm.UcoreInterface)

Aggregations

UKvBean (com.actiontech.dble.config.loader.ucoreprocess.bean.UKvBean)16 JSONObject (com.alibaba.fastjson.JSONObject)5 File (java.io.File)4 HashMap (java.util.HashMap)4 UcoreInterface (com.actiontech.dble.log.alarm.UcoreInterface)3 Map (java.util.Map)3 BinlogPause (com.actiontech.dble.config.loader.zkprocess.zookeeper.process.BinlogPause)2 UDistributeLock (com.actiontech.dble.config.loader.ucoreprocess.UDistributeLock)1 Rules (com.actiontech.dble.config.loader.zkprocess.entity.Rules)1 Schemas (com.actiontech.dble.config.loader.zkprocess.entity.Schemas)1 Server (com.actiontech.dble.config.loader.zkprocess.entity.Server)1 Ehcache (com.actiontech.dble.config.loader.zkprocess.entity.cache.Ehcache)1 Function (com.actiontech.dble.config.loader.zkprocess.entity.rule.function.Function)1 TableRule (com.actiontech.dble.config.loader.zkprocess.entity.rule.tablerule.TableRule)1 DataHost (com.actiontech.dble.config.loader.zkprocess.entity.schema.datahost.DataHost)1 DataNode (com.actiontech.dble.config.loader.zkprocess.entity.schema.datanode.DataNode)1 Schema (com.actiontech.dble.config.loader.zkprocess.entity.schema.schema.Schema)1 DDLInfo (com.actiontech.dble.config.loader.zkprocess.zookeeper.process.DDLInfo)1 SchemaConfig (com.actiontech.dble.config.model.SchemaConfig)1 ArrayList (java.util.ArrayList)1