Created
March 15, 2018 21:56
-
-
Save tommyshiou/49fbff744a91c6872196d78dabd4b279 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StatusUpdateStreamingListener( | |
pipelineName: String, | |
pipelineId: Long) extends StreamingListener { | |
@Inject var statusTrackerClient: StatusTrackerClient = _ | |
override def onBatchCompleted(batch: StreamingListenerBatchCompleted): Unit = { | |
val msg = StreamingStatusMessage.newBuilder() | |
.setPipelineName(pipelineName) | |
.setId(pipelineId) | |
.setBatchTime(batch.batchInfo.batchTime.milliseconds) | |
.build | |
statusTrackerClient.send(msg) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment