pcp
[Top] [All Lists]

Re: [pcp] JSON PMDA

To: David Smith <dsmith@xxxxxxxxxx>
Subject: Re: [pcp] JSON PMDA
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 6 May 2015 02:17:06 -0400 (EDT)
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <55493338.3050609@xxxxxxxxxx>
References: <54F9F92D.4010202@xxxxxxxxxx> <552699FE.7040801@xxxxxxxxxx> <2139482617.15593599.1428634701360.JavaMail.zimbra@xxxxxxxxxx> <552D6524.1030803@xxxxxxxxxx> <1237712965.18667183.1429054767135.JavaMail.zimbra@xxxxxxxxxx> <5536C228.8010001@xxxxxxxxxx> <1344441557.4430503.1429658863072.JavaMail.zimbra@xxxxxxxxxx> <55493338.3050609@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: QUYkDq78dkqAyFh5tAovxpCaASGuTg==
Thread-topic: JSON PMDA
Hi David,

----- Original Message -----
> [...]
> OK, here's a quite rough patch that makes the needed changes to cache.c
> (and associated files), and then modifies the JSON PMDA to use indom
> caches for cluster and metric assignments. There are several "FIXME"
> comments scattered throughout the changes, and more code will need to be
> added to pmda.py to make this more user-friendly. But, it does seem to
> work in the limited testing I've done.
> 

Ah excellent, sounds promising.

+
+    if (maximum < 0)
+       return PM_ERR_SIGN;
+    // FIXME: What do we do if there is already something in the cache
+    // with an instance greater than the new maximum?

Possibly return PM_ERR_TOOBIG or PM_ERR_TOOSMALL for this case?

+    // FIXME 2: Does this maximum value need to be saved/restored when
+    // the cache itself is saved/restored? Currently only a few things
+    // from the header are stored.
+    h->maxinst = maximum;

Yep, I believe so - see Ken's note below, third paragraph...
http://www.pcp.io/pipermail/pcp/2015-April/006982.html

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>