ajothomas commented on code in PR #1642:
URL: https://github.com/apache/samza/pull/1642#discussion_r1024611620
##########
samza-core/src/main/java/org/apache/samza/drain/DrainUtils.java:
##########
@@ -54,44 +74,34 @@ private DrainUtils() {
* @return generated uuid for the DrainNotification
*/
@VisibleForTesting
- public static UUID writeDrainNotification(MetadataStore metadataStore,
String runId) {
+ public static UUID writeSimpleDrainNotification(MetadataStore metadataStore,
String runId) {
Review Comment:
Merged this with `writeDrainNotification(metadataStore)`
##########
samza-core/src/main/java/org/apache/samza/drain/DrainUtils.java:
##########
@@ -54,44 +74,34 @@ private DrainUtils() {
* @return generated uuid for the DrainNotification
*/
@VisibleForTesting
- public static UUID writeDrainNotification(MetadataStore metadataStore,
String runId) {
+ public static UUID writeSimpleDrainNotification(MetadataStore metadataStore,
String runId) {
Preconditions.checkArgument(metadataStore != null, "MetadataStore cannot
be null.");
Preconditions.checkArgument(!Strings.isNullOrEmpty(runId), "runId should
be non-null.");
LOG.info("Attempting to write DrainNotification to metadata-store for the
deployment ID {}", runId);
+ final UUID uuid = UUID.randomUUID();
+ final DrainNotification message = DrainNotification.simple(uuid, runId);
+ return writeDrainNotification(metadataStore, message);
+ }
+
+ /**
+ * Writes a {@link DrainNotification} to an underlying metadata store.
+ * */
+ @VisibleForTesting
+ public static UUID writeDrainNotification(MetadataStore metadataStore,
DrainNotification drainNotification) {
Review Comment:
This is package private now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]