Agreed, should have used getConf(), I cleaned that up, so now things look
like this:

        Job job = Job.getInstance(getConf());
                
                /*
                 * 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("!yost8932!".getBytes()));
        
AccumuloMultiTableInputFormat.setZooKeeperInstance(job,"localhost","localhost");
                AccumuloMultiTableInputFormat.setScanAuthorizations(job,new
Authorizations("private"));
                AccumuloMultiTableInputFormat.setInputTableConfigs(job, 
configs);
                
        
log.debug(job.getConfiguration().get("AccumuloInputFormat.ScanOpts.TableConfigs"));
                
                
AccumuloOutputFormat.setZooKeeperInstance(job,"localhost","localhost");
                AccumuloOutputFormat.setConnectorInfo(job,"root",new
PasswordToken("!yost8932!".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;

Still getting java.lang.IllegalStateException: The table query
configurations could not be deserialized from the given configuration

--John



--
View this message in context: 
http://apache-accumulo.1065345.n5.nabble.com/AccumuloMultiTableInputFormat-IllegalStateException-tp11186p11197.html
Sent from the Users mailing list archive at Nabble.com.

Reply via email to