diff --git a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java index 638b5104d4e..c5716fa6c84 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java +++ b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java @@ -19,7 +19,6 @@ package org.apache.accumulo.core.client.rfile; import java.io.IOException; -import java.io.InputStream; import java.io.UncheckedIOException; import java.util.ArrayList; import java.util.Collections; @@ -348,13 +347,10 @@ public Iterator> iterator() { for (int i = 0; i < sources.length; i++) { // TODO may have been a bug with multiple files and caching in older version... - InputStream inputStream = sources[i].getInputStream(); - if (!(inputStream instanceof FSDataInputStream)) { - throw new IllegalArgumentException("Input stream " + i + " is not a FSDataInputStream"); - } CachableBuilder cb = new CachableBuilder() - .input((FSDataInputStream) inputStream, "source-" + i).length(sources[i].getLength()) - .conf(opts.in.getConf()).cacheProvider(cacheProvider).cryptoService(cryptoService); + .input((FSDataInputStream) sources[i].getInputStream(), "source-" + i) + .length(sources[i].getLength()).conf(opts.in.getConf()).cacheProvider(cacheProvider) + .cryptoService(cryptoService); readers.add(RFile.getReader(cb, sources[i].getRange())); } diff --git a/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java b/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java index 1c8848e85ad..2d3bc40df88 100644 --- a/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java +++ b/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java @@ -21,7 +21,6 @@ import java.io.DataInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.InputStream; import java.io.PrintStream; import java.io.UncheckedIOException; import java.util.ArrayList; @@ -179,12 +178,9 @@ private static SummaryReader load(CachableBlockFile.Reader bcReader, public static SummaryReader load(Configuration conf, RFileSource source, String cacheId, Predicate summarySelector, SummarizerFactory factory, CryptoService cryptoService) throws IOException { - InputStream input = source.getInputStream(); - if (!(input instanceof FSDataInputStream)) { - throw new IllegalArgumentException("Input stream is not a FSDataInputStream"); - } - CachableBuilder cb = new CachableBuilder().input((FSDataInputStream) input, cacheId) - .length(source.getLength()).conf(conf).cryptoService(cryptoService); + CachableBuilder cb = + new CachableBuilder().input((FSDataInputStream) source.getInputStream(), cacheId) + .length(source.getLength()).conf(conf).cryptoService(cryptoService); return load(new CachableBlockFile.Reader(cb), summarySelector, factory); }