ok, I switched back to stock hector, fixed the speed4j.properties
file, and it's doing something different but it's still not enough.
Problem:
statistics appear as expected under speed4j -> hector -> attributes.
Values are all 0 and do not get updated.
statistics do *not* appear as expected under speed4j -> hector-foo ->
attributes. The only two attributes available there are:
DroppedStopWatches and StopWatchQueueLength
hector-foo because of the call:
cassandraHostConfigurator.setOpTimer(new SpeedForJOpTimer("foo"));
I experimented with changing the speed4j.properties file to look like
this:
speed4j.hector-foo = com.ecyrd.speed4j.log.PeriodicalLog
speed4j.hector-foo.period = 10
speed4j.hector-
foo.jmx=READ.success_,WRITE.success_,READ.fail_,WRITE.fail_,META_READ.success_,META_READ.fail_
speed4j.hector-foo.slf4jLogname=me.prettyprint.hector.TimingLogger
And I *do* see the attributes under speed4j -> hector-foo, but they
never update, so that's a bust.
> 2011/8/26 Patricio Echagüe <
patric...@gmail.com>
>
>
>
>
>
>
>
> > Hi David, a rebuild is not necessary.
>
> > That info should be added to speed4j.properties<
http://pastebin.com/MHeV3iHi>
>
> > On Thu, Aug 25, 2011 at 5:51 PM, David Hawthorne <
dsrtho...@gmail.com>wrote:
>
> >> Excellent, and that was almost enough to get it to work.
>
> >> I added this line to log4j.conf:
>
> >> log4j.category.me.prettyprint.cassandra.hector.TimingLogger=info,
> >> stdout
>
> >> I added this line in my client class:
>
> >> CassandraHostConfigurator cassandraHostConfigurator =
> >> new CassandraHostConfigurator(cassandra_host);
>
> >> cassandraHostConfigurator.setOpTimer(new
> >> SpeedForJOpTimer("foo"));
>
> >> And after that I see speed4j in the mbeans list in jmx, but the only
> >> two attributes available are:
>
> >> DroppedStopWatches and StopWatchQueueLength
>
> >> So I did some more digging based on another answer I got a while back
> >> about exporting tags. DEEEEEEP in hector, in
> >> me.pp.cassandra.connection.SpeedForJOpTimer, I added this line:
>
> >> PeriodicalLog slog = new PeriodicalLog();
> >> slog.setName("hector-" + clusterName);
> >> slog.setPeriod(60); // 60 seconds
> >> +
>
> >> slog.setJmx("READ.success_,WRITE.success_,READ.fail_,WRITE.fail_,META_READ. success_,META_READ.fail_");