2 Replies Latest reply on Apr 1, 2014 3:33 AM by aolenev

    How to get info about running cluster

    aolenev

      Hi,

      I'm developing application using Infinispan 6.0.2.Final and figured out that there is no info about cluster in logs. For example this is the snippet from Oracle Coherence log:

       

      INFO  tangosol.coherence.log.logger - <Info> (thread=main, member=n/a): Started cluster Name=MyCluster

       

      Group{Address=225.3.8.6, Port=64901, TTL=4}

       

      MasterMemberSet(

        ThisMember=Member(Id=1, Timestamp=2014-02-28 15:50:12.291, Address=192.168.1.70:10000, MachineId=1474, Location=site:,machine:m1,process:25712, Role=STORAGE)

        OldestMember=Member(Id=1, Timestamp=2014-02-28 15:50:12.291, Address=192.168.1.70:10000, MachineId=1474, Location=site:,machine:m1,process:25712, Role=STORAGE)

        ActualMemberSet=MemberSet(Size=1

          Member(Id=1, Timestamp=2014-02-28 15:50:12.291, Address=192.168.1.70:10000, MachineId=1474, Location=site:,machine:m1,process:25712, Role=STORAGE)

          )

        MemberId|ServiceVersion|ServiceJoined|MemberState

          1|3.7.1|2014-02-28 15:50:15.765|JOINED

        RecycleMillis=1200000

        RecycleSet=MemberSet(Size=0

          )

        )

       

      TcpRing{Connections=[]}

      IpMonitor{Addresses=0}

      How can I print the same info in my log? Didn't find this ability in DefaultCacheManager.

       

      Thank you in advance

        • 1. Re: How to get info about running cluster
          rvansa

          There's no method to print this out into log, but you can grab the info through cacheManager.getTransport() - on the Transport interface you can see methods such as getMembers(), getViewId() and so on. If you want to go deeper, you should cast the Transport to JGroupsTransport and call getChannel().getProtocolStack() there - you can get the configuration of each protocol there.

           

          For view changes, Infinispan prints some INFO level messages, I usually grep for them as "new.*cluster"

          • 2. Re: How to get info about running cluster
            aolenev

            Thank you, Radim!