samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Fang <yanfang...@gmail.com>
Subject Re: How to pass arguments to a Samza job
Date Tue, 21 Apr 2015 21:33:22 GMT
Hi Jeremy,

Naveen is correct. You can also pass the argument through "--config". I
overlooked it. Sorry for the confusion.

Cheers,

Fang, Yan
yanfang724@gmail.com

On Tue, Apr 21, 2015 at 2:10 PM, Naveen S <navgog8@gmail.com> wrote:

> Hey Jeremy,
>                    Sorry, it's probably because it's not documented, but
> anything with "--config" will be passed to the property overrides. I just
> tested it out with hello-samza and it does work.
>
> deploy/samza/bin/run-job.sh
> --config-factory=org.apache.samza.config.factories.PropertiesConfigFactory
> --config-path=file://$PWD/deploy/samza/config/wikipedia-feed.properties
> --config test=3 --config test2=6
>
> On Tue, Apr 21, 2015 at 1:26 PM, jeremy p <athomewithagroovebox@gmail.com>
> wrote:
>
> > I'm a little confused.  Yan is saying that you cannot pass in command
> line
> > parameters, but Nav is saying that it is possible.  I guess I'll just
> build
> > a small project and test it out to see which one is correct.
> >
> > Thank you both.
> >
> > On Tue, Apr 21, 2015 at 2:56 PM, Nav s <navgog8@gmail.com> wrote:
> >
> > > Hey Jeremy,
> > >                     You can implement InitableTask
> > > <
> > >
> >
> http://samza.apache.org/learn/documentation/0.9/api/javadocs/org/apache/samza/task/InitableTask.html
> > > >,
> > > which should give you a handle to the config (You should be able to
> > access
> > > your configs from this class). You can pass commandline arguments with
> > the
> > > flag "--config key=value" in your run-job script.
> > >
> > >
> > > On Tue, Apr 21, 2015 at 11:29 AM, jeremy p <
> > athomewithagroovebox@gmail.com
> > > >
> > > wrote:
> > >
> > > > Hello all,
> > > >
> > > > Is there a way to pass arguments to a Samza job from the command
> line?
> > > If
> > > > not, is there any way to pass arguments to a Samza job besides the
> > > > .properties file?  Also, is there a way to pass application-specific
> > > > properties using the .properties file?  (such as
> > > > my.random.config.value=foo)
> > > >
> > > > Thanks for taking a look!
> > > >
> > > > --Jeremy
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message