Cannot find or load main class com.yahoo.ycsb.Client - ycsb

I'm trying to create a custom database binding, FooStore, for YCSB. I've compiled this via
mvn -pl com.yahoo.ycsb:foostore -am package
to a jar file, which I've tried to add to the classpath per Step 7
java -cp lib/foostore-0.13.0-SNAPSHOT.jar com.yahoo.ycsb.Client
-load -db com.yahoo.ycsb.db.FooStoreClient -P workloads/workloada
which I'm executing from the ycsb-0.12.0 directory (with my new jar file in the lib directory), which results in
Error: Could not find or load main class com.yahoo.ycsb.Client
Where should I be executing the java command from, and/or which jar(s) do I need to add to my classpath in order to fix this command?
Alternatively, how do I modify YCSB so that I can recompile it via mvn package and then simply execute ./bin/ycsb load foostore -P workloads/workloada

Have you tried to add a database keyword in ycsb?
Maven gave you a ycsb-foostore-binding-0.13.0-SNAPSHOT.tar.gz. Untar it (in another directory).
Edit ycsb-foostore-binding-0.13.0-SNAPSHOT/bin/ycsb and edit the DATABASES dictionary by adding a line like:
"foostore" : "com.yahoo.ycsb.db.FooStoreClient",
Run your custom YCSB:
cd ycsb-foostore-binding-0.13.0-SNAPSHOT/
/bin/ycsb load foostore -thread 1 -P workload/worloada -s

Related

How to setup the CLI interface and beast-shell - Maven project #ucrbeast #beast

how do I execute the instructions below?
"CLI: To setup the CLI interface and beast-shell, extract the binary package in .tar.gz format. Run $BEAST/bin/beast to launch the command line interface."
then I need to run the command line to create a Maven project.
Dev: To create a new Java/Scala project for Beast using the following command.
mvn archetype:generate -DgroupId=com.example.beastExample -DartifactId=beast-project \
-DarchetypeGroupId=edu.ucr.cs.bdlab -DarchetypeArtifactId=beast-spark -DarchetypeVersion=0.9.5-RC2
I already ran the first line of the command in cmd but something is missing.
does the entire command only work if executing the first part of the statement first?

Change all SBT target directories to the outside of the source

