Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleaning up print statements

  • Loading branch information...
commit 1188d39890cd747670a9b0ee324a5f858893eab3 1 parent 3ff9251
Bill Graham authored
View
16 pig/src/main/java/com/twitter/ambrose/pig/AmbrosePigProgressNotificationListener.java
@@ -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;
@@ -59,6 +60,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;
@@ -105,8 +108,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
@@ -328,13 +331,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.