fix for missing context when embedding broker

This commit is contained in:
Xavier Léauté 2014-09-09 13:28:08 -07:00
parent 17b6ed2cbe
commit d6f6a59ae2
1 changed files with 11 additions and 5 deletions

View File

@ -39,6 +39,7 @@ import io.druid.query.UnionQueryRunner;
import org.joda.time.Interval; import org.joda.time.Interval;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Map;
/** /**
*/ */
@ -102,11 +103,16 @@ public class ClientQuerySegmentWalker implements QuerySegmentWalker
); );
final PostProcessingOperator<T> postProcessing = objectMapper.convertValue( final Map<String, Object> context = query.getContext();
query.getContext().get("postProcessing"), PostProcessingOperator<T> postProcessing = null;
new TypeReference<PostProcessingOperator<T>>() { if(context != null) {
} postProcessing = objectMapper.convertValue(
); context.get("postProcessing"),
new TypeReference<PostProcessingOperator<T>>()
{
}
);
}
return postProcessing != null ? return postProcessing != null ?
postProcessing.postProcess(baseRunner) : baseRunner; postProcessing.postProcess(baseRunner) : baseRunner;