You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Roman Shaposhnik <rv...@apache.org> on 2015/08/13 21:58:36 UTC

YCSB driver for Geode

Hi!

it seems that the gemfire's cache.xml is no
longer compatible with Geode. Can someone
please help me come up with the update
that makes sense? The following seems to
work, but I'm not sure how optimal it is:

<client-cache>
  <pool name="client" subscription-enabled="true">
      <locator host="10.0.2.15" port="10334"/>
  </pool>

  <region name="usertable">
     <region-attributes pool-name="client" refid="CACHING_PROXY"/>
  </region>
</client-cache>

Thanks,
Roman.

Re: YCSB driver for Geode

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
Yeah, I just trimmed it to the part that'd be different between the
old and the new.

So... does it make sense?

Thanks,
Roman.

On Thu, Aug 13, 2015 at 1:55 PM, Jacob Barrett <jb...@pivotal.io> wrote:
> Your example you posted doesn’t have any scheme declarations. Did you trim them for the email? If not you need to make sure you include the scheme declaration in your xml.
>
>
>
> <?xml version="1.0"?>
>
>
> <client-cache xmlns="http://schema.pivotal.io/gemfire/cache"
>
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>     xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
>
>     version="8.1”>
>
>
>
> </client-cache>
>
>
>
>
>
> —
>
> Jacob Barrett
>
> Manager
>
> GemFire Advanced Customer Engineering (ACE)
>
> Pivotal
>
>
>
>
> jbarrett@pivotal.io
>
> 503-533-3763
>
>
>
>
> For immediate support please contact Pivotal Support at http://support.pivotal.io/
>
> On Thu, Aug 13, 2015 at 1:16 PM, Roman Shaposhnik <ro...@shaposhnik.org>
> wrote:
>
>> On Thu, Aug 13, 2015 at 1:07 PM, Jacob Barrett <jb...@pivotal.io> wrote:
>>> Do you have a corresponding error message or indicator of it not being compatible?
>> Exception in thread "Thread-1" java.lang.IllegalStateException: You
>> must use client-cache in the cache.xml when ClientCacheFactory is
>> used.
>>   at com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:379)
>>   at com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:320)
>>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4248)
>>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1174)
>>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.init(GemFireCacheImpl.java:1018)
>>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:678)
>>   at com.gemstone.gemfire.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:207)
>>   at com.gemstone.gemfire.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:162)
>>   at com.yahoo.ycsb.db.GemFireClient.init(GemFireClient.java:142)
>>   at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63)
>>   at com.yahoo.ycsb.ClientThread.run(Client.java:195)

Re: YCSB driver for Geode

Posted by Jacob Barrett <jb...@pivotal.io>.
Your example you posted doesn’t have any scheme declarations. Did you trim them for the email? If not you need to make sure you include the scheme declaration in your xml.



<?xml version="1.0"?>


<client-cache xmlns="http://schema.pivotal.io/gemfire/cache"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"

    version="8.1”>



</client-cache>





—

Jacob Barrett

Manager

GemFire Advanced Customer Engineering (ACE)

Pivotal




jbarrett@pivotal.io

503-533-3763




For immediate support please contact Pivotal Support at http://support.pivotal.io/

On Thu, Aug 13, 2015 at 1:16 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Thu, Aug 13, 2015 at 1:07 PM, Jacob Barrett <jb...@pivotal.io> wrote:
>> Do you have a corresponding error message or indicator of it not being compatible?
> Exception in thread "Thread-1" java.lang.IllegalStateException: You
> must use client-cache in the cache.xml when ClientCacheFactory is
> used.
>   at com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:379)
>   at com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:320)
>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4248)
>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1174)
>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.init(GemFireCacheImpl.java:1018)
>   at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:678)
>   at com.gemstone.gemfire.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:207)
>   at com.gemstone.gemfire.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:162)
>   at com.yahoo.ycsb.db.GemFireClient.init(GemFireClient.java:142)
>   at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63)
>   at com.yahoo.ycsb.ClientThread.run(Client.java:195)

Re: YCSB driver for Geode

