fix NPE in select query, calculating cache key
remove unwanted logging
fix ds in topNQuery
This commit is contained in:
nishantmonu51 2014-05-01 21:04:47 +05:30
parent 728a606d32
commit 1d67e39949
4 changed files with 5 additions and 4 deletions

View File

@ -762,8 +762,6 @@ public class DeterminePartitionsJob implements Jobby
log.info(" %s", HadoopDruidIndexerConfig.jsonMapper.writeValueAsString(shardSpec)); log.info(" %s", HadoopDruidIndexerConfig.jsonMapper.writeValueAsString(shardSpec));
} }
System.out.println(HadoopDruidIndexerConfig.jsonMapper.writeValueAsString(chosenShardSpecs));
try { try {
HadoopDruidIndexerConfig.jsonMapper HadoopDruidIndexerConfig.jsonMapper
.writerWithType( .writerWithType(

View File

@ -43,6 +43,9 @@ public class UnionDataSource implements DataSource
public UnionDataSource(@JsonProperty("dataSources") List<DataSource> dataSources) public UnionDataSource(@JsonProperty("dataSources") List<DataSource> dataSources)
{ {
Preconditions.checkNotNull(dataSources, "datasources cannot be null for uniondatasource"); Preconditions.checkNotNull(dataSources, "datasources cannot be null for uniondatasource");
for(DataSource ds : dataSources){
Preconditions.checkArgument(ds instanceof TableDataSource, "Union DataSource only supports TableDatasource");
}
this.dataSources = dataSources; this.dataSources = dataSources;
} }

View File

@ -40,7 +40,7 @@ public class PagingSpec
@JsonProperty("threshold") int threshold @JsonProperty("threshold") int threshold
) )
{ {
this.pagingIdentifiers = pagingIdentifiers; this.pagingIdentifiers = pagingIdentifiers == null ? new LinkedHashMap<String, Integer>() : pagingIdentifiers;
this.threshold = threshold; this.threshold = threshold;
} }

View File

@ -167,7 +167,7 @@ public class TopNQuery extends BaseQuery<Result<TopNResultValue>>
public Query<Result<TopNResultValue>> withDataSource(DataSource dataSource) public Query<Result<TopNResultValue>> withDataSource(DataSource dataSource)
{ {
return new TopNQuery( return new TopNQuery(
getDataSource(), dataSource,
dimensionSpec, dimensionSpec,
topNMetricSpec, topNMetricSpec,
threshold, threshold,