HBASE-25588 Excessive logging of "hbase.zookeeper.useMulti is deprecated. Default to true always." (#3640)
Signed-off-by: Viraj Jasani <vjasani@apache.org> Reviewed-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
067f609ec6
commit
d1aa68bd11
@ -1759,6 +1759,12 @@ public final class ZKUtil {
|
||||
}
|
||||
}
|
||||
|
||||
// Static boolean for warning about useMulti because ideally there will be one warning per
|
||||
// process instance. It is fine if two threads end up racing on this for a bit. We do not
|
||||
// need to use an atomic type for this, that is overkill. The goal of reducing the number of
|
||||
// warnings from many to one or a few at startup is still achieved.
|
||||
private static boolean useMultiWarn = true;
|
||||
|
||||
/**
|
||||
* Use ZooKeeper's multi-update functionality.
|
||||
*
|
||||
@ -1779,14 +1785,16 @@ public final class ZKUtil {
|
||||
* @throws KeeperException if a ZooKeeper operation fails
|
||||
*/
|
||||
public static void multiOrSequential(ZKWatcher zkw, List<ZKUtilOp> ops,
|
||||
boolean runSequentialOnMultiFailure) throws KeeperException {
|
||||
if (zkw.getConfiguration().get("hbase.zookeeper.useMulti") != null) {
|
||||
LOG.warn("hbase.zookeeper.useMulti is deprecated. Default to true always.");
|
||||
}
|
||||
boolean runSequentialOnMultiFailure) throws KeeperException {
|
||||
if (ops == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (useMultiWarn) { // Only check and warn at first use
|
||||
if (zkw.getConfiguration().get("hbase.zookeeper.useMulti") != null) {
|
||||
LOG.warn("hbase.zookeeper.useMulti is deprecated. Default to true always.");
|
||||
}
|
||||
useMultiWarn = false;
|
||||
}
|
||||
List<Op> zkOps = new LinkedList<>();
|
||||
for (ZKUtilOp op : ops) {
|
||||
zkOps.add(toZooKeeperOp(zkw, op));
|
||||
|
Loading…
x
Reference in New Issue
Block a user