diff --git a/common/src/main/java/com/twitter/ambrose/model/Event.java b/common/src/main/java/com/twitter/ambrose/model/Event.java index cee0e37..8f97438 100644 --- a/common/src/main/java/com/twitter/ambrose/model/Event.java +++ b/common/src/main/java/com/twitter/ambrose/model/Event.java @@ -52,7 +52,7 @@ private Event(Type type, T payload) { this.payload = payload; } - private Event(int eventId, long timestamp, Type type, T payload) { + public Event(int eventId, long timestamp, Type type, T payload) { this.id = eventId; this.timestamp = timestamp; this.type = type; diff --git a/pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java b/pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java index 00ae659..4125517 100644 --- a/pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java +++ b/pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java @@ -175,6 +175,11 @@ public void jobStartedNotification(String scriptId, String assignedJobId) { */ @Override public void jobFailedNotification(String scriptId, JobStats stats) { + if (stats.getJobId() == null) { + log.warn("jobId for failed job not found. This should only happen in local mode"); + return; + } + DAGNode node = dagNodeJobIdMap.get(stats.getJobId()); if (node == null) { log.warn("Unrecognized jobId reported for failed job: " + stats.getJobId());