6 Replies Latest reply: Aug 21, 2012 8:25 AM by Vladimir Blagojevic RSS

Inifinispan 5.2.0.Alpha examples

Shaun Appleton Newbie

Is there a way of running the map reduce and distexec demos that come with Inifinispan 5.2.0.Alpha running on my local machine as I don't have an EC2 account.

 

Thanks,

 

Shaun

  • 1. Re: Inifinispan 5.2.0.Alpha examples
    Mircea Markus Master

    you should be able to run dist exec example locally, it doesn't require EC2.

  • 2. Re: Inifinispan 5.2.0.Alpha examples
    Shaun Appleton Newbie

    Hi Mircea,

     

    both

     

    ./runPiApproximationDemo.sh

     

    and

     

    ./runWordCountDemo.sh

     

    give me

     

    2012-08-02 16:27:23,823 WARN  [ProtocolConfiguration] (main) variable "${jgroups.s3.secret_access_key}" in S3_PING could not be substituted; secret_access_key is removed from properties

    2012-08-02 16:27:23,823 WARN  [ProtocolConfiguration] (main) variable "${jgroups.s3.access_key}" in S3_PING could not be substituted; access_key is removed from properties

    2012-08-02 16:27:24,887 ERROR [JGroupsTransport] (main) ISPN000085: Error while trying to create a channel using config files: jgroups-ec2.xml

    2012-08-02 16:27:24,888 WARN  [GlobalComponentRegistry] (main) Unable to reset GlobalComponentRegistry after a failed restart due to an exception of type ConfigurationException with message No registered default factory for component 'class org.infinispan.configuration.global.GlobalConfiguration' found!. To get more detail set the system property infinispan.debugDependencies to true. Use DEBUG level logging for full exception details.

    Exception in thread "main" org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport

        at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:222)

        at org.infinispan.manager.DefaultCacheManager.wireCache(DefaultCacheManager.java:686)

        at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:651)

        at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:551)

        at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:523)

        at org.infinispan.demo.Demo.startCache(Demo.java:69)

        at org.infinispan.demo.distexec.PiApproximationDemo.run(PiApproximationDemo.java:38)

        at org.infinispan.demo.distexec.PiApproximationDemo.main(PiApproximationDemo.java:28)

    Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.remoting.transport.jgroups.JGroupsTransport.start() on object of type JGroupsTransport

        at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:238)

        at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)

        at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:639)

        at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:628)

        at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:531)

        at org.infinispan.factories.GlobalComponentRegistry.start(GlobalComponentRegistry.java:200)

        ... 7 more

    Caused by: org.infinispan.CacheException: java.io.IOException: bucket 'jgroups' could not be accessed (rsp=403 (Forbidden). Maybe the bucket is owned by somebody else or the authentication failed

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:348)

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:258)

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannelAndRPCDispatcher(JGroupsTransport.java:301)

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:175)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:616)

        at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:236)

        ... 12 more

    Caused by: java.io.IOException: bucket 'jgroups' could not be accessed (rsp=403 (Forbidden). Maybe the bucket is owned by somebody else or the authentication failed

        at org.jgroups.protocols.S3_PING$AWSAuthConnection.checkBucketExists(S3_PING.java:421)

        at org.jgroups.protocols.S3_PING.init(S3_PING.java:94)

        at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:857)

        at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:469)

        at org.jgroups.JChannel.init(JChannel.java:794)

        at org.jgroups.JChannel.<init>(JChannel.java:167)

        at org.jgroups.JChannel.<init>(JChannel.java:137)

        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:345)

        ... 20 more

     

    Thanks,

     

    Shaun

  • 3. Re: Inifinispan 5.2.0.Alpha examples
    Vladimir Blagojevic Master

    Shaun,

     

    Do not use jgroups-ec2.xml configuration file but another one more suitable to your network setup!

     

    Vladimir

  • 4. Re: Inifinispan 5.2.0.Alpha examples
    Shaun Appleton Newbie

      ./runPiApproximationDemo.sh --help

     

    to the rescue!

     

    this shows the actual file being used is

     

      [(-c|--configFile) <configFile>]

            Infinispan config file (default: config-samples/distributed-ec2.xml)

     

    now running

     

      ./runPiApproximationDemo.sh -c config-samples/*.xml fails for all files in config-samples/ except for

     

      ./runPiApproximationDemo.sh -c config-samples/sample.xml

     

    which looks like it is awaiting further instructions

     

    I was sort of hoping I could run this on my machine out of the box. ie. Start with a single node 'cluster' then expand the number of nodes and watch the performance get better.

     

    Shaun

  • 5. Re: Inifinispan 5.2.0.Alpha examples
    Shaun Appleton Newbie

    ... and changing the slave to the master works a treat !

     

    ie.

     

      ./runPiApproximationDemo.sh -c config-samples/sample.xml -t master

     

     

    I get -

     

    Pi approximation is 3.14192288, computed in 8.38 seconds using 1 nodes.

     

    then

     

    Pi approximation is 3.1416078, computed in 4.48 seconds using 2 nodes.

     

    cool!

  • 6. Re: Inifinispan 5.2.0.Alpha examples
    Vladimir Blagojevic Master

    Shaun,

     

    Thanks a lot for this feedback. We'll make a demo version for distributed execution and map/reduce that does not assume everyone has an Amazon EC2 account. It should work on a local node out of the box as you say!

     

    Regards,

    Vladimir