@Test public void testAggregateWithOverlappingData() throws Exception { createMockVariationRrds(null); RrdDatabase overlappingDatabase = new RrdDatabase(new RrdDb(m_overlapping, true)); RrdDatabase variationDatabase = new RrdDatabase(new RrdDb(m_variation, true)); List<RrdDatabase> datasources = new ArrayList<RrdDatabase>(); datasources.add(overlappingDatabase); datasources.add(variationDatabase); TimeSeriesDataSource aggregate = new AggregateTimeSeriesDataSource(datasources); final List<String> aggregateDsNames = Arrays.asList(new String[] { "c", "d", "a", "b" }); assertEquals(variationDatabase.getStartTime(), overlappingDatabase.getStartTime()); assertEquals(variationDatabase.getStartTime(), aggregate.getStartTime()); assertEquals(variationDatabase.getEndTime(), overlappingDatabase.getEndTime()); assertEquals(variationDatabase.getEndTime(), aggregate.getEndTime()); assertEquals(aggregateDsNames, aggregate.getDsNames()); assertEquals(1.0933333333333D, aggregate.getDataAt(1297956000).getValue("a"), ACCEPTABLE_DOUBLE_DELTA); assertEquals(1.1966666666666D, aggregate.getDataAt(1297956300).getValue("a"), ACCEPTABLE_DOUBLE_DELTA); assertEquals(1.1000000000000D, aggregate.getDataAt(1297956600).getValue("a"), ACCEPTABLE_DOUBLE_DELTA); assertEquals(1.1033333333333D, aggregate.getDataAt(1297956900).getValue("a"), ACCEPTABLE_DOUBLE_DELTA); }
public List<String> getDsNames(final File rrdFile) throws ConverterException { try { final RrdDb db = new RrdDb(rrdFile.getAbsolutePath(), true); return Arrays.asList(db.getDsNames()); } catch (final Exception e) { LogUtils.debugf(JRobinConverter.class, e, "error reading file %s", rrdFile); throw new ConverterException(e); } }
JRobinConverter { public List<String> getDsNames(final File rrdFile) throws ConverterException { try { final RrdDb db = new RrdDb(rrdFile.getAbsolutePath(), true); return Arrays.asList(db.getDsNames()); } catch (final Exception e) { LogUtils.debugf(JRobinConverter.class, e, "error reading file %s", rrdFile); throw new ConverterException(e); } } }
JRobinConverter { public List<String> getDsNames(final File rrdFile) throws ConverterException { try { final RrdDb db = new RrdDb(rrdFile.getAbsolutePath(), true); return Arrays.asList(db.getDsNames()); } catch (final Exception e) { LogUtils.debugf(JRobinConverter.class, e, "error reading file %s", rrdFile); throw new ConverterException(e); } }  }
JRobinConverter { public List<String> getDsNames(final File rrdFile) throws ConverterException { try { final RrdDb db = new RrdDb(rrdFile.getAbsolutePath(), true); return Arrays.asList(db.getDsNames()); } catch (final Exception e) { LogUtils.debugf(JRobinConverter.class, e, "error reading file %s", rrdFile); throw new ConverterException(e); } }  static void main(final String[] args); void execute(final String[] args); List<File> getMatchingGroupRrds(final File rrdGroupFile); List<String> getDsNames(final File rrdFile); List<String> getRras(final File rrdFile); Map<String, Integer> getDsIndexes(final RrdDb rrd); void consolidateRrdFile(final File groupFile, final File outputFile); List<File> findRrds(final File topDirectory); List<File> findGroupRrds(final File topDirectory); void findRrds(final File directory, final List<File> files); File createTempRrd(final File rrdFile); boolean moveFileSafely(final File in, final File out); }
JRobinConverter { public List<String> getDsNames(final File rrdFile) throws ConverterException { try { final RrdDb db = new RrdDb(rrdFile.getAbsolutePath(), true); return Arrays.asList(db.getDsNames()); } catch (final Exception e) { LogUtils.debugf(JRobinConverter.class, e, "error reading file %s", rrdFile); throw new ConverterException(e); } }  static void main(final String[] args); void execute(final String[] args); List<File> getMatchingGroupRrds(final File rrdGroupFile); List<String> getDsNames(final File rrdFile); List<String> getRras(final File rrdFile); Map<String, Integer> getDsIndexes(final RrdDb rrd); void consolidateRrdFile(final File groupFile, final File outputFile); List<File> findRrds(final File topDirectory); List<File> findGroupRrds(final File topDirectory); void findRrds(final File directory, final List<File> files); File createTempRrd(final File rrdFile); boolean moveFileSafely(final File in, final File out);  }