File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
core/src/main/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ import scala.util.control.{ControlThrowable, NonFatal}
4242import com .google .common .cache .{CacheBuilder , CacheLoader , LoadingCache }
4343import com .google .common .io .{ByteStreams , Files => GFiles }
4444import com .google .common .net .InetAddresses
45- import org .apache .commons .io .IOUtils
4645import org .apache .commons .lang3 .SystemUtils
4746import org .apache .hadoop .conf .Configuration
4847import org .apache .hadoop .fs .{FileSystem , FileUtil , Path }
@@ -1486,10 +1485,10 @@ private[spark] object Utils extends Logging {
14861485 val gzInputStream = new GZIPInputStream (new FileInputStream (file))
14871486 val bufSize = 1024
14881487 val buf = new Array [Byte ](bufSize)
1489- var numBytes = IOUtils .read(gzInputStream, buf)
1488+ var numBytes = ByteStreams .read(gzInputStream, buf, 0 , bufSize )
14901489 while (numBytes > 0 ) {
14911490 fileSize += numBytes
1492- numBytes = IOUtils .read(gzInputStream, buf)
1491+ numBytes = ByteStreams .read(gzInputStream, buf, 0 , bufSize )
14931492 }
14941493 fileSize
14951494 } catch {
You can’t perform that action at this time.
0 commit comments