Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
YCSB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
b1f8580f
Commit
b1f8580f
authored
12 years ago
by
Michi Mutsuzaki
Browse files
Options
Downloads
Plain Diff
Merge pull request #82 from minghan/
a57f833e
Added close() for MongoDbClient
parents
5b19cde0
a57f833e
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
mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
+21
-2
21 additions, 2 deletions
mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
with
21 additions
and
2 deletions
mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
+
21
−
2
View file @
b1f8580f
...
...
@@ -48,9 +48,10 @@ public class MongoDbClient extends DB {
private
WriteConcern
writeConcern
;
private
String
database
;
@Override
/**
* Initialize any state for this DB.
Called once per DB instance; there is
* one DB instance per client thread.
* Initialize any state for this DB.
*
Called once per DB instance; there is
one DB instance per client thread.
*/
public
void
init
()
throws
DBException
{
// initialize MongoDb driver
...
...
@@ -97,6 +98,24 @@ public class MongoDbClient extends DB {
}
}
@Override
/**
* Cleanup any state for this DB.
* Called once per DB instance; there is one DB instance per client thread.
*/
public
void
cleanup
()
throws
DBException
{
try
{
mongo
.
close
();
}
catch
(
Exception
e1
)
{
System
.
err
.
println
(
"Could not close MongoDB connection pool: "
+
e1
.
toString
());
e1
.
printStackTrace
();
return
;
}
}
@Override
/**
...
...
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