hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: Setting Configuration for local file:///
Date Tue, 07 Aug 2012 19:50:50 GMT
What is GeoLookupConfigRunner and how do you utilize the setConf(conf)
object within it?

On Wed, Aug 8, 2012 at 1:10 AM, Mohit Anchlia <mohitanchlia@gmail.com> wrote:
> I am trying to write a test on local file system but this test keeps taking
> xml files in the path even though I am setting a different Configuration
> object. Is there a way for me to override it? I thought the way I am doing
> overwrites the configuration but doesn't seem to be working:
>
>  @Test
>  public void testOnLocalFS() throws Exception{
>   Configuration conf = new Configuration();
>   conf.set("fs.default.name", "file:///");
>   conf.set("mapred.job.tracker", "local");
>   Path input = new Path("geoinput/geo.dat");
>   Path output = new Path("geooutput/");
>   FileSystem fs = FileSystem.getLocal(conf);
>   fs.delete(output, true);
>
>   log.info("Here");
>   GeoLookupConfigRunner configRunner = new GeoLookupConfigRunner();
>   configRunner.setConf(conf);
>   int exitCode = configRunner.run(new String[]{input.toString(),
> output.toString()});
>   Assert.assertEquals(exitCode, 0);
>  }



-- 
Harsh J

Mime
View raw message