gpt4 book ai didi

org.apache.hadoop.hbase.zookeeper.ZKUtil.toZooKeeperOp()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 23:30:40 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZKUtil.toZooKeeperOp()方法的一些代码示例,展示了ZKUtil.toZooKeeperOp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKUtil.toZooKeeperOp()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZKUtil
类名称:ZKUtil
方法名:toZooKeeperOp

ZKUtil.toZooKeeperOp介绍

[英]Convert from ZKUtilOp to ZKOp
[中]从ZKUtilOp转换为ZKOp

代码示例

代码示例来源:origin: apache/hbase

private static void setData(ZKWatcher zkw, SetData setData)
 throws KeeperException, KeeperException.NoNodeException {
 SetDataRequest sd = (SetDataRequest)toZooKeeperOp(zkw, setData).toRequestRecord();
 setData(zkw, sd.getPath(), sd.getData(), sd.getVersion());
}

代码示例来源:origin: apache/hbase

zkOps.add(toZooKeeperOp(zkw, op));

代码示例来源:origin: apache/hbase

private static void deleteNodeFailSilent(ZKWatcher zkw,
  DeleteNodeFailSilent dnfs) throws KeeperException {
 DeleteRequest delete = (DeleteRequest)toZooKeeperOp(zkw, dnfs).toRequestRecord();
 try {
  zkw.getRecoverableZooKeeper().delete(delete.getPath(), delete.getVersion());
 } catch(KeeperException.NoNodeException nne) {
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: apache/hbase

private static void createAndFailSilent(ZKWatcher zkw, CreateAndFailSilent cafs)
 throws KeeperException {
 CreateRequest create = (CreateRequest)toZooKeeperOp(zkw, cafs).toRequestRecord();
 String znode = create.getPath();
 try {
  RecoverableZooKeeper zk = zkw.getRecoverableZooKeeper();
  if (zk.exists(znode, false) == null) {
   zk.create(znode, create.getData(), create.getAcl(), CreateMode.fromFlag(create.getFlags()));
  }
 } catch(KeeperException.NodeExistsException nee) {
 } catch(KeeperException.NoAuthException nee){
  try {
   if (null == zkw.getRecoverableZooKeeper().exists(znode, false)) {
    // If we failed to create the file and it does not already exist.
    throw(nee);
   }
  } catch (InterruptedException ie) {
   zkw.interruptedException(ie);
  }
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: co.cask.hbase/hbase

private static void setData(ZooKeeperWatcher zkw, SetData setData)
throws KeeperException, KeeperException.NoNodeException {
 SetDataRequest sd = (SetDataRequest)toZooKeeperOp(zkw, setData).toRequestRecord();
 setData(zkw, sd.getPath(), sd.getData(), sd.getVersion());
}

代码示例来源:origin: harbby/presto-connectors

private static void setData(ZooKeeperWatcher zkw, SetData setData)
throws KeeperException, KeeperException.NoNodeException {
 SetDataRequest sd = (SetDataRequest)toZooKeeperOp(zkw, setData).toRequestRecord();
 setData(zkw, sd.getPath(), sd.getData(), sd.getVersion());
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

private static void setData(ZKWatcher zkw, SetData setData)
 throws KeeperException, KeeperException.NoNodeException {
 SetDataRequest sd = (SetDataRequest)toZooKeeperOp(zkw, setData).toRequestRecord();
 setData(zkw, sd.getPath(), sd.getData(), sd.getVersion());
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

zkOps.add(toZooKeeperOp(zkw, op));

代码示例来源:origin: co.cask.hbase/hbase

private static void deleteNodeFailSilent(ZooKeeperWatcher zkw,
  DeleteNodeFailSilent dnfs) throws KeeperException {
 DeleteRequest delete = (DeleteRequest)toZooKeeperOp(zkw, dnfs).toRequestRecord();
 try {
  zkw.getRecoverableZooKeeper().delete(delete.getPath(), delete.getVersion());
 } catch(KeeperException.NoNodeException nne) {
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

private static void deleteNodeFailSilent(ZKWatcher zkw,
  DeleteNodeFailSilent dnfs) throws KeeperException {
 DeleteRequest delete = (DeleteRequest)toZooKeeperOp(zkw, dnfs).toRequestRecord();
 try {
  zkw.getRecoverableZooKeeper().delete(delete.getPath(), delete.getVersion());
 } catch(KeeperException.NoNodeException nne) {
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: harbby/presto-connectors

private static void deleteNodeFailSilent(ZooKeeperWatcher zkw,
  DeleteNodeFailSilent dnfs) throws KeeperException {
 DeleteRequest delete = (DeleteRequest)toZooKeeperOp(zkw, dnfs).toRequestRecord();
 try {
  zkw.getRecoverableZooKeeper().delete(delete.getPath(), delete.getVersion());
 } catch(KeeperException.NoNodeException nne) {
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: co.cask.hbase/hbase

List<Op> zkOps = new LinkedList<Op>();
for (ZKUtilOp op : ops) {
 zkOps.add(toZooKeeperOp(zkw, op));

代码示例来源:origin: harbby/presto-connectors

List<Op> zkOps = new LinkedList<Op>();
for (ZKUtilOp op : ops) {
 zkOps.add(toZooKeeperOp(zkw, op));

代码示例来源:origin: org.apache.hbase/hbase-zookeeper

private static void createAndFailSilent(ZKWatcher zkw, CreateAndFailSilent cafs)
 throws KeeperException {
 CreateRequest create = (CreateRequest)toZooKeeperOp(zkw, cafs).toRequestRecord();
 String znode = create.getPath();
 try {
  RecoverableZooKeeper zk = zkw.getRecoverableZooKeeper();
  if (zk.exists(znode, false) == null) {
   zk.create(znode, create.getData(), create.getAcl(), CreateMode.fromFlag(create.getFlags()));
  }
 } catch(KeeperException.NodeExistsException nee) {
 } catch(KeeperException.NoAuthException nee){
  try {
   if (null == zkw.getRecoverableZooKeeper().exists(znode, false)) {
    // If we failed to create the file and it does not already exist.
    throw(nee);
   }
  } catch (InterruptedException ie) {
   zkw.interruptedException(ie);
  }
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: co.cask.hbase/hbase

private static void createAndFailSilent(ZooKeeperWatcher zkw, CreateAndFailSilent cafs)
throws KeeperException {
 CreateRequest create = (CreateRequest)toZooKeeperOp(zkw, cafs).toRequestRecord();
 String znode = create.getPath();
 try {
  RecoverableZooKeeper zk = zkw.getRecoverableZooKeeper();
  if (zk.exists(znode, false) == null) {
   zk.create(znode, create.getData(), create.getAcl(), CreateMode.fromFlag(create.getFlags()));
  }
 } catch(KeeperException.NodeExistsException nee) {
 } catch(KeeperException.NoAuthException nee){
  try {
   if (null == zkw.getRecoverableZooKeeper().exists(znode, false)) {
    // If we failed to create the file and it does not already exist.
    throw(nee);
   }
  } catch (InterruptedException ie) {
   zkw.interruptedException(ie);
  }
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

代码示例来源:origin: harbby/presto-connectors

private static void createAndFailSilent(ZooKeeperWatcher zkw, CreateAndFailSilent cafs)
throws KeeperException {
 CreateRequest create = (CreateRequest)toZooKeeperOp(zkw, cafs).toRequestRecord();
 String znode = create.getPath();
 try {
  RecoverableZooKeeper zk = zkw.getRecoverableZooKeeper();
  if (zk.exists(znode, false) == null) {
   zk.create(znode, create.getData(), create.getAcl(), CreateMode.fromFlag(create.getFlags()));
  }
 } catch(KeeperException.NodeExistsException nee) {
 } catch(KeeperException.NoAuthException nee){
  try {
   if (null == zkw.getRecoverableZooKeeper().exists(znode, false)) {
    // If we failed to create the file and it does not already exist.
    throw(nee);
   }
  } catch (InterruptedException ie) {
   zkw.interruptedException(ie);
  }
 } catch(InterruptedException ie) {
  zkw.interruptedException(ie);
 }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com