本文整理了Java中com.ucar.datalink.domain.media.parameter.zk.ZkMediaSrcParameter.parsePort()
方法的一些代码示例,展示了ZkMediaSrcParameter.parsePort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkMediaSrcParameter.parsePort()
方法的具体详情如下:
包路径:com.ucar.datalink.domain.media.parameter.zk.ZkMediaSrcParameter
类名称:ZkMediaSrcParameter
方法名:parsePort
暂无
代码示例来源:origin: ucarGroup/DataLink
org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", zkParameter.parseServersToString());
conf.set("hbase.zookeeper.property.clientPort", zkParameter.parsePort() + "");
conf.set("zookeeper.znode.parent", hbaseParameter.getZnodeParent());
logger.info("getHbaseColumnFamilies hbase admin begin connection.");
代码示例来源:origin: ucarGroup/DataLink
@Override
public Configuration load(MediaSourceInfo mediaSourceInfo) throws Exception {
HBaseMediaSrcParameter hbaseParameter = mediaSourceInfo.getParameterObj();
MediaSourceInfo zkMediaSource = DataLinkFactory.getObject(MediaService.class).getMediaSourceById(hbaseParameter.getZkMediaSourceId());
ZkMediaSrcParameter zkParameter = zkMediaSource.getParameterObj();
String address = zkParameter.parseServersToString();
String prot = zkParameter.parsePort() + "";
String znode = hbaseParameter.getZnodeParent();
Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", address);
conf.set("hbase.zookeeper.property.clientPort", prot);
conf.set("zookeeper.znode.parent", znode);
return conf;
}
});
代码示例来源:origin: ucarGroup/DataLink
String znode = hbaseParameter.getZnodeParent();
String address = zkParameter.parseServersToString();
String port = zkParameter.parsePort()+"";
org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
conf.set("hbase.zookeeper.quorum", address);
代码示例来源:origin: ucarGroup/DataLink
String port = zkParameter.parsePort() + "";
String address = zkParameter.parseServersToString();
String znode = hbaseParameter.getZnodeParent();
代码示例来源:origin: ucarGroup/DataLink
ZkMediaSrcParameter zkParameter = event.getZkParameter();
String hosts = zkParameter.parseServersToString();
String port = zkParameter.parsePort()+"";
String znode = hbaseParameter.getZnodeParent();
代码示例来源:origin: ucarGroup/DataLink
Set<String> qualifiers = getHbaseQualifier(tableName, zkParameter.parseServersToString(), zkParameter.parsePort() + "", hbaseParameter.getZnodeParent(), cf);
if(logger.isDebugEnabled()) {
logger.debug("getHbaseQualifier success "+qualifiers.toString());
代码示例来源:origin: ucarGroup/DataLink
public static List<HBaseRange> generateHBaseSplitInfo(MediaSourceInfo info, String tableName, int splitCount) {
checkHbase(info);
HBaseMediaSrcParameter parameter = info.getParameterObj();
long zkId = parameter.getZkMediaSourceId();
String znode = parameter.getZnodeParent();
MediaSourceInfo zkInfo = dao.findMediaSourceById(zkId);
checkZookeepr(zkInfo);
ZkMediaSrcParameter zkParameter = zkInfo.getParameterObj();
HBaseParameterVO vo = new HBaseParameterVO();
vo.setTableName(tableName);
vo.setZkAddress(zkParameter.getServers());
vo.setPort(zkParameter.parsePort()+"");
vo.setZnode(parameter.getZnodeParent());
vo.setSplitCount(splitCount);
String json = execute(vo,GENERATE_SPLIT_INFO);
Map<String,Object> map = JSONObject.parseObject(json,Map.class);
JSONArray array = (JSONArray)map.get("range");
Object[] obj_arr = array.toArray();
List<HBaseRange> list = new ArrayList<>();
for(Object o : obj_arr) {
String str = JSONObject.toJSONString(o);
HBaseRange hr = JSONObject.parseObject(str, HBaseRange.class);
list.add(hr);
}
return list;
}
代码示例来源:origin: ucarGroup/DataLink
ZkMediaSrcParameter zkParameter = event.getZkParameter();
String hosts = zkParameter.parseServersToString();
String port = zkParameter.parsePort()+"";
String znode = hbaseParameter.getZnodeParent();
int groupNbr = event.getSplitCount();
代码示例来源:origin: ucarGroup/DataLink
public static int getRegionCount(MediaSourceInfo info, String tableName) {
checkHbase(info);
HBaseMediaSrcParameter parameter = info.getParameterObj();
long zkId = parameter.getZkMediaSourceId();
String znode = parameter.getZnodeParent();
MediaSourceInfo zkInfo = dao.findMediaSourceById(zkId);
checkZookeepr(zkInfo);
ZkMediaSrcParameter zkParameter = zkInfo.getParameterObj();
HBaseParameterVO vo = new HBaseParameterVO();
vo.setTableName(tableName);
vo.setZkAddress(zkParameter.getServers());
vo.setPort(zkParameter.parsePort()+"");
vo.setZnode(parameter.getZnodeParent());
String json = execute(vo,GET_REGION_COUNT);
int result = -1;
try {
result = Integer.parseInt(json);
} catch(Exception e) {
logger.error(e.getMessage(),e);
}
return result;
}
代码示例来源:origin: ucarGroup/DataLink
/**
* 根据传入的MediaSourceInfo 获取所有表的元信息
* @param info
* @return
*/
public static List<MediaMeta> getTables(MediaSourceInfo info) {
checkHbase(info);
HBaseMediaSrcParameter parameter = info.getParameterObj();
long zkId = parameter.getZkMediaSourceId();
String znode = parameter.getZnodeParent();
MediaSourceInfo zkInfo = dao.findMediaSourceById(zkId);
checkZookeepr(zkInfo);
ZkMediaSrcParameter zkParameter = zkInfo.getParameterObj();
HBaseParameterVO vo = new HBaseParameterVO();
vo.setTableName("");
vo.setZkAddress(zkParameter.getServers());
vo.setPort(zkParameter.parsePort()+"");
vo.setZnode(parameter.getZnodeParent());
String json = execute(vo,GET_TABLES_URL);
return JSONObject.parseArray(json, MediaMeta.class);
}
代码示例来源:origin: ucarGroup/DataLink
/**
* 根据传入的MediaSourceInfo和表名,获取这个表下的所有列的元信息
* @param info
* @param tableName
* @return
*/
public static List<ColumnMeta> getColumns(MediaSourceInfo info, String tableName) {
checkHbase(info);
HBaseMediaSrcParameter parameter = info.getParameterObj();
long zkId = parameter.getZkMediaSourceId();
String znode = parameter.getZnodeParent();
MediaSourceInfo zkInfo = dao.findMediaSourceById(zkId);
checkZookeepr(zkInfo);
ZkMediaSrcParameter zkParameter = zkInfo.getParameterObj();
HBaseParameterVO vo = new HBaseParameterVO();
vo.setTableName(tableName);
vo.setZkAddress(zkParameter.getServers());
vo.setPort(zkParameter.parsePort()+"");
vo.setZnode(parameter.getZnodeParent());
String json = execute(vo,GET_COLUMNS_URL);
return JSONObject.parseArray(json, ColumnMeta.class);
}
内容来源于网络,如有侵权,请联系作者删除!