Skip to content

Commit

Permalink
Merge pull request #1538 from niveathika/master
Browse files Browse the repository at this point in the history
Fix aggregation definition error logs
  • Loading branch information
mohanvive authored Oct 5, 2019
2 parents b5865fd + 3c55a0a commit a6a0a39
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ public static AggregationRuntime parse(AggregationDefinition aggregationDefiniti

if (aggregationDefinition == null) {
throw new SiddhiAppCreationException(
"AggregationDefinition instance is null. " +
"Aggregation Definition instance is null. " +
"Hence, can't create the siddhi app '" + siddhiAppContext.getName() + "'");
}
if (aggregationDefinition.getTimePeriod() == null) {
throw new SiddhiAppCreationException(
"AggregationDefinition '" + aggregationDefinition.getId() + "'s timePeriod is null. " +
"Aggregation Definition '" + aggregationDefinition.getId() + "'s timePeriod is null. " +
"Hence, can't create the siddhi app '" + siddhiAppContext.getName() + "'",
aggregationDefinition.getQueryContextStartIndex(), aggregationDefinition.getQueryContextEndIndex());
}
if (aggregationDefinition.getSelector() == null) {
throw new SiddhiAppCreationException(
"AggregationDefinition '" + aggregationDefinition.getId() + "'s selection is not defined. " +
"Aggregation Definition '" + aggregationDefinition.getId() + "'s selection is not defined. " +
"Hence, can't create the siddhi app '" + siddhiAppContext.getName() + "'",
aggregationDefinition.getQueryContextStartIndex(), aggregationDefinition.getQueryContextEndIndex());
}
Expand Down Expand Up @@ -585,10 +585,9 @@ private static void populateIncomingAggregatorsAndExecutors(
siddhiQueryContext);
} else if (externalTimestampExecutor.getReturnType() != Attribute.Type.LONG) {
throw new SiddhiAppCreationException(
"AggregationDefinition '" + aggregationDefinition.getId() + "'s aggregateAttribute expects " +
"long or string, but found " + timestampExecutor.getReturnType() + ". " +
"Hence, can't create the siddhi app '" +
siddhiQueryContext.getSiddhiAppContext().getName() + "'",
"Aggregation Definition '" + aggregationDefinition.getId() + "'s timestamp attribute expects " +
"long or string, but found " + externalTimestampExecutor.getReturnType() + ". Hence, can't " +
"create the siddhi app '" + siddhiQueryContext.getSiddhiAppContext().getName() + "'",
externalTimestampExpression.getQueryContextStartIndex(),
externalTimestampExpression.getQueryContextEndIndex());
}
Expand Down

0 comments on commit a6a0a39

Please sign in to comment.