This is an automated email from the ASF dual-hosted git repository.
mcvsubbu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 5920969 Added service status logs to indicate more znode information
(#4184)
5920969 is described below
commit 5920969434c4828b7f22dcd3b9d6a81da1619db4
Author: Subbu Subramaniam <[email protected]>
AuthorDate: Fri May 3 13:52:07 2019 -0700
Added service status logs to indicate more znode information (#4184)
* Added service status logs to indicate more znode information
Added the creation/modification times and znode version so that we
can get more debug information when we wait for a resource partition
to converge with idealstate.
* Guard against helix not initializing stat in HelixProperty
As per Helix team's advice
---
.../main/java/org/apache/pinot/common/utils/ServiceStatus.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
b/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
index 8e51026..b231ac1 100644
---
a/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
+++
b/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
@@ -27,6 +27,7 @@ import java.util.Set;
import org.apache.helix.HelixAdmin;
import org.apache.helix.HelixDataAccessor;
import org.apache.helix.HelixManager;
+import org.apache.helix.HelixProperty;
import org.apache.helix.PropertyKey;
import org.apache.helix.model.CurrentState;
import org.apache.helix.model.ExternalView;
@@ -131,7 +132,7 @@ public class ServiceStatus {
* Service status callback that compares ideal state with another Helix
state. Used to share most of the logic between
* the ideal state/external view comparison and ideal state/current state
comparison.
*/
- private static abstract class IdealStateMatchServiceStatusCallback<T>
implements ServiceStatusCallback {
+ private static abstract class IdealStateMatchServiceStatusCallback<T extends
HelixProperty> implements ServiceStatusCallback {
protected final String _clusterName;
protected final String _instanceName;
protected final HelixAdmin _helixAdmin;
@@ -317,8 +318,11 @@ public class ServiceStatus {
if ("ERROR".equals(currentStateStatus)) {
LOGGER.error(String.format("Resource: %s, partition: %s is in
ERROR state", resourceName, partitionName));
} else {
+ HelixProperty.Stat stat = helixState.getStat();
String description = String
- .format("partition=%s, expected=%s, found=%s", partitionName,
idealStateStatus, currentStateStatus);
+ .format("partition=%s, expected=%s, found=%s, creationTime=%d,
modifiedTime=%d, version=%d", partitionName,
+ idealStateStatus, currentStateStatus, stat != null ?
stat.getCreationTime() : -1,
+ stat != null ? stat.getModifiedTime() : -1, stat != null ?
stat.getVersion() : -1);
return new StatusDescriptionPair(Status.STARTING, description);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]