/** * it is allowed that user can register their own entity definition * * @param entityDef entity definition * @throws IllegalArgumentException */ public static void registerEntity(EntityDefinition entityDef) { registerEntity(entityDef.getService(), entityDef); }
public static Map<String, EntityDefinition> entities() throws Exception { checkInit(); return entityServiceMap; } }
/** * it is allowed that user can register their own entity * * @param clazz entity class * @throws IllegalArgumentException */ public static void registerEntity(Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException { registerEntity(createEntityDefinition(clazz)); }
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) @Table("eaglejpa") @ColumnFamily("f") @Prefix("jevent") @Service(Constants.MR_JOB_EVENT_SERVICE_NAME) @TimeSeries(true) @Partition({"site"}) public class JobEventAPIEntity extends JobBaseAPIEntity { @Column("a") private String eventType; public String getEventType() { return eventType; } public void setEventType(String eventType) { this.eventType = eventType; pcs.firePropertyChange("eventType", null, null); } }
@BeforeClass public static void setUpOnce() throws Exception { entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class); entityDefinition.setTags(new String[] {"cluster", "datacenter", "random"}); }
private void checkIsTimeSeries(String serviceName) throws Exception { EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName); if (!ed.isTimeSeries()) { throw new IllegalArgumentException("Multi-threading stream reader must be applied to time series table"); } }
public GenericDeleter(EntityDefinition ed) { this(ed.getTable(), ed.getColumnFamily()); }
public RowkeyQueryStatement(List<String> rowkeys,String serviceName) throws IllegalAccessException, InstantiationException { this.rowkeys = rowkeys; this.entityDefinition = EntityDefinitionManager.getEntityByServiceName(serviceName); }
public GenericEntityStreamReader(EntityDefinition entityDef, SearchCondition condition) throws InstantiationException, IllegalAccessException { this(entityDef, condition, entityDef.getPrefix()); }
/** * Because we don't have metadata for tag, we regard non-qualifer field as tag. So one field possibly is * not a real tag when this function return true. This happens when a user input an wrong field name which * is neither tag or qualifier * * @param field */ private boolean isTag(String field) { return ed.isTag(field); }
@Override public byte[] serialize(JobConfig jobConfig) { return INSTANCE.serialize(jobConfig); }
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) @Table("eaglejpa_process") @ColumnFamily("f") @Prefix("process") @Service(Constants.MR_JOB_PROCESS_TIME_STAMP_NAME) @TimeSeries(true) @Partition({"site"}) public class JobProcessTimeStampEntity extends TaggedLogAPIEntity { @Column("a") private long currentTimeStamp; public long getCurrentTimeStamp() { return currentTimeStamp; } public void setCurrentTimeStamp(long currentTimeStamp) { this.currentTimeStamp = currentTimeStamp; pcs.firePropertyChange("currentTimeStamp", null, null); } }
@Override public void setUp() throws Exception { entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(TestTimeSeriesAPIEntity.class); entityDefinition.setTags(new String[]{"cluster","datacenter","random"}); super.setUp(); }
private void checkIsTimeSeries(String serviceName) throws Exception{ EntityDefinition ed = EntityDefinitionManager.getEntityByServiceName(serviceName); if(!ed.isTimeSeries()){ throw new IllegalArgumentException("Multi-threading stream reader must be applied to time series table"); } }
/** * it is allowed that user can register their own entity definition * @param entityDef entity definition * @throws IllegalArgumentException */ public static void registerEntity(EntityDefinition entityDef) { registerEntity(entityDef.getService(), entityDef); }
/** * it is allowed that user can register their own entity * @param clazz entity class * @throws IllegalArgumentException */ public static void registerEntity(Class<? extends TaggedLogAPIEntity> clazz) throws IllegalArgumentException{ registerEntity(createEntityDefinition(clazz)); }
/** * Because we don't have metadata for tag, we regard non-qualifer field as tag. So one field possibly is not a real tag when this function return true. This happens * when a user input an wrong field name which is neither tag or qualifier * * @param field */ private boolean isTag(String field){ return _ed.isTag(field); }
@Override public byte[] serialize(JobConfig jobConfig) { return INSTANCE.serialize(jobConfig); }
public static Map<String, EntityDefinition> entities() throws Exception{ checkInit(); return entityServiceMap; } }
@Override public void setUp() throws Exception { entityDefinition = EntityDefinitionManager.getEntityDefinitionByEntityClass(GenericMetricEntity.class); entityDefinition.setTags(new String[]{"site","application"}); super.setUp(); }