You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@samza.apache.org by Naveen Somasundaram <na...@gmail.com> on 2014/11/14 00:58:08 UTC
Review Request 28016: SAMZA-226: Auto create Changelog stream topics
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs
-----
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Chris Riccomini <cr...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review61459
-----------------------------------------------------------
Also, please post RB link and patch on JIRA.
- Chris Riccomini
On Nov. 13, 2014, 11:58 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 13, 2014, 11:58 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62028
-----------------------------------------------------------
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java
<https://reviews.apache.org/r/28016/#comment103951>
Not reverting it in favor of keeping it as a part of the interface.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103952>
Removed
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103953>
Done!
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103955>
Done!
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103956>
Done!
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103957>
Done
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103959>
Done
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103962>
Done, do we follow any style format ? I can configure my IDE to use it.
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103963>
sticking with interface
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala
<https://reviews.apache.org/r/28016/#comment103964>
sticking with interface
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment103969>
Removed for reasons discussed in the previous comment
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment103970>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103971>
Agree with (1) for sure, so reverting to pass parameters.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103985>
As discussed offline, the conditions we check are different, for topic creation we will have different parameters than checkpoint. I think it's better to keep it separate, it will diverge over time as well.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103986>
removed!
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103987>
fixed!
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103988>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103989>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103991>
Added
- Naveen Somasundaram
On Nov. 13, 2014, 11:58 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 13, 2014, 11:58 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Chris Riccomini <cr...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62174
-----------------------------------------------------------
.reviewboardrc
<https://reviews.apache.org/r/28016/#comment104151>
OK for 0.8.0 branch. Will need to remove this for master.
.reviewboardrc
<https://reviews.apache.org/r/28016/#comment104153>
OK for 0.8.0 branch, but will need to fix in patch for master.
docs/learn/documentation/versioned/jobs/configuration-table.html
<https://reviews.apache.org/r/28016/#comment104152>
Nit: trailing space.
docs/learn/documentation/versioned/jobs/configuration-table.html
<https://reviews.apache.org/r/28016/#comment104154>
Nit: trailing space.
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104150>
Nit: regexSubset (lowercase S) to match "subset" API.
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104155>
regexSubset (lower case s) to match "subset" API (vs. subSet).
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104156>
Nit: bracket should be on the same line as if().
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104157>
Nit: k, entry (space)
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java
<https://reviews.apache.org/r/28016/#comment104158>
Nit: (for e.g. ...) seems redundant. You already said that the method is an API to create change log streams.
Remove "topicName" and use "streamName" instead. We don't use "topic" in Samza.
Nit: Also, you have both changelog and "change log" in the same docs. Please use "changelog". Trying to get standardized on that. :)
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java
<https://reviews.apache.org/r/28016/#comment104160>
Spacing is all over the place here. Please clean up.
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104162>
It seems like this stuff needs to be calculated only once, not once per-task. Recommend moving outside the taskInstances loop.
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104161>
Comment why we're doing this.
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104164>
Nit: Named parameter seems not necessary. Recommend removing "partition = " if possible.
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104163>
Nit: Named parameter seems not necessary. Recommend removing "partition = " if possible.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104165>
Not used.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104166>
Not used.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104168>
Nit: streamMetadataCache: StreamMetadataCache vs. streamMetadataCache : StreamMetadataCache (eliminate space to match style)
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104169>
Nit: eliminate space to match style
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104170>
This log line causes a compie-time error. You also have %s, but never call format.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104171>
Nit: private
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104172>
Nit: single space.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104177>
Nit: ChangeLog -> Changelog
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104179>
Recommend ArrayBuffer here. Then, buffer.toList at the end.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104180>
This logic won't work. You're looking at the prefix of the SystemStream, and assuming that developers will always name their system "kafka". This isn't necessarily true. They could name their system "my-system", and it could still be a Kafka system.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104175>
Style: single-line braces.. for(...) {
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104176>
Style: single-line braces.. if(...) {
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104173>
Nit: ... name, true (space)
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104174>
Nit: key, value (space)
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104181>
Javadocs.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104184>
Nit: newline.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104182>
Prefer () => ZkClient as a parameter here (see KafkaCheckpointManager for an example). This makes the ZkClient injectabe for unit testing.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104183>
Should just be Map[String, ChangeLogInfo]
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104190>
To make this a little more clear, recommend "Using partition count " + ...
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104191>
Style: kafkaProps)
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104189>
Move to KafkaUtil and share with KafkaCheckpointManager.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104187>
Delete or define.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104188>
Delete or define.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104185>
No need for : Unit =.. Just do ) {
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104186>
Nit: newline.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104192>
No need to have var and mutable map. Should be either/or. Stylistically, we use var with immutable map for everywhere except performance critical code. So, var ... Map()
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104193>
Style: single line for {
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104195>
Clean this up and and make multi-line, if possible.
Recommend "2" vs 2.toString (to be succinct).
Recommend creating the changeLogInfo in one line, and .put() in another.
Recommend getting replication factor in one line and using it in ChangeogInfo in another.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104194>
This really confused me. Should be consumerConfig (lower case C). Thought you were referring to a class below when you referenced ConsumerConfig.zkConnect.
- Chris Riccomini
On Nov. 19, 2014, 2:12 a.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 19, 2014, 2:12 a.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Chris Riccomini <cr...@apache.org>.
> On Nov. 25, 2014, 10:58 a.m., Martin Kleppmann wrote:
> > samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala, line 44
> > <https://reviews.apache.org/r/28016/diff/9/?file=771598#file771598line44>
> >
> > Does the changelog.replication.factor really need to be a top-level config of its own, or could it be under changelog.kafka? It seems odd that the replication factor is singled out like this, whereas other important configs (the compaction policy, the segment size) are not.
This is the way we handle it in the KafkaCheckpointManager, as well. The reason is that there's actually no replication factor setting in Kafka's properties.
If you check http://kafka.apache.org/documentation.html#configuration, and scroll down to the topic-specific section, you'll see there's no replication factor. This is further mirroed in the kafka-topcs.sh command:
> bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic my-topic --partitions 1
--replication-factor 1 --config max.message.bytes=64000 --config flush.messages=1
Where the --replicaiton-factor is a top level command, not a --config. We're just conforming to Kafka.
- Chris
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62965
-----------------------------------------------------------
On Nov. 20, 2014, 9:56 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 9:56 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Martin Kleppmann <ma...@kleppmann.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62965
-----------------------------------------------------------
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment105144>
This is quite convoluted code. How about something like this?
val changelogPartitions = taskNameToChangeLogPartitionMapping.values.max + 1
(If you're ever tempted to use "var" in Scala, stop and think, because there's probably a better way of doing it.)
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment105147>
Does the changelog.replication.factor really need to be a top-level config of its own, or could it be under changelog.kafka? It seems odd that the replication factor is singled out like this, whereas other important configs (the compaction policy, the segment size) are not.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment105146>
Need documentation for this new set of properties.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment105148>
The name you're dealing with here is actually the name of the store, not the changelog. The code would be easier to read if it was clear about this distinction.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment105150>
As Chris commented previously, it would be better to standardise on "Changelog" rather than "ChangeLog". There are also lots of local variables with [cC]hangeLog in their name, but a case class is particularly visible.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment105145>
Are these whitespace changes really necessary? They pollute the diff, and they make the code style inconsistent. (Everywhere else the convention seems to be to align the first asterisks on the same column.)
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment105151>
See previous comment on "Changelog" rather than "ChangeLog"
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment105149>
You need to use the store name here, not the topic name. (See my comment on JIRA)
- Martin Kleppmann
On Nov. 20, 2014, 9:56 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 9:56 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review64771
-----------------------------------------------------------
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment107530>
Thanks for the pointer (new to scala :) ).
I have changed this to use reduceLeft (In 0.9 the code has changed a bit, values is no longer a simple list).
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment107595>
Added docs for it
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment107596>
Rewrote this section to return a list of stores that are configured to use kafka as a changelog stream
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment107597>
Replaced all instances to Changelog in this class
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment107602>
My IDE shuffled it for some reason, fixed it manually. That said, the reason why I am guessing my IDE is doing that is we are not following standard format: http://docs.scala-lang.org/style/scaladoc.html
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment107598>
Changed to Changelog
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment107599>
Changed to use the storename instead of the topicname
- Naveen Somasundaram
On Nov. 20, 2014, 9:56 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 9:56 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 20, 2014, 9:56 p.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 20, 2014, 6:22 p.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
> On Nov. 20, 2014, 5:58 p.m., Chris Riccomini wrote:
> > Code doesn't compile:
> >
> > :samza-kafka_2.9.2:compileTestScala
> > [ant:scalac] Element '/Users/criccomi/Code/incubator-samza/samza-kafka/build/resources/main' does not exist.
> > /Users/criccomi/Code/incubator-samza/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala:170: error: type mismatch;
> > found : Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin#ChangeLogInfo]
> > required: Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin.ChangeLogInfo]
> > Error occurred in an application involving default arguments.
> > val systemAdmin = new KafkaSystemAdmin(systemName, brokers, connectZk = () => new ZkClient(zkConnect, 6000, 6000, ZKStringSerializer))
> > ^
> > /Users/criccomi/Code/incubator-samza/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala:295: error: type mismatch;
> > found : Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin#ChangeLogInfo]
> > required: Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin.ChangeLogInfo]
> > class KafkaSystemAdminWithTopicMetadataError extends KafkaSystemAdmin("test", brokers, connectZk = () => new ZkClient(zkConnect, 6000, 6000, ZKStringSerializer)) {
I am not able to reproduce, what command are you running ?
~/Documents/samza(branch:SAMZA-226*) ยป rm -rf build && ./gradlew clean build test
..
BUILD SUCCESSFUL
Total time: 3 mins 57.168 secs
------------------------------------------------------------
> On Nov. 20, 2014, 5:58 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala, line 107
> > <https://reviews.apache.org/r/28016/diff/7/?file=770995#file770995line107>
> >
> > Shouldn't this be .equals()? Recommend writing a test for this.
I thought in scala you use == ?
https://www.safaribooksonline.com/library/view/scala-cookbook/9781449340292/ch01s02.html
> On Nov. 20, 2014, 5:58 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 322
> > <https://reviews.apache.org/r/28016/diff/7/?file=770996#file770996line322>
> >
> > Decided not to move this to KafkaUtil and share with KafkaCheckpointManager?
Reply to your earlier comment has the details.
> On Nov. 20, 2014, 5:58 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 47
> > <https://reviews.apache.org/r/28016/diff/7/?file=770996#file770996line47>
> >
> > used +to+ construct?
done
> On Nov. 20, 2014, 5:58 p.m., Chris Riccomini wrote:
> > samza-api/src/main/java/org/apache/samza/config/Config.java, line 57
> > <https://reviews.apache.org/r/28016/diff/7/?file=770988#file770988line57>
> >
> > Lol. I meant regexSubset.
Troll =) Fixed!
- Naveen
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62364
-----------------------------------------------------------
On Nov. 20, 2014, 7:52 a.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 7:52 a.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Chris Riccomini <cr...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62364
-----------------------------------------------------------
Code doesn't compile:
:samza-kafka_2.9.2:compileTestScala
[ant:scalac] Element '/Users/criccomi/Code/incubator-samza/samza-kafka/build/resources/main' does not exist.
/Users/criccomi/Code/incubator-samza/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala:170: error: type mismatch;
found : Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin#ChangeLogInfo]
required: Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin.ChangeLogInfo]
Error occurred in an application involving default arguments.
val systemAdmin = new KafkaSystemAdmin(systemName, brokers, connectZk = () => new ZkClient(zkConnect, 6000, 6000, ZKStringSerializer))
^
/Users/criccomi/Code/incubator-samza/samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala:295: error: type mismatch;
found : Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin#ChangeLogInfo]
required: Map[String,org.apache.samza.system.kafka.KafkaSystemAdmin.ChangeLogInfo]
class KafkaSystemAdminWithTopicMetadataError extends KafkaSystemAdmin("test", brokers, connectZk = () => new ZkClient(zkConnect, 6000, 6000, ZKStringSerializer)) {
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104419>
Lol. I meant regexSubset.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104421>
Shouldn't this be .equals()? Recommend writing a test for this.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104422>
used +to+ construct?
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104423>
Decided not to move this to KafkaUtil and share with KafkaCheckpointManager?
- Chris Riccomini
On Nov. 20, 2014, 7:52 a.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 7:52 a.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 20, 2014, 7:52 a.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 20, 2014, 7:28 a.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review62262
-----------------------------------------------------------
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104273>
Done!
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104276>
done
samza-api/src/main/java/org/apache/samza/config/Config.java
<https://reviews.apache.org/r/28016/#comment104277>
done
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java
<https://reviews.apache.org/r/28016/#comment104278>
done!
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java
<https://reviews.apache.org/r/28016/#comment104280>
done
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104282>
I didn't even realize it was in a loop, once again, I've been tricked by .map!
Moved it outside the loop.
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104283>
Done
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
<https://reviews.apache.org/r/28016/#comment104284>
I removed it, but I wasn't sure why it is there for other parameters. I just added to make it consistent.
Removed for now.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104287>
Done
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104289>
Done
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104290>
Removed %s, it was redundent
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment104291>
done!
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104292>
Single new line ? Fixed
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104293>
done
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104332>
Done!
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104333>
Fixed to verify against the factory name
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104334>
done
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104335>
done
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104336>
done
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment104337>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104362>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104363>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104364>
Done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104365>
Done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104366>
Done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104367>
Done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104368>
I thought about it a little bit more and tried out abstracting it, but couldn't figure out a clean way to do it.
The way to do this would be pass a validateTopic(topicName, function_that_validates_the_condition).
Then the validationTopic will check the functionToValidate in the retryLoop, but the retryLoop also takes an exception condition which will check for the exceptions to be rethrown. If we want to use validateTopic to be shared, then we've two options:
1. Catch both KafkaChangeLogException and kafkaCheckpointException and rethrow both of them (which kind of not correct because changelog creation can throw checkpoint exception and we would just stop retrying - but should not, or the other way around). This is not a strictly correct behavior.
2. Change validateTopic to validateTopic(topicName, function_that_validates_the_condition, exceptions_to_ignore) - this is more so the correct approach, but I'm not sure what we gain by abstracting to this level, because it almost looks like the retry loop itself (with signature (function_that_validates_the_condition, exceptions_to_handle).
I'm going to leave it as-is, unless you can think of a better abstraction :)
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104369>
removed!
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104370>
Removed!
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment104371>
Done!
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104372>
switched to var
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104373>
done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104374>
Done
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala
<https://reviews.apache.org/r/28016/#comment104375>
removed, this must have been a copy-paste error(Source of all evil). There is another copy of the same variable above.
- Naveen Somasundaram
On Nov. 19, 2014, 2:12 a.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 19, 2014, 2:12 a.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 19, 2014, 2:12 a.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 19, 2014, 2:11 a.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 19, 2014, 1:19 a.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/
-----------------------------------------------------------
(Updated Nov. 19, 2014, 1:15 a.m.)
Review request for samza.
Repository: samza
Description
-------
I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
Diffs (updated)
-----
.reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
Diff: https://reviews.apache.org/r/28016/diff/
Testing
-------
Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
Thanks,
Naveen Somasundaram
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Martin Kleppmann <ma...@kleppmann.com>.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java, line 59
> > <https://reviews.apache.org/r/28016/diff/1/?file=762999#file762999line59>
> >
> > Should use "stream" instead of "topic" in this API. Samza doesn't use "topic".
> >
> > I think this method should be createChangelogSream(String streamName, int partitions). The reason for keeping it changelog-specific is that we might want custom configs for changelog streams (e.g. custom replication count, segment size in Kafka, etc). If we don't make the API specific to the changelog, there's no way to have custom configs for changelogs (since we won't know if the topic being created is a changelog or not).
> >
> > Also, the pattern that I'm following for SAMZA-448 is to add a new interface for create*Stream methods in the SystemAdmin is to have an interface that extends SystemAdmin with just the create method in it (e.g. ChangelogSystemAdmin). Then, only KafkaSystemAdmin would implement the new interface, whereas the FileReaderSystemAdmin would not. This was based on Yan's feedback.
>
> Naveen Somasundaram wrote:
> Makes sense, if we have more and more stream creations coming up, then we can maybe generalize it by having a custom configuration object for this API and refactor our code (with resonable defaults). But as of now, we don't have a necessity (we probably have 2-3 stream creation needs). So I am not going to try to code for the future :). I'll change it to changelogstream specific function.
>
> The latter, as we discussed, I am not going to make the change to have a separate interface. While I agree, every interface implementer will have to deal with it (even though they are not interested in it), the only alternative to the proposed solution from 448 is for the caller to deal with it (check if the instance is an appropriate instance before using it), which makes it slighly harder to use the interface IMO. So I am still inclined to sticking with this implementation.
There's a useful distinction here: some systems are able to implement a changelog, and some are not. For example, Amazon Kinesis currently only supports time-based retention of messages for 1 day, and doesn't have log compaction, so it's not suitable for changelog streams. Now what happens if you try to use a system that's not changelog-compatible with a changelog? With the current implementation, assuming that systems which don't support changelogs throw an exception on createChangelogStream(), you'll get an exception at job startup.
A sub-interface could allow slightly more graceful handling of this situation (since an early config verification step could detect whether the appropriate sub-interface is implemented, without calling the method).
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review61445
-----------------------------------------------------------
On Nov. 20, 2014, 9:56 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 9:56 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala d660b91fb7a1029a47d5e083759b8971ad97e617
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 53
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line53>
> >
> > Not needed.
removed
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 65
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line65>
> >
> > Prefer = Map() over null.
done
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 90
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line90>
> >
> > No need for :Unit =
removed
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 91
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line91>
> >
> > Remove newlines.
removed
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 96
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line96>
> >
> > Message in SamzaException.
> >
> > space after ,
done
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 98
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line98>
> >
> > Indentation.
done
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala, line 37
> > <https://reviews.apache.org/r/28016/diff/1/?file=763005#file763005line37>
> >
> > I don't think we need this, do we? Is there ever a case where you'd want to set the changelog partition count to a non-default number?
removed as per previous comment
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala, line 98
> > <https://reviews.apache.org/r/28016/diff/1/?file=763005#file763005line98>
> >
> > map -> foreach
changed
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 90
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line90>
> >
> > Javadocs.
> >
> > After seeing the implementation, I prefer not passing a config object into the constructor, and just having a constructor with a lot of defaults (as we had before). The reason that I don't like this is:
> >
> > 1. It's impossible to know what to set in the config to create the KafkaSystemAdmin without reading its code.
> > 2. It bleeds wiring with the class itself. These are two separate concerns, and should be treated separately.
> > 3. It makes writing tests harder, since you have to create a config object, rather than just passing in the params.
> >
> > Recommend switching back to the old style, and just adding new params to the constructor.
switched to passing parameters
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 283
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line283>
> >
> > This code looks to be pretty much copied from KafkaCheckpointManager. Can we just have the code once, and call it in both places? Maybe in KafkaUtil?
As discussed, there are different parameters and validations for checkpoint and changelog stream creation. I'm going to keep them separate, as I expect to diverge further.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 286
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line286>
> >
> > Don't think we need this. Should just use numKafkaChangeLogPartitions.
> >
> > Also, we should try and standardize on "Changelog" not "ChangeLog".
Removed it as addressed in previous comment.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 303
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line303>
> >
> > checkpoint topic -> changelog topic
done
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 310
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line310>
> >
> > Checkpoint -> changelog.
done
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 333
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line333>
> >
> > Checkpoint again.
done
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala, line 351
> > <https://reviews.apache.org/r/28016/diff/1/?file=763006#file763006line351>
> >
> > What is this? Javadocs.
added docs
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala, line 216
> > <https://reviews.apache.org/r/28016/diff/1/?file=763010#file763010line216>
> >
> > Remove.
done
- Naveen
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review61445
-----------------------------------------------------------
On Nov. 19, 2014, 1:19 a.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 19, 2014, 1:19 a.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> .reviewboardrc 9339119e248e41f954d47e1d01a0f2e1130d349c
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/config/Config.java 2048e90e80e21086eb59be57f3bcd5ebf92b2811
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Naveen Somasundaram <na...@gmail.com>.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java, line 59
> > <https://reviews.apache.org/r/28016/diff/1/?file=762999#file762999line59>
> >
> > Should use "stream" instead of "topic" in this API. Samza doesn't use "topic".
> >
> > I think this method should be createChangelogSream(String streamName, int partitions). The reason for keeping it changelog-specific is that we might want custom configs for changelog streams (e.g. custom replication count, segment size in Kafka, etc). If we don't make the API specific to the changelog, there's no way to have custom configs for changelogs (since we won't know if the topic being created is a changelog or not).
> >
> > Also, the pattern that I'm following for SAMZA-448 is to add a new interface for create*Stream methods in the SystemAdmin is to have an interface that extends SystemAdmin with just the create method in it (e.g. ChangelogSystemAdmin). Then, only KafkaSystemAdmin would implement the new interface, whereas the FileReaderSystemAdmin would not. This was based on Yan's feedback.
Makes sense, if we have more and more stream creations coming up, then we can maybe generalize it by having a custom configuration object for this API and refactor our code (with resonable defaults). But as of now, we don't have a necessity (we probably have 2-3 stream creation needs). So I am not going to try to code for the future :). I'll change it to changelogstream specific function.
The latter, as we discussed, I am not going to make the change to have a separate interface. While I agree, every interface implementer will have to deal with it (even though they are not interested in it), the only alternative to the proposed solution from 448 is for the caller to deal with it (check if the instance is an appropriate instance before using it), which makes it slighly harder to use the interface IMO. So I am still inclined to sticking with this implementation.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > docs/learn/documentation/versioned/jobs/configuration-table.html, line 786
> > <https://reviews.apache.org/r/28016/diff/1/?file=762998#file762998line786>
> >
> > Do we really need this config? What's the use case where you'd want to set the changelog partition count to something other than the correct size (which is automatically determined in the container)?
I thought about it, and couldn't find a reasonable reason why we would need it, going to get rid of it.
> On Nov. 14, 2014, 5:32 p.m., Chris Riccomini wrote:
> > samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala, line 36
> > <https://reviews.apache.org/r/28016/diff/1/?file=763002#file763002line36>
> >
> > Remove. Move getChangeLogOldestOffsetsForPartition into TaskStorageManager.
Done!
- Naveen
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review61445
-----------------------------------------------------------
On Nov. 13, 2014, 11:58 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 13, 2014, 11:58 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>
Re: Review Request 28016: SAMZA-226: Auto create Changelog stream
topics
Posted by Chris Riccomini <cr...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28016/#review61445
-----------------------------------------------------------
Nit: space after //
Just to make code more uniform.
docs/learn/documentation/versioned/jobs/configuration-table.html
<https://reviews.apache.org/r/28016/#comment103025>
Do we really need this config? What's the use case where you'd want to set the changelog partition count to something other than the correct size (which is automatically determined in the container)?
samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java
<https://reviews.apache.org/r/28016/#comment103024>
Should use "stream" instead of "topic" in this API. Samza doesn't use "topic".
I think this method should be createChangelogSream(String streamName, int partitions). The reason for keeping it changelog-specific is that we might want custom configs for changelog streams (e.g. custom replication count, segment size in Kafka, etc). If we don't make the API specific to the changelog, there's no way to have custom configs for changelogs (since we won't know if the topic being created is a changelog or not).
Also, the pattern that I'm following for SAMZA-448 is to add a new interface for create*Stream methods in the SystemAdmin is to have an interface that extends SystemAdmin with just the create method in it (e.g. ChangelogSystemAdmin). Then, only KafkaSystemAdmin would implement the new interface, whereas the FileReaderSystemAdmin would not. This was based on Yan's feedback.
samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java
<https://reviews.apache.org/r/28016/#comment103026>
Don't need this if you have a ChangelogSystemAdmin
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103039>
Remove. Move getChangeLogOldestOffsetsForPartition into TaskStorageManager.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103030>
Not needed.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103036>
Prefer = Map() over null.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103040>
createStreams
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103034>
No need for :Unit =
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103031>
Remove newlines.
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103033>
Message in SamzaException.
space after ,
samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala
<https://reviews.apache.org/r/28016/#comment103032>
Indentation.
samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103043>
Don't need if we hav a ChangelogSystemAdmin.
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala
<https://reviews.apache.org/r/28016/#comment103044>
Don't need if we hav a ChangelogSystemAdmin.
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment103048>
I don't think we need this, do we? Is there ever a case where you'd want to set the changelog partition count to a non-default number?
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment103045>
stores.%s.changelog.kafka
(typo on changelog, and kafkaprops -> kafka)
samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
<https://reviews.apache.org/r/28016/#comment103047>
map -> foreach
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103054>
Javadocs.
After seeing the implementation, I prefer not passing a config object into the constructor, and just having a constructor with a lot of defaults (as we had before). The reason that I don't like this is:
1. It's impossible to know what to set in the config to create the KafkaSystemAdmin without reading its code.
2. It bleeds wiring with the class itself. These are two separate concerns, and should be treated separately.
3. It makes writing tests harder, since you have to create a config object, rather than just passing in the params.
Recommend switching back to the old style, and just adding new params to the constructor.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103057>
Javadocs.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103056>
Javadocs.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103065>
This code looks to be pretty much copied from KafkaCheckpointManager. Can we just have the code once, and call it in both places? Maybe in KafkaUtil?
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103061>
Don't think we need this. Should just use numKafkaChangeLogPartitions.
Also, we should try and standardize on "Changelog" not "ChangeLog".
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103062>
checkpoint topic -> changelog topic
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103063>
Checkpoint -> changelog.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103067>
This looks to be copied from KafkaCheckpointManager as well. Can we converge on one util method in KafkaUtil, and call from both spots?
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103068>
Checkpoint again.
samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala
<https://reviews.apache.org/r/28016/#comment103059>
What is this? Javadocs.
samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java
<https://reviews.apache.org/r/28016/#comment103069>
Not needed if we have ChangelogSystemAdmin.
samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala
<https://reviews.apache.org/r/28016/#comment103071>
Remove.
- Chris Riccomini
On Nov. 13, 2014, 11:58 p.m., Naveen Somasundaram wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28016/
> -----------------------------------------------------------
>
> (Updated Nov. 13, 2014, 11:58 p.m.)
>
>
> Review request for samza.
>
>
> Repository: samza
>
>
> Description
> -------
>
> I have added an new method to the system admin as discussed in the jira, the task storage manager fetches all the information necessary and creates the change log topic using the system admin.
>
> PENDING: I have to update the Samza docs with the new configurations added, will update the rb with docs updates
>
>
> Diffs
> -----
>
> docs/learn/documentation/versioned/jobs/configuration-table.html 4266a137ae003e946e11c122d94061c31d643c77
> samza-api/src/main/java/org/apache/samza/system/SystemAdmin.java 571c60631357ea9a0b4fa24e7253008619ef2f32
> samza-api/src/main/java/org/apache/samza/util/SinglePartitionWithoutOffsetsSystemAdmin.java 38e313f3c39454110efd354e6ca025869fa930cd
> samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala d91d6d7940bd07a145dd3b782a9239f24bb5cf2e
> samza-core/src/main/scala/org/apache/samza/storage/TaskStorageManager.scala b8719c36c2b9346bcd3f291e23b33d2c00cebfa9
> samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemAdmin.scala 98e92bc12f3e2827cdec02f1ce94d7e2314e4b4e
> samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala a79eccaa8fc18d197b77f9363f1814fefc4ac40d
> samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala 9fc1f56d4404ec7722c0d34fde2804e981b41309
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemAdmin.scala 5ac33ea36da451250655d9dd373692b964322b41
> samza-kafka/src/main/scala/org/apache/samza/system/kafka/KafkaSystemFactory.scala 4ed5e881031e019d8df6de259cabb658820a3ba0
> samza-kafka/src/test/scala/org/apache/samza/system/kafka/TestKafkaSystemAdmin.scala 5ceb1093a66cb57e298d4b3ccdd24845dbb41b58
> samza-test/src/main/java/org/apache/samza/system/mock/MockSystemAdmin.java fa1d51b290013a3913d64884dc43907a76670849
> samza-test/src/test/scala/org/apache/samza/test/integration/TestStatefulTask.scala 118f5eee22016db3b802c32fb26c5d72fa61f1a7
>
> Diff: https://reviews.apache.org/r/28016/diff/
>
>
> Testing
> -------
>
> Modoified TestStatefulTask to disable auto creation of topics and the test seems to work.
>
>
> Thanks,
>
> Naveen Somasundaram
>
>