I am having a hard time running SBT in a "read-only" directory (directory I have permissions but I cannot/shouldn't write).
I want basically to move all the target directories to another location.
Half the problem is solved with:
target := file("</full/path/to/new/location>")
but it is still creating target directories inside the project/* directory.
I would also like this to be done in the run command, not by changing the sbt files.
The current command I am using is:
sbt 'set target := file("</full/path/to/new/location>")' compile
Adding some kind of system wide sbt configuration would be a possibility, but I also could not make it work.
Any ideas how to accomplish this?
So here is my suggestion using symlinks:
$ mkdir -p have_access/project
$ ln -sr read_only/src have_access/
$ ln -sr read_only/build.sbt have_access/
$ ln -sr read_only/project/build.properties have_access/project/
$ cd have_access
$ sbt test

How to determine dependencies of recipes in yocto?

I want to add gedit to the the image. But i am not able to find the dependencies of gedit package. How to find the dependencies (DEPENDS) in yocto.
You can use the following command which opens up a Dependency explorer that displays dependencies on the packages:
bitbake -g recipe-name -u depexp
or bitbake -g gedit -u depexp, in your case.
On pyro and later use:
bitbake -g recipe-name -u taskexp
Note: this command needs python-gtk2 installed.
You can also use Toaster, which is a web UI that collects information about what you build, including dependencies. This video shows the dependency information provided:
https://www.youtube.com/watch?v=x-6dx4huNnw
Details on how to set up and use Toaster at
https://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html
The list of packages installed in your image is stored in the manifest file (besides of build history which is already mentioned).
Content of the manifest file looks like:
alsa-conf cortexa7hf-neon-vfpv4 1.1.2-r0.1
alsa-conf-base cortexa7hf-neon-vfpv4 1.1.2-r0.1
alsa-lib cortexa7hf-neon-vfpv4 1.1.2-r0.1
alsa-states cortexa7hf-neon-vfpv4 0.2.0-r5.1
alsa-utils-alsactl cortexa7hf-neon-vfpv4 1.1.2-r0.5
alsa-utils-alsamixer cortexa7hf-neon-vfpv4 1.1.2-r0.5
...
The list consists of the package name, architecture and a version.
That manifest is located in the deploy directory (i.e. deploy/images/${MACHINE}/). Here as an example of the directory listing (there are target images and the manifest file)
example-image-genericx86.ext3
example-image-genericx86.manifest
example-image-genericx86.tar.bz2

sbt: Unable to specify application configuration in mingw

I am trying to launch an application using sbt's application launcher.
This application is defined as:
#!/bin/sh
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar #"/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
However, when I launch it, it gives me this error:
$ ~/bin/cs n8han/giter8
Error during sbt execution: Could not find configuration file 'C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig'. Searched:
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/
file:/C:/Users/salil.wadnerkar/
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/
However, the file is present there. So, I think it's because of some quirk in the way sbt handles mingw file path.
Does anybody know how I can get it working?
In Cygwin I used
java -jar "`cygpath -m "$HOME/.conscript/sbt-launch.jar"`" "#file:///C:/Users/cvanvranken/.conscript/n8han/conscript/cs/launchconfig" "$#"
I expect you will be able to get yours to work with something similar, perhaps this:
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar "#file:///C:/Users/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
or
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar "#file:///C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
if those fail, you still definitely need to use the file:// protocol.
Also note the three directories it is searching in the error message
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/
file:/C:/Users/salil.wadnerkar/
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/
no matter what you put in the launchconfig parameter, if it is not recognized then those directories are searched by default. So you could have gibberish in your parameter and still see the same exact error you are getting now.
you can set the launch config path relative to the .conscript folder -
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar #n8han/conscript/cs/launchconfig "$#"

Why would Eclipse not be able to include a file when running a PHPUnit test?

I have the following class and unit test in a PHP project in Eclipse:
I know my unit test works as I can run it at the command line:
Now I want to run this test from Eclipse. I set up PHP Unit in Eclipse like this:
However, when I run the PHPUnit tests:
It tells me that it can't include the class file:
/usr/bin/php -c /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/zend_debug/session4910937990995915704.tmp -d asp_tags=off /Applications/eclipse/plugins/org.phpsrc.eclipse.pti.tools.phpunit_0.5.0.R20101103000000/php/tools/phpunit.php --log-junit /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/pti_phpunit/phpunit.xml /Volumes/data/domains/et/extjslayout/phpunittest/tests
PHP Warning: include_once(../Product.php): failed to open stream: No such file or directory in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Warning: include_once(): Failed opening '../Product.php' for inclusion (include_path='/usr/local/PEAR') in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Fatal error: Class 'Product' not found in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 9
Why would PHPUnit be able to find the class when run from the command line but not when run from Eclipse?
When you start something from the command line, the "current directory" has a well-defined meaning: It's the directory where you started the command.
In Eclipse, what is the "current directory"? It's probably the directory from which you started Eclipse or maybe the folder in which Eclipse is installed.
I haven't used PHP in Eclipse before but for other languages, I can set the current directory in the launch config somewhere. If that doesn't work, define a variable which points to your project and then use absolute paths (using that variable as a starting point).
Have same problem. Found only solution by creating tests with internal PHPUnit wizard like at this screenshot:
Source: HowTo create a Test Case Class from a PHP Class
But following investigate show that your test case file should contain reference to tested code for example like this: require_once 'C:\Apache2\htdocs\jobeet\src\Ibw\JobeetBundle\Utils\Jobeet.php';
Other experiments with plugin config not bringing luck. So in my opinion PHPUnit from PHP Tools not well developed plugin. Consider using MakeGood plugin as better alternative.