Skip to content

Commit

Permalink
Add ignore unknown flags for Jackson to the TSQuery and
Browse files Browse the repository at this point in the history
TSSubQuery classes so we can parse forward and backward compatible
queries.

Signed-off-by: Chris Larsen <clarsen@yahoo-inc.com>
  • Loading branch information
manolama committed Feb 27, 2016
1 parent f721378 commit e2efe9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/TSQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.google.common.base.Objects;
import com.stumbleupon.async.Callback;
import com.stumbleupon.async.Deferred;
Expand All @@ -38,6 +39,7 @@
* {@code start_time} and {@code end_time} fields.
* @since 2.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class TSQuery {

/** User given start date/time, could be relative or absolute */
Expand Down
2 changes: 2 additions & 0 deletions src/core/TSSubQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import net.opentsdb.query.filter.TagVFilter;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableMap;

Expand All @@ -41,6 +42,7 @@
* {@code agg} and {@code downsample_specifier} fields.
* @since 2.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class TSSubQuery {
/** User given name of an aggregation function to use */
private String aggregator;
Expand Down

0 comments on commit e2efe9a

Please # to comment.