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
aa1e56af
Commit
aa1e56af
authored
11 years ago
by
achille
Committed by
Robert J. Moore
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Set default thread count to 100 when thread count is not specified
parent
cd1fb357
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java
+1
-1
1 addition, 1 deletion
...b/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java
mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
+4
-6
4 additions, 6 deletions
mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
with
5 additions
and
7 deletions
mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java
+
1
−
1
View file @
aa1e56af
...
...
@@ -124,7 +124,7 @@ public class AsyncMongoDbClient extends DB {
final
Properties
props
=
getProperties
();
final
String
maxConnections
=
props
.
getProperty
(
"mongodb.maxconnections"
,
"10"
);
"mongodb.maxconnections"
,
"10
0
"
);
final
int
connections
=
Integer
.
parseInt
(
maxConnections
);
synchronized
(
AsyncMongoDbClient
.
class
)
{
...
...
This diff is collapsed.
Click to expand it.
mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java
+
4
−
6
View file @
aa1e56af
...
...
@@ -26,7 +26,6 @@ import com.mongodb.DBObject;
import
com.mongodb.MongoClient
;
import
com.mongodb.MongoClientOptions
;
import
com.mongodb.WriteConcern
;
import
com.mongodb.WriteResult
;
import
com.yahoo.ycsb.ByteArrayByteIterator
;
import
com.yahoo.ycsb.ByteIterator
;
import
com.yahoo.ycsb.DB
;
...
...
@@ -94,7 +93,7 @@ public class MongoDbClient extends DB {
// Set connectionpool to size of ycsb thread pool
final
String
maxConnections
=
props
.
getProperty
(
"mongodb.maxconnections"
,
"10"
);
"mongodb.maxconnections"
,
"10
0
"
);
final
String
threadsAllowedToBlockForConnectionMultiplier
=
props
.
getProperty
(
"mongodb.threadsAllowedToBlockForConnectionMultiplier"
,
...
...
@@ -193,7 +192,7 @@ public class MongoDbClient extends DB {
db
.
requestStart
();
DBCollection
collection
=
db
.
getCollection
(
table
);
DBObject
q
=
new
BasicDBObject
().
append
(
"_id"
,
key
);
WriteResult
res
=
collection
.
remove
(
q
,
writeConcern
);
collection
.
remove
(
q
,
writeConcern
);
return
0
;
}
catch
(
Exception
e
)
{
...
...
@@ -235,7 +234,7 @@ public class MongoDbClient extends DB {
for
(
Map
.
Entry
<
String
,
ByteIterator
>
entry
:
values
.
entrySet
())
{
r
.
put
(
entry
.
getKey
(),
entry
.
getValue
().
toArray
());
}
WriteResult
res
=
collection
.
insert
(
r
,
writeConcern
);
collection
.
insert
(
r
,
writeConcern
);
return
0
;
}
catch
(
Exception
e
)
{
...
...
@@ -339,8 +338,7 @@ public class MongoDbClient extends DB {
}
u
.
put
(
"$set"
,
fieldsToSet
);
WriteResult
res
=
collection
.
update
(
q
,
u
,
false
,
false
,
writeConcern
);
collection
.
update
(
q
,
u
,
false
,
false
,
writeConcern
);
return
0
;
}
catch
(
Exception
e
)
{
...
...
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