Skip to content
This repository
Browse code

Merge branch 'model_refactor' of github.com:twitter/ambrose into hack…

…week

Conflicts:
	pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java
  • Loading branch information...
commit e4e1a88aba9edf5c73da95d0a4d7a7e6cd8ec43c 2 parents b100bd5 + 1188d39
Andy Schlaikjer sagemintblue authored
16 pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java
@@ -15,6 +15,7 @@
15 15 */
16 16 package com.twitter.ambrose.pig;
17 17
  18 +import com.google.common.base.Joiner;
18 19 import com.twitter.ambrose.model.DAGNode;
19 20 import com.twitter.ambrose.model.Event;
20 21 import com.twitter.ambrose.model.Job;
@@ -63,6 +64,8 @@
63 64 public class AmbrosePigProgressNotificationListener implements PigProgressNotificationListener {
64 65 protected Log log = LogFactory.getLog(getClass());
65 66
  67 + private static final Joiner COMMA_JOINER = Joiner.on(',');
  68 +
66 69 private StatsWriteService statsWriteService;
67 70
68 71 private String workflowVersion;
@@ -109,8 +112,8 @@ public void initialPlanNotification(String scriptId, MROperPlan plan) {
109 112
110 113 // this shows how we can get the basic info about all nameless jobs before any execute.
111 114 // we can traverse the plan to build a DAG of this info
112   - log.info("initialPlanNotification: aliases: " + aliases + ", name: " + node.getName() +
113   - ", features: " + features);
  115 + log.info("initialPlanNotification: aliases: " + COMMA_JOINER.join(aliases) +
  116 + ", name: " + node.getName() + ", features: " + COMMA_JOINER.join(features));
114 117 }
115 118
116 119 // second pass connects the edges
@@ -332,13 +335,4 @@ private void addMapReduceJobState(PigJob pigJob) {
332 335 private static String[] toArray(String string) {
333 336 return string == null ? new String[0] : string.trim().split(",");
334 337 }
335   -
336   - private static String toString(String[] array) {
337   - StringBuilder sb = new StringBuilder();
338   - for (String string : array) {
339   - if (sb.length() > 0) { sb.append(","); }
340   - sb.append(string);
341   - }
342   - return sb.toString();
343   - }
344 338 }

0 comments on commit e4e1a88

Please sign in to comment.
Something went wrong with that request. Please try again.