RE: Thread block on org.apache.geode.cache.CacheFactory.getAnyInstance(CacheFactory.java:282)

2018-11-01 Thread Dinesh Akhand

In the meantime, a PutMessage is being processed by a P2P message reader 
thread. This is a send of a primary put from another server. As part of that 
put operation, its delivering the event to a gateway sender which ultimately 
causes a VSDCountersManager to be instantiated. This is blocked waiting for the 
CacheFactory. The CacheFactory won't be available until the cache 
initialization is complete.

Regarding above command,  First time this happed when JVM is getting up and 
Function start executing on that same JVM , but JVM is not initialized till now.
So avoiding such issue, I am trying to add the check with new method is geode.

Which tells user function that IsJVMinitializationCompleted then only function 
execute should work.

Thanks,
Dinesh Akhand

-Original Message-
From: Barry Oglesby  
Sent: Thursday, October 25, 2018 11:09 PM
To: u...@geode.apache.org
Cc: dev@geode.apache.org
Subject: Re: Thread block on 
org.apache.geode.cache.CacheFactory.getAnyInstance(CacheFactory.java:282)

The main thread has locked the CacheFactory (0x00021de38d70) and is 
initializing the cache. At this time it is registering a partitioned region by 
getting a distributed lock. It is waiting for a reply to this request from a 
remote member:

"main" #1 prio=5 os_prio=0 tid=0x7f855c00c800 nid=0x1763e waiting on 
condition [0x7f8563ca2000]
   java.lang.Thread.State: TIMED_WAITING (parking) at 
sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0001c9d4b2e8> (a
java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277)
at
org.apache.geode.internal.util.concurrent.StoppableCountDownLatch.await(StoppableCountDownLatch.java:64)
at
org.apache.geode.distributed.internal.ReplyProcessor21.basicWait(ReplyProcessor21.java:715)
at
org.apache.geode.distributed.internal.ReplyProcessor21.waitForRepliesUninterruptibly(ReplyProcessor21.java:795)
at
org.apache.geode.distributed.internal.ReplyProcessor21.waitForRepliesUninterruptibly(ReplyProcessor21.java:771)
at
org.apache.geode.distributed.internal.ReplyProcessor21.waitForRepliesUninterruptibly(ReplyProcessor21.java:858)
at
org.apache.geode.distributed.internal.locks.DLockRequestProcessor.requestLock(DLockRequestProcessor.java:242)
at
org.apache.geode.distributed.internal.locks.DLockService.lockInterruptibly(DLockService.java:1537)
at
org.apache.geode.distributed.internal.locks.DLockService.lock(DLockService.java:1260)
at
org.apache.geode.internal.cache.PartitionedRegion$BucketLock.basicLock(PartitionedRegion.java:6683)
at
org.apache.geode.internal.cache.PartitionedRegion$BucketLock.lock(PartitionedRegion.java:6626)
at
org.apache.geode.internal.cache.PartitionedRegion$RegionLock.lock(PartitionedRegion.java:6883)
at
org.apache.geode.internal.cache.PartitionedRegion.registerPartitionedRegion(PartitionedRegion.java:1318)
at
org.apache.geode.internal.cache.PartitionedRegion.initPRInternals(PartitionedRegion.java:987)
- locked <0x00021dd35258> (a
org.apache.geode.internal.cache.PartitionedRegion)
at
org.apache.geode.internal.cache.PartitionedRegion.initialize(PartitionedRegion.java:1157)
at
org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3104)
at
org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:3004)
at
org.apache.geode.internal.cache.xmlcache.RegionCreation.createRoot(RegionCreation.java:243)
at
org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeRegions(CacheCreation.java:558)
at
org.apache.geode.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:512)
at
org.apache.geode.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:338)
at
org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4291)
at
org.apache.geode.internal.cache.GemFireCacheImpl.initializeDeclarativeCache(GemFireCacheImpl.java:1390)
at
org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1195)
at
org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
- locked <0x00021de39cf0> (a java.lang.Class for
org.apache.geode.internal.cache.GemFireCacheImpl)
at
org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:745)
at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:173)
- locked <0x00021de38d70> (a java.lang.Class for
org.apache.geode.cache.CacheFactory)
at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:212)
- locked <0x00021de38d70> (a java.lang.Class

Thread block on org.apache.geode.cache.CacheFactory.getAnyInstance(CacheFactory.java:282)

2018-10-23 Thread Dinesh Akhand
Hi team,

Recently we see JVM stuck , in stack trace I can see below method having problem

As per document

From link :


https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheListener.html

this warning:

WARNING: To avoid risk of deadlock, do not invoke CacheFactory.getAnyInstance() 
from within any callback methods. Instead use EntryEvent.getRegion().getCache() 
or RegionEvent.getRegion().getCache()
What  is the best solution to avoid it.

Function Execution Processor1" #247 daemon prio=10 os_prio=0 
tid=0x7f5798268000 nid=0x3ff5 waiting for monitor entry [0x7f576adf]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
org.apache.geode.cache.CacheFactory.getAnyInstance(CacheFactory.java:282)
- waiting to lock <0x000699feafa0> (a java.lang.Class for 
org.apache.geode.cache.CacheFactory)
at 
org.apache.geode.management.internal.cli.functions.GetRegionsFunction.execute(GetRegionsFunction.java:44)
at 
org.apache.geode.internal.cache.MemberFunctionStreamingMessage.process(MemberFunctionStreamingMessage.java:185)
at 
org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:374)
at 
org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:440)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at 
org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:662)
at 
org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1108)
at java.lang.Thread.run(Thread.java:745

"P2P message reader for 10.218.110.61(sbimgapp16-server1:65602):1026 shared 
ordered uid=139 port=62033" #403 daemon prio=10 os_prio=0 
tid=0x7f1ad4114800 nid=0xda7c waiting for monitor entry [0x
7f1a28fcc000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
org.apache.geode.cache.CacheFactory.getAnyInstance(CacheFactory.java:282)
- waiting to lock <0x00021df685a8> (a java.lang.Class for 
org.apache.geode.cache.CacheFactory)
at 
amdocs.imdg.statistics.GemFireStatisticsFactory.getStatisticsFactory(GemFireStatisticsFactory.java:43)
at 
amdocs.imdg.statistics.VSDCountersManager.(VSDCountersManager.java:35)
at 
amdocs.imdg.statistics.VSDCountersManager.(VSDCountersManager.java:19)
at 
amdocs.imdg.statistics.CountersManagerFactory.getCountersManager(CountersManagerFactory.java:27)
at 
amdocs.imdg.utils.pooling.DataPoolFactory.makeObject(DataPoolFactory.java:42)
at 
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:797)
- locked <0x00021ebbe630> (a 
org.apache.commons.pool.impl.GenericKeyedObjectPool)
at 
amdocs.imdg.utils.pooling.DataPool$DataPoolManager.getByteArray(DataPool.java:236)
at amdocs.imdg.utils.pooling.DataPool.getByteArray(DataPool.java:98)
at amdocs.imdg.model.BusinessData.populateData(BusinessData.java:110)
at 
amdocs.imdg.utils.FlatBuffersUtils.updateBusinessData(FlatBuffersUtils.java:2255)
at 
amdocs.imdg.utils.FlatBuffersUtils.updateCustomerData(FlatBuffersUtils.java:3083)
at 
amdocs.imdg.utils.FlatBuffersUtils.updateNewCustomer(FlatBuffersUtils.java:3103)
at 
amdocs.imdg.utils.FlatBuffersUtils.updateFromCustomerData(FlatBuffersUtils.java:2798)
at amdocs.imdg.model.Customer.fromData(Customer.java:696)
- locked <0x00021f874d08> (a amdocs.imdg.model.Customer)
at 
org.apache.geode.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2372)
at 
org.apache.geode.internal.InternalDataSerializer.readDataSerializable(InternalDataSerializer.java:2395)
at org.apache.geode.internal.InternalDataSerializer.basicRead



Thanks,
Dinesh Akhand

“Amdocs’ email platform is based on a third-party, worldwide, cloud-based 
system. Any emails sent to Amdocs will be processed and stored using such 
system and are accessible by third party providers of such system on a limited 
basis. Your sending of emails to Amdocs evidences your consent to the use of 
such system and such processing, storing and access”.


How to print number of lost bucket in locator

2018-10-23 Thread Dinesh Akhand
Hi Team,

I need to know , how to print number of lost bucket , when 2 JVM goes down and 
all JVM holding the customer partition region.
Suppose,  I have 5 jvm in cluster where CUSTOMER region is partition region 
which 1 copy of data[redundant-copies="1"] in ALL JVM.

Thanks,
Dinesh Akhand

“Amdocs’ email platform is based on a third-party, worldwide, cloud-based 
system. Any emails sent to Amdocs will be processed and stored using such 
system and are accessible by third party providers of such system on a limited 
basis. Your sending of emails to Amdocs evidences your consent to the use of 
such system and such processing, storing and access”.


need to find out number of lost bucket info & bucket ID when 2 JVM goes down when hosting partition region with redundency 2

2018-10-17 Thread Dinesh Akhand
Hi Team,

I am trying to get the information in geode code when we have partition region 
with redundancy =2 .
Total JVM are 5 and 2 JVM goes down same time.

Then it comes with bucket loss.
I want  to print this information in log.
Kindly suggest why below code do't give correct information. Using geode 
version 1.2


  if(region.getFullPath().equals("/CUSTOMER_1"))
   {
  PartitionedRegion pr=(PartitionedRegion)region;
  logger.info("akhand2="+ region.getFullPath());
  Iterator bucketIdsWithStorage = 
pr.getRegionAdvisor().getBucketSet().iterator();
  while (bucketIdsWithStorage.hasNext()) { // bucketId loop
   Integer bucketId = ((Integer) 
bucketIdsWithStorage.next()).intValue();

   try {
 //List owners = 
pr.getBucketOwnersForValidation(bucketId);
   Set bucketOwners 
= pr.getRegionAdvisor().getBucketOwners(bucketId.intValue());


   for(InternalDistributedMember dm 
:bucketOwners)
   {

 
logger.info("getBucketRedundancy"+pr.getRegionAdvisor().getBucketRedundancy(bucketId.intValue())+"bucketid="+bucketId.intValue()+",bucketOwners"+bucketOwners.size()+",
 
dmName:"+dm.getName()+",Primary:"+pr.getRegionAdvisor().getBucket(bucketId.intValue()).isPrimary()+",
 isHosted:"+pr.getRegionAdvisor().getBucket(bucketId.intValue()).isHosting()+", 
isPrimaryHosting:"+pr.getRegionAdvisor().getBucket(bucketId.intValue()).getprimaryStateToString());
   }

   } catch (Exception e) {
   logger.info("akhand1 pr " + pr, e);
   }

       }
}//end if
  }//end partition region
}


Thanks,
Dinesh Akhand

“Amdocs’ email platform is based on a third-party, worldwide, cloud-based 
system. Any emails sent to Amdocs will be processed and stored using such 
system and are accessible by third party providers of such system on a limited 
basis. Your sending of emails to Amdocs evidences your consent to the use of 
such system and such processing, storing and access”.


need information about network parameter configuration values for geode.

2018-08-22 Thread Dinesh Akhand
Hi Team,

What will be impact of below parameter if we do't set into geode cluster .

In our cluster we have 8M population with 11 VM and each VM having 5 JVM for 
holding the data. Means 11*5 = 55 JVM  holder the CUSTOMR region.

Many time face the problem , all JVM comes comes up and joined the locator . in 
 list member I can see all members.

But Command like :list REGION , assign buckets stuck in gfsh.  Could you 
suggest what making cause to it.

Currently both parameter we set to 1.

net.ipv4.tcp_slow_start_after_idle

0

By default, TCP starts with a single small segment, gradually increasing it by 
one each time. This results in unnecessary slowness that impacts the start of 
every request.

net.ipv4.tcp_syncookies

0

Many default Linux installations use SYN cookies to protect the system against 
malicious attacks that flood TCP SYN packets. The use of SYN cookies 
dramatically reduces network bandwidth, and can be triggered by a running Geode 
cluster. If your Geode cluster is otherwise protected against such attacks, 
disable SYN cookies to ensure that Geode network throughput is not affected.
NOTE: if SYN floods are an issue and SYN cookies can't be disabled, try the 
following:
net.ipv4.tcp_max_syn_backlog="16384"
net.ipv4.tcp_synack_retries="1"
net.ipv4.tcp_max_orphans="40"


https://cwiki.apache.org/confluence/display/GEODE/Network+Configuration+Best+Practices

