Return-Path: X-Original-To: apmail-samza-dev-archive@minotaur.apache.org Delivered-To: apmail-samza-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0AD4183CD for ; Wed, 17 Jun 2015 00:25:16 +0000 (UTC) Received: (qmail 99380 invoked by uid 500); 17 Jun 2015 00:25:11 -0000 Delivered-To: apmail-samza-dev-archive@samza.apache.org Received: (qmail 99327 invoked by uid 500); 17 Jun 2015 00:25:11 -0000 Mailing-List: contact dev-help@samza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@samza.apache.org Delivered-To: mailing list dev@samza.apache.org Received: (qmail 99306 invoked by uid 99); 17 Jun 2015 00:25:11 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2015 00:25:11 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 2FDF91DFE7F; Wed, 17 Jun 2015 00:25:11 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7556318399852754677==" MIME-Version: 1.0 Subject: Re: Review Request 35241: refactoring the code for coordinator stream writer From: "Navina Ramesh" To: "Navina Ramesh" , "Naveen Somasundaram" , "Yi Pan (Data Infrastructure)" Cc: "samza" , "Shadi A. Noghabi" Date: Wed, 17 Jun 2015 00:25:11 -0000 Message-ID: <20150617002511.1515.39648@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Navina Ramesh" X-ReviewGroup: Samza X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/35241/ X-Sender: "Navina Ramesh" References: <20150609235315.27735.15031@reviews.apache.org> In-Reply-To: <20150609235315.27735.15031@reviews.apache.org> Reply-To: "Navina Ramesh" X-ReviewRequest-Repository: samza --===============7556318399852754677== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35241/#review88174 ----------------------------------------------------------- samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamWriter.java (line 41) Can you add a .sh wrapper using run-job to actually run the job from command line? Take a look at samza-shell/src/main/bash/checkpoint-tool.sh. You can follow a similar pattern to run the CoordinatorStreamWriter class. samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamWriter.java (line 61) Do we really need this check? There are no other components starting the same write thread. samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamWriter.java (line 125) I was thinking about how a continuous input is more useful than a one-time command. I think it is safer to expose / allow writing only 1 config change at a time. This will make input validation simpler and also, avoid the job-coordinator to react to all config changes at the same time. Can you change this to input only 1 config key/value pair at a time ? samza-core/src/test/java/org/apache/samza/coordinator/stream/MockCoordinatorStreamSystemFactory.java (line 60) nit: spacing - Navina Ramesh On June 9, 2015, 11:53 p.m., Shadi A. Noghabi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35241/ > ----------------------------------------------------------- > > (Updated June 9, 2015, 11:53 p.m.) > > > Review request for samza, Yi Pan (Data Infrastructure), Navina Ramesh, and Naveen Somasundaram. > > > Repository: samza > > > Description > ------- > > In order to be able to change configurations while a job is running, a tool for writing a message to the coordinator stream is needed. This code targets creating such a tool that can write messages to the coordinator stream after the bootstrap of the job. This code is related to the SAMZA-704 JIRA. > > To run the code use the folowing command: > > /bin/run-class.sh org.apache.samza.coordinator.stream.CoordinatorStreamWriter --config-factory= --config-path= > > > Diffs > ----- > > checkstyle/import-control.xml 3374f0c432e61ac4cda275377604cfd481f0cddf > samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamMessage.java 6c1e488d00d8593d59c89b57e673e0b6b90fd7d2 > samza-core/src/main/java/org/apache/samza/coordinator/stream/CoordinatorStreamWriter.java PRE-CREATION > samza-core/src/test/java/org/apache/samza/coordinator/stream/MockCoordinatorStreamSystemFactory.java 647cadb3a4e51bec8204197d77ad35a6b29afcec > samza-core/src/test/java/org/apache/samza/coordinator/stream/TestCoordinatorStreamSystemProducer.java 68e32554c18f443565284b807f43f4a5b05afbce > samza-core/src/test/java/org/apache/samza/coordinator/stream/TestCoordinatorStreamWriter.java PRE-CREATION > > Diff: https://reviews.apache.org/r/35241/diff/ > > > Testing > ------- > > > Thanks, > > Shadi A. Noghabi > > --===============7556318399852754677==--