public class SerializerUtil extends Object
| Constructor and Description |
|---|
SerializerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Optional<String> |
findPhysicalName(Dimension value,
com.fasterxml.jackson.core.JsonGenerator gen)
JSON tree walk up to physical table to retrieve physical name for a dimension.
|
static Boolean |
hasInnerQuery(com.fasterxml.jackson.core.JsonGenerator gen)
JSON tree walk to determine if there is a nested query below the current json node or not.
|
static <T> Optional<T> |
mapNearestDruidQuery(com.fasterxml.jackson.core.JsonGenerator gen,
Function<DruidQuery,T> mapper)
JSON tree walk to find the druid query context of the current context and apply handler to the DruidQuery,
finds the current context if current context is a druid query.
|
public static Optional<String> findPhysicalName(Dimension value, com.fasterxml.jackson.core.JsonGenerator gen)
value - the dimension to retrieve api name.gen - the Json Generator to retrieve the tree to walk on.public static Boolean hasInnerQuery(com.fasterxml.jackson.core.JsonGenerator gen)
gen - the Json Generator to retrieve the tree to walk on.public static <T> Optional<T> mapNearestDruidQuery(com.fasterxml.jackson.core.JsonGenerator gen, Function<DruidQuery,T> mapper)
T - Type of result from the mappergen - the Json Generator to retrieve the tree to walk on.mapper - a function that takes an DruidQuery as an argument and return the final desired returned result.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.