From: xuemei <xue...@gm...> - 2012-07-16 09:23:46
|
Thanks for your reply, I wish you got a good weekend. ---> If you explain your broader goal, rather than the very narrow thing you are trying to do, we can help more. I am trying to describe it in small step to make people understand more easily, I dont believe it is very narrow thing. I wana avoid the gap in the jrb file, and the gap is caused by some late response, can be whatever reason. At least it exists in openNMS when we check the jrb file, lots of period has NaN. What I am trying to do is to fill those gap, I got all the data, but not able to update the file when the timestamp is earlier than last record. I guess it is the store method in the RrdDb.class, would like get some idea of people here. synchronized void store(Sample sample) throws IOException, RrdException { if (closed) { throw new RrdException("RRD already closed, cannot store this sample"); } long newTime = sample.getTime(); long lastTime = header.getLastUpdateTime(); if (lastTime >= newTime) { throw new RrdException("Bad sample timestamp " + newTime + ". Last update time was " + lastTime + ", at least one second step is required"); } double[] newValues = sample.getValues(); for (int i = 0; i < datasources.length; i++) { double newValue = newValues[i]; datasources[i].process(newTime, newValue); } header.setLastUpdateTime(newTime); } But as I said, if the inspector tool could insert value and save successfully, I would like to see at which step I could modidy the rrd tool. By the way, I am a development engineer workinig in Paris, most of my clients are from telecom, and I would like to have some experience for implementing openNMS. Thanks xuemei -- View this message in context: http://opennms.530661.n2.nabble.com/RrdUtils-updateFile-skip-the-timestamp-which-is-expired-tp7580325p7580353.html Sent from the OpenNMS - devel mailing list archive at Nabble.com. |