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));
}
System.out.println(HadoopDruidIndexerConfig.jsonMapper.writeValueAsString(chosenShardSpecs));
try {
HadoopDruidIndexerConfig.jsonMapper
.writerWithType(

View File

@ -43,6 +43,9 @@ public class UnionDataSource implements DataSource
public UnionDataSource(@JsonProperty("dataSources") List<DataSource> dataSources)
{
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;
}

View File

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

View File

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