@Override public FactTable get(int resolution, int ignoredRollTime) { // roll time will be taken from configuration todo: clean this up return dsFactory.getOrCreateFactTable(resolution); } };
private MetricsConsumerMetaTable getMetaTable() { while (metaTable == null) { if (stopping) { LOG.info("We are shutting down, giving up on acquiring consumer metaTable."); break; } try { metaTable = metricDatasetFactory.createConsumerMeta(); } catch (ServiceUnavailableException e) { // No need to log the exception here since this can only happen when the DatasetService is not running. // try in next iteration } catch (Exception e) { LOG.warn("Cannot access consumer metaTable, will retry in 1 sec."); try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); break; } } } return metaTable; }
private MetricsConsumerMetaTable getMetaTable() { while (metaTable == null) { if (stopping) { LOG.info("We are shutting down, giving up on acquiring consumer metaTable."); break; } try { metaTable = metricDatasetFactory.createConsumerMeta(); } catch (ServiceUnavailableException e) { // No need to log the exception here since this can only happen when the DatasetService is not running. // try in next iteration } catch (Exception e) { LOG.warn("Cannot access consumer metaTable, will retry in 1 sec."); try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); break; } } } return metaTable; }
return dsFactory.getOrCreateFactTable(resolution); }; this.cube = Suppliers.memoize(new Supplier<Cube>() {
metricDatasetFactory.getOrCreateFactTable(resolution);