YCSB 构建后 运行 失败
YCSB failed to run after build
我正在尝试 运行 最新版本的 YCSB 与 MongoDB 数据库。
我尝试使用 maven 构建 YCSB,但在构建过程中收到了很多错误,尽管 maven 说是成功的。
当我尝试 运行 ycsb 它 returns 一个错误时,我在 CentOS 6.5
上使用 Maven 3.3.3 和 java 1.8
[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 和 Java 详细信息:
[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 输出:
/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] ------------------------------------------------------------------------
您缺少名为 argparse 的 Python 模块。
您可以使用以下命令安装它:
easy_install argparse
它是用 maven 构建的。
但是被python使用了。您的 python 丢失了一个数据包。尝试安装 python-argparse 或使用 python 2.7。 (python2.7 包含 argparse)
我正在尝试 运行 最新版本的 YCSB 与 MongoDB 数据库。 我尝试使用 maven 构建 YCSB,但在构建过程中收到了很多错误,尽管 maven 说是成功的。 当我尝试 运行 ycsb 它 returns 一个错误时,我在 CentOS 6.5
上使用 Maven 3.3.3 和 java 1.8[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 和 Java 详细信息:
[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 输出:
/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] ------------------------------------------------------------------------
您缺少名为 argparse 的 Python 模块。
您可以使用以下命令安装它:
easy_install argparse
它是用 maven 构建的。
但是被python使用了。您的 python 丢失了一个数据包。尝试安装 python-argparse 或使用 python 2.7。 (python2.7 包含 argparse)