Also we set net.ipv4.tcp_abort_on_overflow = 0 .

Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement, you may review at 
https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>

Amdocs Development Centre India Private Limited having CIN: 
U72200PN2004PTC0188320 converted into Amdocs Development Centre India LLP (A 
limited liability partner­ship with LLP Identification Number: AAI-6901 
effective 28th Feb 2017)


Need information about vf.gf.locator.status.cmd & vf.gf.locator.status.cmd

2018-05-29 Thread Dinesh Akhand
Hi Team,

What is vf.gf.locator.status.cmd , vf.gf.locator.status.cmd file ,which are 
getting created in locator working dir.
I am trying to understand it , in what scenario these file are getting created.

Both files are empty  and locator is going down.
Could you please provide information about these files.

Thanks,
Dinesh Akhand

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


[discussion]clear method implementation for Parallel Gateway Sender Queue

2017-12-07 Thread Dinesh Akhand
Created the pull request for the same.
https://github.com/apache/geode/pull/1139


Thanks,
Dinesh akhand

-Original Message-
From: Dan Smith [mailto:dsm...@pivotal.io] 
Sent: Tuesday, July 18, 2017 3:59 AM
To: dev@geode.apache.org
Subject: Re: need information about 
SerialGatewaySenderQueue/ParallelGatewaySenderQueue Clear

Hi Dinesh,

I think we probably just never got around to adding a clear. I think you could 
probably clear your queues just stop stopping and starting the gateway sender, 
which might be the easiest thing to do here.

Regarding your code, for your parallel queue are you doing that inside of a 
function? The code you have will try to clear things on a single node. The 
queue also maintains some other metadata in memory. I'm not quite sure what the 
effect on the queue will be if you delete the region entries without changing 
that other metadata. I guess you could test it and find out.
You'll probably want to see what the effect is while the queue is actually 
dispatching entries as well, because it's possible you could catch the system 
in a state where it is trying to read entries from the region as you are 
deleting them. Or maybe pause the queue first in your clear method?

-Dan

On Fri, Jul 14, 2017 at 2:23 AM, Dinesh Akhand <dines...@amdocs.com> wrote:

> Hi Team,
>
>
>
> Please reply . why we don't have implementation of clear method in 
> ParallelGatewaySenderQueue/ SerialGatewaySenderQueue in geode. Requirement:
> we want to clear the queue data.
>
>
>
> I have implement below method in our code.
>
> --
>
> Class ParallelGatewaySenderQueue.java
>
>
>
> //clear the partition region
>
> private void clearPartitionedRegion(PartitionedRegion 
> partitionedRegion)
>
> {
>
> LocalDataSet lds = (LocalDataSet) 
> PartitionRegionHelper.getLocalPrimaryData(partitionedRegion);
>
> Setset = lds.getBucketSet(); // this 
> returns bucket ids in the function context
>
>
>
> for (Integer bucketId : set) {
>
> Bucket bucket = partitionedRegion.
> getRegionAdvisor().getBucket(bucketId);
>
> if (bucket instanceof 
> ProxyBucketRegion == false) {
>
> if (bucket 
> instanceof BucketRegion) {
>
>
>   BucketRegion bucketRegion = (BucketRegion) bucket;
>
>
>   Set keySet = bucketRegion.keySet();
>
>
>   for (Iterator iterator = keySet.iterator(); iterator.hasNext();) 
> {
>
>
>   Object key = iterator.next();
>
>
>   bucketRegion.remove(key);
>
>
>   }
>
> }
>
> }
>
> }
>
> }
>
> -
>
> Class : SerialGatewaySenderQueue.java
>
>  @Override
>
>   public void clearQueue() {
>
>
>
> this.sender.getLifeCycleLock().readLock().lock();
>
> Set keys = this.region.keys();
>
> for (Long key : keys) {
>
>   this.region.remove(key);
>
>     }
>
> this.sender.getLifeCycleLock().readLock().unlock();
>
>
>
>   }
>
> -
>
>
>
> Any comment in above code will welcome.
>
>
>
>
>
> Thanks,
>
> Dinesh Akhand
>
>
>
> -Original Message-
> From: Dinesh Akhand
> Sent: Monday, May 15, 2017 2:39 PM
> To: dev@geode.apache.org
> Subject: need information about RegionQueue
>
>
>
>
>
> Hi Team,
>
>
>
> Why we do't have support to clear complete queue.  Is there any 
> limitation for it?.
>
>
>
> public void clear(PartitionedRegion pr, int bucketId) {
>
>throw new RuntimeException("This method(clear)is not supported 
> by ParallelGatewaySenderQueue");
>
>   }
>
>
>
> Class : ParallelGatewaySenderQueue
>
> Class : SerialGatewaySenderQueue
>
>
>
> Thanks,
>
> Dinesh Akhand
>
>
>
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
>
>
>
> you may review at https://www.amdocs.com/about/email-disclaimer < 
> https://www.amdocs.com/about/email-disclaimer>
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
>
> you may review at https://www.amdocs.com/about/email-disclaimer < 
> https://www.amdocs.com/about/email-disclaimer>
>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


need suggestion about below exception

2017-10-27 Thread Dinesh Akhand
Any one suggest about below exception:

at 
org.apache.geode.internal.cache.DiskEntry$Helper.removeFromDisk(DiskEntry.java:1505)
at 
org.apache.geode.internal.cache.AbstractOplogDiskRegionEntry.removePhase1(AbstractOplogDiskRegionEntry.java:42)
at 
org.apache.geode.internal.cache.AbstractRegionEntry.destroy(AbstractRegionEntry.java:896)
at 
org.apache.geode.internal.cache.AbstractRegionMap.destroyEntry(AbstractRegionMap.java:3084)
at 
org.apache.geode.internal.cache.AbstractRegionMap.destroy(AbstractRegionMap.java:1422)
at 
org.apache.geode.internal.cache.LocalRegion.mapDestroy(LocalRegion.java:6566)
at 
org.apache.geode.internal.cache.LocalRegion.mapDestroy(LocalRegion.java:6540)
at 
org.apache.geode.internal.cache.BucketRegion.basicDestroy(BucketRegion.java:1183)
at 
org.apache.geode.internal.cache.AbstractBucketRegionQueue.basicDestroy(AbstractBucketRegionQueue.java:352)
at 
org.apache.geode.internal.cache.BucketRegionQueue.basicDestroy(BucketRegionQueue.java:363)
at 
org.apache.geode.internal.cache.LocalRegion.validatedDestroy(LocalRegion.java:)
at 
org.apache.geode.internal.cache.DistributedRegion.validatedDestroy(DistributedRegion.java:904)
at 
org.apache.geode.internal.cache.LocalRegion.destroy(LocalRegion.java:1096)
at 
org.apache.geode.internal.cache.AbstractRegion.destroy(AbstractRegion.java:315)
at 
org.apache.geode.internal.cache.LocalRegion.remove(LocalRegion.java:8976)
at 
org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.clearPartitionedRegion(ParallelGatewaySenderQueue.java:1830)
at 
org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.clearQueue(ParallelGatewaySenderQueue.java:1800)
at 
org.apache.geode.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue.clearQueue(ConcurrentParallelGatewaySenderQueue.java:237)
at org.apa

In geode 1.1 Clear queue function is working correctly for us.
But with same configuration in geode 1.2 is not working.

I tried to add the debug log and printed  disk region which is created inside 
the LocalRegion.java, diskregion is not null.

[info 2017/10/27 12:26:43.196 IDT eaasrt-server1  tid=0xf2] akhand diskregion/__PR/_B__AsyncEventQueue
__PWInfoQueue__PARALLEL__GATEWAY__SENDER__QUEUE_4fullpath:=/__PR/_B__AsyncEventQueue__PWInfoQueue__PARALLEL__GATEWAY__SENDER__QUEUE_4isuse

Which is not Null , also  DiskStoreImpl is Not null

info 2017/10/27 13:59:36.407 IDT eaasrt-server1  tid=0xe8] akhand diskregion/__PR/_B__AsyncEventQueue
__PWInfoQueue__PARALLEL__GATEWAY__SENDER__QUEUE_109fullpath:=/__PR/_B__AsyncEventQueue__PWInfoQueue__PARALLEL__GATEWAY__SENDER__QUEUE_109i
suse:false,dsi:PWInfo-queue-overflow

Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


what is the command to read cacheserver.gfs file??

2017-10-24 Thread Dinesh Akhand
Hi team,

I tried below command

java -cp "geode-dependencies.jar:$GEODE_HOME/lib/*" 
org.apache.geode.internal.SystemAdmin stats-archive=cacheserver.gfs

Is this correct command to read cacheserver.gfs file.


Please confirm.

Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


[Discuss] replace jsonToObject method with com.fasterxml.jackson.databind. ObjectMapper ->readValue

2017-09-19 Thread Dinesh Akhand
Hi Team,

In geode, we are using our own written  parsing method in geode.
Method :
public static  T jsonToObject(String jsonString, Class klass) {

it have custom parsing logic
   while (keys.hasNext()) {
String key = keys.next();
Method method = methodsMap.get("set" + capitalize(key));
if (method != null) {
  Class[] parameterTypes = method.getParameterTypes();
  if (parameterTypes.length == 1) {
Class parameterType = parameterTypes[0];

Object value = jsonObject.get(key);
if (isPrimitiveOrWrapper(parameterType)) {
  value = 
ConvertUtils.convert(getPrimitiveOrWrapperValue(parameterType, 
value),parameterType);
}
// Bug #51175
else if (isArray(parameterType)) {
  value = toArray(value, parameterType);
} else if (isList(parameterType)) {
  value = toList(value, parameterType);
} else if (isMap(parameterType)) {
  value = toMap(value, parameterType);
} else if (isSet(parameterType)) {
  value = toSet(value, parameterType);
} else {
  value = jsonToObject(value.toString(), parameterType);
}
method.invoke(objectFromJson, new Object[] {value});
noOfFields--;
  }

can we use replace this parsing with readValue method of ObjectMapper Class 
call?.

jackson-databind-2.8.6.jar
com.fasterxml.jackson.databind. ObjectMapper class
which have readValue method which works for all data type. It convert json to 
class type object.
What do you think??

Example :
 ObjectMapper mapper = new ObjectMapper();
 String emp_key = mapper.writeValueAsString(key1);
  System.out.println(emp_key);
 Object empkey = mapper.readValue(emp_key, SICKey1.class);


I have seen issue in this method

When key class having the byte[] inside it or method isArray, isList, isMap, 
toMap, toSet when these have byte[] inside it.

Any suggestion to adopt new method.

Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


[DISCUSS] GEODE-3617 Replace gemfire prefix with geode

2017-09-14 Thread Dinesh Akhand
Hi,

Why we are keeping gemfire in current geode 1.2 , Can we replace this with GEODE
File : DistributionConfig.java

Current code:
  String GEMFIRE_PREFIX = "gemfire.";

Suggestion to change:
 String GEODE_PREFIX = "geode.";

Why do you think ?
Can we go ahead  and change this ?
It will impact lots of files & all configuration will be now using with geode.

Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: [DISCUSS] Bug while parsing the JSON "key which having short data type" in locate command "https://github.com/apache/geode/pull/752"

2017-09-12 Thread Dinesh Akhand
Hi Team,

I fixed the first review code comments. Please review again.

Thanks,
Dinesh Akhand

-Original Message-
From: dinesh 1004 [mailto:dineshpune2...@gmail.com] 
Sent: Wednesday, September 6, 2017 10:23 PM
To: dev@geode.apache.org
Subject: RE: [DISCUSS] Bug while parsing the JSON "key which having short data 
type" in locate command "https://github.com/apache/geode/pull/752;

Need suggestions on same pull request

Thanks,
Dinesh

On 1 Sep 2017 09:46, "Dinesh Akhand" <dines...@amdocs.com> wrote:

> Hi Team,
>
> Please reply over below mail chain.
>
> Need you focus on the issue.
>
> Thanks,
> Dinesh Akhand
>
> -Original Message-
> From: Dinesh Akhand
> Sent: Thursday, August 31, 2017 7:04 PM
> To: dev@geode.apache.org
> Subject: [DISCUSS] Bug while parsing the JSON "key which having short 
> data type" in locate command "https://github.com/apache/geode/pull/752;
>
> Hi,
>
>
>
> I have created the pull request for the same .
>
> https://github.com/apache/geode/pull/752
>
>
>
> Jira ticket GEODE-3544.
>
>
>
> Case 1)
>
>
>
> Short data type is getting converted into integer &  geode is looking 
> for set method  with integer
>
> And it throws the exception.
>
>
>
> So I am converting the value with parameterType  using 
> ConvertUtils.convert which solve the problem for all primitive/wrapper 
> type
>
> Example 2)
>
>  If key data type in short i =5
>
>   It will look for method  seti(integer )
>
> Case 2) If key having the base class it check only key class set method .
>
>
>
> So I change getDeclaredMethods to getMethods()
>
>
>
>
>
> Thanks,
>
> Dinesh Akhand
>
>
>
> -Original Message-
> From: Dinesh Akhand
> Sent: Monday, August 28, 2017 5:46 PM
> To: dev@geode.apache.org
> Subject: Bug while parsing the JSON "key which having short data type" 
> in locate command
>
>
>
> Hi Team,
>
>
>
> I have found one bug in geode 1.2 .
>
>
>
> If in the key we having the short data type
>
>
>
> Example:
>
>
>
> public class EmpData  implements Serializable{ private short empid;
>
>
>
> public short getEmpid() {
>
>return empid;
>
> }
>
>
>
> public void setEmpid(short empid) {
>
>this.empid = empid;
>
> }
>
>
>
>
>
> EmpData d1 = new EmpData();
>
> D1. setEmpid((short)1);
>
>
>
> Region.put(d1,"value1");
>
>
>
> Now try locate command on this .
>
>
>
>
>
> Problem in code: file JSONTokener.java. it always return short to int 
> value
>
>
>
> try {
>
> long longValue = Long.parseLong(number, base);
>
> if(longValue <= Short.MAX_VALUE && longValue >= 
> Short.MIN_VALUE)
>
> {
>
>  return (short) longValue;
>
> }
>
> else if (longValue <= Integer.MAX_VALUE && longValue >=
> Integer.MIN_VALUE) {
>
>   return (int) longValue;
>
> } else {
>
>   return longValue;
>
> }
>
>
>
> Later it cause the problem of java.lang.IllegalArgumentException:
> argument type mismatch.
>
> locate entry --key=--key=('empid ':1) --region=CUSTOMER_1
>
>
>
> alternate way :  changes the  DataCommandFunctionJUnitTest.java 
> changes the testLocateKeyIsObject method
>
>
>
> due to same problem, we are facing problem with all commands where we 
> usage the key.
>
>
>
> Thanks,
>
> Dinesh Akhand
>
>
>
>
>
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
>
>
>
> you may review at https://www.amdocs.com/about/email-disclaimer < 
> https://www.amdocs.com/about/email-disclaimer>
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
>
> you may review at https://www.amdocs.com/about/email-disclaimer < 
> https://www.amdocs.com/about/email-disclaimer>
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
>
> you may review at https://www.amdocs.com/about/email-disclaimer < 
> https://www.amdocs.com/about/email-disclaimer>
>
>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


Need suggestion for exception expected but was

2017-09-06 Thread Dinesh Akhand
java.lang.Exception: Unexpected exception, 
expected but 
was
   at 
org.apache.geode.internal.logging.LogService$PropertyChangeListenerImpl.propertyChange(LogService.java:279)
   at 
org.apache.logging.log4j.core.LoggerContext.firePropertyChangeEvent(LoggerContext.java:519)
   at 
org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:500)
   at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:562)
   at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:578)
   at 
