You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2019/01/28 12:32:47 UTC
[kylin] branch master updated: KYLIN-3793 KafkaSampleProducer exit
after generating 1 message
This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 33ef4a9 KYLIN-3793 KafkaSampleProducer exit after generating 1 message
33ef4a9 is described below
commit 33ef4a92b094935db029d3478cf6d491cf51efea
Author: shaofengshi <sh...@apache.org>
AuthorDate: Mon Jan 28 20:30:30 2019 +0800
KYLIN-3793 KafkaSampleProducer exit after generating 1 message
---
.../java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java b/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
index 51e8ff3..750d2f0 100644
--- a/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
+++ b/source-kafka/src/main/java/org/apache/kylin/source/kafka/util/KafkaSampleProducer.java
@@ -135,7 +135,7 @@ public class KafkaSampleProducer {
if(logger.isInfoEnabled()) logger.info("Sending 1 message: {}", JsonUtil.writeValueAsString(record));
producer.send(data);
Thread.sleep(interval);
- if(System.currentTimeMillis() - startTime <= 7 * 24 * 3600 * 1000){
+ if(System.currentTimeMillis() - startTime >= 7 * 24 * 3600 * 1000){
alive = false;
}
}