@Override public boolean allowsDynamicSplitting() { try { return getCurrentSource().isSplittable(); } catch (Exception e) { throw new RuntimeException( String.format("Error determining if %s allows dynamic splitting", this), e); } }
/** * Determines whether a single file represented by this source is splittable. Returns true if we * are using the default decompression factory and and it determines from the requested file name * that the file is not compressed. */ @Override protected final boolean isSplittable() { try { if (!sourceDelegate.isSplittable()) { return false; } } catch (Exception e) { throw new RuntimeException(e); } if (channelFactory == CompressionMode.UNCOMPRESSED) { return true; } if (channelFactory == CompressionMode.AUTO) { return !Compression.AUTO.isCompressed(getFileOrPatternSpec()); } return false; }
return splitResults; } else { if (isSplittable()) { @SuppressWarnings("unchecked") List<FileBasedSource<T>> splits =