org.apache.geode.internal.logging.LogService.init(LogService.java:84)
   at 
org.apache.geode.internal.logging.LogService.(LogService.java:72)
   at 
org.apache.geode.distributed.internal.InternalDistributedSystem.(InternalDistributedSystem.java:129)


Can any one suggest me about this exception.

While creating logger inInternalDistributedSystem
  private static final boolean ALLOW_MEMORY_LOCK_WHEN_OVERCOMMITTED =
  Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + 
"Cache.ALLOW_MEMORY_OVERCOMMIT");
  private static final Logger logger = LogService.getLogger();

  public static final String DISABLE_MANAGEMENT_PROPERTY =
  DistributionConfig.GEMFIRE_PREFIX + "disableManagement";

  /**
Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: [DISCUSS] Bug while parsing the JSON "key which having short data type" in locate command "https://github.com/apache/geode/pull/752"

2017-08-31 Thread Dinesh Akhand
Hi Team,

Please reply over below mail chain.

Need you focus on the issue.

Thanks,
Dinesh Akhand

-Original Message-
From: Dinesh Akhand 
Sent: Thursday, August 31, 2017 7:04 PM
To: dev@geode.apache.org
Subject: [DISCUSS] Bug while parsing the JSON "key which having short data 
type" in locate command "https://github.com/apache/geode/pull/752;

Hi,



I have created the pull request for the same .

https://github.com/apache/geode/pull/752



Jira ticket GEODE-3544.



Case 1)



Short data type is getting converted into integer &  geode is looking for set 
method  with integer

And it throws the exception.



So I am converting the value with parameterType  using ConvertUtils.convert 
which solve the problem for all primitive/wrapper type

Example 2)

 If key data type in short i =5

  It will look for method  seti(integer )

Case 2) If key having the base class it check only key class set method .



So I change getDeclaredMethods to getMethods()





Thanks,

Dinesh Akhand



-Original Message-
From: Dinesh Akhand
Sent: Monday, August 28, 2017 5:46 PM
To: dev@geode.apache.org
Subject: Bug while parsing the JSON "key which having short data type" in 
locate command



Hi Team,



I have found one bug in geode 1.2 .



If in the key we having the short data type



Example:



public class EmpData  implements Serializable{ private short empid;



public short getEmpid() {

   return empid;

}



public void setEmpid(short empid) {

   this.empid = empid;

}





EmpData d1 = new EmpData();

D1. setEmpid((short)1);



Region.put(d1,"value1");



Now try locate command on this .





Problem in code: file JSONTokener.java. it always return short to int value



try {

long longValue = Long.parseLong(number, base);

if(longValue <= Short.MAX_VALUE && longValue >= Short.MIN_VALUE)

{

 return (short) longValue;

}

else if (longValue <= Integer.MAX_VALUE && longValue >= 
Integer.MIN_VALUE) {

  return (int) longValue;

} else {

  return longValue;

}



Later it cause the problem of java.lang.IllegalArgumentException: argument type 
mismatch.

locate entry --key=--key=('empid ':1) --region=CUSTOMER_1



alternate way :  changes the  DataCommandFunctionJUnitTest.java changes the 
testLocateKeyIsObject method



due to same problem, we are facing problem with all commands where we usage the 
key.



Thanks,

Dinesh Akhand





This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,



you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>



[DISCUSS] Bug while parsing the JSON "key which having short data type" in locate command "https://github.com/apache/geode/pull/752"

2017-08-31 Thread Dinesh Akhand
Hi,



I have created the pull request for the same .

https://github.com/apache/geode/pull/752



Jira ticket GEODE-3544.



Case 1)



Short data type is getting converted into integer &  geode is looking for set 
method  with integer

And it throws the exception.



So I am converting the value with parameterType  using ConvertUtils.convert 
which solve the problem for all primitive/wrapper type

Example 2)

 If key data type in short i =5

  It will look for method  seti(integer )

Case 2) If key having the base class it check only key class set method .



So I change getDeclaredMethods to getMethods()





Thanks,

Dinesh Akhand



-Original Message-
From: Dinesh Akhand
Sent: Monday, August 28, 2017 5:46 PM
To: dev@geode.apache.org
Subject: Bug while parsing the JSON "key which having short data type" in 
locate command



Hi Team,



I have found one bug in geode 1.2 .



If in the key we having the short data type



Example:



public class EmpData  implements Serializable{ private short empid;



public short getEmpid() {

   return empid;

}



public void setEmpid(short empid) {

   this.empid = empid;

}





EmpData d1 = new EmpData();

D1. setEmpid((short)1);



Region.put(d1,"value1");



Now try locate command on this .





Problem in code: file JSONTokener.java. it always return short to int value



try {

long longValue = Long.parseLong(number, base);

if(longValue <= Short.MAX_VALUE && longValue >= Short.MIN_VALUE)

{

 return (short) longValue;

}

else if (longValue <= Integer.MAX_VALUE && longValue >= 
Integer.MIN_VALUE) {

  return (int) longValue;

} else {

  return longValue;

}



Later it cause the problem of java.lang.IllegalArgumentException: argument type 
mismatch.

locate entry --key=--key=('empid ':1) --region=CUSTOMER_1



alternate way :  changes the  DataCommandFunctionJUnitTest.java changes the 
testLocateKeyIsObject method



due to same problem, we are facing problem with all commands where we usage the 
key.



Thanks,

Dinesh Akhand





This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,



you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


Bug while parsing the JSON "key which having short data type" in locate command

2017-08-28 Thread Dinesh Akhand
Hi Team,

I have found one bug in geode 1.2 .

If in the key we having the short data type

Example:

public class EmpData  implements Serializable{
private short empid;

public short getEmpid() {
   return empid;
}

public void setEmpid(short empid) {
   this.empid = empid;
}


EmpData d1 = new EmpData();
D1. setEmpid((short)1);

Region.put(d1,"value1");

Now try locate command on this .


Problem in code: file JSONTokener.java. it always return short to int value

try {
long longValue = Long.parseLong(number, base);
if(longValue <= Short.MAX_VALUE && longValue >= Short.MIN_VALUE)
{
 return (short) longValue;
}
else if (longValue <= Integer.MAX_VALUE && longValue >= 
Integer.MIN_VALUE) {
  return (int) longValue;
} else {
  return longValue;
}

Later it cause the problem of java.lang.IllegalArgumentException: argument type 
mismatch.
locate entry --key=--key=('empid ':1) --region=CUSTOMER_1

alternate way :  changes the  DataCommandFunctionJUnitTest.java changes the 
testLocateKeyIsObject method

due to same problem, we are facing problem with all commands where we usage the 
key.

Thanks,
Dinesh Akhand


This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


[Discuss] FunctionStats over the JMX [GEODE-3462]

2017-08-21 Thread Dinesh Akhand
Hi Team,

We are looking for implementing the function stats over JMX.
Currently Function Stats are not part of JMX. We can't see them on JMX server.
Can you please assist what is the correct way to implementing it.

We have many function  which are instanceOf  FunctionAdapter.
We want to monitor their stats on JMX server . can you please assist.

But we having lots of user created function . for monitoring the few critical 
functions, we want then as per configuration based.


GEODE-3462. https://github.com/apache/geode/pull/720

Thanks,
Dinesh Akhand

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: How to export region keys in json file

2017-08-18 Thread Dinesh Akhand
Hi,

Looks like it converting key in string when I am doing put

gfsh>put --region=/CUSTOMER_1 
--key='("CustomerKey","customerID":1,"cycleCode":1,"customerGroup":1000,"partitionID":100)'
  --value=foo

but Region key is CustomerKey class object.

gfsh>query --query='select e.key from /CUSTOMER_1.entrySet e'

   name| customerID | customerGroup | cycleCode | 
partitionID | Result
-- | -- | - | - | 
--- | 
---
amdocs.imdg.model.keys.CustomerKey | 1592   | 30006 | 1 | 
300062  | 
{"customerID":1,"cycleCode":1,"customerGroup":1000,"partitionID":100,"type-class":"amdocs.imdg.model.keys.CustomerKey"}
amdocs.imdg.model.keys.CustomerKey | 3258   | 30005 | 1 | 
300058  | 
{'customerID':1010,'customerGroup':30006,'cycleCode':1,'partitionID':300066}
amdocs.imdg.model.keys.CustomerKey | 1593   | 30013 | 1 | 
300133  | 
{\"customerID\":1000,\"customerGroup\":30006,\"cycleCode\":1,\"partitionID\":300066}
amdocs.imdg.model.keys.CustomerKey | 54 | 30011 | 1 | 
300114  | 
{"name":"amdocs.imdg.model.keys.CustomerKey","customerID":1,"cycleCode":1,"customerGroup":1000,"partitionID":100,"type-class":"amdocs.imdg.model.keys.CustomerKey"}
amdocs.imdg.model.keys.CustomerKey | 386| 30014 | 1 | 
300146  | null
amdocs.imdg.model.keys.CustomerKey | 1591   | 30003 | 1 | 
300031  | null
amdocs.imdg.model.keys.CustomerKey | 1594   | 30010 | 1 | 
300104  | null
null   | null   | null  | null  | 
null| null
null   | null   | null  | null  | 
null| null
null   | null   | null  | null  | 
null| null
null   | null   | null  | null  | 
null| null


-Original Message-
From: Swapnil Bawaskar [mailto:sbawas...@pivotal.io] 
Sent: Thursday, August 17, 2017 10:32 PM
To: dev@geode.apache.org
Cc: bogle...@pivotal.io
Subject: Re: How to export region keys in json file

I think you need to wrap the entire json string in quotes. From GEODE-3001
<https://issues.apache.org/jira/browse/GEODE-3001>:

gfsh>put --key-class=io.pivotal.gemfire.testing.MyKey
--key="{'identifier': 'KIWI131117+65', 'name':'name'}" --value=foo2 
--region=/foo



On Thu, Aug 17, 2017 at 6:15 AM Dinesh Akhand <dines...@amdocs.com> wrote:

> Hi I tried below,
>
> gfsh>query --query='select e.key from /CUSTOMER_1.entrySet e'
>
> Result : true
> startCount : 0
> endCount   : 20
> Rows   : 7
>
>name| customerID | cycleCode |
> customerGroup | partitionID
> -- | -- | - |
> - | ---
> amdocs.imdg.model.keys.CustomerKey | 1592   | 1 | 30006
>  | 300062
>
>
> but when I ran
>
> gfsh>remove --region=/ CUSTOMER_1
> --key={\"customerID\":1592,\"customerGroup\":30006,\"cycleCode\":1,\"p
> artitionID\":300062} --key-class=amdocs.imdg.model.keys.CustomerKey
> Result: false
> Message   : Key is not present in the region
> Key Class : java.lang.String
> Key   :
> {\"customerID\":1592,\"customerGroup\":30006,\"cycleCode\":1,\"partiti
> onID\":300062} --key-class=amdocs.imdg.model.keys.CustomerKey
>
> Showing error key not exist.
>
> We have customerID=LONG type
> cycleCode = short
> customerGroup = int
> partitionID =int
>
> Can you please suggest.
>
> Thanks,
> Dinesh Akhand
>
>
> From: Barry Oglesby [mailto:bogle...@pivotal.io]
> Sent: Thursday, August 17, 2017 4:18 AM
> To: dev@geode.apache.org<mailto:dev@geode.apache.org>
> Subject: Re: How to export region keys in json file
>
> There isn't anything built in to export keys as JSON. There was some 
> talk about exporting values as JSON at one time, but that hasn't been done.
>
> I attached a function to dump the keys as JSON. It just logs them to 
> the terminal, but it can easily be changed to write them to a file.
>
> It dumps output like:
>
> Region data contains the following 34 keys:
>
> {"customerID":"28","customerGroup":"gr

RE: How to export region keys in json file

2017-08-17 Thread Dinesh Akhand
Hi I tried below,

gfsh>query --query='select e.key from /CUSTOMER_1.entrySet e'

Result : true
startCount : 0
endCount   : 20
Rows   : 7

   name| customerID | cycleCode | customerGroup | 
partitionID
-- | -- | - | - | 
---
amdocs.imdg.model.keys.CustomerKey | 1592   | 1 | 30006 | 
300062


but when I ran

gfsh>remove --region=/ CUSTOMER_1 
--key={\"customerID\":1592,\"customerGroup\":30006,\"cycleCode\":1,\"partitionID\":300062}
 --key-class=amdocs.imdg.model.keys.CustomerKey
Result: false
Message   : Key is not present in the region
Key Class : java.lang.String
Key   : 
{\"customerID\":1592,\"customerGroup\":30006,\"cycleCode\":1,\"partitionID\":300062}
 --key-class=amdocs.imdg.model.keys.CustomerKey

Showing error key not exist.

We have customerID=LONG type
cycleCode = short
customerGroup = int
partitionID =int

Can you please suggest.

Thanks,
Dinesh Akhand


From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Thursday, August 17, 2017 4:18 AM
To: dev@geode.apache.org<mailto:dev@geode.apache.org>
Subject: Re: How to export region keys in json file

There isn't anything built in to export keys as JSON. There was some talk about 
exporting values as JSON at one time, but that hasn't been done.

I attached a function to dump the keys as JSON. It just logs them to the 
terminal, but it can easily be changed to write them to a file.

It dumps output like:

Region data contains the following 34 keys:

{"customerID":"28","customerGroup":"group-28","cycleCode":"cycleCode-28","partitionID":28}

{"customerID":"21","customerGroup":"group-21","cycleCode":"cycleCode-21","partitionID":21}

{"customerID":"68","customerGroup":"group-68","cycleCode":"cycleCode-68","partitionID":68}

{"customerID":"81","customerGroup":"group-81","cycleCode":"cycleCode-81","partitionID":81}

{"customerID":"35","customerGroup":"group-35","cycleCode":"cycleCode-35","partitionID":35}

{"customerID":"90","customerGroup":"group-90","cycleCode":"cycleCode-90","partitionID":90}

{"customerID":"15","customerGroup":"group-15","cycleCode":"cycleCode-15","partitionID":15}

{"customerID":"44","customerGroup":"group-44","cycleCode":"cycleCode-44","partitionID":44}


Thanks,
Barry Oglesby


On Wed, Aug 16, 2017 at 4:35 AM, Dinesh Akhand 
<dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:
Hi,

How I can export Region keys in json file.

It will help full for us to use get command or remove command for particular 
key when we have the composite keys defined.

get --region=/CUSTOMER_1 
--key=({'customerID':'1593','customerGroup':'30013','cycleCode':'1','partitionID':'300133'})
 --key-class=amdocs.imdg.model.keys.CustomerKey
Message : Error in converting JSON Couldn't convert JSON to Object of type 
class amdocs.imdg.model.keys.CustomerKey


Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: How to export region keys in json file

2017-08-17 Thread Dinesh Akhand
Hi I tried below,

gfsh>query --query='select e.key from /CUSTOMER_1.entrySet e'

Result : true
startCount : 0
endCount   : 20
Rows   : 7

   name| customerID | cycleCode | customerGroup | 
partitionID
-- | -- | - | - | 
---
amdocs.imdg.model.keys.CustomerKey | 1592   | 1 | 30006 | 
300062


but when I ran

gfsh>remove --region=/AsyncEventQueue_PWInfoQueue_PARALLEL_GATEWAY_SENDER_QUEUE 
--key={\"customerID\":1592,\"customerGroup\":30006,\"cycleCode\":1,\"partitionID\":300062}
 --key-class=amdocs.imdg.model.keys.CustomerKey
Result: false
Message   : Key is not present in the region
Key Class : java.lang.String
Key   : 
{\"customerID\":1592,\"customerGroup\":30006,\"cycleCode\":1,\"partitionID\":300062}
 --key-class=amdocs.imdg.model.keys.CustomerKey

Showing error key not exist.

We have customerID=LONG type
cycleCode = short
customerGroup = int
partitionID =int

Can you please suggest.

Thanks,
Dinesh Akhand


From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Thursday, August 17, 2017 4:18 AM
To: dev@geode.apache.org
Subject: Re: How to export region keys in json file

There isn't anything built in to export keys as JSON. There was some talk about 
exporting values as JSON at one time, but that hasn't been done.

I attached a function to dump the keys as JSON. It just logs them to the 
terminal, but it can easily be changed to write them to a file.

It dumps output like:

Region data contains the following 34 keys:

{"customerID":"28","customerGroup":"group-28","cycleCode":"cycleCode-28","partitionID":28}

{"customerID":"21","customerGroup":"group-21","cycleCode":"cycleCode-21","partitionID":21}

{"customerID":"68","customerGroup":"group-68","cycleCode":"cycleCode-68","partitionID":68}

{"customerID":"81","customerGroup":"group-81","cycleCode":"cycleCode-81","partitionID":81}

{"customerID":"35","customerGroup":"group-35","cycleCode":"cycleCode-35","partitionID":35}

{"customerID":"90","customerGroup":"group-90","cycleCode":"cycleCode-90","partitionID":90}

{"customerID":"15","customerGroup":"group-15","cycleCode":"cycleCode-15","partitionID":15}

{"customerID":"44","customerGroup":"group-44","cycleCode":"cycleCode-44","partitionID":44}


Thanks,
Barry Oglesby


On Wed, Aug 16, 2017 at 4:35 AM, Dinesh Akhand 
<dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:
Hi,

How I can export Region keys in json file.

It will help full for us to use get command or remove command for particular 
key when we have the composite keys defined.

get --region=/CUSTOMER_1 
--key=({'customerID':'1593','customerGroup':'30013','cycleCode':'1','partitionID':'300133'})
 --key-class=amdocs.imdg.model.keys.CustomerKey
Message : Error in converting JSON Couldn't convert JSON to Object of type 
class amdocs.imdg.model.keys.CustomerKey


Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


How to export region keys in json file

2017-08-16 Thread Dinesh Akhand
Hi,

How I can export Region keys in json file.

It will help full for us to use get command or remove command for particular 
key when we have the composite keys defined.

get --region=/CUSTOMER_1 
--key=({'customerID':'1593','customerGroup':'30013','cycleCode':'1','partitionID':'300133'})
 --key-class=amdocs.imdg.model.keys.CustomerKey
Message : Error in converting JSON Couldn't convert JSON to Object of type 
class amdocs.imdg.model.keys.CustomerKey


Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: Need to know complete execution time for geode-core Junit tests

2017-08-08 Thread Dinesh Akhand
Thanks Darrel It works on Linux.
But there I see another failure:

:geode-core:distributedTest

org.apache.geode.internal.cache.FixedPRSinglehopDUnitTest > 
testMetadataInClientWithFixedPartitions FAILED
java.lang.AssertionError: bucket 3 was incorrect expected:<20189> but 
was:<29785>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at 
org.apache.geode.internal.cache.FixedPRSinglehopDUnitTest.testMetadataInClientWithFixedPartitions(FixedPRSinglehopDUnitTest.java:352)

Which all test are part of Geode CI .  only Junit ? or Integration ? 
distributedTest?

Thanks,
Dinesh Akhand

-Original Message-
From: Darrel Schneider [mailto:dschnei...@pivotal.io] 
Sent: Monday, August 7, 2017 9:59 PM
To: dev@geode.apache.org
Subject: Re: Need to know complete execution time for geode-core Junit tests

For test004StartServerFailsFastOnMissingGemFirePropertiesFile I think this test 
just needs to be improved for Windows.
The test has an assertion that the failure message contains a certain string. 
On Windows the message contains "C:" and "\" which the test does not expect. 
Instead of the test treating "cacheXmlPathName" as a constant I think it should 
create an instance of File using cacheXmlPathName and then make sure the 
message contains the result of calling getAbsolutePath on that File.


On Sun, Aug 6, 2017 at 11:54 PM, Dinesh Akhand <dines...@amdocs.com> wrote:

> Hi Team,
>
> When we are running test on windows : we are getting below error We 
> ran : gradlew precheckin
>
>
> rg.apache.geode.management.internal.cli.commands.
> LauncherLifecycleCommandsDUnitTest > 
> test003StartServerFailsFastOnMissingCacheXmlFile
> FAILED
> java.lang.AssertionError:
> Warning: The Geode cache XML file C:\path\to\missing\cache.xml 
> could not be found.
>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.apache.geode.management.internal.cli.commands.
> LauncherLifecycleCommandsDUnitTest.test003StartServerFailsFastOnM
> issingCacheXmlFile(LauncherLifecycleCommandsDUnitTest.java:502)
>
> org.apache.geode.management.internal.cli.commands.
> LauncherLifecycleCommandsDUnitTest > 
> test004StartServerFailsFastOnMissingGemFirePropertiesFile
> FAILED
> java.lang.AssertionError:
> Warning: The Geode properties file 
> C:\path\to\missing\gemfire.properties
> could not be found.
>
> at org.junit.Assert.fail(Assert.java:88)
>     at org.junit.Assert.assertTrue(Assert.java:41)
> at
>
> Is there any path we need to set in windows to make it run.
>
> Thanks,
> Dinesh Akhand
>
>
>
>
>
>
>
>
>
>
>
> 
> ---
> Found suspect string in log4j at line 546
>
> -Original Message-
> From: Dan Smith [mailto:dsm...@pivotal.io]
> Sent: Tuesday, July 25, 2017 9:59 PM
> To: dev@geode.apache.org
> Subject: Re: Need to know complete execution time for geode-core Junit 
> tests
>
> What target are you running? It's a bit confusing because there are 
> actually 3 different sets of tests. These times a really rough because 
> I don't have a good run in front of me, but this should give you an idea.
>
> "True" unit tests, runs in 1-2 minutes like Jens Said:
> ./gradlew geode-core:test
>
> Single VM integration tests - runs in maybe 1.5 hours:
> ./gradlew geode-core:integrationTest
>
> Multiple VM integration tests - runs in maybe 5 hours?
> .gradlew geode-core:distributedTest
>
> Run all of the tests
> ./gradlew geode-core:precheckin
>
> -Dan
>
> On Tue, Jul 25, 2017 at 8:34 AM, Anthony Baker <aba...@pivotal.io> wrote:
>
> > You might want to get a few thread dumps to see if there is a hung test.
> > Also, make sure you have sufficient RAM.
> >
> > Anthony
> >
> > > On Jul 25, 2017, at 1:13 AM, Dinesh Akhand <dines...@amdocs.com>
> wrote:
> > >
> > > Hi Team,
> > >
> > > I trigger the geode-core Junit tests . it keeping running from 
> > > last
> > > 3
> > hour.
> > > Can you please let me know how much time it take completion of 
> > > Junit
> > test in Geode-core.
> > > I am using geode 1.1.1
> > >
> > >
> > > Thanks,
> > > Dinesh Akhand
> > > This message and the information contained herein is proprietary 
> > > and
> > confidential and subject to the Amdocs policy statement,
> > >
> > > you may review at https

RE: Need to know complete execution time for geode-core Junit tests

2017-08-07 Thread Dinesh Akhand
Hi Team,

When we run :
./gradlew integrationTest
./gradlew distributedTest 

Many test are getting failed with head allocation error or configuration error.
Can you please suggest , what extra configuration we need to do .

I am able to run Junit correctly.
unit tests - run with ./gradlew test  // this works properly.

I have i5 , 8GB laptop RAM. 

Thanks,
Dinesh Akhand

-Original Message-
From: Dinesh Akhand 
Sent: Monday, August 7, 2017 12:24 PM
To: dev@geode.apache.org
Subject: RE: Need to know complete execution time for geode-core Junit tests

Hi Team,

When we are running test on windows : we are getting below error We ran : 
gradlew precheckin


rg.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest
 > test003StartServerFailsFastOnMissingCacheXmlFile FAILED
java.lang.AssertionError:
Warning: The Geode cache XML file C:\path\to\missing\cache.xml could not be 
found.

at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at 
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest.test003StartServerFailsFastOnMissingCacheXmlFile(LauncherLifecycleCommandsDUnitTest.java:502)

org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest
 > test004StartServerFailsFastOnMissingGemFirePropertiesFile FAILED
java.lang.AssertionError:
Warning: The Geode properties file C:\path\to\missing\gemfire.properties 
could not be found.

at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at 

Is there any path we need to set in windows to make it run.

Thanks,
Dinesh Akhand











---
Found suspect string in log4j at line 546

-Original Message-
From: Dan Smith [mailto:dsm...@pivotal.io] 
Sent: Tuesday, July 25, 2017 9:59 PM
To: dev@geode.apache.org
Subject: Re: Need to know complete execution time for geode-core Junit tests

What target are you running? It's a bit confusing because there are actually 3 
different sets of tests. These times a really rough because I don't have a good 
run in front of me, but this should give you an idea.

"True" unit tests, runs in 1-2 minutes like Jens Said:
./gradlew geode-core:test

Single VM integration tests - runs in maybe 1.5 hours:
./gradlew geode-core:integrationTest

Multiple VM integration tests - runs in maybe 5 hours?
.gradlew geode-core:distributedTest

Run all of the tests
./gradlew geode-core:precheckin

-Dan

On Tue, Jul 25, 2017 at 8:34 AM, Anthony Baker <aba...@pivotal.io> wrote:

> You might want to get a few thread dumps to see if there is a hung test.
> Also, make sure you have sufficient RAM.
>
> Anthony
>
> > On Jul 25, 2017, at 1:13 AM, Dinesh Akhand <dines...@amdocs.com> wrote:
> >
> > Hi Team,
> >
> > I trigger the geode-core Junit tests . it keeping running from last 
> > 3
> hour.
> > Can you please let me know how much time it take completion of Junit
> test in Geode-core.
> > I am using geode 1.1.1
> >
> >
> > Thanks,
> > Dinesh Akhand
> > This message and the information contained herein is proprietary and
> confidential and subject to the Amdocs policy statement,
> >
> > you may review at https://www.amdocs.com/about/email-disclaimer <
> https://www.amdocs.com/about/email-disclaimer>
>
>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: Need to know complete execution time for geode-core Junit tests

2017-08-07 Thread Dinesh Akhand
Hi Team,

When we are running test on windows : we are getting below error 
We ran : gradlew precheckin


rg.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest
 > test003StartServerFailsFastOnMissingCacheXmlFile FAILED
java.lang.AssertionError:
Warning: The Geode cache XML file C:\path\to\missing\cache.xml could not be 
found.

at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at 
org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest.test003StartServerFailsFastOnMissingCacheXmlFile(LauncherLifecycleCommandsDUnitTest.java:502)

org.apache.geode.management.internal.cli.commands.LauncherLifecycleCommandsDUnitTest
 > test004StartServerFailsFastOnMissingGemFirePropertiesFile FAILED
java.lang.AssertionError:
Warning: The Geode properties file C:\path\to\missing\gemfire.properties 
could not be found.

at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at 

Is there any path we need to set in windows to make it run.

Thanks,
Dinesh Akhand











---
Found suspect string in log4j at line 546

-Original Message-
From: Dan Smith [mailto:dsm...@pivotal.io] 
Sent: Tuesday, July 25, 2017 9:59 PM
To: dev@geode.apache.org
Subject: Re: Need to know complete execution time for geode-core Junit tests

What target are you running? It's a bit confusing because there are actually 3 
different sets of tests. These times a really rough because I don't have a good 
run in front of me, but this should give you an idea.

"True" unit tests, runs in 1-2 minutes like Jens Said:
./gradlew geode-core:test

Single VM integration tests - runs in maybe 1.5 hours:
./gradlew geode-core:integrationTest

Multiple VM integration tests - runs in maybe 5 hours?
.gradlew geode-core:distributedTest

Run all of the tests
./gradlew geode-core:precheckin

-Dan

On Tue, Jul 25, 2017 at 8:34 AM, Anthony Baker <aba...@pivotal.io> wrote:

> You might want to get a few thread dumps to see if there is a hung test.
> Also, make sure you have sufficient RAM.
>
> Anthony
>
> > On Jul 25, 2017, at 1:13 AM, Dinesh Akhand <dines...@amdocs.com> wrote:
> >
> > Hi Team,
> >
> > I trigger the geode-core Junit tests . it keeping running from last 
> > 3
> hour.
> > Can you please let me know how much time it take completion of Junit
> test in Geode-core.
> > I am using geode 1.1.1
> >
> >
> > Thanks,
> > Dinesh Akhand
> > This message and the information contained herein is proprietary and
> confidential and subject to the Amdocs policy statement,
> >
> > you may review at https://www.amdocs.com/about/email-disclaimer <
> https://www.amdocs.com/about/email-disclaimer>
>
>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


Need to know complete execution time for geode-core Junit tests

2017-07-25 Thread Dinesh Akhand
Hi Team,

I trigger the geode-core Junit tests . it keeping running from last 3 hour.
Can you please let me know how much time it take completion of Junit test in 
Geode-core.
I am using geode 1.1.1


Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


Need to enable authentication in Locator JMX

2017-07-14 Thread Dinesh Akhand
Hi Team,

I need to enable the JMX authentication in geode for clients like pulse . could 
you please suggest what is correct procedure.

I did the below things:
JMX is enabled:

jmx-manager-start=true
jmx-manager=true

Add entry
Locator.properties:

jmx-manager-password-file=/users/xpiwrk1/GemFire/Server/properties/jmxremote.password
 // permission is 400
jmx-manager-access-file=/users/xpiwrk1/GemFire/Server/properties/jmxremote.access


cat jmxremote.access
admin readwrite


cat jmxremote.password
admin admin

I am getting below exception in one of JVM:

Exception in thread "main" java.lang.StackOverflowError
   at java.security.AccessController.doPrivileged(Native Method)
   at 
sun.rmi.transport.tcp.TCPEndpoint.getHostnameProperty(TCPEndpoint.java:97)
   at 
sun.rmi.transport.tcp.TCPEndpoint.resampleLocalHost(TCPEndpoint.java:256)
   at 
sun.rmi.transport.tcp.TCPEndpoint.getLocalEndpoint(TCPEndpoint.java:201)
   at 
sun.rmi.transport.tcp.TCPEndpoint.getOutboundTransport(TCPEndpoint.java:368)
   at 
sun.rmi.transport.tcp.TCPEndpoint.getChannel(TCPEndpoint.java:418)
   at sun.rmi.transport.LiveRef.getChannel(LiveRef.java:152)
   at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
   at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
   at 
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
   at 
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:205)
   at javax.naming.InitialContext.lookup(InitialContext.java:417)
   at 
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1955)
   at 
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1922)
   at 
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
   at 
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
   at 
org.apache.geode.management.internal.cli.shell.JmxOperationInvoker.(JmxOperationInvoker.java:149)
   at 
org.apache.geode.management.internal.cli.commands.ShellCommands.jmxConnect(ShellCommands.java:347)
   at 
org.apache.geode.management.internal.cli.commands.ShellCommands.jmxConnect(ShellCommands.java:372)

Please suggest.

After that I want to enable 
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder for password 
encoding & decoding in JMX . please guide.

Thanks,
Dinesh Akhand

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: Query for JMX "Async Event Queue properties"

2017-07-14 Thread Dinesh Akhand
Thanks Barry,

It solved the problem .

if (bean == null) {//try with function because internal region does't have 
bean
  Set matchedMembers = new HashSet();
  matchedMembers = CliUtil.getMembersForeRegionViaFunction(cache, region, 
true);
  return matchedMembers;
}

Can we publish this fix over open community.

Thanks,
Dinesh Akhand

-Original Message-
From: Barry Oglesby [mailto:bogle...@pivotal.io] 
Sent: Monday, July 10, 2017 11:58 PM
To: dev@geode.apache.org
Subject: Re: Query for JMX "Async Event Queue properties"

Dinesh,

The getRegionAssociatedMembers method looks like it could be improved.

It currently does this:

- gets the distributed MBean for the region
- if one doesn't exist it returns null
- if one does exist, it gets the members for that bean (which are the members 
with that region)
- if there are none, it tries to get the members using a function
- returns the members

Instead of returning null if the MBean can't be found, it could try using the 
function.

I made a hack fix to do that and the query worked:

Cluster-1 gfsh>query --query="select * from 
/AsyncEventQueue_db_PARALLEL_GATEWAY_SENDER_QUEUE"

Result : true
startCount : 0
endCount   : 20
Rows   : 1

DSFID | action | bucketId | callbackArgument | creationTime  |
deserializedValue |   enumListenerEvent
   | eventId |
 eventSequenceID   | initialized | key | keyToConflate |
numberOfParts |operation | possibleDuplicate |
 rawValue  | region | regionPath | regionToConflate |
  senderCallbackArgument |  serializedValue   |
serializedValueNotAvailable | serializedValueSize | shadowKey | sizeInBytes
| substituteValue | value
 | valueIsObject | valueToConflate | versionTimeStamp
- | -- |  |  | - |
- |
-- |
--- |
-- | --- | --- |
- | - |  |
- | -- | -- | -- |
 |
-- |
-- | --- | --- |
- | --- | --- |
-- | - |
--- | 
-134  | 0  | 0| null | 1499708631487 | 0
  | org.apache.geode.internal.cache.EnumListenerEvent.AFTER_CREATE | 
org.apache.geode.internal.cache.EventID |
org.apache.geode.cache.wan.EventSequenceID | true| 0   | 0
| 9 | org.apache.geode.cache.Operation | false
| org.json.JSONArray | null   | /data  | /data|
org.apache.geode.internal.cache.wan.GatewaySenderEventCallbackArgument |
org.json.JSONArray | false   | 17  |
113   | 365 | null|
org.apache.geode.internal.cache.VMCachedDeserializable | 1 | 0
  | 1499708631486

You could write your own function to do the same thing.

I tried that and got:

Cluster-1 gfsh>execute function --id=QueryAsyncEventQueueRegionFunction
--result-collector=QueryAsyncEventQueueRegionFunctionResultCollector
Execution summary

  Member ID/Name| Function Execution Result
--- |
--
server1(40603):1027 |
SenderEventImpl[id=EventIDid=25bytes;threadID=0x1|1;sequenceID=0;bucketId=0];action=0;operation=CREATE;region=/data;key=0;value=0;valueIsObject=1;numberOfParts=9;callbackArgument=GatewaySenderEventCallbackArgumen..


Thanks,
Barry Oglesby


On Fri, Jun 16, 2017 at 5:38 AM, Dinesh Akhand <dines...@amdocs.com> wrote:

> Hi Team
>
> Regarding the following metrics:
>
> /AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE:PartitionedRegionStats.
> dataStoreEntryCount
> /AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE:PartitionedRegionStats.
> dataStoreBytesInUse
>
>
> I found only count for async queue in JMX , it called here 
> EventQueueSize = PartitionedRegionStats.dataStoreEntryCount
>
> /** AsyncEventQueue Stats **/
>   public static final String ASYNCEVENTQUEUE_EVENTS_QUEUE_SIZE = 
> "eventQueueSize"
>
> we having Missing  PartitionedRegionStats.dataStoreBytesInUse in JMX 
> for Async Qeueue.
>
> Can you help me , which property I need to map for it.
>
> Thanks,
> Dinesh Akhand
>
>
> This message and the information contained herein is proprieta

