long hoursSince1970 = timeperiod / 240;
Bucket myBucket = null;
try {
myBucket = riakClient.fetchBucket(accountName + ";" + hoursSince1970).execute();
BasicMetricHour storedMetricHour = myBucket.fetch("" + guiPath, BasicMetricHour.class).execute();
if (storedMetricHour == null) {
storedMetricHour = new BasicMetricHour(guiPath, accountName, hoursSince1970, valueType.toString(), unitType.toString());
}
storedMetricHour.addStatistic(new BasicLiveStatistics(guiPath, accountName, timeperiod, valueDouble, valueType.value(), unitType.value(), count));