Posted by Swapnil Bawaskar <sb...@pivotal.io>.
The YCSB driver can either be a client or a full participant in the
cluster. You can set the property "-p gemfire.topology=p2p" on the command
line to make the YCSB driver a member of the p2p cluster.

I will make sure that this is better documented. I had also made changes to
rename everything to Geode, but ran into some log4j issues. Will make it a
priority to fix this.

On Thu, Aug 13, 2015 at 3:05 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Thu, Aug 13, 2015 at 2:47 PM, William Markito <wm...@pivotal.io>
> wrote:
> > Well the server side is not actually for YCSB, but for Geode.
>
> Understood. But right now we have a problem of cache.xml file
> being there and tripping up the YCSB driver. So at the very
> minimum I have to send a pull request to YCSB folks to rename
> that file to something like cache.xml.server.
>
> Not having a file named cache.xml in the YCSB would unblock
> the default path in the driver. That would work, but one question
> will still remain: won't we be better of if the YCSB client was
> a full participant in the cluster instead of a simple client?
>
> Thanks,
> Roman.
>

Re: YCSB driver for Geode

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
On Thu, Aug 13, 2015 at 2:47 PM, William Markito <wm...@pivotal.io> wrote:
> Well the server side is not actually for YCSB, but for Geode.

Understood. But right now we have a problem of cache.xml file
being there and tripping up the YCSB driver. So at the very
minimum I have to send a pull request to YCSB folks to rename
that file to something like cache.xml.server.

Not having a file named cache.xml in the YCSB would unblock
the default path in the driver. That would work, but one question
will still remain: won't we be better of if the YCSB client was
a full participant in the cluster instead of a simple client?

Thanks,
Roman.

Re: YCSB driver for Geode

Posted by William Markito <wm...@pivotal.io>.
Well the server side is not actually for YCSB, but for Geode.

IOW, the YCSB client expects a region named "usertable" to be defined on
the server (Geode, Cassandra, MySQL...)  for the workloads.

We've just provided the cache.xml for the server side so you can use it to
start the servers.  But that's not different then starting the server and
creating the regions manually using GFSH for example.



On Thu, Aug 13, 2015 at 2:43 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> I guess I'm not following: why would you have a server side
> configuration for YCSB?
>
> Thanks,
> Roman.
>
> On Thu, Aug 13, 2015 at 2:33 PM, William Markito <wm...@pivotal.io>
> wrote:
> > The current cache.xml I'm looking at is -
> >
> https://github.com/brianfrankcooper/YCSB/blob/master/gemfire/src/main/conf/cache.xml
> >  - So something like this should work for the server:
> >
> > *<cache*
> >     xmlns="http://schema.pivotal.io/gemfire/cache"
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >     xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache
> > http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
> >     version="8.1">
> >
> > <cache>
> >   <region name="usertable" refid="PARTITION"/>
> > </cache>
> > *</cache>*
> >
> >
> > Then for the client:
> >
> > <client-cache xmlns="http://schema.pivotal.io/gemfire/cache"
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >     xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache
> > http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
> >     version="8.1”>
> >
> >   <pool name="client" subscription-enabled="true">
> >       <locator host="10.0.2.15" port="10334"/>
> >   </pool>
> >
> >   <region name="usertable">
> >      <region-attributes pool-name="client" refid="CACHING_PROXY"/>
> >   </region>
> >
> > </client-cache>
> >
> >
> > On Thu, Aug 13, 2015 at 2:23 PM, Roman Shaposhnik <ro...@shaposhnik.org>
> > wrote:
> >
> >> On Thu, Aug 13, 2015 at 1:54 PM, William Markito <wm...@pivotal.io>
> >> wrote:
> >> > Hi Roman,
> >> >
> >> > There is the cache and client-cache xml.
> >> >
> >> >
> >>
> http://gemfire.docs.pivotal.io/latest/userguide/reference/topics/elements_ref.html
> >>
> >> Sure. What I'm asking is: what is the most reasonable content of
> >> cache.xml that gets shipped as part of YCSB. The current content
> >> clearly doesn't work.
> >>
> >> Thanks,
> >> Roman.
> >>
> >
> >
> >
> > --
> >
> > William Markito Oliveira
> > Enterprise Architect
> > -- For questions about Apache Geode, please write to
> > *dev@geode.incubator.apache.org
> > <de...@geode.incubator.apache.org>*
>