RE: need information about SerialGatewaySenderQueue/ParallelGatewaySenderQueue Clear

2017-07-14 Thread Dinesh Akhand
Hi Team,



Please reply . why we don't have implementation of clear method in  
ParallelGatewaySenderQueue/ SerialGatewaySenderQueue in geode. Requirement: we 
want to clear the queue data.



I have implement below method in our code.

--

Class ParallelGatewaySenderQueue.java



//clear the partition region

private void clearPartitionedRegion(PartitionedRegion partitionedRegion)

{

LocalDataSet lds = 
(LocalDataSet)PartitionRegionHelper.getLocalPrimaryData(partitionedRegion);

Setset = lds.getBucketSet(); // this returns 
bucket ids in the function context



for (Integer bucketId : set) {

Bucket bucket = 
partitionedRegion.getRegionAdvisor().getBucket(bucketId);

if (bucket instanceof ProxyBucketRegion 
== false) {

if (bucket 
instanceof BucketRegion) {


BucketRegion bucketRegion = (BucketRegion) bucket;


Set keySet = bucketRegion.keySet();


for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {


Object key = iterator.next();


bucketRegion.remove(key);


}

}

}

}

}

-

Class : SerialGatewaySenderQueue.java

 @Override

  public void clearQueue() {



this.sender.getLifeCycleLock().readLock().lock();

Set keys = this.region.keys();

for (Long key : keys) {

  this.region.remove(key);

}

this.sender.getLifeCycleLock().readLock().unlock();



  }

