You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by hz...@apache.org on 2021/01/21 07:44:24 UTC
[helix] branch master updated: Include Exception Message in Log of
ZkBaseDataAccessor#get() (#1609)
This is an automated email from the ASF dual-hosted git repository.
hzlu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new fd84ca8 Include Exception Message in Log of ZkBaseDataAccessor#get() (#1609)
fd84ca8 is described below
commit fd84ca8b561c909f5cefa211fbadeec1cf0f25aa
Author: xyuanlu <xy...@gmail.com>
AuthorDate: Wed Jan 20 23:44:17 2021 -0800
Include Exception Message in Log of ZkBaseDataAccessor#get() (#1609)
Include Exception Message in Log of ZkBaseDataAccessor
---
.../java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
index 2721640..4e40d41 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
@@ -366,7 +366,7 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T> {
return result;
}
} catch (Exception e1) {
- LOG.error("Exception while setting path by creating: " + path, e);
+ LOG.error("Exception while setting path by creating: " + path, e1);
result._retCode = RetCode.ERROR;
return result;
}
@@ -441,7 +441,7 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T> {
retry = true;
break;
default:
- LOG.error("Fail to update path by creating: " + path);
+ LOG.error("Fail to update path by creating: " + path, e);
result._retCode = RetCode.ERROR;
return result;
}
@@ -557,8 +557,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T> {
stats.set(i, cb._stat);
}
} else if (Code.get(cb.getRc()) != Code.NONODE && throwException) {
- throw new HelixMetaDataAccessException(
- String.format("Failed to read node %s", paths.get(i)));
+ throw new HelixMetaDataAccessException(String
+ .format("Failed to read node %s, return code: %s", paths.get(i),
+ Code.get(cb.getRc())));
} else {
pathFailToRead.put(paths.get(i), cb.getRc());
}
@@ -568,7 +569,8 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T> {
}
return records;
} catch (Exception e) {
- throw new HelixMetaDataAccessException(String.format("Fail to read nodes for %s", paths));
+ throw new HelixMetaDataAccessException(
+ String.format("Fail to read nodes for %s", paths), e);
} finally {
long endT = System.nanoTime();
if (LOG.isTraceEnabled()) {