lhaiesp commented on a change in pull request #1217: SAMZA-2381: Refactor
JobRunner#run and split into two methods.
URL: https://github.com/apache/samza/pull/1217#discussion_r345510594
##########
File path: samza-core/src/main/scala/org/apache/samza/job/JobRunner.scala
##########
@@ -66,17 +66,33 @@ object JobRunner extends Logging {
class JobRunner(config: Config) extends Logging {
/**
- * This function submits the samza job.
- * @param resetJobConfig This flag indicates whether or not to reset the job
configurations when submitting the job.
+ * This function persist config in coordinator stream, create diagnostics
stream if applicable and
+ * then submits the samza job.
+ * @param resetJobConfig This flag indicates whether or not to reset the job
configurations in coordinator stream
+ * when submitting the job.
* If this value is set to true, all previously
written configs to coordinator stream will be
* deleted, and only the configs in the input config
file will have an affect. Otherwise, any
* config that is not deleted will have an affect.
* By default this value is set to true.
* @return The job submitted
*/
- def run(resetJobConfig: Boolean = true) = {
+ def run(resetJobConfig: Boolean = true): StreamJob = {
+ persist(resetJobConfig)
+ submit()
+ }
+
+ /**
+ * This function persist config in coordinator stream.
Review comment:
Besides creating and writing into coordinator stream, this method also
creates diagnostics streams and potentially other stuff in the future. Suggest
we provide more details in the java doc here. Also suggest a more generic
method name such as "prepare()"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services