Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Passing command line arguments


+
praveenesh kumar 2013-12-06, 16:31
+
Serega Sheypak 2013-12-06, 16:36
Copy link to this message
-
Re: Passing command line arguments
Thanks :)

On Fri, Dec 6, 2013 at 4:36 PM, Serega Sheypak <[EMAIL PROTECTED]>wrote:

> Mapred. Child.Java.opts
> 06.12.2013 20:32 пользователь "praveenesh kumar" <[EMAIL PROTECTED]>
> написал:
>
> > Hi all,
> >
> > I am using my custom build class and my UDF is acting as wrapper.
> > I need to pass the command line argument to my UDF, which can be passed
> > down to the actual class that needs it.
> >
> > One way would be to use the standard command line passing method and pass
> > the parameter via constructors down to the class which needs it. But that
> > doesn't seems to be the right way to me as it requires too much of code
> > changes, I want to keep my UDF as a separate entity.
> >
> > Other way (which I am using) is defining the external parameter as system
> > variable and calling System.getenv( ), get that parameter, which is also
> > not that ideal as it requires hard-coding the variable on all hadoop
> nodes.
> >
> > What I am trying to look, something which I can pass via something like
> Pig
> > -D<my parameter=value> and use System.getProperty( ) method to get that
> > parameter.
> > But I am not able to find the property. I was wondering is there a way I
> > can use some other method or alternative to pass the command line
> variable
> > using Pig -D method or how pig UDFs are called behind the scenes so that
> I
> > can think of some other alternative.
> >
> > Regards
> > Praveenesh
> >
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB