Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlord fails to start if it is not able to parse any existing tasks from DB. #2749

Closed
nishantmonu51 opened this issue Mar 28, 2016 · 4 comments

Comments

@nishantmonu51
Copy link
Member

Faced this while updating from 0.8.3 to 0.9.0, when there were few active tasks having max aggregators instead of doubleMax, which made them non parseable.
stack trace -

Caused by: org.skife.jdbi.v2.exceptions.ResultSetException: Exception thrown while attempting to traverse the result set [statement:"SELECT id, payload, status_payload FROM prod_tasks WHERE active = TRUE ORDER BY created_date", loca
ted:"SELECT id, payload, status_payload FROM prod_tasks WHERE active = TRUE ORDER BY created_date", rewritten:"SELECT id, payload, status_payload FROM prod_tasks WHERE active = TRUE ORDER BY created_date", arguments:{ positional:{},
 named:{}, finder:[]}]
        at org.skife.jdbi.v2.SQLStatement.internalExecute(SQLStatement.java:1343) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query.fold(Query.java:173) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query.list(Query.java:82) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query.list(Query.java:75) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at io.druid.metadata.SQLMetadataStorageActionHandler$5.withHandle(SQLMetadataStorageActionHandler.java:211) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at io.druid.metadata.SQLMetadataStorageActionHandler$5.withHandle(SQLMetadataStorageActionHandler.java:207) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.DBI.withHandle(DBI.java:281) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        ... 19 more
Caused by: java.sql.SQLException: com.fasterxml.jackson.databind.JsonMappingException: Could not resolve type id 'max' into a subtype of [simple type, class io.druid.query.aggregation.AggregatorFactory]
 at [Source: [B@449b6055; line: 1, column: 1539] (through reference chain: Object[][2])
        at io.druid.metadata.SQLMetadataStorageActionHandler$5$1.map(SQLMetadataStorageActionHandler.java:239) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at io.druid.metadata.SQLMetadataStorageActionHandler$5$1.map(SQLMetadataStorageActionHandler.java:220) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query$4.munge(Query.java:183) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.QueryResultSetMunger.munge(QueryResultSetMunger.java:43) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.SQLStatement.internalExecute(SQLStatement.java:1340) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query.fold(Query.java:173) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query.list(Query.java:82) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.Query.list(Query.java:75) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at io.druid.metadata.SQLMetadataStorageActionHandler$5.withHandle(SQLMetadataStorageActionHandler.java:211) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at io.druid.metadata.SQLMetadataStorageActionHandler$5.withHandle(SQLMetadataStorageActionHandler.java:207) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at org.skife.jdbi.v2.DBI.withHandle(DBI.java:281) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        ... 19 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Could not resolve type id 'max' into a subtype of [simple type, class io.druid.query.aggregation.AggregatorFactory]
 at [Source: [B@449b6055; line: 1, column: 1539] (through reference chain: Object[][2])
        at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.DeserializationContext.unknownTypeException(DeserializationContext.java:862) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:167) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:99) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:84) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:132) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:151) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:17) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
        at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:538) ~[druid-selfcontained-0.9.0-rc2-mmx5.jar:0.9.0-rc2-mmx5]
@xvrl xvrl added this to the 0.9.0 milestone Mar 28, 2016
@nishantmonu51
Copy link
Member Author

Way to Fix -

  1. To get overlord started run below SQL queries will replace aggregators for any existing active tasks -
    update tasks set payload = REPLACE(payload, '"type":"min"','"type":"doubleMin"') WHERE active = TRUE AND payload like '%"type":"min"%';
    update tasks set payload = REPLACE(payload, '"type":"max"','"type":"doubleMax"') WHERE active = TRUE AND payload like '%"type":"max"%';

  2. Update your data pipeline to submit tasks with doubleMax/doubleMin aggregators instead of max/min aggregators.

@himanshug
Copy link
Contributor

do the 2) as soon as possible and way before upgrading to 0.9.0. no reason to wait till 0.9.0 deployment.

@gianm gianm removed this from the 0.9.0 milestone Apr 21, 2016
@stale
Copy link

stale bot commented Jun 21, 2019

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

@stale stale bot added the stale label Jun 21, 2019
@stale
Copy link

stale bot commented Jul 5, 2019

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

@stale stale bot closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants