public GenericEntityBatchReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException { reader = new GenericEntityStreamReader(serviceName, condition); reader.register(this); }
@Override public long getFirstTimestamp() { return readerAfterPlan.getFirstTimestamp(); } }
@Override public long getLastTimestamp() { long lastTimestamp = 0; for (GenericEntityStreamReader reader : readers) { if (lastTimestamp < reader.getLastTimestamp()) { lastTimestamp = reader.getLastTimestamp(); } } return lastTimestamp; }
private static GenericMetricEntity metricWrapper(Long timestamp, String metricName, double value, Map<String, String> tags) { GenericMetricEntity metricEntity = new GenericMetricEntity(); metricEntity.setTimestamp(timestamp); metricEntity.setTags(tags); metricEntity.setPrefix(metricName); metricEntity.setValue(new double[] {value}); return metricEntity; }
@Override public void readAsStream() throws Exception { reader.register(this); reader.readAsStream(); }
public GenericEntityBatchReader(StreamReader reader) throws InstantiationException, IllegalAccessException { this.reader = reader; reader.register(this); }
@Override public void entityCreated(TaggedLogAPIEntity entity) throws Exception{ synchronized(mutex){ listener.entityCreated(entity); } } }
@Override public long getFirstTimestamp() { return reader.getFirstTimestamp(); } }
@Override public Void call() throws Exception { reader.readAsStream(); return null; } }
public GenericEntityStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException { this.prefix = prefix; checkNotNull(entityDef, "entityDef"); this.entityDef = entityDef; checkNotNull(entityDef, "EntityDefinition"); this.condition = condition; this.readerAfterPlan = selectQueryReader(); }
public GenericEntityScanStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException { this.prefix = prefix; checkNotNull(entityDef, "entityDef"); this.entityDef = entityDef; checkNotNull(entityDef, "EntityDefinition"); this.condition = condition; }
@Override public InternalLog read() throws IOException { if (entityResult == null || entityResult.length == 0 || this.getIndex >= entityResult.length - 1) { return null; } getIndex++; InternalLog t = HBaseInternalLogHelper.parse(ed, entityResult[getIndex], this.qualifiers); return t; } }
public GenericEntityWriter(EntityDefinition entityDef) throws InstantiationException, IllegalAccessException { this.entityDef = entityDef; checkNotNull(entityDef, "serviceName"); }
public GenericEntityBatchReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException{ reader = new GenericEntityStreamReader(serviceName, condition); reader.register(this); }
@Override public long getFirstTimestamp() { return readerAfterPlan.getFirstTimestamp(); } }
@Override public long getFirstTimestamp() { long firstTimestamp = 0; for (GenericEntityStreamReader reader : readers) { if (firstTimestamp > reader.getLastTimestamp() || firstTimestamp == 0) { firstTimestamp = reader.getLastTimestamp(); } } return firstTimestamp; } }
@Override public long getFirstTimestamp() { return reader.getFirstTimestamp(); } }
@Override public Void call() throws Exception{ reader.readAsStream(); return null; } }
public GenericEntityScanStreamReader(EntityDefinition entityDef, SearchCondition condition, String prefix) throws InstantiationException, IllegalAccessException{ this.prefix = prefix; checkNotNull(entityDef, "entityDef"); this.entityDef = entityDef; checkNotNull(entityDef, "EntityDefinition"); this.condition = condition; }
@Override public long getFirstTimestamp() { long firstTimestamp = 0; for (GenericEntityStreamReader reader : readers) { if (firstTimestamp > reader.getLastTimestamp() || firstTimestamp == 0) { firstTimestamp = reader.getLastTimestamp(); } } return firstTimestamp; } }