本文整理汇总了Java中org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent类的典型用法代码示例。如果您正苦于以下问题:Java DeleteNodeFailSilent类的具体用法?Java DeleteNodeFailSilent怎么用?Java DeleteNodeFailSilent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DeleteNodeFailSilent类属于org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp包,在下文中一共展示了DeleteNodeFailSilent类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toZooKeeperOp
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
/**
* Convert from ZKUtilOp to ZKOp
*/
private static Op toZooKeeperOp(ZooKeeperWatcher zkw, ZKUtilOp op)
throws UnsupportedOperationException {
if(op == null) return null;
if (op instanceof CreateAndFailSilent) {
CreateAndFailSilent cafs = (CreateAndFailSilent)op;
return Op.create(cafs.getPath(), cafs.getData(), createACL(zkw, cafs.getPath()),
CreateMode.PERSISTENT);
} else if (op instanceof DeleteNodeFailSilent) {
DeleteNodeFailSilent dnfs = (DeleteNodeFailSilent)op;
return Op.delete(dnfs.getPath(), -1);
} else if (op instanceof SetData) {
SetData sd = (SetData)op;
return Op.setData(sd.getPath(), sd.getData(), -1);
} else {
throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
+ op.getClass().getName());
}
}
示例2: toZooKeeperOp
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
/**
* Convert from ZKUtilOp to ZKOp
*/
private static Op toZooKeeperOp(ZKWatcher zkw, ZKUtilOp op) throws UnsupportedOperationException {
if(op == null) {
return null;
}
if (op instanceof CreateAndFailSilent) {
CreateAndFailSilent cafs = (CreateAndFailSilent)op;
return Op.create(cafs.getPath(), cafs.getData(), createACL(zkw, cafs.getPath()),
CreateMode.PERSISTENT);
} else if (op instanceof DeleteNodeFailSilent) {
DeleteNodeFailSilent dnfs = (DeleteNodeFailSilent)op;
return Op.delete(dnfs.getPath(), -1);
} else if (op instanceof SetData) {
SetData sd = (SetData)op;
return Op.setData(sd.getPath(), sd.getData(), -1);
} else {
throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
+ op.getClass().getName());
}
}
示例3: deleteNodeFailSilent
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
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);
}
}
示例4: equals
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof DeleteNodeFailSilent)) return false;
return super.equals(o);
}
示例5: processSequentially
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
private static void processSequentially(ZooKeeperWatcher zkw, List<ZKUtilOp> ops)
throws KeeperException, NoNodeException {
for (ZKUtilOp op : ops) {
if (op instanceof CreateAndFailSilent) {
createAndFailSilent(zkw, (CreateAndFailSilent) op);
} else if (op instanceof DeleteNodeFailSilent) {
deleteNodeFailSilent(zkw, (DeleteNodeFailSilent) op);
} else if (op instanceof SetData) {
setData(zkw, (SetData) op);
} else {
throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
+ op.getClass().getName());
}
}
}
示例6: deleteNodeFailSilent
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
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);
}
}
示例7: equals
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof DeleteNodeFailSilent)) {
return false;
}
return super.equals(o);
}
示例8: processSequentially
import org.apache.hadoop.hbase.zookeeper.ZKUtil.ZKUtilOp.DeleteNodeFailSilent; //导入依赖的package包/类
private static void processSequentially(ZKWatcher zkw, List<ZKUtilOp> ops)
throws KeeperException, NoNodeException {
for (ZKUtilOp op : ops) {
if (op instanceof CreateAndFailSilent) {
createAndFailSilent(zkw, (CreateAndFailSilent) op);
} else if (op instanceof DeleteNodeFailSilent) {
deleteNodeFailSilent(zkw, (DeleteNodeFailSilent) op);
} else if (op instanceof SetData) {
setData(zkw, (SetData) op);
} else {
throw new UnsupportedOperationException("Unexpected ZKUtilOp type: "
+ op.getClass().getName());
}
}
}