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

[riak] Riak binding doesn't include an slf4j Logger binding, logs nothing by default #1228

Closed
AhmadZia1991 opened this issue Sep 11, 2018 · 21 comments

Comments

@AhmadZia1991
Copy link

dear all , i tried to run ycsb benchmarking on Riak database i face with such problem
Loading workload...
Starting test.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

I changed setting of POM file, POM file setting is like bellow

scm:git:git://github.com/brianfrankcooper/YCSB.git
master
https://github.com/brianfrankcooper/YCSB




com.puppycrawl.tools
checkstyle
7.7.1


com.yahoo.ycsb
mapkeeper-binding
${project.version}


com.yahoo.mapkeeper
mapkeeper
1.0


org.apache.thrift
libthrift
0.8.0


org.jdom
jdom
1.1


com.google.collections
google-collections
1.0


org.slf4j
slf4j-api
1.7.25


org.slf4j
slf4j-simple
1.6.4

but still its not working plz help regarding that as soon as possible,
thanks in advance

@busbey
Copy link
Collaborator

busbey commented Sep 11, 2018

Please try to use one of our release binaries, e.g. 0.15.0: https://github.com/brianfrankcooper/YCSB/releases/tag/0.15.0

@busbey
Copy link
Collaborator

busbey commented Sep 11, 2018

Looking at the Riak specific YCSB tarball, it looks like the Riak binding suffers from #1173 just like HBase 2.

@AhmadZia1991
Copy link
Author

dear sir i am using ycsb 0.15.0
Loading workload...
Starting test.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
DBWrapper: report latency for each error is false and specific error codes to track for latency are: []
^CTraceback (most recent call last):
File "./bin/ycsb", line 342, in
sys.exit(main())
File "./bin/ycsb", line 333, in main
return subprocess.call(ycsb_command)
File "/usr/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 1099, in wait
pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
File "/usr/lib/python2.7/subprocess.py", line 125, in _eintr_retry_call
return func(*args)
KeyboardInterrupt
root@ahmad-virtual-machine:~/ycsb-0.15.0/YCSB#

@AhmadZia1991
Copy link
Author

when i m running these commands it give me that error
./bin/ycsb load riak -P workloads/workloada
./bin/ycsb run riak -P workloads/workloada

@busbey
Copy link
Collaborator

busbey commented Sep 11, 2018

As a workaround, you can download the slf4j simple logger directly:

e.g. for the riak specific tarball:

(cd lib/ && curl -O 'https://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar')

for 0.15.0 you'd end up with

ycsb-riak-binding-0.15.0 busbey$ ls -lah lib
total 18368
drwxr-xr-x  18 busbey  staff   576B Sep 11 08:08 .
drwxr-xr-x   8 busbey  staff   256B Sep 11 08:05 ..
-rw-r--r--@  1 busbey  staff   102K May 12  2017 HdrHistogram-2.1.4.jar
-rw-r--r--@  1 busbey  staff   143K Aug 13 22:25 core-0.15.0.jar
-rw-r--r--@  1 busbey  staff   625K Nov 29  2016 google-collections-1.0.jar
-rw-r--r--@  1 busbey  staff   1.4M Dec  2  2016 htrace-core4-4.1.0-incubating.jar
-rw-r--r--@  1 busbey  staff    33K Feb 16  2017 jackson-annotations-2.2.2.jar
-rw-r--r--@  1 busbey  staff   187K Feb 16  2017 jackson-core-2.2.2.jar
-rw-r--r--@  1 busbey  staff   223K May 12  2017 jackson-core-asl-1.9.4.jar
-rw-r--r--@  1 busbey  staff   846K Feb 16  2017 jackson-databind-2.2.2.jar
-rw-r--r--@  1 busbey  staff    31K May 12  2017 jackson-datatype-joda-2.2.2.jar
-rw-r--r--@  1 busbey  staff   759K May 12  2017 jackson-mapper-asl-1.9.4.jar
-rw-r--r--@  1 busbey  staff   557K Feb 16  2017 joda-time-2.1.jar
-rw-r--r--@  1 busbey  staff   2.0M May 12  2017 netty-all-4.0.33.Final.jar
-rw-r--r--@  1 busbey  staff    16K Aug 13 22:34 riak-binding-0.15.0.jar
-rw-r--r--@  1 busbey  staff   2.0M May 12  2017 riak-client-2.0.5.jar
-rw-r--r--@  1 busbey  staff    40K May  4  2017 slf4j-api-1.7.25.jar
-rw-r--r--   1 busbey  staff    15K Sep 11 08:08 slf4j-simple-1.7.25.jar

similarly, for the full YCSB tarball:

(cd riak-binding/lib && curl -O 'https://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar')

for 0.15.0 you'd end up with

