Skip to content

Commit 2ea536f

Browse files
committed
Output msgId only when logging ack/fails.
Updated issue apache#2909 to only output the message ID for log messages produced by nextTuple, ack, and fail within SupplierSource and ComplexSource.
1 parent cdbda41 commit 2ea536f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

heron/api/src/java/org/apache/heron/streamlet/impl/sources/ComplexSource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void nextTuple() {
8282
collector.emit(new Values(tuple));
8383
}
8484
// TODO change logging level
85-
LOG.info("Emitting: " + new Values(tuple, msgId));
85+
LOG.info("Emitting: [" + msgId + "]");
8686
}
8787
}
8888
}
@@ -100,7 +100,7 @@ public void nextTuple() {
100100
Values values = new Values(msgIdCache.getIfPresent(mid));
101101
collector.emit(values, mid);
102102
// TODO change logging level
103-
LOG.info("Re-emit: [" + values.get(0) + ", " + mid + "]");
103+
LOG.info("Re-emit: [" + mid + "]");
104104
}
105105
}
106106
}

heron/api/src/java/org/apache/heron/streamlet/impl/sources/SupplierSource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector
6666
collector.emit(new Values(data));
6767
}
6868
// TODO change logging level
69-
LOG.info("Emitting: " + new Values(data, msgId));
69+
LOG.info("Emitting: [" + msgId + "]");
7070
}
7171

7272
@Override public void ack(Object mid) {
@@ -82,7 +82,7 @@ public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector
8282
Values values = new Values(msgIdCache.getIfPresent(mid));
8383
collector.emit(values, mid);
8484
// TODO change logging level
85-
LOG.info("Re-emit: [" + values.get(0) + ", " + mid + "]");
85+
LOG.info("Re-emit: [" + mid + "]");
8686
}
8787
}
8888
}

0 commit comments

Comments
 (0)