本文整理了Java中org.apache.hadoop.util.curator.ZKCuratorManager.setData()
方法的一些代码示例,展示了ZKCuratorManager.setData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKCuratorManager.setData()
方法的具体详情如下:
包路径:org.apache.hadoop.util.curator.ZKCuratorManager
类名称:ZKCuratorManager
方法名:setData
[英]Set data into a ZNode.
[中]将数据设置为ZNode。
代码示例来源:origin: org.apache.hadoop/hadoop-common
/**
* Set data into a ZNode.
* @param path Path of the ZNode.
* @param data Data to set as String.
* @param version Version of the data to store.
* @throws Exception If it cannot contact Zookeeper.
*/
public void setData(String path, String data, int version) throws Exception {
byte[] bytes = data.getBytes(Charset.forName("UTF-8"));
setData(path, bytes, version);
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
zkManager.setData(logsPath,
serializeObject(new LinkedList<LogMutation>()), -1);
mapSchedConf.put(entry.getKey(), entry.getValue());
zkManager.setData(confStorePath, serializeObject(mapSchedConf), -1);
内容来源于网络,如有侵权,请联系作者删除!