Thanks for clarification!



At 2013-03-09 00:28:09,"Hiram Chirino" <hi...@hiramchirino.com> wrote:
>On Thu, Mar 7, 2013 at 1:42 AM, SuoNayi <suonayi2...@163.com> wrote:
>
>> I have some confusions not answered until now:
>> 1. A leveldb driver( pure java driver or the jni driver) seems like a jdbc
>> driver,
>>     it can not save the data without talking to the store engine(database).
>>     For the jni driver, does it will find the installed LevelDB on the
>> broker at first?
>>     If not found what will behave next? Just use the experimental pure
>> Java LevelDB  implement
>>     (org.iq80.leveldb.impl.*)?
>>
>
>If the JNI driver cannot be loaded, then the pure java driver is then used.
>
>
>>     Can the pure jave driver talks to the the installed LevelDB?
>>
>
>The pure java driver uses the same on disk format, so yes you can switch
>between the two safely.
>
>
>>     I download the source code from http://code.google.com/p/leveldb/ and
>> issue 'make' command
>>     and install LevelDB.
>>
>
>That won't help.  The the leveldb logic has been statically linked into the
>jni library.  That jni library is prebuilt and included in a jar.  It's
>extracted on demand.  If you really want to build it yourself and install
>it, see:
>https://github.com/fusesource/leveldbjni
>
>
>> 2. How can I only enable jni driver for the LevelDB?
>>
>
>If on startup you don't get a warning saying your using the pure java
>version, then your using the JNI driver.  If you want the broker to fail to
>start up if it's not using the JNI driver, then you should set the
>following attribute on the levelDB element in your activemq configuration
>file: indexFactory="org.fusesource.leveldbjni.JniDBFactory"
>
>3. Does the jni driver performs faster than the purge java driver?
>>
>
>I have not benchmarked recently, but It was faster.
>
>
>> 4. Is it production-ready for using LevelDB?
>
>
>Yes.
>
>
>> At 2013-03-06 23:36:20,"Christian Posta" <christian.po...@gmail.com>
>> wrote:
>> >Apollo does this. I think the logs are coming from the leveldb store, so
>> >when using with ActiveMQ 5.x it should be the same (but i didn't try yet).
>> >It will only log if NOT using the JNI impl.
>> >
>> >
>> >On Wed, Mar 6, 2013 at 12:35 AM, Claus Ibsen <claus.ib...@gmail.com>
>> wrote:
>> >
>> >> On Wed, Mar 6, 2013 at 8:00 AM, SuoNayi <suonayi2...@163.com> wrote:
>> >> > Also I saw the leveldb-0.2.jar in the extra directory under the lib
>> >> directory, seems it's the java LevelDB implement.
>> >> >
>> >> > I removed the jar from the extra directory and deployed a new broker
>> on
>> >> other new CentOS server and restarted the broker,
>> >> > but I could still send messages to the new broker and log files
>> created
>> >> by LevelDB were present in the specific directory.
>> >> >
>> >>
>> >> I think the leveldb driver/transport has a Java based driver that it
>> >> fallback and use if the JNI is not possible/present.
>> >>
>> >> Though Hiram would be the best person to answer that.
>> >>
>> >> And yeah if there is something we can make more obvious from INFO
>> >> logging when starting the broker which one is in use, that would be
>> >> great.
>> >>
>> >>
>> >> > So here I'm more confused about that the broker with removal the
>> >> leveldb-0.2.jar is deployed on the new CentOS server without
>> >> > LevelDB installation can still work.
>> >> > The version is activemq-5.7.0.fuse-71-047.
>> >> >
>> >> > At 2013-03-06 13:36:46,SuoNayi <suonayi2...@163.com> wrote:
>> >> >>Hi ,
>> >> >>Can we ensure LevelDB store uses a JNI driver or not via logging?
>> >> >>I have deployed brokers on two CentOS servers, one server with LevelDB
>> >> installation while the other without installation.
>> >> >>After changing the logging level to DEBUG, I still can not find logs
>> to
>> >> indicate that a JNI driver or a pure java implement is used.
>> >> >>On the same server my broker was deployed without LevelDB installation
>> >> at first, I use a simple load producer to send massive
>> >> >>messages to measure performance,after that I installed LevelDB and
>> >> restarted the broker and the load producer.
>> >> >>What make me confused is that the performance measure is very close.
>> So
>> >> I suspect if the JNI driver is used or not.
>> >> >>If not used the java LevelDB will be used?Can I assume the JNI driver
>> >> always performs better than the java driver?
>> >> >>
>> >> >>
>> >> >>Thanks,
>> >> >>SuoNayi
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>--
>> >> >>
>> >> >>Wangyin
>> >> >>suonayi2...@163.com
>> >> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> FuseSource is now part of Red Hat
>> >> Email: cib...@redhat.com
>> >> Web: http://fusesource.com
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>> >
>> >
>> >
>> >--
>> >*Christian Posta*
>> >http://www.christianposta.com/blog
>> >twitter: @christianposta
>>
>
>
>
>-- 
>
>**
>
>*Hiram Chirino*
>
>*Engineering | Red Hat, Inc.*
>
>*hchir...@redhat.com <hchir...@redhat.com> | fusesource.com | redhat.com*
>
>*skype: hiramchirino | twitter: @hiramchirino<http://twitter.com/hiramchirino>
>*
>
>*blog: Hiram Chirino's Bit Mojo <http://hiramchirino.com/blog/>*

Reply via email to