From 35c02df825043b1db282bc5258c3a45e2f3ee3d6 Mon Sep 17 00:00:00 2001 From: Zhongxiang Zheng <zheng.z.aa@gmail.com> Date: Fri, 11 Mar 2016 00:05:00 +0900 Subject: [PATCH] [S3] Close opened S3Object S3Object opened in getS3ObjectAndMetadata() should be closed. --- s3/src/main/java/com/yahoo/ycsb/db/S3Client.java | 1 + 1 file changed, 1 insertion(+) diff --git a/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java b/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java index f9f5b2da..3268eb09 100644 --- a/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java +++ b/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java @@ -353,6 +353,7 @@ public class S3Client extends DB { int sizeOfFile = (int)objectAndMetadata.getValue().getContentLength(); fieldCount = sizeOfFile/sizeArray; totalSize = sizeOfFile; + objectAndMetadata.getKey().close(); } catch (Exception e){ System.err.println("Not possible to get the object :"+key); e.printStackTrace(); -- GitLab