Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adnan Ahmad
YCSB
Commits
f25f26f5
Commit
f25f26f5
authored
9 years ago
by
Sean Busbey
Browse files
Options
Downloads
Plain Diff
Merge pull request #652 from zx-zheng/s3_close_s3object
[S3] Close opened S3Object
parents
b21a3bfd
912a956d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
+2
-0
2 additions, 0 deletions
s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
with
2 additions
and
0 deletions
s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
+
2
−
0
View file @
f25f26f5
...
...
@@ -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
();
...
...
@@ -431,6 +432,7 @@ public class S3Client extends DB {
objectData
.
read
(
inputStreamToByte
,
0
,
sizeOfFile
);
result
.
put
(
key
,
new
ByteArrayByteIterator
(
inputStreamToByte
));
objectData
.
close
();
objectAndMetadata
.
getKey
().
close
();
}
catch
(
Exception
e
){
System
.
err
.
println
(
"Not possible to get the object "
+
key
);
e
.
printStackTrace
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment