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

x33g5p2x  于2022-02-05 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(118)

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

ZKUtil.logRetrievedMsg介绍

暂无

代码示例

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

  1. /**
  2. * Get znode data. Does not set a watcher.
  3. *
  4. * @return ZNode data, null if the node does not exist or if there is an error.
  5. */
  6. public static byte [] getData(ZKWatcher zkw, String znode)
  7. throws KeeperException, InterruptedException {
  8. try {
  9. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, null);
  10. logRetrievedMsg(zkw, znode, data, false);
  11. return data;
  12. } catch (KeeperException.NoNodeException e) {
  13. LOG.debug(zkw.prefix("Unable to get data of znode " + znode + " " +
  14. "because node does not exist (not an error)"));
  15. return null;
  16. } catch (KeeperException e) {
  17. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  18. zkw.keeperException(e);
  19. return null;
  20. }
  21. }

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

  1. private static byte[] getDataInternal(ZKWatcher zkw, String znode, Stat stat,
  2. boolean watcherSet)
  3. throws KeeperException {
  4. try {
  5. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, zkw, stat);
  6. logRetrievedMsg(zkw, znode, data, watcherSet);
  7. return data;
  8. } catch (KeeperException.NoNodeException e) {
  9. // This log can get pretty annoying when we cycle on 100ms waits.
  10. // Enable trace if you really want to see it.
  11. LOG.trace(zkw.prefix("Unable to get data of znode " + znode + " " +
  12. "because node does not exist (not an error)"));
  13. return null;
  14. } catch (KeeperException e) {
  15. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  16. zkw.keeperException(e);
  17. return null;
  18. } catch (InterruptedException e) {
  19. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  20. zkw.interruptedException(e);
  21. return null;
  22. }
  23. }

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

  1. try {
  2. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, stat);
  3. logRetrievedMsg(zkw, znode, data, false);
  4. return data;
  5. } catch (KeeperException.NoNodeException e) {

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

  1. /**
  2. * Get znode data. Does not set a watcher.
  3. *
  4. * @return ZNode data, null if the node does not exist or if there is an error.
  5. */
  6. public static byte [] getData(ZKWatcher zkw, String znode)
  7. throws KeeperException, InterruptedException {
  8. try {
  9. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, null);
  10. logRetrievedMsg(zkw, znode, data, false);
  11. return data;
  12. } catch (KeeperException.NoNodeException e) {
  13. LOG.debug(zkw.prefix("Unable to get data of znode " + znode + " " +
  14. "because node does not exist (not an error)"));
  15. return null;
  16. } catch (KeeperException e) {
  17. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  18. zkw.keeperException(e);
  19. return null;
  20. }
  21. }

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

  1. /**
  2. * Get znode data. Does not set a watcher.
  3. * @return ZNode data
  4. */
  5. public static byte [] getData(ZooKeeperWatcher zkw, String znode)
  6. throws KeeperException {
  7. try {
  8. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, null);
  9. logRetrievedMsg(zkw, znode, data, false);
  10. return data;
  11. } catch (KeeperException.NoNodeException e) {
  12. LOG.debug(zkw.prefix("Unable to get data of znode " + znode + " " +
  13. "because node does not exist (not an error)"));
  14. return null;
  15. } catch (KeeperException e) {
  16. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  17. zkw.keeperException(e);
  18. return null;
  19. } catch (InterruptedException e) {
  20. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  21. zkw.interruptedException(e);
  22. return null;
  23. }
  24. }

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

  1. private static byte[] getDataInternal(ZooKeeperWatcher zkw, String znode, Stat stat,
  2. boolean watcherSet)
  3. throws KeeperException {
  4. try {
  5. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, zkw, stat);
  6. logRetrievedMsg(zkw, znode, data, watcherSet);
  7. return data;
  8. } catch (KeeperException.NoNodeException e) {
  9. LOG.debug(zkw.prefix("Unable to get data of znode " + znode + " " +
  10. "because node does not exist (not an error)"));
  11. return null;
  12. } catch (KeeperException e) {
  13. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  14. zkw.keeperException(e);
  15. return null;
  16. } catch (InterruptedException e) {
  17. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  18. zkw.interruptedException(e);
  19. return null;
  20. }
  21. }

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

  1. private static byte[] getDataInternal(ZKWatcher zkw, String znode, Stat stat,
  2. boolean watcherSet)
  3. throws KeeperException {
  4. try {
  5. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, zkw, stat);
  6. logRetrievedMsg(zkw, znode, data, watcherSet);
  7. return data;
  8. } catch (KeeperException.NoNodeException e) {
  9. // This log can get pretty annoying when we cycle on 100ms waits.
  10. // Enable trace if you really want to see it.
  11. LOG.trace(zkw.prefix("Unable to get data of znode " + znode + " " +
  12. "because node does not exist (not an error)"));
  13. return null;
  14. } catch (KeeperException e) {
  15. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  16. zkw.keeperException(e);
  17. return null;
  18. } catch (InterruptedException e) {
  19. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  20. zkw.interruptedException(e);
  21. return null;
  22. }
  23. }

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

  1. try {
  2. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, stat);
  3. logRetrievedMsg(zkw, znode, data, false);
  4. return data;
  5. } catch (KeeperException.NoNodeException e) {

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

  1. try {
  2. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, stat);
  3. logRetrievedMsg(zkw, znode, data, false);
  4. return data;
  5. } catch (KeeperException.NoNodeException e) {

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

  1. /**
  2. * Get znode data. Does not set a watcher.
  3. * @return ZNode data, null if the node does not exist or if there is an
  4. * error.
  5. */
  6. public static byte [] getData(ZooKeeperWatcher zkw, String znode)
  7. throws KeeperException, InterruptedException {
  8. try {
  9. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, null);
  10. logRetrievedMsg(zkw, znode, data, false);
  11. return data;
  12. } catch (KeeperException.NoNodeException e) {
  13. LOG.debug(zkw.prefix("Unable to get data of znode " + znode + " " +
  14. "because node does not exist (not an error)"));
  15. return null;
  16. } catch (KeeperException e) {
  17. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  18. zkw.keeperException(e);
  19. return null;
  20. }
  21. }

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

  1. private static byte[] getDataInternal(ZooKeeperWatcher zkw, String znode, Stat stat,
  2. boolean watcherSet)
  3. throws KeeperException {
  4. try {
  5. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, zkw, stat);
  6. logRetrievedMsg(zkw, znode, data, watcherSet);
  7. return data;
  8. } catch (KeeperException.NoNodeException e) {
  9. // This log can get pretty annoying when we cycle on 100ms waits.
  10. // Enable trace if you really want to see it.
  11. LOG.trace(zkw.prefix("Unable to get data of znode " + znode + " " +
  12. "because node does not exist (not an error)"));
  13. return null;
  14. } catch (KeeperException e) {
  15. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  16. zkw.keeperException(e);
  17. return null;
  18. } catch (InterruptedException e) {
  19. LOG.warn(zkw.prefix("Unable to get data of znode " + znode), e);
  20. zkw.interruptedException(e);
  21. return null;
  22. }
  23. }

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

  1. try {
  2. byte [] data = zkw.getRecoverableZooKeeper().getData(znode, null, stat);
  3. logRetrievedMsg(zkw, znode, data, false);
  4. return data;
  5. } catch (KeeperException.NoNodeException e) {

相关文章