-- 

William Markito Oliveira
Enterprise Architect
-- For questions about Apache Geode, please write to
*dev@geode.incubator.apache.org
<de...@geode.incubator.apache.org>*

Re: YCSB driver for Geode

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
I guess I'm not following: why would you have a server side
configuration for YCSB?

Thanks,
Roman.

On Thu, Aug 13, 2015 at 2:33 PM, William Markito <wm...@pivotal.io> wrote:
> The current cache.xml I'm looking at is -
> https://github.com/brianfrankcooper/YCSB/blob/master/gemfire/src/main/conf/cache.xml
>  - So something like this should work for the server:
>
> *<cache*
>     xmlns="http://schema.pivotal.io/gemfire/cache"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache
> http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
>     version="8.1">
>
> <cache>
>   <region name="usertable" refid="PARTITION"/>
> </cache>
> *</cache>*
>
>
> Then for the client:
>
> <client-cache xmlns="http://schema.pivotal.io/gemfire/cache"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache
> http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
>     version="8.1”>
>
>   <pool name="client" subscription-enabled="true">
>       <locator host="10.0.2.15" port="10334"/>
>   </pool>
>
>   <region name="usertable">
>      <region-attributes pool-name="client" refid="CACHING_PROXY"/>
>   </region>
>
> </client-cache>
>
>
> On Thu, Aug 13, 2015 at 2:23 PM, Roman Shaposhnik <ro...@shaposhnik.org>
> wrote:
>
>> On Thu, Aug 13, 2015 at 1:54 PM, William Markito <wm...@pivotal.io>
>> wrote:
>> > Hi Roman,
>> >
>> > There is the cache and client-cache xml.
>> >
>> >
>> http://gemfire.docs.pivotal.io/latest/userguide/reference/topics/elements_ref.html
>>
>> Sure. What I'm asking is: what is the most reasonable content of
>> cache.xml that gets shipped as part of YCSB. The current content
>> clearly doesn't work.
>>
>> Thanks,
>> Roman.
>>
>
>
>
> --
>
> William Markito Oliveira
> Enterprise Architect
> -- For questions about Apache Geode, please write to
> *dev@geode.incubator.apache.org
> <de...@geode.incubator.apache.org>*

Re: YCSB driver for Geode

Posted by William Markito <wm...@pivotal.io>.
The current cache.xml I'm looking at is -
https://github.com/brianfrankcooper/YCSB/blob/master/gemfire/src/main/conf/cache.xml
 - So something like this should work for the server:

*<cache*
    xmlns="http://schema.pivotal.io/gemfire/cache"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache
http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
    version="8.1">

<cache>
  <region name="usertable" refid="PARTITION"/>
</cache>
*</cache>*


Then for the client:

<client-cache xmlns="http://schema.pivotal.io/gemfire/cache"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache
http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
    version="8.1”>

  <pool name="client" subscription-enabled="true">
      <locator host="10.0.2.15" port="10334"/>
  </pool>

  <region name="usertable">
     <region-attributes pool-name="client" refid="CACHING_PROXY"/>
  </region>

</client-cache>


On Thu, Aug 13, 2015 at 2:23 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Thu, Aug 13, 2015 at 1:54 PM, William Markito <wm...@pivotal.io>
> wrote:
> > Hi Roman,
> >
> > There is the cache and client-cache xml.
> >
> >
> http://gemfire.docs.pivotal.io/latest/userguide/reference/topics/elements_ref.html
>
> Sure. What I'm asking is: what is the most reasonable content of
> cache.xml that gets shipped as part of YCSB. The current content
> clearly doesn't work.
>
> Thanks,
> Roman.
>



-- 

