@Override protected boolean isSplitable(JobContext context, Path file) { return super.isSplitable(context, file); } }
@Override protected boolean isSplitable(JobContext context, Path file) { return super.isSplitable(context, file); } }
@Override public boolean isSplitable(JobContext job, Path path) { return super.isSplitable(job, path); } }
@Override public boolean isSplitable(JobContext job, Path path) { return super.isSplitable(job, path); } }
@Override public boolean isSplitable(JobContext job, Path path) { return super.isSplitable(job, path); } }
@Override protected boolean isSplitable(JobContext context, Path path) { boolean superIsSplittable = super.isSplitable(context, path); if (!superIsSplittable) return false; // If it has a local index, do not split it String fname = path.getName(); int lastDot = fname.lastIndexOf('.'); if (lastDot == -1) return true; // No local index String extension = fname.substring(lastDot + 1); Class<? extends LocalIndex> lindexClass = SpatialSite.getLocalIndex(extension); return lindexClass == null; // Splittable only if no associated local index } }
/** Defers to {@link BAMInputFormat}, {@link CRAMInputFormat}, or * {@link SAMInputFormat} as appropriate for the given path. */ @Override public boolean isSplitable(JobContext job, Path path) { if (this.conf == null) this.conf = job.getConfiguration(); try { final SAMFormat fmt = getFormat(path); if (fmt == null) return super.isSplitable(job, path); switch (fmt) { case SAM: return samIF.isSplitable(job, path); case BAM: return bamIF.isSplitable(job, path); case CRAM: return cramIF.isSplitable(job, path); default: assert false; return false; } } catch (PathNotFoundException e) { return super.isSplitable(job, path); } }
/** Defers to {@link BAMInputFormat}, {@link CRAMInputFormat}, or * {@link SAMInputFormat} as appropriate for the given path. */ @Override public boolean isSplitable(JobContext job, Path path) { if (this.conf == null) this.conf = job.getConfiguration(); try { final SAMFormat fmt = getFormat(path); if (fmt == null) return super.isSplitable(job, path); switch (fmt) { case SAM: return samIF.isSplitable(job, path); case BAM: return bamIF.isSplitable(job, path); case CRAM: return cramIF.isSplitable(job, path); default: assert false; return false; } } catch (PathNotFoundException e) { return super.isSplitable(job, path); } }
/** Defers to {@link BAMInputFormat}, {@link CRAMInputFormat}, or * {@link SAMInputFormat} as appropriate for the given path. */ @Override public boolean isSplitable(JobContext job, Path path) { if (this.conf == null) this.conf = job.getConfiguration(); try { final SAMFormat fmt = getFormat(path); if (fmt == null) return super.isSplitable(job, path); switch (fmt) { case SAM: return samIF.isSplitable(job, path); case BAM: return bamIF.isSplitable(job, path); case CRAM: return cramIF.isSplitable(job, path); default: assert false; return false; } } catch (PathNotFoundException e) { return super.isSplitable(job, path); } }
/** * Determine whether an input file can be split. If the input format is * configured to be anything other than N-Triples or N-Quads, then the * structure of the file is important and it cannot be split arbitrarily. * Otherwise, default to the superclass logic to determine whether splitting * is appropriate. * @return true if configured to use a line-based input format and the * superclass implementation returns true. */ @Override protected boolean isSplitable(JobContext context, Path filename) { RDFFormat rdfFormat = getRDFFormat(context); if (RDFFormat.NTRIPLES.equals(rdfFormat) || RDFFormat.NQUADS.equals(rdfFormat)) { return super.isSplitable(context, filename); } return false; }
/** * Determine whether an input file can be split. If the input format is * configured to be anything other than N-Triples or N-Quads, then the * structure of the file is important and it cannot be split arbitrarily. * Otherwise, default to the superclass logic to determine whether splitting * is appropriate. * @return true if configured to use a line-based input format and the * superclass implementation returns true. */ @Override protected boolean isSplitable(JobContext context, Path filename) { RDFFormat rdfFormat = getRDFFormat(context); if (RDFFormat.NTRIPLES.equals(rdfFormat) || RDFFormat.NQUADS.equals(rdfFormat)) { return super.isSplitable(context, filename); } return false; }
FileSystem fs = path.getFileSystem(job.getConfiguration()); BlockLocation[] blkLocations = fs.getFileBlockLocations(file, 0, length); if (isSplitable(job, path)) { long blockSize = file.getBlockSize(); long splitSize = computeSplitSize(blockSize, minSize, maxSize);
BlockLocation[] blkLocations = file.getBlockLocations(); if ((length != 0) && isSplitable(job, path)) { long blockSize = file.getBlockSize(); long splitSize = computeSplitSize(blockSize, minSize, maxSize);
blkLocations = fs.getFileBlockLocations(file, 0, length); if (isSplitable(job, path)) { long blockSize = file.getBlockSize(); long splitSize = computeSplitSize(blockSize, minSize, maxSize);
blkLocations = fs.getFileBlockLocations(file, 0, length); if (isSplitable(job, path)) { long blockSize = file.getBlockSize(); long splitSize = computeSplitSize(blockSize, minSize, maxSize);
blkLocations = fs.getFileBlockLocations(file, 0, length); if (isSplitable(job, path)) { long blockSize = file.getBlockSize(); long splitSize = computeSplitSize(blockSize, minSize, maxSize);
blkLocations = fs.getFileBlockLocations(file, 0, length); if (isSplitable(job, path)) { long blockSize = file.getBlockSize(); long splitSize = computeSplitSize(blockSize, minSize, maxSize);