@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(); } }
@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(); } }
public void configure(JobConf jobConf) { keyword = jobConf.get("keywords").split(","); super.configure(jobConf); }
@Override public void configure(JobConf job) { super.configure(job); }
@Override public void configure(JobConf jobConf) { super.configure(jobConf); this.conf = jobConf; init(); }