mirror of
https://github.com/apache/druid.git
synced 2025-02-17 15:35:56 +00:00
Merge tag 'druid-0.4.12.5'
[maven-release-plugin] copy for tag druid-0.4.12.5 Conflicts: client/pom.xml common/pom.xml examples/pom.xml index-common/pom.xml indexer/pom.xml merger/pom.xml pom.xml realtime/pom.xml server/pom.xml services/pom.xml
This commit is contained in:
commit
a792525063
@ -255,7 +255,8 @@ public class ServerManager implements QuerySegmentWalker
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
.filter(Predicates.<QueryRunner<T>>notNull());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -145,6 +145,10 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
|
|
||||||
final Interval dataInterval = new Interval(getMinTime().getMillis(), gran.next(getMaxTime().getMillis()));
|
final Interval dataInterval = new Interval(getMinTime().getMillis(), gran.next(getMaxTime().getMillis()));
|
||||||
|
|
||||||
|
if (!actualInterval.overlaps(dataInterval)) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
|
||||||
if (actualInterval.getStart().isBefore(dataInterval.getStart())) {
|
if (actualInterval.getStart().isBefore(dataInterval.getStart())) {
|
||||||
actualInterval = actualInterval.withStart(dataInterval.getStart());
|
actualInterval = actualInterval.withStart(dataInterval.getStart());
|
||||||
}
|
}
|
||||||
@ -285,7 +289,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
|
|
||||||
final Map<String, GenericColumn> genericColumnCache = Maps.newHashMap();
|
final Map<String, GenericColumn> genericColumnCache = Maps.newHashMap();
|
||||||
final Map<String, ComplexColumn> complexColumnCache = Maps.newHashMap();
|
final Map<String, ComplexColumn> complexColumnCache = Maps.newHashMap();
|
||||||
final Map<String, Object> objectColumnCache = Maps.newHashMap();
|
final Map<String, Object> objectColumnCache = Maps.newHashMap();
|
||||||
|
|
||||||
final GenericColumn timestamps = index.getTimeColumn().getGenericColumn();
|
final GenericColumn timestamps = index.getTimeColumn().getGenericColumn();
|
||||||
|
|
||||||
@ -508,27 +512,25 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
if (cachedColumnVals == null) {
|
if (cachedColumnVals == null) {
|
||||||
Column holder = index.getColumn(columnName);
|
Column holder = index.getColumn(columnName);
|
||||||
|
|
||||||
if(holder != null) {
|
if (holder != null) {
|
||||||
final ColumnCapabilities capabilities = holder.getCapabilities();
|
final ColumnCapabilities capabilities = holder.getCapabilities();
|
||||||
|
|
||||||
if(capabilities.hasMultipleValues()) {
|
if (capabilities.hasMultipleValues()) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"makeObjectColumnSelector does not support multivalued columns"
|
"makeObjectColumnSelector does not support multivalued columns"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(capabilities.isDictionaryEncoded()) {
|
if (capabilities.isDictionaryEncoded()) {
|
||||||
cachedColumnVals = holder.getDictionaryEncoding();
|
cachedColumnVals = holder.getDictionaryEncoding();
|
||||||
}
|
} else if (capabilities.getType() == ValueType.COMPLEX) {
|
||||||
else if(capabilities.getType() == ValueType.COMPLEX) {
|
|
||||||
cachedColumnVals = holder.getComplexColumn();
|
cachedColumnVals = holder.getComplexColumn();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cachedColumnVals = holder.getGenericColumn();
|
cachedColumnVals = holder.getGenericColumn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cachedColumnVals != null) {
|
if (cachedColumnVals != null) {
|
||||||
objectColumnCache.put(columnName, cachedColumnVals);
|
objectColumnCache.put(columnName, cachedColumnVals);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -537,11 +539,11 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cachedColumnVals instanceof GenericColumn) {
|
if (cachedColumnVals instanceof GenericColumn) {
|
||||||
final GenericColumn columnVals = (GenericColumn) cachedColumnVals;
|
final GenericColumn columnVals = (GenericColumn) cachedColumnVals;
|
||||||
final ValueType type = columnVals.getType();
|
final ValueType type = columnVals.getType();
|
||||||
|
|
||||||
if(type == ValueType.FLOAT) {
|
if (type == ValueType.FLOAT) {
|
||||||
return new ObjectColumnSelector<Float>()
|
return new ObjectColumnSelector<Float>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -557,7 +559,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(type == ValueType.LONG) {
|
if (type == ValueType.LONG) {
|
||||||
return new ObjectColumnSelector<Long>()
|
return new ObjectColumnSelector<Long>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -573,7 +575,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(type == ValueType.STRING) {
|
if (type == ValueType.STRING) {
|
||||||
return new ObjectColumnSelector<String>()
|
return new ObjectColumnSelector<String>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -609,7 +611,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
final ComplexColumn columnVals = (ComplexColumn)cachedColumnVals;
|
final ComplexColumn columnVals = (ComplexColumn) cachedColumnVals;
|
||||||
return new ObjectColumnSelector()
|
return new ObjectColumnSelector()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -647,8 +649,8 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
Closeables.closeQuietly(complexColumn);
|
Closeables.closeQuietly(complexColumn);
|
||||||
}
|
}
|
||||||
for (Object column : complexColumnCache.values()) {
|
for (Object column : complexColumnCache.values()) {
|
||||||
if(column instanceof Closeable) {
|
if (column instanceof Closeable) {
|
||||||
Closeables.closeQuietly((Closeable)column);
|
Closeables.closeQuietly((Closeable) column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -946,26 +948,24 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
if (cachedColumnVals == null) {
|
if (cachedColumnVals == null) {
|
||||||
Column holder = index.getColumn(columnName);
|
Column holder = index.getColumn(columnName);
|
||||||
|
|
||||||
if(holder != null) {
|
if (holder != null) {
|
||||||
if(holder.getCapabilities().hasMultipleValues()) {
|
if (holder.getCapabilities().hasMultipleValues()) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"makeObjectColumnSelector does not support multivalued columns"
|
"makeObjectColumnSelector does not support multivalued columns"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final ValueType type = holder.getCapabilities().getType();
|
final ValueType type = holder.getCapabilities().getType();
|
||||||
|
|
||||||
if(holder.getCapabilities().isDictionaryEncoded()) {
|
if (holder.getCapabilities().isDictionaryEncoded()) {
|
||||||
cachedColumnVals = holder.getDictionaryEncoding();
|
cachedColumnVals = holder.getDictionaryEncoding();
|
||||||
}
|
} else if (type == ValueType.COMPLEX) {
|
||||||
else if(type == ValueType.COMPLEX) {
|
|
||||||
cachedColumnVals = holder.getComplexColumn();
|
cachedColumnVals = holder.getComplexColumn();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cachedColumnVals = holder.getGenericColumn();
|
cachedColumnVals = holder.getGenericColumn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cachedColumnVals != null) {
|
if (cachedColumnVals != null) {
|
||||||
objectColumnCache.put(columnName, cachedColumnVals);
|
objectColumnCache.put(columnName, cachedColumnVals);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -974,11 +974,11 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cachedColumnVals instanceof GenericColumn) {
|
if (cachedColumnVals instanceof GenericColumn) {
|
||||||
final GenericColumn columnVals = (GenericColumn) cachedColumnVals;
|
final GenericColumn columnVals = (GenericColumn) cachedColumnVals;
|
||||||
final ValueType type = columnVals.getType();
|
final ValueType type = columnVals.getType();
|
||||||
|
|
||||||
if(type == ValueType.FLOAT) {
|
if (type == ValueType.FLOAT) {
|
||||||
return new ObjectColumnSelector<Float>()
|
return new ObjectColumnSelector<Float>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -994,7 +994,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(type == ValueType.LONG) {
|
if (type == ValueType.LONG) {
|
||||||
return new ObjectColumnSelector<Long>()
|
return new ObjectColumnSelector<Long>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -1010,7 +1010,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if(type == ValueType.STRING) {
|
if (type == ValueType.STRING) {
|
||||||
return new ObjectColumnSelector<String>()
|
return new ObjectColumnSelector<String>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -1046,7 +1046,7 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
final ComplexColumn columnVals = (ComplexColumn)cachedColumnVals;
|
final ComplexColumn columnVals = (ComplexColumn) cachedColumnVals;
|
||||||
return new ObjectColumnSelector()
|
return new ObjectColumnSelector()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@ -1082,7 +1082,9 @@ public class QueryableIndexStorageAdapter extends BaseStorageAdapter
|
|||||||
Closeables.closeQuietly(complexColumn);
|
Closeables.closeQuietly(complexColumn);
|
||||||
}
|
}
|
||||||
for (Object column : objectColumnCache.values()) {
|
for (Object column : objectColumnCache.values()) {
|
||||||
if(column instanceof Closeable) Closeables.closeQuietly((Closeable)column);
|
if (column instanceof Closeable) {
|
||||||
|
Closeables.closeQuietly((Closeable) column);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,11 +103,13 @@ public class DruidSetup
|
|||||||
if ("dump".equals(cmd) && args.length == 3) {
|
if ("dump".equals(cmd) && args.length == 3) {
|
||||||
final String zkConnect = args[1];
|
final String zkConnect = args[1];
|
||||||
curator = connectToZK(zkConnect);
|
curator = connectToZK(zkConnect);
|
||||||
|
curator.start();
|
||||||
String zpathBase = args[2];
|
String zpathBase = args[2];
|
||||||
dumpFromZk(curator, zkConnect, zpathBase, System.out);
|
dumpFromZk(curator, zkConnect, zpathBase, System.out);
|
||||||
} else if ("put".equals(cmd) && args.length == 3) {
|
} else if ("put".equals(cmd) && args.length == 3) {
|
||||||
final String zkConnect = args[1];
|
final String zkConnect = args[1];
|
||||||
curator = connectToZK(zkConnect);
|
curator = connectToZK(zkConnect);
|
||||||
|
curator.start();
|
||||||
final String pfile = args[2];
|
final String pfile = args[2];
|
||||||
putToZk(curator, pfile);
|
putToZk(curator, pfile);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user