public static void addNamedOutput(Job job, String name, Class<? extends OutputFormat> outputFormatClass, Class keyClass, Class valueClass) { addNamedOutput(job, name, FormatBundle.forOutput(outputFormatClass), keyClass, valueClass); }
@Override public boolean accept(OutputHandler handler, PType<?> ptype) { if (!(ptype instanceof AvroType)) { return false; } handler.configure(this, ptype); return true; }
@Override public Path getPath() { return ((PathTarget) target).getPath(); } }
@Override public Target outputConf(String key, String value) { formatBundle.set(key, value); return this; }
public FileSourceImpl(Path path, PType<T> ptype, Class<? extends InputFormat> inputFormatClass) { this.path = path; this.ptype = ptype; this.inputBundle = FormatBundle.forInput(inputFormatClass); }
@Override public boolean equals(Object other) { if (other == null || !(other instanceof HBaseSourceTarget)) { return false; } HBaseSourceTarget o = (HBaseSourceTarget) other; // XXX scan does not have equals method return inputBundle.equals(o.inputBundle); }
@Override public void configureForMapReduce(Job job, PType<?> ptype, Path outputPath, String name) { ((PathTarget) target).configureForMapReduce(job, ptype, outputPath, name); }
@Override public String getReduceOutputName(Configuration configuration, Path outputDirectory, int partitionId) throws IOException { return getSequentialFileName(configuration, outputDirectory, "r"); }
@Override public Iterable<T> read(Configuration conf) throws IOException { return ((ReadableSource<T>) source).read(conf); } }
@Override public Source<HCatRecord> inputConf(String key, String value) { bundle.set(key, value); return this; }
public static void addNamedOutput(Job job, String name, Class<? extends OutputFormat> outputFormatClass, Class keyClass, Class valueClass) { addNamedOutput(job, name, FormatBundle.forOutput(outputFormatClass), keyClass, valueClass); }
@Override public boolean accept(OutputHandler handler, PType<?> ptype) { if (!(ptype instanceof AvroType)) { return false; } handler.configure(this, ptype); return true; }
@Override public boolean equals(Object other) { if (other == null || !(other instanceof HBaseSourceTarget)) { return false; } HBaseSourceTarget o = (HBaseSourceTarget) other; // XXX scan does not have equals method return inputBundle.equals(o.inputBundle); }
@Override public Source<Pair<BytesWritable, BytesWritable>> inputConf(String key, String value) { inputBundle.set(key, value); return this; }
@Override public boolean accept(OutputHandler handler, PType<?> ptype) { handler.configure(this, ptype); return true; }
@Override public Source<E> inputConf(String key, String value) { formatBundle.set(key, value); return this; }
@Override public boolean accept(OutputHandler handler, PType<?> ptype) { if (!(ptype instanceof AvroType)) { return false; } handler.configure(this, ptype); return true; }
@Override public Target outputConf(String key, String value) { formatBundle.set(key, value); return this; }
@Override public boolean accept(OutputHandler handler, PType<?> ptype) { if (!(ptype instanceof AvroType)) { return false; } handler.configure(this, ptype); return true; }