RrdDb rrdDb = getRrdDbReference(path);
try {
if (dsNames != null) {
// template specified, check datasource names
for (String dsName : dsNames) {
if (!rrdDb.containsDs(dsName)) {
throw new RrdException("Invalid datasource name: " + dsName);
}
}
}
// parse update strings