giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carmen Manzulli <carmenmanzu...@gmail.com>
Subject Re: string parameter from command line
Date Wed, 16 Jul 2014 11:32:18 GMT
yes...this i would obtain...but there is a unknown error (for me) in the
code:

public final StrConfOption SOURCE_ID = new
StrConfOption("Selection.sourceId",null,"select source id");
      public final Text subject=new
Text(getConf().get("Selection.sourceId"));

and from command line: hadoop jar.....-vip....-ca
Selection.sourceId="string"

i would use <subject> to compare vertex ID values ( defined as Text in my
inputFormat)


2014-07-16 12:15 GMT+02:00 Sundara Raghavan Sankaran <sundar@crayondata.com>
:

> I'm not sure of the use case here, but I'll give an example which might
> help you.
>
> The parameter is given in the command line with -ca (as you said). For
> example
> hadoop jar sample.jar -vip .... *-ca sample.option1=value1 -ca
> sample.option2=value2*
>
> You can then get this value from the configuration in your computation
> class
>
> *String option1 = getConf().get("sample.option1"); // will get "value1"*
>
> *String option2 = getConf().get("sample.option2"); // will get "value2"*
>
>
>
> On Wed, Jul 16, 2014 at 2:49 PM, Carmen Manzulli <carmenmanzulli@gmail.com
> > wrote:
>
>> Hi experts,
>> I'm trying to insert a string parameter from the command line with
>> "-ca"...so in my Computation code i've created a StrConfOption...when
>> running i get NPE because it seems to set the value of this string to
>> null...
>>
>> how can i fix this problem?
>>
>
>

Mime
View raw message