-



Any comment in above code will welcome.





Thanks,

Dinesh Akhand



-Original Message-
From: Dinesh Akhand
Sent: Monday, May 15, 2017 2:39 PM
To: dev@geode.apache.org
Subject: need information about RegionQueue





Hi Team,



Why we do't have support to clear complete queue.  Is there any limitation for 
it?.



public void clear(PartitionedRegion pr, int bucketId) {

   throw new RuntimeException("This method(clear)is not supported by 
ParallelGatewaySenderQueue");

  }



Class : ParallelGatewaySenderQueue

Class : SerialGatewaySenderQueue



Thanks,

Dinesh Akhand



This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,



you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: want to encrypt default username/password in properties files or xml with default encrypted values.

2017-07-11 Thread Dinesh Akhand
Hi Below is the example using it ,We are able to encrypt password for pulse. 
Change the entry as per below





   

   

  

 

 



   




 

  

   





But not able to find a standard way to encrypt pulse.jmxUserPassword.



If anyone know it kindly share it.



Thanks,

Dinesh Akhand





-Original Message-
From: Jinmei Liao [mailto:jil...@pivotal.io]
Sent: Wednesday, June 28, 2017 9:18 PM
To: dev@geode.apache.org
Subject: Re: want to encrypt default username/password in properties files or 
xml with default encrypted values.



Hi, if you are using the Geode1.1, Pulse uses the integrated security from your 
cluster now instead of having to resort to its own security. So the admin/admin 
username/password is only used when your cluster is not secured. If your 
cluster has a security manager, when logging into Pulse, you should use 
whatever username/password that can be authenticated by that security manager.



On Wed, Jun 28, 2017 at 1:27 AM, Dinesh Akhand 
<dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:



> Hi team,

>

>

> Is there any way to encrypted default username/password  in

> pulse.properties:

>

> # JMX User Properties

> pulse.jmxUserName=admin

> pulse.jmxUserPassword=admin

>

> spring-security.xml:

>

> 

> 

> 

> 

> 

> 

>   authorities="ROLE_CLUSTER:READ,ROLE_DATA:READ"/>

> 

> 

>  I want to set default

> username/password to be in encrypted from in above file.

> Please suggest.

>

> Thanks,

> Dinesh Akhand

>

>

> -Original Message-

> From: Dinesh Akhand

> Sent: Tuesday, June 27, 2017 12:34 PM

> To: dev@geode.apache.org<mailto:dev@geode.apache.org>

> Subject: want to encrypt default username/password in properties files

> or xml with default encrypted values.

>

> Hi Team,

>

> Default user name /password are defined in spring-security.xml  and

> pulse.properties file.

> As below.

>

> ./geode/locator0/GemFire_anmuser/services/http/0.0.0.0_

> 20248_pulse/webapp/WEB-INF/spring-security.xml:

>  ./geode/locator0/GemFire_anmuser/services/http/0.0.0.0_

> 20248_pulse/webapp/WEB-INF/classes/pulse.properties:

> pulse.jmxUserPassword=admin

>

> What is the correct way to set the default encrypted username/password

> in these config files.

>

> Please suggest.

>

> Thanks,

> Dinesh Akhand

> This message and the information contained herein is proprietary and

> confidential and subject to the Amdocs policy statement,

>

> you may review at https://www.amdocs.com/about/email-disclaimer <

> https://www.amdocs.com/about/email-disclaimer>

> This message and the information contained herein is proprietary and

> confidential and subject to the Amdocs policy statement,

>

> you may review at https://www.amdocs.com/about/email-disclaimer <

> https://www.amdocs.com/about/email-disclaimer>

>

>





--

Cheers



Jinmei
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: Query for JMX "Async Event Queue properties"

2017-07-09 Thread Dinesh Akhand
Please suggest on below question.

Thanks,
Dinesh

-Original Message-
From: Dinesh Akhand 
Sent: Friday, July 7, 2017 6:30 PM
To: dev@geode.apache.org; bogle...@pivotal.io
Subject: RE: Query for JMX "Async Event Queue properties"

Hi Team,



I tried to execute select sql  on  Internal region associated the Async Queue 
using command “gfsh>query --query=’select * from 
/AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE’

But in geode 1.1.1



There is a validation check in below method .   we always try to find out the 
Bean associated with it.   But for internal region we don’t have bean . Can 
someone suggest how I can skip this check.



Could  you please  suggest more generic check here , so we can make query on 
internal regions.





Classs:



   management/internal/cli/commands/DataCommands.java



method:

--

public static Set getRegionAssociatedMembers(String region,

  final InternalCache cache, boolean returnAll) {



DistributedMember member;



if (StringUtils.isEmpty(region)) {

  return null;

}



DistributedRegionMXBean bean =


ManagementService.getManagementService(cache).getDistributedRegionMXBean(region);



if (bean == null) {

  // try with slash ahead

  bean = ManagementService.getManagementService(cache)

  .getDistributedRegionMXBean(Region.SEPARATOR + region);

}



if (bean == null) {

  return null;

}



---



Thanks,

Dinesh Akhand































-Original Message-
From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Thursday, June 22, 2017 12:04 AM
To: dev@geode.apache.org
Subject: Re: Query for JMX "Async Event Queue properties"



I don't see that OR clause on Geode develop. What version of Geode are you 
using?



In any event, the JMX MBeans are registered using a ResourceEventsListener 
called ManagementListener. That listener is invoked by handleResourceEvent 
calls in GemFireCacheImpl for a bunch of different events including region 
creation. There isn't any other property that could be set to create the MBean 
for that region.



Rather than test the region name in that OR clause, a slightly better way to 
implement that would be:



if (!region.isInternalRegion()

|| region.isUsedForParallelGatewaySenderQueue()

|| region.isUsedForSerialGatewaySenderQueue()) {





btw - the MBean should be removed if the region is destroyed. The LocalRegion 
recursiveDestroyRegion and basicDestroyRegion methods contain code like this 
that should also be modified like above:



if (!region.isInternalRegion()) {

InternalDistributedSystem system =

region.cache.getInternalDistributedSystem();

system.handleResourceEvent(ResourceEvent.REGION_REMOVE, region); }





Thanks,

Barry Oglesby





On Tue, Jun 20, 2017 at 6:33 AM, Dinesh Akhand 
<dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:



> Hi Barry,

>

>

>

> Looks like things are already implemented in geode:

>

>

>

> Class : GemFireCacheImpl

>

>

>

> if (!rgn.isInternalRegion() ||

> rgn.getFullPath().contains("GATEWAY_SENDER_QUEUE"))

> {

>

>   system.handleResourceEvent(ResourceEvent.REGION_CREATE, rgn);

>

> }

>

>

>

> Above code solved my problem .  Async Queue Partition region visible

> in JMX.

>

>

>

> But above code looks like hack in existing code.  Is this fix can we

> take and go ahead because in our requirement we need to show all

> internal partition region.

>

>

>

> Or can we define some property in .properties files to enable stats in

> jmx for internal region?.

>

>

>

> Thanks,

>

> Dinesh Akhand

>

>

>

>

>

> -Original Message-

> From: Barry Oglesby [mailto:bogle...@pivotal.io]

> Sent: Saturday, June 17, 2017 2:14 AM

> To: dev@geode.apache.org<mailto:dev@geode.apache.org>

> Subject: Re: Query for JMX "Async Event Queue properties"

>

>

>

> The AsynceEventQueueMBean is monitoring the AsyncEventQueueStats not

> the PartitionedRegionStats. And, actually, the only stat being

> monitored by that MBean is the eventQueueSize stat. The parallel

> AsyncEventQueue creates a colocated PartitionedRegion under the

> covers, and the stats for that PR are the PartitionedRegionStats you

> referenced. There isn't currently any JMX support for those 
> PartitionedRegionStats.

>

>

>

> Are you looking to add support for those PartitionedRegionStats to the

> AsynceEventQueueMBean? If so, I guess there are a few ways to do. The

> first would be to find the underlying PartitionedRegion for the

> parallel AsyncEventQueue, add its Pa

RE: Query for JMX "Async Event Queue properties"

2017-07-07 Thread Dinesh Akhand
Hi Team,



I tried to execute select sql  on  Internal region associated the Async Queue 
using command “gfsh>query --query=’select * from 
/AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE’

But in geode 1.1.1



There is a validation check in below method .   we always try to find out the 
Bean associated with it.   But for internal region we don’t have bean . Can 
someone suggest how I can skip this check.



Could  you please  suggest more generic check here , so we can make query on 
internal regions.





Classs:



   management/internal/cli/commands/DataCommands.java



method:

--

public static Set getRegionAssociatedMembers(String region,

  final InternalCache cache, boolean returnAll) {



DistributedMember member;



if (StringUtils.isEmpty(region)) {

  return null;

}



DistributedRegionMXBean bean =


ManagementService.getManagementService(cache).getDistributedRegionMXBean(region);



if (bean == null) {

  // try with slash ahead

  bean = ManagementService.getManagementService(cache)

  .getDistributedRegionMXBean(Region.SEPARATOR + region);

}



if (bean == null) {

  return null;

}



---



Thanks,

Dinesh Akhand































-Original Message-
From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Thursday, June 22, 2017 12:04 AM
To: dev@geode.apache.org
Subject: Re: Query for JMX "Async Event Queue properties"



I don't see that OR clause on Geode develop. What version of Geode are you 
using?



In any event, the JMX MBeans are registered using a ResourceEventsListener 
called ManagementListener. That listener is invoked by handleResourceEvent 
calls in GemFireCacheImpl for a bunch of different events including region 
creation. There isn't any other property that could be set to create the MBean 
for that region.



Rather than test the region name in that OR clause, a slightly better way to 
implement that would be:



if (!region.isInternalRegion()

|| region.isUsedForParallelGatewaySenderQueue()

|| region.isUsedForSerialGatewaySenderQueue()) {





btw - the MBean should be removed if the region is destroyed. The LocalRegion 
recursiveDestroyRegion and basicDestroyRegion methods contain code like this 
that should also be modified like above:



if (!region.isInternalRegion()) {

InternalDistributedSystem system =

region.cache.getInternalDistributedSystem();

system.handleResourceEvent(ResourceEvent.REGION_REMOVE, region); }





Thanks,

Barry Oglesby





On Tue, Jun 20, 2017 at 6:33 AM, Dinesh Akhand 
<dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:



> Hi Barry,

>

>

>

> Looks like things are already implemented in geode:

>

>

>

> Class : GemFireCacheImpl

>

>

>

> if (!rgn.isInternalRegion() ||

> rgn.getFullPath().contains("GATEWAY_SENDER_QUEUE"))

> {

>

>   system.handleResourceEvent(ResourceEvent.REGION_CREATE, rgn);

>

> }

>

>

>

> Above code solved my problem .  Async Queue Partition region visible

> in JMX.

>

>

>

> But above code looks like hack in existing code.  Is this fix can we

> take and go ahead because in our requirement we need to show all

> internal partition region.

>

>

>

> Or can we define some property in .properties files to enable stats in

> jmx for internal region?.

>

>

>

> Thanks,

>

> Dinesh Akhand

>

>

>

>

>

> -Original Message-

> From: Barry Oglesby [mailto:bogle...@pivotal.io]

> Sent: Saturday, June 17, 2017 2:14 AM

> To: dev@geode.apache.org<mailto:dev@geode.apache.org>

> Subject: Re: Query for JMX "Async Event Queue properties"

>

>

>

> The AsynceEventQueueMBean is monitoring the AsyncEventQueueStats not

> the PartitionedRegionStats. And, actually, the only stat being

> monitored by that MBean is the eventQueueSize stat. The parallel

> AsyncEventQueue creates a colocated PartitionedRegion under the

> covers, and the stats for that PR are the PartitionedRegionStats you

> referenced. There isn't currently any JMX support for those 
> PartitionedRegionStats.

>

>

>

> Are you looking to add support for those PartitionedRegionStats to the

> AsynceEventQueueMBean? If so, I guess there are a few ways to do. The

> first would be to find the underlying PartitionedRegion for the

> parallel AsyncEventQueue, add its PartitionedRegionStats to the

> AsyncEventQueueMBeanBridge's monitor and reference the appropriate

> one(s) (in your case dataStoreBytesInUse). Another would be to

> actually create an MBean for that internal PartitionedRegion.

Review Request 60678: GEODE-3151 Configuration Parameter Based Registration Of internal Region over JMX

2017-07-06 Thread dinesh akhand

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60678/
---

Review request for geode and Barry Oglesby.


Bugs: GEODE-3151
https://issues.apache.org/jira/browse/GEODE-3151


Repository: geode


Description
---

I am Adding the Configuration parameter which will have the internal region 
name/function name
which we want to register in JMX.
currently for Internal Region Bean is not getting registered in JMX.
I want to make this as configurable.
If user provided internal region names in configuration[property file ] then
bean should get register in JMX.
Current use: we want to register the async queue associated internal region in 
JMX.
future scope: using same parameter we want to register few functions to JMX.
output : only defined internal regions in property file are going to be show in 
JMX.


Diffs
-

  
geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java
 63f6505101 
  
geode-core/src/main/java/org/apache/geode/distributed/internal/AbstractDistributionConfig.java
 795f6a5a4a 
  
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfig.java
 c2a395de0b 
  
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfigImpl.java
 fbe894c964 
  
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
 6aa602fc8f 
  
geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java 
2dda38c70b 
  geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java 
3b3047ff00 
  geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java 
baad039bf9 
  
geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java
 525f988cd3 
  
geode-core/src/test/java/org/apache/geode/distributed/internal/InternalDistributedSystemJUnitTest.java
 5a191bbd93 


Diff: https://reviews.apache.org/r/60678/diff/1/


Testing
---

Manual testing was done for it.
Added test case for it.


Thanks,

dinesh  akhand



https://issues.apache.org/jira/browse/GEODE-3151

2017-07-05 Thread Dinesh Akhand
Hi  Team,

Please assign GEODE-3151 to me.

Can  anyone please review the pull request.

Thanks,
Dinesh Akhand

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: [GitHub] geode pull request #613: GEODE-3151: Internal Region Registration in JMX as ...

2017-06-29 Thread Dinesh Akhand
Hi Team,

I want to raise the review request for the same. I created the pull request.
Can some one help , How I can raise review request.

Thanks,
Dinesh Akhand

-Original Message-
From: dineshpune2006 [mailto:g...@git.apache.org] 
Sent: Thursday, June 29, 2017 7:41 PM
To: dev@geode.apache.org
Subject: [GitHub] geode pull request #613: GEODE-3151: Internal Region 
Registration in JMX as ...

GitHub user dineshpune2006 opened a pull request:

https://github.com/apache/geode/pull/613

GEODE-3151: Internal Region Registration in JMX as per config parameter

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [X ] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?

- [X ] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?

- [ X] Is your initial contribution a single, squashed commit?

- [X ] Does `gradlew build` run cleanly?

- [ X] Have you written or updated unit tests to verify your changes?

- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and
submit an update to your PR as soon as possible. If you need help, please 
send an
email to dev@geode.apache.org.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dineshpune2006/geode feature/GEODE-3151

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/geode/pull/613.patch

To close this pull request, make a commit to your master/trunk branch with (at 
least) the following in the commit message:

This closes #613


commit 5098e58360c31d3e44954010c4ed7263e60186f3
Author: dineshpune2006 <dineshpune2...@gmail.com>
Date:   2017-06-29T13:40:51Z

GEODE-3151: Internal Region Registration in JMX as per config parameter




---
If your project is set up for it, you can reply to this email and have your 
reply appear on GitHub as well. If your project does not have this feature 
enabled and wishes so, or if the feature is enabled but not working, please 
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with 
INFRA.
---
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: want to encrypt default username/password in properties files or xml with default encrypted values.

2017-06-28 Thread Dinesh Akhand
Hi team,


Is there any way to encrypted default username/password  in 
pulse.properties:

# JMX User Properties
pulse.jmxUserName=admin
pulse.jmxUserPassword=admin

spring-security.xml:










I want to set default username/password to be in encrypted from in above file.
Please suggest.

Thanks,
Dinesh Akhand


-Original Message-
From: Dinesh Akhand 
Sent: Tuesday, June 27, 2017 12:34 PM
To: dev@geode.apache.org
Subject: want to encrypt default username/password in properties files or xml 
with default encrypted values.

Hi Team,

Default user name /password are defined in spring-security.xml  and 
pulse.properties file.
As below.

./geode/locator0/GemFire_anmuser/services/http/0.0.0.0_20248_pulse/webapp/WEB-INF/spring-security.xml:
https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>



want to encrypt default username/password in properties files or xml with default encrypted values.

2017-06-27 Thread Dinesh Akhand
Hi Team,

Default user name /password are defined in spring-security.xml  and 
pulse.properties file.
As below.

./geode/locator0/GemFire_anmuser/services/http/0.0.0.0_20248_pulse/webapp/WEB-INF/spring-security.xml:
https://www.amdocs.com/about/email-disclaimer 



RE: Need information about FunctionStatistics

2017-06-21 Thread Dinesh Akhand
Hi ,



I have registered all function stats to JMX by creating new bean.

But need to know what Is the correct place register this bean.



I did like this :



public void handleFunctionCreation() throws ManagementException {

  Map<String, Function> functionMap =  
FunctionService.getRegisteredFunctions();

  logger.info("akhand :functionMap:"+functionMap.size());

  for(String funid :functionMap.keySet())

 {

Function functionDetail= functionMap.get(funid);

  FunctionStatsMBeanBridge functionStatsMBeanBridge = new 
FunctionStatsMBeanBridge(functionDetail,cacheImpl, service);

  FunctionStatsMXBean functionBean = new 
FunctionStatsMBean(functionStatsMBeanBridge);

  ObjectName senderObjectName = 
MBeanJMXAdapter.getFunctionStatsMBeanName(

  cacheImpl.getDistributedSystem().getDistributedMember(), 
funid);

  ObjectName changedFunctionMBeanName = 
service.registerInternalMBean(functionBean, senderObjectName);



  service.federate(changedFunctionMBeanName, FunctionStatsMXBean.class, 
true);

 }

}



But from where I need to call this method .

Currently I called above method from ManagementListener.java

  case CACHE_SERVER_START:

CacheServer startedServer = (CacheServer) resource;

adapter.handleCacheServerStart(startedServer);

adapter.handleFunctionCreation();

break;



Please suggest.



Thanks,

Dinesh Akhand







-Original Message-----
From: Dinesh Akhand
Sent: Friday, June 9, 2017 6:44 PM
To: dev@geode.apache.org; bogle...@pivotal.io
Subject: RE: Need information about FunctionStatistics



Hi Team,



Problem Solved ,



Function Stats works fine if function is associated with JVM . else it will 
display 0 .



Thanks,

Dinesh Akhand



From: Dinesh Akhand

Sent: Friday, June 9, 2017 4:34 PM

To: dev@geode.apache.org<mailto:dev@geode.apache.org>; 'bogle...@pivotal.io' 
<bogle...@pivotal.io<mailto:bogle...@pivotal.io>>

Subject: RE: Need information about FunctionStatistics





Hi Barry,







Yes , I can see the function statics in VSD  but looks like







All the stats are 0 .  not even for single function stats are correct .







   FunctionExecution, 2265, FunctionServiceStatistics: "2017/06/07 12:11:09.201 
IDT" samples=502



  functionExecutionsCompleted operations/sec: samples=501 min=0 max=0.2 
average=0 stddev=0.01 last=0



  functionExecutionsCompletedProcessingTime nanoseconds/sec: samples=501 min=0 
max=190219.8 average=379.68 stddev=8498.39 last=0



  functionExecutionsRunning operations: samples=502 min=0 max=0 average=0 
stddev=0 last=0



  resultsSentToResultCollector operations/sec: samples=501 min=0 max=0.2 
average=0 stddev=0.01 last=0



  resultsReceived operations/sec: samples=501 min=0 max=0 average=0 stddev=0 
last=0



  functionExecutionCalls operations/sec: samples=501 min=0 max=0.2 average=0 
stddev=0.01 last=0



  functionExecutionsHasResultCompletedProcessingTime nanoseconds/sec: 
samples=501 min=0 max=190219.8 average=379.68 stddev=8498.39 last=0



  functionExecutionsHasResultRunning operations: samples=502 min=0 max=0 
average=0 stddev=0 last=0



  functionExecutionsExceptions operations/sec: samples=501 min=0 max=0 
average=0 stddev=0 last=0







Can you please confirm function stats values are correct in your case.







Thanks,



Dinesh Akhand







-Original Message-

From: Barry Oglesby [mailto:bogle...@pivotal.io]

Sent: Thursday, June 8, 2017 10:38 PM

To: 
dev@geode.apache.org<mailto:dev@geode.apache.org<mailto:dev@geode.apache.org%3cmailto:dev@geode.apache.org>>

Subject: Re: Need information about FunctionStatistics







Dinesh,







The FunctionStatistics and FunctionServiceStatistics look to be displaying 
properly in vsd. Are you not seeing them?







Thanks,



Barry Oglesby











On Thu, Jun 8, 2017 at 9:51 AM, Kirk Lund 
<kl...@apache.org<mailto:kl...@apache.org<mailto:kl...@apache.org%3cmailto:kl...@apache.org>>>
 wrote:







> I think we would probably need to introduce a new



> FunctionServiceMXBean with these stats as attributes or add



> showFunctionMetrics() operation to MemberMXBean.



>



> On Wed, Jun 7, 2017 at 6:32 AM, Dinesh Akhand 
> <dines...@amdocs.com<mailto:dines...@amdocs.com<mailto:dines...@amdocs.com%3cmailto:dines...@amdocs.com>>>
>  wrote:



>



> > Hi Team,



> >



> > Currently I can see Function stats are getting generated .



> > functionExecutionsCompleted operations/sec: samples=1955 min=0 max=0



> > average=0 stddev=0 last=0



> >   functionExecutionsCompletedProcessingTime nanoseconds/sec:



> samples=1955



> > min=0 max=0 average=0 stddev=0 last=0



> >   functionExecutionsRunning operations: samples=1956 min

RE: Query for JMX "Async Event Queue properties"

2017-06-20 Thread Dinesh Akhand
Hi Barry,



Looks like things are already implemented in geode:



Class : GemFireCacheImpl



if (!rgn.isInternalRegion() || 
rgn.getFullPath().contains("GATEWAY_SENDER_QUEUE")) {

  system.handleResourceEvent(ResourceEvent.REGION_CREATE, rgn);

}



Above code solved my problem .  Async Queue Partition region visible in JMX.



But above code looks like hack in existing code.  Is this fix can we take and 
go ahead because in our requirement we need to show all internal partition 
region.



Or can we define some property in .properties files to enable stats in jmx for 
internal region?.



Thanks,

Dinesh Akhand





-Original Message-
From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Saturday, June 17, 2017 2:14 AM
To: dev@geode.apache.org
Subject: Re: Query for JMX "Async Event Queue properties"



The AsynceEventQueueMBean is monitoring the AsyncEventQueueStats not the 
PartitionedRegionStats. And, actually, the only stat being monitored by that 
MBean is the eventQueueSize stat. The parallel AsyncEventQueue creates a 
colocated PartitionedRegion under the covers, and the stats for that PR are the 
PartitionedRegionStats you referenced. There isn't currently any JMX support 
for those PartitionedRegionStats.



Are you looking to add support for those PartitionedRegionStats to the 
AsynceEventQueueMBean? If so, I guess there are a few ways to do. The first 
would be to find the underlying PartitionedRegion for the parallel 
AsyncEventQueue, add its PartitionedRegionStats to the 
AsyncEventQueueMBeanBridge's monitor and reference the appropriate one(s) (in 
your case dataStoreBytesInUse). Another would be to actually create an MBean 
for that internal PartitionedRegion.



Both of these would only be applicable for a parallel AsyncEventQueue.

Serial AsyncEventQueues don't create a PartitionedRegion.





Thanks,

Barry Oglesby





On Fri, Jun 16, 2017 at 5:38 AM, Dinesh Akhand 
<dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:



> Hi Team

>

> Regarding the following metrics:

>

> /AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE:PartitionedRegionStats.

> dataStoreEntryCount

> /AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE:PartitionedRegionStats.

> dataStoreBytesInUse

>

>

> I found only count for async queue in JMX , it called here

> EventQueueSize = PartitionedRegionStats.dataStoreEntryCount

>

> /** AsyncEventQueue Stats **/

>   public static final String ASYNCEVENTQUEUE_EVENTS_QUEUE_SIZE =

> "eventQueueSize"

>

> we having Missing  PartitionedRegionStats.dataStoreBytesInUse in JMX

> for Async Qeueue.

>

> Can you help me , which property I need to map for it.

>

> Thanks,

> Dinesh Akhand

>

>

> This message and the information contained herein is proprietary and

> confidential and subject to the Amdocs policy statement,

>

> you may review at https://www.amdocs.com/about/email-disclaimer <

> https://www.amdocs.com/about/email-disclaimer>

>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


Query for JMX "Async Event Queue properties"

2017-06-16 Thread Dinesh Akhand
Hi Team

Regarding the following metrics:

/AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE:PartitionedRegionStats.dataStoreEntryCount
/AsyncEventQueue_XYZ_PARALLEL_GATEWAY_SENDER_QUEUE:PartitionedRegionStats.dataStoreBytesInUse


I found only count for async queue in JMX , it called here EventQueueSize = 
PartitionedRegionStats.dataStoreEntryCount

/** AsyncEventQueue Stats **/
  public static final String ASYNCEVENTQUEUE_EVENTS_QUEUE_SIZE = 
"eventQueueSize"

we having Missing  PartitionedRegionStats.dataStoreBytesInUse in JMX for Async 
Qeueue.

Can you help me , which property I need to map for it.

Thanks,
Dinesh Akhand


This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: Need information about FunctionStatistics

2017-06-09 Thread Dinesh Akhand
Hi Team,

Problem Solved ,

Function Stats works fine if function is associated with JVM . else it will 
display 0 .

Thanks,
Dinesh Akhand

From: Dinesh Akhand
Sent: Friday, June 9, 2017 4:34 PM
To: dev@geode.apache.org; 'bogle...@pivotal.io' <bogle...@pivotal.io>
Subject: RE: Need information about FunctionStatistics


Hi Barry,



Yes , I can see the function statics in VSD  but looks like



All the stats are 0 .  not even for single function stats are correct .



   FunctionExecution, 2265, FunctionServiceStatistics: "2017/06/07 12:11:09.201 
IDT" samples=502

  functionExecutionsCompleted operations/sec: samples=501 min=0 max=0.2 
average=0 stddev=0.01 last=0

  functionExecutionsCompletedProcessingTime nanoseconds/sec: samples=501 min=0 
max=190219.8 average=379.68 stddev=8498.39 last=0

  functionExecutionsRunning operations: samples=502 min=0 max=0 average=0 
stddev=0 last=0

  resultsSentToResultCollector operations/sec: samples=501 min=0 max=0.2 
average=0 stddev=0.01 last=0

  resultsReceived operations/sec: samples=501 min=0 max=0 average=0 stddev=0 
last=0

  functionExecutionCalls operations/sec: samples=501 min=0 max=0.2 average=0 
stddev=0.01 last=0

  functionExecutionsHasResultCompletedProcessingTime nanoseconds/sec: 
samples=501 min=0 max=190219.8 average=379.68 stddev=8498.39 last=0

  functionExecutionsHasResultRunning operations: samples=502 min=0 max=0 
average=0 stddev=0 last=0

  functionExecutionsExceptions operations/sec: samples=501 min=0 max=0 
average=0 stddev=0 last=0



Can you please confirm function stats values are correct in your case.



Thanks,

Dinesh Akhand



-Original Message-
From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Thursday, June 8, 2017 10:38 PM
To: dev@geode.apache.org<mailto:dev@geode.apache.org>
Subject: Re: Need information about FunctionStatistics



Dinesh,



The FunctionStatistics and FunctionServiceStatistics look to be displaying 
properly in vsd. Are you not seeing them?



Thanks,

Barry Oglesby





On Thu, Jun 8, 2017 at 9:51 AM, Kirk Lund 
<kl...@apache.org<mailto:kl...@apache.org>> wrote:



> I think we would probably need to introduce a new

> FunctionServiceMXBean with these stats as attributes or add

> showFunctionMetrics() operation to MemberMXBean.

>

> On Wed, Jun 7, 2017 at 6:32 AM, Dinesh Akhand 
> <dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:

>

> > Hi Team,

> >

> > Currently I can see Function stats are getting generated .

> > functionExecutionsCompleted operations/sec: samples=1955 min=0 max=0

> > average=0 stddev=0 last=0

> >   functionExecutionsCompletedProcessingTime nanoseconds/sec:

> samples=1955

> > min=0 max=0 average=0 stddev=0 last=0

> >   functionExecutionsRunning operations: samples=1956 min=0 max=0

> average=0

> > stddev=0 last=0

> >   resultsSentToResultCollector operations/sec: samples=1955 min=0

> > max=2.6

> > average=0 stddev=0.1 last=0

> >   resultsReceived operations/sec: samples=1955 min=0 max=2.6

> > average=0

> > stddev=0.1 last=0

> >   functionExecutionCalls operations/sec: samples=1955 min=0 max=0

> > average=0 stddev=0 last=0

> >

> > but I am not able to see them on JMX .

> >

> > I found last end point in  MemberMBeanBridge for JMX.   Is there any

> > information and document can you provide.

> > I want to publish FunctionStatistics on JMX , any suggestion will be

> > welcome.

> >

> >

> > Thanks,

> > Dinesh Akhand

> > This message and the information contained herein is proprietary and

> > confidential and subject to the Amdocs policy statement,

> >

> > you may review at https://www.amdocs.com/about/email-disclaimer <

> > https://www.amdocs.com/about/email-disclaimer>

> >

>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


RE: Need information about FunctionStatistics

2017-06-09 Thread Dinesh Akhand
Hi Barry,



Yes , I can see the function statics in VSD  but looks like



All the stats are 0 .  not even for single function stats are correct .



   FunctionExecution, 2265, FunctionServiceStatistics: "2017/06/07 12:11:09.201 
IDT" samples=502

  functionExecutionsCompleted operations/sec: samples=501 min=0 max=0.2 
average=0 stddev=0.01 last=0

  functionExecutionsCompletedProcessingTime nanoseconds/sec: samples=501 min=0 
max=190219.8 average=379.68 stddev=8498.39 last=0

  functionExecutionsRunning operations: samples=502 min=0 max=0 average=0 
stddev=0 last=0

  resultsSentToResultCollector operations/sec: samples=501 min=0 max=0.2 
average=0 stddev=0.01 last=0

  resultsReceived operations/sec: samples=501 min=0 max=0 average=0 stddev=0 
last=0

  functionExecutionCalls operations/sec: samples=501 min=0 max=0.2 average=0 
stddev=0.01 last=0

  functionExecutionsHasResultCompletedProcessingTime nanoseconds/sec: 
samples=501 min=0 max=190219.8 average=379.68 stddev=8498.39 last=0

  functionExecutionsHasResultRunning operations: samples=502 min=0 max=0 
average=0 stddev=0 last=0

  functionExecutionsExceptions operations/sec: samples=501 min=0 max=0 
average=0 stddev=0 last=0



Can you please confirm function stats values are correct in your case.



Thanks,

Dinesh Akhand



-Original Message-
From: Barry Oglesby [mailto:bogle...@pivotal.io]
Sent: Thursday, June 8, 2017 10:38 PM
To: dev@geode.apache.org
Subject: Re: Need information about FunctionStatistics



Dinesh,



The FunctionStatistics and FunctionServiceStatistics look to be displaying 
properly in vsd. Are you not seeing them?



Thanks,

Barry Oglesby





On Thu, Jun 8, 2017 at 9:51 AM, Kirk Lund 
<kl...@apache.org<mailto:kl...@apache.org>> wrote:



> I think we would probably need to introduce a new

> FunctionServiceMXBean with these stats as attributes or add

> showFunctionMetrics() operation to MemberMXBean.

>

> On Wed, Jun 7, 2017 at 6:32 AM, Dinesh Akhand 
> <dines...@amdocs.com<mailto:dines...@amdocs.com>> wrote:

>

> > Hi Team,

> >

> > Currently I can see Function stats are getting generated .

> > functionExecutionsCompleted operations/sec: samples=1955 min=0 max=0

> > average=0 stddev=0 last=0

> >   functionExecutionsCompletedProcessingTime nanoseconds/sec:

> samples=1955

> > min=0 max=0 average=0 stddev=0 last=0

> >   functionExecutionsRunning operations: samples=1956 min=0 max=0

> average=0

> > stddev=0 last=0

> >   resultsSentToResultCollector operations/sec: samples=1955 min=0

> > max=2.6

> > average=0 stddev=0.1 last=0

> >   resultsReceived operations/sec: samples=1955 min=0 max=2.6

> > average=0

> > stddev=0.1 last=0

> >   functionExecutionCalls operations/sec: samples=1955 min=0 max=0

> > average=0 stddev=0 last=0

> >

> > but I am not able to see them on JMX .

> >

> > I found last end point in  MemberMBeanBridge for JMX.   Is there any

> > information and document can you provide.

> > I want to publish FunctionStatistics on JMX , any suggestion will be

> > welcome.

> >

> >

> > Thanks,

> > Dinesh Akhand

> > This message and the information contained herein is proprietary and

> > confidential and subject to the Amdocs policy statement,

> >

> > you may review at https://www.amdocs.com/about/email-disclaimer <

> > https://www.amdocs.com/about/email-disclaimer>

> >

>
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


Need information about FunctionStatistics

2017-06-07 Thread Dinesh Akhand
Hi Team,

Currently I can see Function stats are getting generated .
functionExecutionsCompleted operations/sec: samples=1955 min=0 max=0 average=0 
stddev=0 last=0
  functionExecutionsCompletedProcessingTime nanoseconds/sec: samples=1955 min=0 
max=0 average=0 stddev=0 last=0
  functionExecutionsRunning operations: samples=1956 min=0 max=0 average=0 
stddev=0 last=0
  resultsSentToResultCollector operations/sec: samples=1955 min=0 max=2.6 
average=0 stddev=0.1 last=0
  resultsReceived operations/sec: samples=1955 min=0 max=2.6 average=0 
stddev=0.1 last=0
  functionExecutionCalls operations/sec: samples=1955 min=0 max=0 average=0 
stddev=0 last=0

but I am not able to see them on JMX .

I found last end point in  MemberMBeanBridge for JMX.   Is there any 
information and document can you provide.
I want to publish FunctionStatistics on JMX , any suggestion will be welcome.


Thanks,
Dinesh Akhand
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>


need information about RegionQueue

2017-05-15 Thread Dinesh Akhand

Hi Team,

Why we do't have support to clear complete queue.  Is there any limitation for 
it?.

public void clear(PartitionedRegion pr, int bucketId) {
   throw new RuntimeException("This method(clear)is not supported by 
ParallelGatewaySenderQueue");
  }

Class : ParallelGatewaySenderQueue
Class : SerialGatewaySenderQueue

Thanks,
Dinesh Akhand

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 
<https://www.amdocs.com/about/email-disclaimer>