Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run from source fails to use maven on windows #335

Closed
leileiway opened this issue Jul 2, 2015 · 7 comments
Closed

run from source fails to use maven on windows #335

leileiway opened this issue Jul 2, 2015 · 7 comments

Comments

@leileiway
Copy link

When i execute

Python ycsb shell basic

it always says like this:

[WARN]  Running against a source checkout. In order to get our runtime dependenc
ies we'll have to invoke Maven. Depending on the state of your system, this may
take ~30-45 seconds
[DEBUG]  Running 'mvn -pl com.yahoo.ycsb:basic-binding -am package -DskipTests d
ependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'
Traceback (most recent call last):
  File "bin/ycsb", line 207, in <module>
    sys.exit(main())
  File "bin/ycsb", line 186, in main
    maven_says = get_classpath_from_maven(binding)
  File "bin/ycsb", line 130, in get_classpath_from_maven
    "-Dmdep.outputFilterFile=true"])
  File "D:\software\Python2.7.3\lib\subprocess.py", line 537, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "D:\software\Python2.7.3\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "D:\software\Python2.7.3\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2]

can anyone tell me solution?

@busbey
Copy link
Collaborator

busbey commented Jul 2, 2015

running against basic from a source checkout currently fails (see #336). There's a workaround on that issue for using the basic datastore.

Your error looks different though. I think WindowsError Error 2 is "can't find file", was there a little bit more of the error message cut off?

Do you have maven installed? In the same window where you run ycsb, what does mvn -version output?

I should also warn you that our windows support is still spotty (see #246)

@leileiway
Copy link
Author

I try the workaround of #336 ,"do 'mvn package' from the top level and then make use of the distribution tgz artifact made in distribution/target/" ,but it doesn't work.

The maven version

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T01:37:5
2+08:00)
Maven home: D:\software\apache-maven-3.2.1\bin\..
Java version: 1.8.0_20, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_20\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"

when i execute

mvn -pl com.yahoo.ycsb:basic-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true

it says like this

[INFO] Scanning for projects...
[ERROR] Could not find the selected project in the reactor: com.yahoo.ycsb:basic
-binding -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecution
Exception

when i execute

python ycsb shell mongodb

it export the same errors like this

[WARN]  Running against a source checkout. In order to get our runtime dependenc
ies we'll have to invoke Maven. Depending on the state of your system, this may
take ~30-45 seconds
[DEBUG]  Running 'mvn -pl com.yahoo.ycsb:mongodb-binding -am package -DskipTests
 dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'

Traceback (most recent call last):
  File "bin/ycsb", line 207, in <module>
    sys.exit(main())
  File "bin/ycsb", line 186, in main
    maven_says = get_classpath_from_maven(binding)
  File "bin/ycsb", line 130, in get_classpath_from_maven
    "-Dmdep.outputFilterFile=true"])
  File "D:\software\Python2.7.3\lib\subprocess.py", line 537, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "D:\software\Python2.7.3\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "D:\software\Python2.7.3\lib\subprocess.py", line 896, in _execute_child
    startupinfo)
WindowsError: [Error 2]

but when i execute

mvn -pl com.yahoo.ycsb:mongodb-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true

it says

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] YCSB Root ......................................... SUCCESS [  4.444 s]
[INFO] Core YCSB ......................................... SUCCESS [ 11.106 s]
[INFO] Per Datastore Binding descriptor .................. SUCCESS [  0.679 s]
[INFO] YCSB Datastore Binding Parent ..................... SUCCESS [  1.532 s]
[INFO] MongoDB Binding ................................... SUCCESS [  3.926 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.708 s
[INFO] Finished at: 2015-07-03T09:47:43+08:00
[INFO] Final Memory: 35M/415M
[INFO] ------------------------------------------------------------------------

@busbey busbey changed the title error in YCSB ON windows run from source fails to use maven on windows Jul 6, 2015
@busbey
Copy link
Collaborator

busbey commented Jul 6, 2015

Try out the instructions proposed on #246. Note that running out of a source working directory still won't work on windows. If you are trying to use a version more recent then the 0.1.4 release, you'll need to follow the instructions for building from source and then use the file it creates (distributions/target/ycsb-*.tar.gz) to run.

@busbey
Copy link
Collaborator

busbey commented Aug 4, 2015

Any update here? The instruction on #246 are now in the docs and I verified them on Windows last night with the 0.3.0 RC.

@cindywang
Copy link

Hi there,

I have the same issue here.

*OS: windows 7
Apache Maven 3.3.9
Cassandra 3.4
YCSB 0.7.0
*

Build successfully. Added C:\Program Files\YCSB\cassandra2\target;C:\Program Files\DataStax-DDC\apache-cassandra\lib in my system environment variable.
Tried ./bin/ycsb then help lunched. But "./bin/ycsb shell basic" doesn't work
Error message:
$ ./ycsb shell basic
[WARN] Running against a source checkout. In order to get our runtime dependencies we'll have to invoke Maven. Depending on the state of your system, this may take ~30-45 seconds
[DEBUG] Running 'mvn -pl com.yahoo.ycsb:core -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'
Traceback (most recent call last):
File "./ycsb", line 259, in
sys.exit(main())
File "./ycsb", line 232, in main
maven_says = get_classpath_from_maven(project)
File "./ycsb", line 178, in get_classpath_from_maven
+ err.output)
TypeError: cannot concatenate 'str' and 'NoneType' objects

$ ./ycsb load cassandra-10 -p hosts="192.168.xxx.xx" -P workloads/workloada -s > workloada_load_res.txt
[WARN] The 'cassandra-7', 'cassandra-8', 'cassandra-10', and cassandra-cql' clients are deprecated. If you are using Cassandra 2.X try using the 'cassandra2-cql' client instead.
[WARN] Running against a source checkout. In order to get our runtime dependencies we'll have to invoke Maven. Depending on the state of your system, this may take ~30-45 seconds
[DEBUG] Running 'mvn -pl com.yahoo.ycsb:cassandra-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'
Traceback (most recent call last):
File "./ycsb", line 259, in
sys.exit(main())
File "./ycsb", line 232, in main
maven_says = get_classpath_from_maven(project)
File "./ycsb", line 178, in get_classpath_from_maven
+ err.output)
TypeError: cannot concatenate 'str' and 'NoneType' objects

Could anybody help me out? Was it because of the version of Cassandra? If so, which version I should switch to?

Struggling for a long time... Many thanks!!!

@busbey
Copy link
Collaborator

busbey commented Mar 16, 2016

Try downloading the YCSB 0.7.0 release binaries instead of building from source.

For the majority of users, the cassandra2-cql binding is the correct one to use. Please note though that we've only gotten reports thus far of Cassandra 3.y not being compatible (ref #612)

@busbey
Copy link
Collaborator

busbey commented Jun 30, 2016

this was fixed by a combination of #737 and #777

@busbey busbey closed this as completed Jun 30, 2016
deRemo added a commit to deRemo/rt-YCSB that referenced this issue Jan 16, 2025
…ut [...]" warning

The fix is discussed and addressed in issue brianfrankcooper#335, brianfrankcooper#336  and brianfrankcooper#962, to name a few, but it was never properly explained within the README. This should save some Googling time for a few people
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants