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
c895c641
Commit
c895c641
authored
13 years ago
by
m1ch1
Browse files
Options
Downloads
Patches
Plain Diff
gh-66 small fixes
parent
c40b53ee
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
distribution/pom.xml
+2
-1
2 additions, 1 deletion
distribution/pom.xml
distribution/src/main/bin/ycsb
+40
-21
40 additions, 21 deletions
distribution/src/main/bin/ycsb
pom.xml
+18
-1
18 additions, 1 deletion
pom.xml
with
60 additions
and
23 deletions
distribution/pom.xml
+
2
−
1
View file @
c895c641
...
...
@@ -8,7 +8,7 @@
<version>
0.1.3
</version>
</parent>
<artifactId>
ycsb
-distribution
</artifactId>
<artifactId>
ycsb
</artifactId>
<name>
YCSB Release Distribution Builder
</name>
<packaging>
pom
</packaging>
...
...
@@ -81,6 +81,7 @@
<descriptors>
<descriptor>
src/main/assembly/distribution.xml
</descriptor>
</descriptors>
<appendAssemblyId>
false
</appendAssemblyId>
</configuration>
<executions>
<execution>
...
...
This diff is collapsed.
Click to expand it.
distribution/src/main/bin/ycsb
+
40
−
21
View file @
c895c641
...
...
@@ -5,22 +5,28 @@ import sys
import
subprocess
COMMANDS
=
{
"
load
"
:
"
-load
"
,
"
run
"
:
"
-t
"
,
"
load
"
:
{
"
command
"
:
"
-load
"
,
"
description
"
:
"
Execute the load phase
"
,
},
"
run
"
:
{
"
command
"
:
"
-t
"
,
"
description
"
:
"
Execute the transaction phase
"
,
},
}
DATABASES
=
{
"
basic
"
:
"
com.yahoo.ycsb.BasicDB
"
,
"
cassandra7
"
:
"
com.yahoo.ycsb.db.CassandraClient7
"
,
"
cassandra8
"
:
"
com.yahoo.ycsb.db.CassandraClient8
"
,
"
cassandra10
"
:
"
com.yahoo.ycsb.db.CassandraClient10
"
,
"
hbase
"
:
"
com.yahoo.ycsb.db.HBaseClient
"
,
"
infispan
"
:
"
com.yahoo.ycsb.db.InfinispanClient
"
,
"
j
b
dc
"
:
"
com.yahoo.ycsb.db.JdbcDBClient
"
,
"
mapkeeper
"
:
"
com.yahoo.ycsb.db.MapKeeperClient
"
,
"
mongodb
"
:
"
com.yahoo.ycsb.db.MongoDbClient
"
,
"
redis
"
:
"
com.yahoo.ycsb.db.RedisClient
"
,
"
voldemort
"
:
"
com.yahoo.ycsb.db.VoldemortClient
"
,
"
basic
"
:
"
com.yahoo.ycsb.BasicDB
"
,
"
cassandra
-
7
"
:
"
com.yahoo.ycsb.db.CassandraClient7
"
,
"
cassandra
-
8
"
:
"
com.yahoo.ycsb.db.CassandraClient8
"
,
"
cassandra
-
10
"
:
"
com.yahoo.ycsb.db.CassandraClient10
"
,
"
hbase
"
:
"
com.yahoo.ycsb.db.HBaseClient
"
,
"
infi
ni
span
"
:
"
com.yahoo.ycsb.db.InfinispanClient
"
,
"
jd
b
c
"
:
"
com.yahoo.ycsb.db.JdbcDBClient
"
,
"
mapkeeper
"
:
"
com.yahoo.ycsb.db.MapKeeperClient
"
,
"
mongodb
"
:
"
com.yahoo.ycsb.db.MongoDbClient
"
,
"
redis
"
:
"
com.yahoo.ycsb.db.RedisClient
"
,
"
voldemort
"
:
"
com.yahoo.ycsb.db.VoldemortClient
"
,
}
OPTIONS
=
{
...
...
@@ -35,22 +41,34 @@ def usage():
print
"
Commands:
"
for
command
in
sorted
(
COMMANDS
.
keys
()):
print
"
%s
"
%
command
print
"
{0:13} {1}
"
.
format
(
command
,
COMMANDS
[
command
][
"
description
"
])
print
print
"
Databases:
"
for
db
in
sorted
(
DATABASES
.
keys
()):
print
"
%s
"
%
db
print
print
"""
Workload Files:
There are various predefined workloads under workloads/ directory.
See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties
for the list of workload properties.
"""
print
"
Options:
"
for
option
in
sorted
(
OPTIONS
.
keys
()):
print
"
{0:13} {1}
"
.
format
(
option
,
OPTIONS
[
option
])
sys
.
exit
(
1
)
def
find_jars
(
dir
):
def
find_jars
(
dir
,
database
):
jars
=
[]
print
database
for
(
dirpath
,
dirnames
,
filenames
)
in
os
.
walk
(
dir
):
for
filename
in
filenames
:
if
filename
.
endswith
(
"
.jar
"
):
print
filename
if
filename
.
endswith
(
"
.jar
"
)
and
\
filename
.
startswith
(
"
core
"
)
or
filename
.
startswith
(
database
.
split
(
"
-
"
)[
0
]):
print
filename
jars
.
append
(
os
.
path
.
join
(
dirpath
,
filename
))
return
jars
...
...
@@ -66,7 +84,7 @@ def get_command():
if
sys
.
argv
[
1
]
not
in
COMMANDS
:
print
"
ERROR: Command
'
%s
'
not found
"
%
sys
.
argv
[
1
]
usage
()
return
COMMANDS
[
sys
.
argv
[
1
]]
return
COMMANDS
[
sys
.
argv
[
1
]]
[
"
command
"
]
def
get_database
():
if
len
(
sys
.
argv
)
<
3
:
...
...
@@ -74,7 +92,7 @@ def get_database():
if
sys
.
argv
[
2
]
not
in
DATABASES
:
print
"
ERROR: Database
'
%s
'
not found
"
%
sys
.
argv
[
2
]
usage
()
return
DATABASES
[
sys
.
argv
[
2
]]
return
sys
.
argv
[
2
],
DATABASES
[
sys
.
argv
[
2
]]
def
get_workload
():
if
len
(
sys
.
argv
)
<
4
:
...
...
@@ -86,10 +104,11 @@ def get_options():
ycsb_home
=
get_ycsb_home
()
command
=
get_command
()
database
=
get_database
()
database
,
db_classname
=
get_database
()
workload
=
get_workload
()
options
=
get_options
()
ycsb_command
=
[
"
java
"
,
"
-cp
"
,
"
:
"
.
join
(
find_jars
(
ycsb_home
)),
\
"
com.yahoo.ycsb.Client
"
,
command
,
"
-db
"
,
d
atabas
e
,
\
ycsb_command
=
[
"
java
"
,
"
-cp
"
,
"
:
"
.
join
(
find_jars
(
ycsb_home
,
database
)),
\
"
com.yahoo.ycsb.Client
"
,
command
,
"
-db
"
,
d
b_classnam
e
,
\
"
-P
"
,
workload
]
+
options
print
"
"
.
join
(
ycsb_command
)
subprocess
.
call
(
ycsb_command
)
This diff is collapsed.
Click to expand it.
pom.xml
+
18
−
1
View file @
c895c641
...
...
@@ -13,7 +13,24 @@
<description>
This is the top level project that builds, packages the core and all the DB bindings for YCSB infrastructure.
</description>
<dependencies>
<!-- voldemort -->
<dependency>
<groupId>
com.google.collections
</groupId>
<artifactId>
google-collections
</artifactId>
<version>
1.0
</version>
</dependency>
<!--
Nail down slf4j version to 1.6 so that it defaults to no-op logger.
http://www.slf4j.org/codes.html#StaticLoggerBinder
-->
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
1.6.4
</version>
</dependency>
</dependencies>
<!-- Properties Management -->
<properties>
<maven.assembly.version>
2.2.1
</maven.assembly.version>
...
...
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