YCSB failed to run after build

681 views Asked by At

I am trying to run the latest version of YCSB with MongoDB database. Ive tried building YCSB using maven but received many errors during build although maven said is SUCCESS. when im trying to run ycsb it returns an error, i am using maven 3.3.3 with java 1.8 on CentOS 6.5

[root@hostname YCSB]# ./bin/ycsb
Traceback (most recent call last):
  File "./bin/ycsb", line 3, in <module>
    import argparse
ImportError: No module named argparse

Maven and Java details:

[root@hostname YCSB]# mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T14:57:37+03:00)
Maven home: /usr/local/maven
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.el6.x86_64", arch: "amd64", family: "unix"

Maven output:

/YCSB/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java:465: 'if' have incorrect indentation level 12, expected level should be 6.
/YCSB/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java:466: 'if' child have incorrect indentation level 16, expected level should be 8.
/YCSB/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java:468: 'if rcurly' have incorrect indentation level 12, expected level should be 6.
/YCSB/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java:469: 'for rcurly' have incorrect indentation level 8, expected level should be 4.
/YCSB/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java:470: 'method def rcurly' have incorrect indentation level 4, expected level should be 2.
Audit done.
[INFO] There are 653 errors reported by Checkstyle 6.1.1 with checkstyle.xml ruleset.
[WARNING] Unable to locate Source XRef to link to - DISABLED
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ mongodb-binding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /YCSB/mongodb/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ mongodb-binding ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /YCSB/mongodb/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ mongodb-binding ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /YCSB/mongodb/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ mongodb-binding ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /YCSB/mongodb/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ mongodb-binding ---
[INFO] Surefire report directory: /YCSB/mongodb/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.yahoo.ycsb.db.MongoDbClientTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.043 sec
Running com.yahoo.ycsb.db.AsyncMongoDbClientTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec
Running com.yahoo.ycsb.db.OptionsSupportTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec

Results :

Tests run: 6, Failures: 0, Errors: 0, Skipped: 2

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ mongodb-binding ---
[INFO] Building jar: /YCSB/mongodb/target/mongodb-binding-0.3.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-dependency-plugin:2.10:copy-dependencies (stage-dependencies) @ mongodb-binding ---
[INFO] Copying logback-core-1.1.2.jar to /YCSB/mongodb/target/dependency/logback-core-1.1.2.jar
[INFO] Copying mongo-java-driver-3.0.2.jar to /YCSB/mongodb/target/dependency/mongo-java-driver-3.0.2.jar
[INFO] Copying slf4j-api-1.6.4.jar to /YCSB/mongodb/target/dependency/slf4j-api-1.6.4.jar
[INFO] Copying logback-classic-1.1.2.jar to /YCSB/mongodb/target/dependency/logback-classic-1.1.2.jar
[INFO] Copying mongodb-async-driver-2.0.1.jar to /YCSB/mongodb/target/dependency/mongodb-async-driver-2.0.1.jar
[INFO]
[INFO] --- maven-assembly-plugin:2.5.5:single (default) @ mongodb-binding ---
[WARNING] The following patterns were never triggered in this artifact exclusion filter:
o  '*:sources'

[INFO] Building tar: /YCSB/mongodb/target/ycsb-mongodb-binding-0.3.0-SNAPSHOT.tar.gz
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] YCSB Root .......................................... SUCCESS [  0.486 s]
[INFO] Core YCSB .......................................... SUCCESS [  3.856 s]
[INFO] Per Datastore Binding descriptor ................... SUCCESS [  0.216 s]
[INFO] YCSB Datastore Binding Parent ...................... SUCCESS [  0.175 s]
[INFO] MongoDB Binding .................................... SUCCESS [  1.077 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.946 s
[INFO] Finished at: 2015-06-24T20:10:33+03:00
[INFO] Final Memory: 55M/2369M
[INFO] ------------------------------------------------------------------------
2

There are 2 answers

0
Reazon On BEST ANSWER

It's build with maven.

But it is used by python. Your python is missing a packet. Try to install python-argparse or use python 2.7. (python2.7 contains argparse)

0
bryce On

You are lacking the Python module whose name is argparse.

You can install it with the command:

easy_install argparse