Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,12 @@ public void init(String topicName, String consumerName, Date startTimestamp,
&& startTime.after(new Date(System.currentTimeMillis()))) {
throw new IllegalArgumentException("Future start time is not accepted");
}
init(config);
metrics = (BaseMessageConsumerStatsExposer) getMetricsImpl();
String emitterConfig = config
.getString(MessageConsumerFactory.EMITTER_CONF_FILE_KEY);
if (emitterConfig != null) {
statsEmitter.init(emitterConfig);
}
init(config);
metrics = (BaseMessageConsumerStatsExposer) getMetricsImpl();
if (emitterConfig != null) {
statsEmitter.add(metrics);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ protected void createPartitionReaders() throws IOException {
PartitionReaderStatsExposer collectorMetrics = new
CollectorReaderStatsExposer(topicName, consumerName,
id.toString(), consumerNumber, fsuri);
addStatsExposer(collectorMetrics);
Path streamsLocalDir = null;
if (readFromLocalStream) {
streamsLocalDir = DatabusUtil.getStreamDir(StreamType.LOCAL,
Expand All @@ -214,6 +213,7 @@ protected void createPartitionReaders() throws IOException {
new Path(streamDir, collector), streamsLocalDir, buffer, topicName,
partitionTimestamp, waitTimeForFlush, waitTimeForFileCreate,
collectorMetrics, stopTime));
addStatsExposer(collectorMetrics);
messageConsumedMap.put(id, false);
numList = 0;
}
Expand All @@ -228,12 +228,12 @@ protected void createPartitionReaders() throws IOException {
PartitionReaderStatsExposer clusterMetrics =
new PartitionReaderStatsExposer(topicName, consumerName,
id.toString(), consumerNumber, fsuri);
addStatsExposer(clusterMetrics);
readers.put(id, new PartitionReader(id,
partitionCheckpointList, fs, buffer, streamDir, conf,
DatabusInputFormat.class.getCanonicalName(), partitionTimestamp,
waitTimeForFileCreate, true, clusterMetrics, partitionMinList,
stopTime));
addStatsExposer(clusterMetrics);
messageConsumedMap.put(id, false);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ protected void createPartitionReaders() throws IOException {
PartitionReaderStatsExposer clusterMetrics =
new PartitionReaderStatsExposer(topicName, consumerName, id.toString(),
consumerNumber, fsUri);
addStatsExposer(clusterMetrics);
PartitionReader reader = new PartitionReader(id,
partitionCheckpointList, fileSystems[i], buffer, rootDirs[i],
conf, inputFormatClassName, partitionTimestamp,
waitTimeForFileCreate, false, clusterMetrics, partitionMinList,
stopTime);
LOG.debug("Created partition " + id);
readers.put(id, reader);
addStatsExposer(clusterMetrics);
messageConsumedMap.put(id, false);
}
}
Expand Down