diff options
author | vlad <vlad@driver.xyz> | 2017-08-07 14:34:07 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-08-07 14:34:07 -0700 |
commit | 2283b61115fc94029f4772e2fbd05eaabb2ad5a8 (patch) | |
tree | ad2c4bf5bc1295d1318baea92ac34443803009a8 /src/main/scala/xyz/driver/core/file | |
parent | a1e2e7b9ed43a8a0757a4c678ea855d97f1a16c8 (diff) | |
parent | 886415aa5f86e758d9a9aafa8f60128e3473311a (diff) | |
download | driver-core-2283b61115fc94029f4772e2fbd05eaabb2ad5a8.tar.gz driver-core-2283b61115fc94029f4772e2fbd05eaabb2ad5a8.tar.bz2 driver-core-2283b61115fc94029f4772e2fbd05eaabb2ad5a8.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/main/scala/xyz/driver/core/file')
-rw-r--r-- | src/main/scala/xyz/driver/core/file/GcsStorage.scala | 2 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/core/file/S3Storage.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/core/file/GcsStorage.scala b/src/main/scala/xyz/driver/core/file/GcsStorage.scala index 65a5a50..76438cf 100644 --- a/src/main/scala/xyz/driver/core/file/GcsStorage.scala +++ b/src/main/scala/xyz/driver/core/file/GcsStorage.scala @@ -11,7 +11,7 @@ import java.nio.file.{Path, Paths} import java.util.concurrent.TimeUnit import com.google.cloud.storage.Storage.BlobListOption -import com.google.cloud.storage._ +import com.google.cloud.storage.{Option => _, _} import xyz.driver.core.time.Time import xyz.driver.core.{Name, Revision, generators} diff --git a/src/main/scala/xyz/driver/core/file/S3Storage.scala b/src/main/scala/xyz/driver/core/file/S3Storage.scala index 49bebc8..311aab3 100644 --- a/src/main/scala/xyz/driver/core/file/S3Storage.scala +++ b/src/main/scala/xyz/driver/core/file/S3Storage.scala @@ -43,7 +43,7 @@ class S3Storage(s3: AmazonS3, bucket: Name[Bucket], executionContext: ExecutionC override def stream(filePath: Path): OptionT[Future, Source[ByteString, NotUsed]] = OptionT.optionT(Future { Option(s3.getObject(new GetObjectRequest(bucket.value, filePath.toString))).map { elem => - StreamConverters.fromInputStream(elem.getObjectContent, chunkSize).mapMaterializedValue(_ => NotUsed) + StreamConverters.fromInputStream(() => elem.getObjectContent(), chunkSize).mapMaterializedValue(_ => NotUsed) } }) |