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
3b6059bb
Commit
3b6059bb
authored
6 years ago
by
Kevin Risden
Committed by
Sean Busbey
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[core] Fix ycsb.sh and ycsb.bat missing core dependencies (#908)
parent
682be7fb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/ycsb.bat
+11
-2
11 additions, 2 deletions
bin/ycsb.bat
bin/ycsb.sh
+19
-17
19 additions, 17 deletions
bin/ycsb.sh
core/pom.xml
+28
-0
28 additions, 0 deletions
core/pom.xml
with
58 additions
and
19 deletions
bin/ycsb.bat
+
11
−
2
View file @
3b6059bb
...
...
@@ -155,7 +155,11 @@ GOTO classpathComplete
:gotSource
@REM Check for some basic libraries to see if the source has been built.
IF
EXIST
"
%YCSB_HOME%
\
%BINDING_DIR%
\target\*.jar"
GOTO
gotJars
IF
EXIST
"
%YCSB_HOME%
\core\target\dependency\*.jar"
(
IF
EXIST
"
%YCSB_HOME%
\
%BINDING_DIR%
\target\*.jar"
(
GOTO
gotJars
)
)
@REM Call mvn to build source checkout.
IF
"
%BINDING_NAME%
"
==
"basic"
GOTO
buildCore
...
...
@@ -166,7 +170,7 @@ SET MVN_PROJECT=core
:gotMvnProject
ECHO
[
WARN
]
YCSB
libraries
not
found
.
Attempting
to
build
...
CALL
mvn
-pl
com
.yahoo.ycsb:
%MVN_PROJECT%
-am
package
-DskipTests
CALL
mvn
-Psource-run
-pl
com
.yahoo.ycsb:
%MVN_PROJECT%
-am
package
-DskipTests
IF
%ERRORLEVEL%
NEQ
0
(
ECHO
[
ERROR
]
Error
trying
to
build
project
.
Exiting
.
GOTO
exit
...
...
@@ -178,6 +182,11 @@ FOR %%F IN (%YCSB_HOME%\core\target\*.jar) DO (
SET
CLASSPATH
=
!CLASSPATH!
;
%%F%
)
@REM Core dependency libraries
FOR
%%F
IN
(
%YCSB_HOME%
\core\target\dependency\
*
.jar
)
DO
(
SET
CLASSPATH
=
!CLASSPATH!
;
%%F%
)
@REM Database conf (need to find because location is not consistent)
FOR
/D /R
%YCSB_HOME%
\
%BINDING_DIR%
%%F
IN
(*)
DO
(
IF
"
%%~nxF
"
==
"conf"
SET
CLASSPATH
=
!CLASSPATH!
;
%%F%
...
...
This diff is collapsed.
Click to expand it.
bin/ycsb.sh
+
19
−
17
View file @
3b6059bb
...
...
@@ -184,25 +184,21 @@ if $DISTRIBUTION; then
# Source checkout
else
# Check for some basic libraries to see if the source has been built.
for
f
in
"
$YCSB_HOME
"
/
"
$BINDING_DIR
"
/target/
*
.jar
;
do
if
!
ls
"
$YCSB_HOME
"
/
core/target/
*
.jar 1> /dev/null 2>&1
||
\
!
ls
"
$YCSB_HOME
"
/
"
$BINDING_DIR
"
/target/
*
.jar 1>/dev/null 2>&1
;
then
# Call mvn to build source checkout.
if
[
!
-e
"
$f
"
]
;
then
if
[
"
$BINDING_NAME
"
=
"basic"
]
;
then
MVN_PROJECT
=
core
else
MVN_PROJECT
=
"
$BINDING_DIR
"
-binding
fi
echo
"[WARN] YCSB libraries not found. Attempting to build..."
mvn
-pl
com.yahoo.ycsb:
"
$MVN_PROJECT
"
-am
package
-DskipTests
if
[
"
$?
"
-ne
0
]
;
then
echo
"[ERROR] Error trying to build project. Exiting."
exit
1
;
fi
if
[
"
$BINDING_NAME
"
=
"basic"
]
;
then
MVN_PROJECT
=
core
else
MVN_PROJECT
=
"
$BINDING_DIR
"
-binding
fi
done
echo
"[WARN] YCSB libraries not found. Attempting to build..."
if
mvn
-Psource-run
-pl
com.yahoo.ycsb:
"
$MVN_PROJECT
"
-am
package
-DskipTests
;
then
echo
"[ERROR] Error trying to build project. Exiting."
exit
1
;
fi
fi
# Core libraries
for
f
in
"
$YCSB_HOME
"
/core/target/
*
.jar
;
do
...
...
@@ -211,13 +207,19 @@ else
fi
done
# Core dependency libraries
for
f
in
"
$YCSB_HOME
"
/core/target/dependency/
*
.jar
;
do
if
[
-r
"
$f
"
]
;
then
CLASSPATH
=
"
$CLASSPATH
:
$f
"
fi
done
# Database conf (need to find because location is not consistent)
CLASSPATH_CONF
=
$(
find
"
$YCSB_HOME
"
/
$BINDING_DIR
-name
"conf"
|
while
IFS
=
""
read
-r
file
;
do
echo
":
$file
"
;
done
)
if
[
"x
$CLASSPATH_CONF
"
!=
"x"
]
;
then
CLASSPATH
=
"
$CLASSPATH$CLASSPATH_CONF
"
fi
# Database libraries
for
f
in
"
$YCSB_HOME
"
/
"
$BINDING_DIR
"
/target/
*
.jar
;
do
if
[
-r
"
$f
"
]
;
then
...
...
This diff is collapsed.
Click to expand it.
core/pom.xml
+
28
−
0
View file @
3b6059bb
...
...
@@ -60,6 +60,7 @@ LICENSE file.
<version>
2.1.4
</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
...
...
@@ -68,4 +69,31 @@ LICENSE file.
</resource>
</resources>
</build>
<profiles>
<profile>
<!-- Build profile when running via yscb.sh or yscb.bat-->
<id>
source-run
</id>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<executions>
<execution>
<id>
stage-dependencies
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-dependencies
</goal>
</goals>
<configuration>
<includeScope>
runtime
</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
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