use of org.apache.apex.malhar.lib.appdata.schemas.SchemaResult in project apex-malhar by apache.
the class AbstractAppDataSnapshotServer method processQuery.
/**
* process the query send.
* provide this method to give sub class a chance to override.
* @param queryJSON
*/
protected void processQuery(String queryJSON) {
LOG.debug("query {}", queryJSON);
Message query = null;
try {
query = queryDeserializerFactory.deserialize(queryJSON);
} catch (IOException ex) {
LOG.error("Error parsing query: {}", queryJSON);
LOG.error("{}", ex);
return;
}
if (query instanceof SchemaQuery) {
SchemaResult schemaResult = schemaRegistry.getSchemaResult((SchemaQuery) query);
if (schemaResult != null) {
LOG.debug("queueing {}", schemaResult);
schemaQueue.add(schemaResult);
}
} else if (query instanceof DataQuerySnapshot) {
queryProcessor.enqueue((DataQuerySnapshot) query, null, null);
}
}
Aggregations