ycsb-0.15.0 busbey$ ls -lah riak-binding/lib/
total 12968
drwxr-xr-x@ 13 busbey  staff   416B Sep 11 08:18 .
drwxr-xr-x   4 busbey  staff   128B Sep 11 08:16 ..
-rw-r--r--@  1 busbey  staff   625K Aug 13 22:34 google-collections-1.0.jar
-rw-r--r--@  1 busbey  staff    33K Aug 13 22:34 jackson-annotations-2.2.2.jar
-rw-r--r--@  1 busbey  staff   187K Aug 13 22:34 jackson-core-2.2.2.jar
-rw-r--r--@  1 busbey  staff   846K Aug 13 22:34 jackson-databind-2.2.2.jar
-rw-r--r--@  1 busbey  staff    31K Aug 13 22:34 jackson-datatype-joda-2.2.2.jar
-rw-r--r--@  1 busbey  staff   557K Aug 13 22:34 joda-time-2.1.jar
-rw-r--r--@  1 busbey  staff   2.0M Aug 13 22:34 netty-all-4.0.33.Final.jar
-rw-r--r--@  1 busbey  staff    16K Aug 13 22:34 riak-binding-0.15.0.jar
-rw-r--r--@  1 busbey  staff   2.0M Aug 13 22:34 riak-client-2.0.5.jar
-rw-r--r--@  1 busbey  staff    40K Aug 13 22:34 slf4j-api-1.7.25.jar
-rw-r--r--   1 busbey  staff    15K Sep 11 08:18 slf4j-simple-1.7.25.jar

@busbey busbey changed the title running YCSB on Riak [riak] Riak binding doesn't include an slf4j Logger binding, logs nothing by default Sep 11, 2018
@AhmadZia1991
Copy link
Author

dear sir ,
root@ahmad-virtual-machine:/# cd lib/ && curl -O 'https://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15257 100 15257 0 0 5138 0 0:00:02 0:00:02 --:--:-- 5137
root@ahmad-virtual-machine:/lib#
this was command for downloading slf4j?
and what next should i do?

@busbey
Copy link
Collaborator

busbey commented Sep 11, 2018

if that's in the directory where you've installed the Riak-specific YCSB tarball, then you should be able to just run ycsb after that.

@busbey
Copy link
Collaborator

busbey commented Sep 11, 2018

doing a directory listing should get you a similar listing as I posted above. If it doesn't, then back up and see what you've got different.

@AhmadZia1991
Copy link
Author

dear sir , sorry i didnt get answer correctly ,
where to give this command [ ls -lah riak-binding/lib/ ]?
what should be in same directory with riak ?

@AhmadZia1991
Copy link
Author

while i am running ( mvn clean package ) command it only run acumolo and for other i receive following errors
[INFO] Reactor Summary:
[INFO]
[INFO] YCSB Root .......................................... SUCCESS [ 7.875 s]
[INFO] Core YCSB .......................................... SUCCESS [ 33.533 s]
[INFO] Per Datastore Binding descriptor ................... SUCCESS [ 0.489 s]
[INFO] YCSB Datastore Binding Parent ...................... SUCCESS [ 1.295 s]
[INFO] Accumulo 1.6 DB Binding ............................ SUCCESS [05:52 min]
[INFO] Accumulo 1.7 DB Binding ............................ SUCCESS [02:38 min]
[INFO] Accumulo 1.8 DB Binding ............................ SUCCESS [02:13 min]
[INFO] Aerospike DB Binding ............................... SUCCESS [ 1.932 s]
[INFO] ArangoDB Binding ................................... SUCCESS [ 1.666 s]
[INFO] AsyncHBase Client Binding for Apache HBase ......... FAILURE [ 4.730 s]
[INFO] Cassandra 2.1+ DB Binding .......................... SKIPPED
[INFO] Cloud Spanner DB Binding ........................... SKIPPED
[INFO] Couchbase Binding .................................. SKIPPED
[INFO] Couchbase Java SDK 2.x Binding ..................... SKIPPED
[INFO] Azure DocumentDB Binding ........................... SKIPPED
[INFO] Azure table storage Binding ........................ SKIPPED
[INFO] DynamoDB DB Binding ................................ SKIPPED
[INFO] Elasticsearch Binding .............................. SKIPPED
[INFO] Elasticsearch 5.x Binding .......................... SKIPPED
[INFO] FoundationDB Binding ............................... SKIPPED
[INFO] Geode DB Binding ................................... SKIPPED
[INFO] Google Cloud Datastore Binding ..................... SKIPPED
[INFO] Google Cloud Bigtable Binding ...................... SKIPPED
[INFO] HBase 0.98.x DB Binding ............................ SKIPPED
[INFO] HBase 1.0 DB Binding ............................... SKIPPED
[INFO] HBase 1.2 DB Binding ............................... SKIPPED
[INFO] HBase 1.4 DB Binding ............................... SKIPPED
[INFO] HBase 2.0 DB Binding ............................... SKIPPED
[INFO] Hypertable DB Binding .............................. SKIPPED
[INFO] Apache Ignite ...................................... SKIPPED
[INFO] Infinispan DB Binding .............................. SKIPPED
[INFO] JDBC DB Binding .................................... SKIPPED
[INFO] Kudu DB Binding .................................... SKIPPED
[INFO] memcached binding .................................. SKIPPED
[INFO] MapRDB Binding ..................................... SKIPPED
[INFO] MapR JSON DB Binding ............................... SKIPPED
[INFO] MongoDB Binding .................................... SKIPPED
[INFO] Oracle NoSQL Database Binding ...................... SKIPPED
[INFO] OrientDB Binding ................................... SKIPPED
[INFO] rados of Ceph FS binding ........................... SKIPPED
[INFO] Redis DB Binding ................................... SKIPPED
[INFO] Rest Client Binding ................................ SKIPPED
[INFO] Riak KV Binding .................................... SKIPPED
[INFO] RocksDB Java Binding ............................... SKIPPED
[INFO] S3 Storage Binding ................................. SKIPPED
[INFO] Solr Binding ....................................... SKIPPED
[INFO] Solr 6 Binding ..................................... SKIPPED
[INFO] Tarantool DB Binding ............................... SKIPPED
[INFO] YCSB Release Distribution Builder .................. SKIPPED

