From 56f15e4af4ea2e72ba09e6a5491034950c1cdf37 Mon Sep 17 00:00:00 2001 From: Alex Shchetkov Date: Tue, 10 Aug 2021 18:40:24 -0400 Subject: [PATCH] changing from read to readFully to fix the bug where index file wasn't being read fully --- src/main/scala/com/microsoft/hyperspace/util/FileUtils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/microsoft/hyperspace/util/FileUtils.scala b/src/main/scala/com/microsoft/hyperspace/util/FileUtils.scala index 534c4094f..98e5bd732 100644 --- a/src/main/scala/com/microsoft/hyperspace/util/FileUtils.scala +++ b/src/main/scala/com/microsoft/hyperspace/util/FileUtils.scala @@ -117,7 +117,7 @@ object FileUtils { val fileInputStream = fileSystem.open(path) val len = fileSystem.getFileStatus(path).getLen val bytes = new Array[Byte](len.toInt) - fileInputStream.read(bytes) + fileInputStream.readFully(bytes) fileInputStream.close() bytes }