William Markito Oliveira
Enterprise Architect
-- For questions about Apache Geode, please write to
*dev@geode.incubator.apache.org
<de...@geode.incubator.apache.org>*

Re: YCSB driver for Geode

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
On Thu, Aug 13, 2015 at 1:54 PM, William Markito <wm...@pivotal.io> wrote:
> Hi Roman,
>
> There is the cache and client-cache xml.
>
> http://gemfire.docs.pivotal.io/latest/userguide/reference/topics/elements_ref.html

Sure. What I'm asking is: what is the most reasonable content of
cache.xml that gets shipped as part of YCSB. The current content
clearly doesn't work.

Thanks,
Roman.

Re: YCSB driver for Geode

Posted by William Markito <wm...@pivotal.io>.
Hi Roman,

There is the cache and client-cache xml.

http://gemfire.docs.pivotal.io/latest/userguide/reference/topics/elements_ref.html

On Thu, Aug 13, 2015 at 1:16 PM, Roman Shaposhnik <ro...@shaposhnik.org>
wrote:

> On Thu, Aug 13, 2015 at 1:07 PM, Jacob Barrett <jb...@pivotal.io>
> wrote:
> > Do you have a corresponding error message or indicator of it not being
> compatible?
>
> Exception in thread "Thread-1" java.lang.IllegalStateException: You
> must use client-cache in the cache.xml when ClientCacheFactory is
> used.
>   at
> com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:379)
>   at
> com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:320)
>   at
> com.gemstone.gemfire.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4248)
>   at
> com.gemstone.gemfire.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1174)
>   at
> com.gemstone.gemfire.internal.cache.GemFireCacheImpl.init(GemFireCacheImpl.java:1018)
>   at
> com.gemstone.gemfire.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:678)
>   at
> com.gemstone.gemfire.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:207)
>   at
> com.gemstone.gemfire.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:162)
>   at com.yahoo.ycsb.db.GemFireClient.init(GemFireClient.java:142)
>   at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63)
>   at com.yahoo.ycsb.ClientThread.run(Client.java:195)
>



-- 

William Markito Oliveira
Enterprise Architect
-- For questions about Apache Geode, please write to
*dev@geode.incubator.apache.org
<de...@geode.incubator.apache.org>*

Re: YCSB driver for Geode

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
On Thu, Aug 13, 2015 at 1:07 PM, Jacob Barrett <jb...@pivotal.io> wrote:
> Do you have a corresponding error message or indicator of it not being compatible?

Exception in thread "Thread-1" java.lang.IllegalStateException: You
must use client-cache in the cache.xml when ClientCacheFactory is
used.
  at com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:379)
  at com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:320)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4248)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1174)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.init(GemFireCacheImpl.java:1018)
  at com.gemstone.gemfire.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:678)
  at com.gemstone.gemfire.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:207)
  at com.gemstone.gemfire.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:162)
  at com.yahoo.ycsb.db.GemFireClient.init(GemFireClient.java:142)
  at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63)
  at com.yahoo.ycsb.ClientThread.run(Client.java:195)

Re: YCSB driver for Geode

Posted by Jacob Barrett <jb...@pivotal.io>.
Do you have a corresponding error message or indicator of it not being compatible?





—

Jacob Barrett

Manager

GemFire Advanced Customer Engineering (ACE)

Pivotal




jbarrett@pivotal.io

503-533-3763




For immediate support please contact Pivotal Support at http://support.pivotal.io/

On Thu, Aug 13, 2015 at 12:58 PM, Roman Shaposhnik <rv...@apache.org> wrote:

> Hi!
> it seems that the gemfire's cache.xml is no
> longer compatible with Geode. Can someone
> please help me come up with the update
> that makes sense? The following seems to
> work, but I'm not sure how optimal it is:
> <client-cache>
>   <pool name="client" subscription-enabled="true">
>       <locator host="10.0.2.15" port="10334"/>
>   </pool>
>   <region name="usertable">
>      <region-attributes pool-name="client" refid="CACHING_PROXY"/>
>   </region>
> </client-cache>
> Thanks,
> Roman.