Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
View
@@ -15,6 +15,7 @@
*/
package com.twitter.ambrose.pig;
+import com.google.common.base.Joiner;
import com.twitter.ambrose.model.DAGNode;
import com.twitter.ambrose.model.Event;
import com.twitter.ambrose.model.Job;
@@ -63,6 +64,8 @@
public class AmbrosePigProgressNotificationListener implements PigProgressNotificationListener {
protected Log log = LogFactory.getLog(getClass());
+ private static final Joiner COMMA_JOINER = Joiner.on(',');
+
private StatsWriteService statsWriteService;
private String workflowVersion;
@@ -109,8 +112,8 @@ public void initialPlanNotification(String scriptId, MROperPlan plan) {
// this shows how we can get the basic info about all nameless jobs before any execute.
// we can traverse the plan to build a DAG of this info
- log.info("initialPlanNotification: aliases: " + aliases + ", name: " + node.getName() +
- ", features: " + features);
+ log.info("initialPlanNotification: aliases: " + COMMA_JOINER.join(aliases) +
+ ", name: " + node.getName() + ", features: " + COMMA_JOINER.join(features));
}
// second pass connects the edges
@@ -332,13 +335,4 @@ private void addMapReduceJobState(PigJob pigJob) {
private static String[] toArray(String string) {
return string == null ? new String[0] : string.trim().split(",");
}
-
- private static String toString(String[] array) {
- StringBuilder sb = new StringBuilder();
- for (String string : array) {
- if (sb.length() > 0) { sb.append(","); }
- sb.append(string);
- }
- return sb.toString();
- }
}
Please sign in to comment.
Something went wrong with that request. Please try again.