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
Hadoop >> mail # user >> Setting Configuration for local file:///


Copy link to this message
-
Setting Configuration for local file:///
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 2012-08-07, 19:50
+
Mohit Anchlia 2012-08-07, 20:10
+
Harsh J 2012-08-07, 21:07
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