mirror of https://github.com/apache/druid.git
Fixes
fix NPE in select query, calculating cache key remove unwanted logging fix ds in topNQuery
This commit is contained in:
parent
728a606d32
commit
1d67e39949
|
@ -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(
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue