accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corey Nolet <cjno...@gmail.com>
Subject Re: AccumuloMultiTableInputFormat IllegalStatementException
Date Sat, 23 Aug 2014 05:17:29 GMT
Also, if you don't mind me asking, why isn't your job setup class extending
Configured? That was you are picking up configurations injected from the
environment.

You would do "MyJobSetUpClass extends Configured" Then use getConf()
instead of newing up a new configuration.


On Sat, Aug 23, 2014 at 1:11 AM, Corey Nolet <cjnolet@gmail.com> wrote:

> Job.getInstance(configuration) copies the configuration and makes its own.
> Try doing your debug statement from earlier on job.getConfiguration() and
> let's see what the base64 string looks like.
>
>
>
> On Sat, Aug 23, 2014 at 1:00 AM, JavaHokie <soozandjohnyost@gmail.com>
> wrote:
>
>> Sure thing, here's my run method implementation:
>>
>>             Configuration configuration = new Configuration();
>>
>>             configuration.set("fs.defaultFS", "hdfs://127.0.0.1:8020");
>>             configuration.set("mapreduce.job.tracker", "localhost:54311");
>>             configuration.set("mapreduce.framework.name", "yarn");
>>             configuration.set("yarn.resourcemanager.address",
>> "localhost:8032");
>>
>>                 Job job = Job.getInstance(configuration);
>>
>>                 /*
>>                  * Set the basic stuff
>>                  */
>>                 job.setJobName("TwitterJoin Query");
>>                 job.setJarByClass(TwitterJoin.class);
>>
>>                 /*
>>                  * Set Mapper and Reducer Classes
>>                  */
>>                 job.setMapperClass(TwitterJoinMapper.class);
>>                 job.setReducerClass(TwitterJoinReducer.class);
>>
>>             /*
>>              * Set the Mapper MapOutputKeyClass and MapOutputValueClass
>>              */
>>             job.setMapOutputKeyClass(Text.class);
>>             job.setMapOutputValueClass(Text.class);
>>
>>             /*
>>              * Set the Reducer OutputKeyClass and OutputValueClass
>>              */
>>             job.setOutputKeyClass(Text.class);
>>             job.setOutputValueClass(Mutation.class);
>>
>>                 /*
>>                  * Set InputFormat and OutputFormat classes
>>                  */
>>
>> job.setInputFormatClass(AccumuloMultiTableInputFormat.class);
>>                 job.setOutputFormatClass(AccumuloOutputFormat.class);
>>
>>                 /*
>>                  * Configure InputFormat and OutputFormat Classes
>>                  */
>>                 Map<String,InputTableConfig> configs = new
>> HashMap<String,InputTableConfig>();
>>
>>                 List<Range> ranges = Lists.newArrayList(new
>> Range("104587"),new
>> Range("105255"));
>>
>>                 InputTableConfig edgeConfig = new InputTableConfig();
>>                 edgeConfig.setRanges(ranges);
>>                 edgeConfig.setAutoAdjustRanges(true);
>>
>>                 InputTableConfig followerConfig = new InputTableConfig();
>>                 followerConfig.setRanges(ranges);
>>                 followerConfig.setAutoAdjustRanges(true);
>>
>>                 configs.put("following",followerConfig);
>>                 configs.put("twitteredges",edgeConfig);
>>
>>
>> AccumuloMultiTableInputFormat.setConnectorInfo(job,"root",new
>> PasswordToken("********".getBytes()));
>>
>>
>> AccumuloMultiTableInputFormat.setZooKeeperInstance(job,"localhost","localhost");
>>
>> AccumuloMultiTableInputFormat.setScanAuthorizations(job,new
>> Authorizations("private"));
>>                 AccumuloMultiTableInputFormat.setInputTableConfigs(job,
>> configs);
>>
>>
>> AccumuloOutputFormat.setZooKeeperInstance(job,"localhost","localhost");
>>                 AccumuloOutputFormat.setConnectorInfo(job,"root",new
>> PasswordToken("********".getBytes()));
>>                 AccumuloOutputFormat.setCreateTables(job,true);
>>
>> AccumuloOutputFormat.setDefaultTableName(job,"twitteredgerollup");
>>
>>                 /*
>>                  * Kick off the job, wait for completion, and return
>> applicable code
>>                  */
>>             boolean success = job.waitForCompletion(true);
>>
>>             if (success) {
>>                 return 0;
>>             }
>>
>>             return 1;
>>         }
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-accumulo.1065345.n5.nabble.com/AccumuloMultiTableInputFormat-IllegalStateException-tp11186p11193.html
>> Sent from the Users mailing list archive at Nabble.com.
>>
>
>

Mime
View raw message