but when i am running ( mvn install -Dskiptests ) then its ok
any reason for that ?

@AhmadZia1991
Copy link
Author

please anyone know about this issue please help me regarding this
Loading workload...
Starting test.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail

@AhmadZia1991
Copy link
Author

sir you mentioned in #1173 that in case of hbase 2.0 client will need to add it , in this case where to add and how to add plz help me regarding this .
thanks in advance .

@AhmadZia1991
Copy link
Author

sir as you said in #1173 there is no logger file so please help me what to add in java file and where to add

@busbey
Copy link
Collaborator

busbey commented Sep 11, 2018

please keep in mind that questions here are answered by folks volunteering their time. Be patient in your questions and I'll be patient in my answers.

@AhmadZia1991
Copy link
Author

its ok i asked many question because at meanwhile i am searching and working on it, so at last i reach to the point which you mentioned before i think there is need of logger to add , but don't know where to past.
i tried like below but it gives error.

import static com.yahoo.ycsb.db.riak.RiakUtils.createResultHashMap;
import static com.yahoo.ycsb.db.riak.RiakUtils.getKeyAsLong;
import static com.yahoo.ycsb.db.riak.RiakUtils.serializeTable;

/*import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RiakKVClient extends DB {

// private static Logger logger = LoggerFactory.getLogger(RiakKVClient.class);
don't worry sir i will wait when you become free then give me answer
thanks and sorry for many and fast questions.

@busbey
Copy link
Collaborator

busbey commented Sep 12, 2018

Let's back up for a second. I don't think you should need to run Maven.

My understanding is that you're trying to run YCSB against a Riak install. Something isn't working, but the only log message you get is the problem with getting the SLF4j logging system going.

Is that all correct?

@AhmadZia1991
Copy link
Author

yes sir that is correct ,
and i tried without running mvn but still i have the same problem

@busbey
Copy link
Collaborator

busbey commented Sep 13, 2018

So to confirm, you've downloaded and unpacked one of these two artifacts?

If you're just going to test Riak then the smaller one at the top is probably what you want.

@busbey
Copy link
Collaborator

busbey commented Sep 15, 2018

@AhmadZia1991 are you still trying to make this work? Could you confirm which of the two above artifacts you're working with?

@AhmadZia1991
Copy link
Author

AhmadZia1991 commented Sep 15, 2018 via email

@busbey
Copy link
Collaborator

busbey commented Sep 16, 2018

Okay, so you should be able to go into the directory where you unpacked the YCSB tarball and from there run this command:

(cd riak-binding/lib && curl -O 'https://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar')

And you should end up with Riak lib directory that looks like this:

ycsb-0.15.0 busbey$ ls -lah riak-binding/lib/
total 12968
drwxr-xr-x@ 13 busbey  staff   416B Sep 11 08:18 .
drwxr-xr-x   4 busbey  staff   128B Sep 11 08:16 ..
-rw-r--r--@  1 busbey  staff   625K Aug 13 22:34 google-collections-1.0.jar
-rw-r--r--@  1 busbey  staff    33K Aug 13 22:34 jackson-annotations-2.2.2.jar
-rw-r--r--@  1 busbey  staff   187K Aug 13 22:34 jackson-core-2.2.2.jar
-rw-r--r--@  1 busbey  staff   846K Aug 13 22:34 jackson-databind-2.2.2.jar
-rw-r--r--@  1 busbey  staff    31K Aug 13 22:34 jackson-datatype-joda-2.2.2.jar
-rw-r--r--@  1 busbey  staff   557K Aug 13 22:34 joda-time-2.1.jar
-rw-r--r--@  1 busbey  staff   2.0M Aug 13 22:34 netty-all-4.0.33.Final.jar
-rw-r--r--@  1 busbey  staff    16K Aug 13 22:34 riak-binding-0.15.0.jar
-rw-r--r--@  1 busbey  staff   2.0M Aug 13 22:34 riak-client-2.0.5.jar
-rw-r--r--@  1 busbey  staff    40K Aug 13 22:34 slf4j-api-1.7.25.jar
-rw-r--r--   1 busbey  staff    15K Sep 11 08:18 slf4j-simple-1.7.25.jar

Once that's done, running your test with Riak should have normal logging in place.

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

2 participants