mirror of https://github.com/apache/druid.git
fix some intellij inspections in druid-processing (#13823)
fix some intellij inspections in druid-processing
This commit is contained in:
parent
46eafa57e1
commit
614205f3bc
|
@ -25,6 +25,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
/**
|
/**
|
||||||
* Annotation for suppressing spotbugs checks when necessary.
|
* Annotation for suppressing spotbugs checks when necessary.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Retention(RetentionPolicy.CLASS)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface SuppressFBWarnings
|
public @interface SuppressFBWarnings
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,6 +86,7 @@ public interface FirehoseFactory<T extends InputRowParser>
|
||||||
return connect(parser, temporaryDirectory);
|
return connect(parser, temporaryDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
default boolean isSplittable()
|
default boolean isSplittable()
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,11 +45,6 @@ public class FirehoseFactoryToInputSourceAdaptor extends AbstractInputSource imp
|
||||||
return firehoseFactory;
|
return firehoseFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputRowParser getInputRowParser()
|
|
||||||
{
|
|
||||||
return inputRowParser;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSplittable()
|
public boolean isSplittable()
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,6 +58,7 @@ public interface InputFormat
|
||||||
* This method is not being used anywhere for now, but should be considered
|
* This method is not being used anywhere for now, but should be considered
|
||||||
* in {@link SplittableInputSource#createSplits} in the future.
|
* in {@link SplittableInputSource#createSplits} in the future.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
boolean isSplittable();
|
boolean isSplittable();
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.druid.indexer;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.google.common.net.HostAndPort;
|
|
||||||
import org.apache.druid.java.util.common.IAE;
|
import org.apache.druid.java.util.common.IAE;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@ -133,12 +132,4 @@ public class TaskLocation
|
||||||
{
|
{
|
||||||
return Objects.hash(host, port, tlsPort);
|
return Objects.hash(host, port, tlsPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HostAndPort toHostAndPort()
|
|
||||||
{
|
|
||||||
if (tlsPort >= 0) {
|
|
||||||
return HostAndPort.fromParts(host, tlsPort);
|
|
||||||
}
|
|
||||||
return HostAndPort.fromParts(host, port);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,10 @@ import java.util.Map;
|
||||||
|
|
||||||
public interface TaskMetricsGetter
|
public interface TaskMetricsGetter
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unused")
|
||||||
List<String> getKeys();
|
List<String> getKeys();
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Nullable
|
@Nullable
|
||||||
Map<String, Number> getTotalMetrics();
|
Map<String, Number> getTotalMetrics();
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,11 +171,6 @@ public class DefineClassUtils
|
||||||
return defineClass;
|
return defineClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int getArrayLength(byte[] bytes)
|
|
||||||
{
|
|
||||||
return bytes.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Class defineClass(
|
public static Class defineClass(
|
||||||
Class<?> targetClass,
|
Class<?> targetClass,
|
||||||
byte[] byteCode,
|
byte[] byteCode,
|
||||||
|
|
|
@ -47,6 +47,7 @@ import java.lang.annotation.Target;
|
||||||
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
|
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Constraint(validatedBy = HumanReadableBytesRange.HumanReadableBytesRangeValidator.class)
|
@Constraint(validatedBy = HumanReadableBytesRange.HumanReadableBytesRangeValidator.class)
|
||||||
public @interface HumanReadableBytesRange
|
public @interface HumanReadableBytesRange
|
||||||
{
|
{
|
||||||
|
@ -66,9 +67,11 @@ public @interface HumanReadableBytesRange
|
||||||
//ConstraintValidator requires
|
//ConstraintValidator requires
|
||||||
String message() default "value must be in the range of [{min}, {max}]";
|
String message() default "value must be in the range of [{min}, {max}]";
|
||||||
|
|
||||||
|
|
||||||
//ConstraintValidator requires
|
//ConstraintValidator requires
|
||||||
Class<? extends Payload>[] payload() default {};
|
Class<? extends Payload>[] payload() default {};
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
class HumanReadableBytesRangeValidator implements ConstraintValidator<HumanReadableBytesRange, Object>
|
class HumanReadableBytesRangeValidator implements ConstraintValidator<HumanReadableBytesRange, Object>
|
||||||
{
|
{
|
||||||
private HumanReadableBytesRange range;
|
private HumanReadableBytesRange range;
|
||||||
|
|
|
@ -200,21 +200,13 @@ public final class Numbers
|
||||||
return lobj;
|
return lobj;
|
||||||
}
|
}
|
||||||
// try as a double, for "ddd.dd" , Longs.tryParse(..) returns null
|
// try as a double, for "ddd.dd" , Longs.tryParse(..) returns null
|
||||||
Double dobj = Doubles.tryParse((String) val);
|
Double dobj = Doubles.tryParse(val);
|
||||||
if (dobj != null) {
|
if (dobj != null) {
|
||||||
return dobj.longValue();
|
return dobj.longValue();
|
||||||
}
|
}
|
||||||
throw new NumberFormatException("Cannot parse string to long");
|
throw new NumberFormatException("Cannot parse string to long");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int toIntExact(long value, String error)
|
|
||||||
{
|
|
||||||
if ((int) value != value) {
|
|
||||||
throw new ArithmeticException(error);
|
|
||||||
}
|
|
||||||
return (int) value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Numbers()
|
private Numbers()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,10 @@ package org.apache.druid.java.util.common;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import it.unimi.dsi.fastutil.bytes.ByteArrayList;
|
import it.unimi.dsi.fastutil.bytes.ByteArrayList;
|
||||||
import it.unimi.dsi.fastutil.bytes.ByteList;
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
@ -268,11 +266,6 @@ public class StringUtils
|
||||||
return StringUtils.fromUtf8(buffer.elements(), 0, buffer.size());
|
return StringUtils.fromUtf8(buffer.elements(), 0, buffer.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String fromUtf8(final ByteList buffer)
|
|
||||||
{
|
|
||||||
return StringUtils.fromUtf8(buffer.toByteArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If buffer is Decodes a UTF-8 string from the remaining bytes of a buffer.
|
* If buffer is Decodes a UTF-8 string from the remaining bytes of a buffer.
|
||||||
* Advances the position of the buffer by {@link ByteBuffer#remaining()}.
|
* Advances the position of the buffer by {@link ByteBuffer#remaining()}.
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class ParallelMergeCombiningSequence<T> extends YieldingSequenceBase<T>
|
||||||
BinaryOperator<T> combineFn,
|
BinaryOperator<T> combineFn,
|
||||||
boolean hasTimeout,
|
boolean hasTimeout,
|
||||||
long timeoutMillis,
|
long timeoutMillis,
|
||||||
int queryPriority,
|
@SuppressWarnings("unused") int queryPriority,
|
||||||
int parallelism,
|
int parallelism,
|
||||||
int yieldAfter,
|
int yieldAfter,
|
||||||
int batchSize,
|
int batchSize,
|
||||||
|
|
|
@ -130,18 +130,6 @@ public final class Closer implements Closeable
|
||||||
return closeable;
|
return closeable;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a list of {@code Closeable} to be closed when this {@code Closer} is
|
|
||||||
* {@linkplain #close closed}.
|
|
||||||
*
|
|
||||||
* @return the supplied list of {@code Closeable}
|
|
||||||
*/
|
|
||||||
public <C extends Closeable> Iterable<C> registerAll(Iterable<C> closeables)
|
|
||||||
{
|
|
||||||
closeables.forEach(this::register);
|
|
||||||
return closeables;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the given throwable and rethrows it. It will be rethrown as is if it is an
|
* Stores the given throwable and rethrows it. It will be rethrown as is if it is an
|
||||||
* {@code IOException}, {@code RuntimeException} or {@code Error}. Otherwise, it will be rethrown
|
* {@code IOException}, {@code RuntimeException} or {@code Error}. Otherwise, it will be rethrown
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class Logger
|
||||||
return log;
|
return log;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,15 +79,6 @@ public class EventMap extends HashMap<String, Object>
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds map entry to the map
|
|
||||||
*/
|
|
||||||
public Builder put(Map.Entry<String, Object> entry)
|
|
||||||
{
|
|
||||||
map.put(entry.getKey(), entry.getValue());
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds all key -> value pairs from other map
|
* Adds all key -> value pairs from other map
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,9 +26,9 @@ import org.apache.druid.java.util.emitter.core.HttpEmitterConfig;
|
||||||
import org.apache.druid.java.util.emitter.core.HttpPostEmitter;
|
import org.apache.druid.java.util.emitter.core.HttpPostEmitter;
|
||||||
import org.asynchttpclient.AsyncHttpClient;
|
import org.asynchttpclient.AsyncHttpClient;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class HttpEmitterFactory extends HttpEmitterConfig implements EmitterFactory
|
public class HttpEmitterFactory extends HttpEmitterConfig implements EmitterFactory
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle)
|
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,12 +26,9 @@ import org.apache.druid.java.util.emitter.core.LoggingEmitter;
|
||||||
import org.apache.druid.java.util.emitter.core.LoggingEmitterConfig;
|
import org.apache.druid.java.util.emitter.core.LoggingEmitterConfig;
|
||||||
import org.asynchttpclient.AsyncHttpClient;
|
import org.asynchttpclient.AsyncHttpClient;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class LoggingEmitterFactory extends LoggingEmitterConfig implements EmitterFactory
|
public class LoggingEmitterFactory extends LoggingEmitterConfig implements EmitterFactory
|
||||||
{
|
{
|
||||||
public LoggingEmitterFactory()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle)
|
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.apache.druid.java.util.emitter.core.Emitter;
|
||||||
import org.apache.druid.java.util.emitter.core.NoopEmitter;
|
import org.apache.druid.java.util.emitter.core.NoopEmitter;
|
||||||
import org.asynchttpclient.AsyncHttpClient;
|
import org.asynchttpclient.AsyncHttpClient;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class NoopEmitterFactory implements EmitterFactory
|
public class NoopEmitterFactory implements EmitterFactory
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -26,9 +26,9 @@ import org.apache.druid.java.util.emitter.core.ParametrizedUriEmitter;
|
||||||
import org.apache.druid.java.util.emitter.core.ParametrizedUriEmitterConfig;
|
import org.apache.druid.java.util.emitter.core.ParametrizedUriEmitterConfig;
|
||||||
import org.asynchttpclient.AsyncHttpClient;
|
import org.asynchttpclient.AsyncHttpClient;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class ParametrizedUriEmitterFactory extends ParametrizedUriEmitterConfig implements EmitterFactory
|
public class ParametrizedUriEmitterFactory extends ParametrizedUriEmitterConfig implements EmitterFactory
|
||||||
{
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle)
|
public Emitter makeEmitter(ObjectMapper objectMapper, AsyncHttpClient httpClient, Lifecycle lifecycle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class HttpClientProxyConfig
|
||||||
@JsonProperty("password")
|
@JsonProperty("password")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public HttpClientProxyConfig()
|
public HttpClientProxyConfig()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,5 +49,6 @@ public abstract class FullResponseHolder<T>
|
||||||
/**
|
/**
|
||||||
* Get the data.
|
* Get the data.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public abstract T getContent();
|
public abstract T getContent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ public abstract class AbstractMonitor implements Monitor
|
||||||
started = false;
|
started = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public boolean isStarted()
|
public boolean isStarted()
|
||||||
{
|
{
|
||||||
return started;
|
return started;
|
||||||
|
|
|
@ -21,5 +21,6 @@ package org.apache.druid.java.util.metrics;
|
||||||
|
|
||||||
public interface PidDiscoverer
|
public interface PidDiscoverer
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unused")
|
||||||
long getPid();
|
long getPid();
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,6 @@ public class ProcFsReader
|
||||||
private final File procDir;
|
private final File procDir;
|
||||||
|
|
||||||
private static final Logger LOG = new Logger(ProcFsReader.class);
|
private static final Logger LOG = new Logger(ProcFsReader.class);
|
||||||
public static final Path DEFAULT_PROC_FS_ROOT = Paths.get("/proc/");
|
|
||||||
private static final String BOOT_ID_PATH = "sys/kernel/random/boot_id";
|
private static final String BOOT_ID_PATH = "sys/kernel/random/boot_id";
|
||||||
private static final String CPUINFO_PATH = "cpuinfo";
|
private static final String CPUINFO_PATH = "cpuinfo";
|
||||||
|
|
||||||
|
|
|
@ -1249,12 +1249,6 @@ public abstract class ExprEval<T>
|
||||||
return new ArrayExpr(arrayType, value);
|
return new ArrayExpr(arrayType, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public Object getIndex(int index)
|
|
||||||
{
|
|
||||||
return value == null ? null : value[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean isScalar()
|
protected boolean isScalar()
|
||||||
{
|
{
|
||||||
return value != null && value.length == 1;
|
return value != null && value.length == 1;
|
||||||
|
|
|
@ -34,7 +34,6 @@ public abstract class BivariateDoubleFunctionVectorValueProcessor<TLeftInput, TR
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<TLeftInput> left;
|
final ExprVectorProcessor<TLeftInput> left;
|
||||||
final ExprVectorProcessor<TRightInput> right;
|
final ExprVectorProcessor<TRightInput> right;
|
||||||
final int maxVectorSize;
|
|
||||||
final boolean[] outNulls;
|
final boolean[] outNulls;
|
||||||
final double[] outValues;
|
final double[] outValues;
|
||||||
|
|
||||||
|
@ -46,7 +45,6 @@ public abstract class BivariateDoubleFunctionVectorValueProcessor<TLeftInput, TR
|
||||||
{
|
{
|
||||||
this.left = left;
|
this.left = left;
|
||||||
this.right = right;
|
this.right = right;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outValues = new double[maxVectorSize];
|
this.outValues = new double[maxVectorSize];
|
||||||
this.outNulls = new boolean[maxVectorSize];
|
this.outNulls = new boolean[maxVectorSize];
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,20 +35,17 @@ public abstract class BivariateFunctionVectorObjectProcessor<TLeftInput, TRightI
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<TLeftInput> left;
|
final ExprVectorProcessor<TLeftInput> left;
|
||||||
final ExprVectorProcessor<TRightInput> right;
|
final ExprVectorProcessor<TRightInput> right;
|
||||||
final int maxVectorSize;
|
|
||||||
final TOutput outValues;
|
final TOutput outValues;
|
||||||
final boolean sqlCompatible = NullHandling.sqlCompatible();
|
final boolean sqlCompatible = NullHandling.sqlCompatible();
|
||||||
|
|
||||||
protected BivariateFunctionVectorObjectProcessor(
|
protected BivariateFunctionVectorObjectProcessor(
|
||||||
ExprVectorProcessor<TLeftInput> left,
|
ExprVectorProcessor<TLeftInput> left,
|
||||||
ExprVectorProcessor<TRightInput> right,
|
ExprVectorProcessor<TRightInput> right,
|
||||||
int maxVectorSize,
|
|
||||||
TOutput outValues
|
TOutput outValues
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.left = left;
|
this.left = left;
|
||||||
this.right = right;
|
this.right = right;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outValues = outValues;
|
this.outValues = outValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ public abstract class BivariateLongFunctionVectorValueProcessor<TLeftInput, TRig
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<TLeftInput> left;
|
final ExprVectorProcessor<TLeftInput> left;
|
||||||
final ExprVectorProcessor<TRightInput> right;
|
final ExprVectorProcessor<TRightInput> right;
|
||||||
final int maxVectorSize;
|
|
||||||
final boolean[] outNulls;
|
final boolean[] outNulls;
|
||||||
final long[] outValues;
|
final long[] outValues;
|
||||||
|
|
||||||
|
@ -46,7 +45,6 @@ public abstract class BivariateLongFunctionVectorValueProcessor<TLeftInput, TRig
|
||||||
{
|
{
|
||||||
this.left = left;
|
this.left = left;
|
||||||
this.right = right;
|
this.right = right;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outValues = new long[maxVectorSize];
|
this.outValues = new long[maxVectorSize];
|
||||||
this.outNulls = new boolean[maxVectorSize];
|
this.outNulls = new boolean[maxVectorSize];
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,6 @@ import org.apache.druid.math.expr.ExpressionType;
|
||||||
public abstract class LongOutObjectInFunctionVectorProcessor
|
public abstract class LongOutObjectInFunctionVectorProcessor
|
||||||
extends UnivariateFunctionVectorObjectProcessor<Object[], long[]>
|
extends UnivariateFunctionVectorObjectProcessor<Object[], long[]>
|
||||||
{
|
{
|
||||||
final ExpressionType inputType;
|
|
||||||
|
|
||||||
public LongOutObjectInFunctionVectorProcessor(
|
public LongOutObjectInFunctionVectorProcessor(
|
||||||
ExprVectorProcessor<Object[]> processor,
|
ExprVectorProcessor<Object[]> processor,
|
||||||
int maxVectorSize,
|
int maxVectorSize,
|
||||||
|
@ -36,7 +34,6 @@ public abstract class LongOutObjectInFunctionVectorProcessor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
super(CastToTypeVectorProcessor.cast(processor, inputType), maxVectorSize, new long[maxVectorSize]);
|
super(CastToTypeVectorProcessor.cast(processor, inputType), maxVectorSize, new long[maxVectorSize]);
|
||||||
this.inputType = inputType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -38,7 +38,6 @@ public abstract class LongOutObjectsInFunctionVectorProcessor
|
||||||
super(
|
super(
|
||||||
CastToTypeVectorProcessor.cast(left, inputType),
|
CastToTypeVectorProcessor.cast(left, inputType),
|
||||||
CastToTypeVectorProcessor.cast(right, inputType),
|
CastToTypeVectorProcessor.cast(right, inputType),
|
||||||
maxVectorSize,
|
|
||||||
new long[maxVectorSize]
|
new long[maxVectorSize]
|
||||||
);
|
);
|
||||||
this.outNulls = new boolean[maxVectorSize];
|
this.outNulls = new boolean[maxVectorSize];
|
||||||
|
|
|
@ -28,7 +28,6 @@ import org.apache.druid.math.expr.ExpressionType;
|
||||||
public abstract class ObjectOutMultiObjectInVectorProcessor implements ExprVectorProcessor<Object[]>
|
public abstract class ObjectOutMultiObjectInVectorProcessor implements ExprVectorProcessor<Object[]>
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<Object[]>[] inputs;
|
final ExprVectorProcessor<Object[]>[] inputs;
|
||||||
final int maxVectorSize;
|
|
||||||
final Object[] outValues;
|
final Object[] outValues;
|
||||||
|
|
||||||
final ExpressionType expressionType;
|
final ExpressionType expressionType;
|
||||||
|
@ -40,7 +39,6 @@ public abstract class ObjectOutMultiObjectInVectorProcessor implements ExprVecto
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.inputs = inputs;
|
this.inputs = inputs;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outValues = new Object[maxVectorSize];
|
this.outValues = new Object[maxVectorSize];
|
||||||
this.expressionType = objectType;
|
this.expressionType = objectType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,6 @@ public abstract class ObjectOutObjectsInFunctionVectorProcessor
|
||||||
super(
|
super(
|
||||||
CastToTypeVectorProcessor.cast(left, expressionType),
|
CastToTypeVectorProcessor.cast(left, expressionType),
|
||||||
CastToTypeVectorProcessor.cast(right, expressionType),
|
CastToTypeVectorProcessor.cast(right, expressionType),
|
||||||
maxVectorSize,
|
|
||||||
new Object[maxVectorSize]
|
new Object[maxVectorSize]
|
||||||
);
|
);
|
||||||
this.expressionType = expressionType;
|
this.expressionType = expressionType;
|
||||||
|
|
|
@ -32,7 +32,6 @@ import org.apache.druid.math.expr.Expr;
|
||||||
public abstract class UnivariateDoubleFunctionVectorValueProcessor<TInput> implements ExprVectorProcessor<double[]>
|
public abstract class UnivariateDoubleFunctionVectorValueProcessor<TInput> implements ExprVectorProcessor<double[]>
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<TInput> processor;
|
final ExprVectorProcessor<TInput> processor;
|
||||||
final int maxVectorSize;
|
|
||||||
final boolean[] outNulls;
|
final boolean[] outNulls;
|
||||||
final double[] outValues;
|
final double[] outValues;
|
||||||
|
|
||||||
|
@ -42,7 +41,6 @@ public abstract class UnivariateDoubleFunctionVectorValueProcessor<TInput> imple
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.processor = processor;
|
this.processor = processor;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outNulls = new boolean[maxVectorSize];
|
this.outNulls = new boolean[maxVectorSize];
|
||||||
this.outValues = new double[maxVectorSize];
|
this.outValues = new double[maxVectorSize];
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ import org.apache.druid.math.expr.Expr;
|
||||||
public abstract class UnivariateFunctionVectorObjectProcessor<TInput, TOutput> implements ExprVectorProcessor<TOutput>
|
public abstract class UnivariateFunctionVectorObjectProcessor<TInput, TOutput> implements ExprVectorProcessor<TOutput>
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<TInput> processor;
|
final ExprVectorProcessor<TInput> processor;
|
||||||
final int maxVectorSize;
|
|
||||||
final boolean[] outNulls;
|
final boolean[] outNulls;
|
||||||
final TOutput outValues;
|
final TOutput outValues;
|
||||||
|
|
||||||
|
@ -39,7 +38,6 @@ public abstract class UnivariateFunctionVectorObjectProcessor<TInput, TOutput> i
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.processor = processor;
|
this.processor = processor;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outNulls = new boolean[maxVectorSize];
|
this.outNulls = new boolean[maxVectorSize];
|
||||||
this.outValues = outValues;
|
this.outValues = outValues;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ import org.apache.druid.math.expr.Expr;
|
||||||
public abstract class UnivariateLongFunctionVectorValueProcessor<TInput> implements ExprVectorProcessor<long[]>
|
public abstract class UnivariateLongFunctionVectorValueProcessor<TInput> implements ExprVectorProcessor<long[]>
|
||||||
{
|
{
|
||||||
final ExprVectorProcessor<TInput> processor;
|
final ExprVectorProcessor<TInput> processor;
|
||||||
final int maxVectorSize;
|
|
||||||
final boolean[] outNulls;
|
final boolean[] outNulls;
|
||||||
final long[] outValues;
|
final long[] outValues;
|
||||||
|
|
||||||
|
@ -42,7 +41,6 @@ public abstract class UnivariateLongFunctionVectorValueProcessor<TInput> impleme
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.processor = processor;
|
this.processor = processor;
|
||||||
this.maxVectorSize = maxVectorSize;
|
|
||||||
this.outNulls = new boolean[maxVectorSize];
|
this.outNulls = new boolean[maxVectorSize];
|
||||||
this.outValues = new long[maxVectorSize];
|
this.outValues = new long[maxVectorSize];
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
*/
|
*/
|
||||||
public interface PasswordProviderRedactionMixIn
|
public interface PasswordProviderRedactionMixIn
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
String getPassword();
|
String getPassword();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import com.google.common.collect.Iterables;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
import org.apache.druid.guice.annotations.PublicApi;
|
import org.apache.druid.guice.annotations.PublicApi;
|
||||||
import org.apache.druid.java.util.common.DateTimes;
|
import org.apache.druid.java.util.common.DateTimes;
|
||||||
import org.apache.druid.java.util.common.IAE;
|
|
||||||
import org.apache.druid.java.util.common.Intervals;
|
import org.apache.druid.java.util.common.Intervals;
|
||||||
import org.apache.druid.query.SegmentDescriptor;
|
import org.apache.druid.query.SegmentDescriptor;
|
||||||
import org.apache.druid.timeline.partition.ShardSpec;
|
import org.apache.druid.timeline.partition.ShardSpec;
|
||||||
|
@ -41,7 +40,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
@ -233,18 +231,6 @@ public final class SegmentId implements Comparable<SegmentId>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Function<String, Interval> makeIntervalExtractor(final String dataSource)
|
|
||||||
{
|
|
||||||
return identifier -> {
|
|
||||||
SegmentId segmentIdentifierParts = tryParse(dataSource, identifier);
|
|
||||||
if (segmentIdentifierParts == null) {
|
|
||||||
throw new IAE("Invalid identifier [%s]", identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
return segmentIdentifierParts.getInterval();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a dummy SegmentId with the given data source. This method is useful in benchmark and test code.
|
* Creates a dummy SegmentId with the given data source. This method is useful in benchmark and test code.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -79,17 +79,20 @@ public class BuildingSingleDimensionShardSpec extends BuildingDimensionRangeShar
|
||||||
return jsonMap;
|
return jsonMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public String getDimension()
|
public String getDimension()
|
||||||
{
|
{
|
||||||
return dimension;
|
return dimension;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getStart()
|
public String getStart()
|
||||||
{
|
{
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getEnd()
|
public String getEnd()
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class SingleDimensionShardSpec extends DimensionRangeShardSpec
|
||||||
return jsonMap;
|
return jsonMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public String getDimension()
|
public String getDimension()
|
||||||
{
|
{
|
||||||
return dimension;
|
return dimension;
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.google.common.base.Preconditions;
|
||||||
*/
|
*/
|
||||||
public class CircularBuffer<E>
|
public class CircularBuffer<E>
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public E[] getBuffer()
|
public E[] getBuffer()
|
||||||
{
|
{
|
||||||
return buffer;
|
return buffer;
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.druid.guice.annotations.PublicApi;
|
||||||
@PublicApi
|
@PublicApi
|
||||||
public class Runnables
|
public class Runnables
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public static Runnable getNoopRunnable()
|
public static Runnable getNoopRunnable()
|
||||||
{
|
{
|
||||||
return () -> {};
|
return () -> {};
|
||||||
|
|
Loading…
Reference in New Issue