예제 #1
0
 @Override
 public void configure(JobConf job) {
   super.configure(job);
   this.localDir = job.get("mapred.child.tmp");
   try {
     FileAndWriter faw = openFileWriter(localDir, 1);
     s1File = faw.file;
     s1FileWriter = faw.writer;
     faw = openFileWriter(localDir, 2);
     s2File = faw.file;
     s2FileWriter = faw.writer;
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
예제 #2
0
 @Override
 public void configure(JobConf job) {
   super.configure(job);
   try {
     String queryShapeClassName = job.get(QUERY_SHAPE_CLASS);
     Class<? extends Shape> queryShapeClass =
         Class.forName(queryShapeClassName).asSubclass(Shape.class);
     queryShape = queryShapeClass.newInstance();
     queryShape.fromText(new Text(job.get(QUERY_SHAPE)));
     queryMbr = queryShape.getMBR();
     queryField = job.get(QUERY_FIELD);
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   } catch (InstantiationException e) {
     e.printStackTrace();
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   }
 }
예제 #3
0
 public void configure(JobConf jobConf) {
   keyword = jobConf.get("keywords").split(",");
   super.configure(jobConf);
 }
예제 #4
0
 @Override
 public void configure(JobConf job) {
   super.configure(job);
 }
예제 #5
0
 @Override
 public void configure(JobConf jobConf) {
   super.configure(jobConf);
   this.conf = jobConf;
   init();
 }