MCPcopy Create free account
hub / github.com/apache/storm / sendToEventLogger

Method sendToEventLogger

storm-client/src/jvm/org/apache/storm/daemon/Task.java:222–235  ·  view source on GitHub ↗

Send sampled data to the eventlogger if the global or component level debug flag is set (via nimbus api).

(Executor executor, List values,
                                  String componentId, Object messageId, Random random, Queue<AddressedTuple> overflow)

Source from the content-addressed store, hash-verified

220 * Send sampled data to the eventlogger if the global or component level debug flag is set (via nimbus api).
221 */
222 public void sendToEventLogger(Executor executor, List values,
223 String componentId, Object messageId, Random random, Queue<AddressedTuple> overflow) {
224 Map<String, DebugOptions> componentDebug = executor.getStormComponentDebug().get();
225 DebugOptions debugOptions = componentDebug.get(componentId);
226 if (debugOptions == null) {
227 debugOptions = componentDebug.get(executor.getStormId());
228 }
229 double spct = ((debugOptions != null) && (debugOptions.is_enable())) ? debugOptions.get_samplingpct() : 0;
230 if (spct > 0 && (random.nextDouble() * 100) < spct) {
231 sendUnanchored(StormCommon.EVENTLOGGER_STREAM_ID,
232 new Values(componentId, messageId, System.currentTimeMillis(), values),
233 executor.getExecutorTransfer(), overflow);
234 }
235 }
236
237 private TopologyContext mkTopologyContext(StormTopology topology) throws IOException {
238 Map<String, Object> conf = workerData.getConf();

Callers 2

sendSpoutMsgMethod · 0.80
boltEmitMethod · 0.80

Calls 8

is_enableMethod · 0.95
get_samplingpctMethod · 0.95
sendUnanchoredMethod · 0.95
currentTimeMillisMethod · 0.80
getExecutorTransferMethod · 0.80
getMethod · 0.65
getStormIdMethod · 0.65

Tested by

no test coverage detected