id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
127,600 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java | SystemSchema.getTasks | private static JsonParserIterator<TaskStatusPlus> getTasks(
DruidLeaderClient indexingServiceClient,
ObjectMapper jsonMapper,
BytesAccumulatingResponseHandler responseHandler
)
{
Request request;
try {
request = indexingServiceClient.makeRequest(
HttpMethod.GET,
S... | java | private static JsonParserIterator<TaskStatusPlus> getTasks(
DruidLeaderClient indexingServiceClient,
ObjectMapper jsonMapper,
BytesAccumulatingResponseHandler responseHandler
)
{
Request request;
try {
request = indexingServiceClient.makeRequest(
HttpMethod.GET,
S... | [
"private",
"static",
"JsonParserIterator",
"<",
"TaskStatusPlus",
">",
"getTasks",
"(",
"DruidLeaderClient",
"indexingServiceClient",
",",
"ObjectMapper",
"jsonMapper",
",",
"BytesAccumulatingResponseHandler",
"responseHandler",
")",
"{",
"Request",
"request",
";",
"try",
... | Note that overlord must be up to get tasks | [
"Note",
"that",
"overlord",
"must",
"be",
"up",
"to",
"get",
"tasks"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java#L657-L691 |
127,601 | apache/incubator-druid | server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java | IndexerSQLMetadataStorageCoordinator.announceHistoricalSegment | private boolean announceHistoricalSegment(
final Handle handle,
final DataSegment segment,
final boolean used
) throws IOException
{
try {
if (segmentExists(handle, segment)) {
log.info("Found [%s] in DB, not updating DB", segment.getId());
return false;
}
//... | java | private boolean announceHistoricalSegment(
final Handle handle,
final DataSegment segment,
final boolean used
) throws IOException
{
try {
if (segmentExists(handle, segment)) {
log.info("Found [%s] in DB, not updating DB", segment.getId());
return false;
}
//... | [
"private",
"boolean",
"announceHistoricalSegment",
"(",
"final",
"Handle",
"handle",
",",
"final",
"DataSegment",
"segment",
",",
"final",
"boolean",
"used",
")",
"throws",
"IOException",
"{",
"try",
"{",
"if",
"(",
"segmentExists",
"(",
"handle",
",",
"segment"... | Attempts to insert a single segment to the database. If the segment already exists, will do nothing; although,
this checking is imperfect and callers must be prepared to retry their entire transaction on exceptions.
@return true if the segment was added, false if it already existed | [
"Attempts",
"to",
"insert",
"a",
"single",
"segment",
"to",
"the",
"database",
".",
"If",
"the",
"segment",
"already",
"exists",
"will",
"do",
"nothing",
";",
"although",
"this",
"checking",
"is",
"imperfect",
"and",
"callers",
"must",
"be",
"prepared",
"to"... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java#L739-L781 |
127,602 | apache/incubator-druid | server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java | IndexerSQLMetadataStorageCoordinator.getDataSourceMetadata | @Override
public DataSourceMetadata getDataSourceMetadata(final String dataSource)
{
final byte[] bytes = connector.lookup(
dbTables.getDataSourceTable(),
"dataSource",
"commit_metadata_payload",
dataSource
);
if (bytes == null) {
return null;
}
try {
... | java | @Override
public DataSourceMetadata getDataSourceMetadata(final String dataSource)
{
final byte[] bytes = connector.lookup(
dbTables.getDataSourceTable(),
"dataSource",
"commit_metadata_payload",
dataSource
);
if (bytes == null) {
return null;
}
try {
... | [
"@",
"Override",
"public",
"DataSourceMetadata",
"getDataSourceMetadata",
"(",
"final",
"String",
"dataSource",
")",
"{",
"final",
"byte",
"[",
"]",
"bytes",
"=",
"connector",
".",
"lookup",
"(",
"dbTables",
".",
"getDataSourceTable",
"(",
")",
",",
"\"dataSourc... | Read dataSource metadata. Returns null if there is no metadata. | [
"Read",
"dataSource",
"metadata",
".",
"Returns",
"null",
"if",
"there",
"is",
"no",
"metadata",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java#L796-L816 |
127,603 | apache/incubator-druid | server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java | IndexerSQLMetadataStorageCoordinator.getDataSourceMetadataWithHandleAsBytes | private byte[] getDataSourceMetadataWithHandleAsBytes(
final Handle handle,
final String dataSource
)
{
return connector.lookupWithHandle(
handle,
dbTables.getDataSourceTable(),
"dataSource",
"commit_metadata_payload",
dataSource
);
} | java | private byte[] getDataSourceMetadataWithHandleAsBytes(
final Handle handle,
final String dataSource
)
{
return connector.lookupWithHandle(
handle,
dbTables.getDataSourceTable(),
"dataSource",
"commit_metadata_payload",
dataSource
);
} | [
"private",
"byte",
"[",
"]",
"getDataSourceMetadataWithHandleAsBytes",
"(",
"final",
"Handle",
"handle",
",",
"final",
"String",
"dataSource",
")",
"{",
"return",
"connector",
".",
"lookupWithHandle",
"(",
"handle",
",",
"dbTables",
".",
"getDataSourceTable",
"(",
... | Read dataSource metadata as bytes, from a specific handle. Returns null if there is no metadata. | [
"Read",
"dataSource",
"metadata",
"as",
"bytes",
"from",
"a",
"specific",
"handle",
".",
"Returns",
"null",
"if",
"there",
"is",
"no",
"metadata",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java#L821-L833 |
127,604 | apache/incubator-druid | extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/MemoryBoundLinkedBlockingQueue.java | MemoryBoundLinkedBlockingQueue.take | public ObjectContainer<T> take() throws InterruptedException
{
final ObjectContainer<T> ret = queue.take();
currentMemory.addAndGet(-ret.getSize());
return ret;
} | java | public ObjectContainer<T> take() throws InterruptedException
{
final ObjectContainer<T> ret = queue.take();
currentMemory.addAndGet(-ret.getSize());
return ret;
} | [
"public",
"ObjectContainer",
"<",
"T",
">",
"take",
"(",
")",
"throws",
"InterruptedException",
"{",
"final",
"ObjectContainer",
"<",
"T",
">",
"ret",
"=",
"queue",
".",
"take",
"(",
")",
";",
"currentMemory",
".",
"addAndGet",
"(",
"-",
"ret",
".",
"get... | blocks until at least one item is available to take | [
"blocks",
"until",
"at",
"least",
"one",
"item",
"is",
"available",
"to",
"take"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/MemoryBoundLinkedBlockingQueue.java#L57-L62 |
127,605 | apache/incubator-druid | processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexAdapter.java | IncrementalIndexAdapter.processRows | private void processRows(
IncrementalIndex<?> index,
BitmapFactory bitmapFactory,
List<IncrementalIndex.DimensionDesc> dimensions
)
{
int rowNum = 0;
for (IncrementalIndexRow row : index.getFacts().persistIterable()) {
final Object[] dims = row.getDims();
for (IncrementalIndex... | java | private void processRows(
IncrementalIndex<?> index,
BitmapFactory bitmapFactory,
List<IncrementalIndex.DimensionDesc> dimensions
)
{
int rowNum = 0;
for (IncrementalIndexRow row : index.getFacts().persistIterable()) {
final Object[] dims = row.getDims();
for (IncrementalIndex... | [
"private",
"void",
"processRows",
"(",
"IncrementalIndex",
"<",
"?",
">",
"index",
",",
"BitmapFactory",
"bitmapFactory",
",",
"List",
"<",
"IncrementalIndex",
".",
"DimensionDesc",
">",
"dimensions",
")",
"{",
"int",
"rowNum",
"=",
"0",
";",
"for",
"(",
"In... | Sometimes it's hard to tell whether one dimension contains a null value or not.
If one dimension had show a null or empty value explicitly, then yes, it contains
null value. But if one dimension's values are all non-null, it still early to say
this dimension does not contain null value. Consider a two row case, first r... | [
"Sometimes",
"it",
"s",
"hard",
"to",
"tell",
"whether",
"one",
"dimension",
"contains",
"a",
"null",
"value",
"or",
"not",
".",
"If",
"one",
"dimension",
"had",
"show",
"a",
"null",
"or",
"empty",
"value",
"explicitly",
"then",
"yes",
"it",
"contains",
... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndexAdapter.java#L89-L118 |
127,606 | apache/incubator-druid | server/src/main/java/org/apache/druid/segment/indexing/RealtimeTuningConfig.java | RealtimeTuningConfig.makeDefaultTuningConfig | public static RealtimeTuningConfig makeDefaultTuningConfig(final @Nullable File basePersistDirectory)
{
return new RealtimeTuningConfig(
defaultMaxRowsInMemory,
0L,
defaultIntermediatePersistPeriod,
defaultWindowPeriod,
basePersistDirectory == null ? createNewBasePersistDir... | java | public static RealtimeTuningConfig makeDefaultTuningConfig(final @Nullable File basePersistDirectory)
{
return new RealtimeTuningConfig(
defaultMaxRowsInMemory,
0L,
defaultIntermediatePersistPeriod,
defaultWindowPeriod,
basePersistDirectory == null ? createNewBasePersistDir... | [
"public",
"static",
"RealtimeTuningConfig",
"makeDefaultTuningConfig",
"(",
"final",
"@",
"Nullable",
"File",
"basePersistDirectory",
")",
"{",
"return",
"new",
"RealtimeTuningConfig",
"(",
"defaultMaxRowsInMemory",
",",
"0L",
",",
"defaultIntermediatePersistPeriod",
",",
... | Might make sense for this to be a builder | [
"Might",
"make",
"sense",
"for",
"this",
"to",
"be",
"a",
"builder"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/indexing/RealtimeTuningConfig.java#L72-L94 |
127,607 | apache/incubator-druid | server/src/main/java/org/apache/druid/segment/realtime/FireDepartmentMetrics.java | FireDepartmentMetrics.merge | public FireDepartmentMetrics merge(FireDepartmentMetrics other)
{
Preconditions.checkNotNull(other, "Cannot merge a null FireDepartmentMetrics");
FireDepartmentMetrics otherSnapshot = other.snapshot();
processedCount.addAndGet(otherSnapshot.processed());
processedWithErrorsCount.addAndGet(otherSnapsho... | java | public FireDepartmentMetrics merge(FireDepartmentMetrics other)
{
Preconditions.checkNotNull(other, "Cannot merge a null FireDepartmentMetrics");
FireDepartmentMetrics otherSnapshot = other.snapshot();
processedCount.addAndGet(otherSnapshot.processed());
processedWithErrorsCount.addAndGet(otherSnapsho... | [
"public",
"FireDepartmentMetrics",
"merge",
"(",
"FireDepartmentMetrics",
"other",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"other",
",",
"\"Cannot merge a null FireDepartmentMetrics\"",
")",
";",
"FireDepartmentMetrics",
"otherSnapshot",
"=",
"other",
".",
"s... | merge other FireDepartmentMetrics, will modify this object's data
@return this object | [
"merge",
"other",
"FireDepartmentMetrics",
"will",
"modify",
"this",
"object",
"s",
"data"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/realtime/FireDepartmentMetrics.java#L253-L276 |
127,608 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/worker/TaskAnnouncement.java | TaskAnnouncement.create | public static TaskAnnouncement create(Task task, TaskStatus status, TaskLocation location)
{
return create(task.getId(), task.getType(), task.getTaskResource(), status, location, task.getDataSource());
} | java | public static TaskAnnouncement create(Task task, TaskStatus status, TaskLocation location)
{
return create(task.getId(), task.getType(), task.getTaskResource(), status, location, task.getDataSource());
} | [
"public",
"static",
"TaskAnnouncement",
"create",
"(",
"Task",
"task",
",",
"TaskStatus",
"status",
",",
"TaskLocation",
"location",
")",
"{",
"return",
"create",
"(",
"task",
".",
"getId",
"(",
")",
",",
"task",
".",
"getType",
"(",
")",
",",
"task",
".... | nullable for backward compatibility | [
"nullable",
"for",
"backward",
"compatibility"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/worker/TaskAnnouncement.java#L46-L49 |
127,609 | apache/incubator-druid | processing/src/main/java/org/apache/druid/query/groupby/resource/GroupByQueryResource.java | GroupByQueryResource.getMergeBuffer | public ResourceHolder<ByteBuffer> getMergeBuffer()
{
final ByteBuffer buffer = mergeBuffers.pop();
return new ResourceHolder<ByteBuffer>()
{
@Override
public ByteBuffer get()
{
return buffer;
}
@Override
public void close()
{
mergeBuffers.add(buff... | java | public ResourceHolder<ByteBuffer> getMergeBuffer()
{
final ByteBuffer buffer = mergeBuffers.pop();
return new ResourceHolder<ByteBuffer>()
{
@Override
public ByteBuffer get()
{
return buffer;
}
@Override
public void close()
{
mergeBuffers.add(buff... | [
"public",
"ResourceHolder",
"<",
"ByteBuffer",
">",
"getMergeBuffer",
"(",
")",
"{",
"final",
"ByteBuffer",
"buffer",
"=",
"mergeBuffers",
".",
"pop",
"(",
")",
";",
"return",
"new",
"ResourceHolder",
"<",
"ByteBuffer",
">",
"(",
")",
"{",
"@",
"Override",
... | Get a merge buffer from the pre-acquired resources.
@return a resource holder containing a merge buffer
@throws IllegalStateException if this resource is initialized with empty merge buffers, or
there isn't any available merge buffers | [
"Get",
"a",
"merge",
"buffer",
"from",
"the",
"pre",
"-",
"acquired",
"resources",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/groupby/resource/GroupByQueryResource.java#L64-L81 |
127,610 | apache/incubator-druid | processing/src/main/java/org/apache/druid/segment/data/CompressionFactory.java | CompressionFactory.getFloatSupplier | public static Supplier<ColumnarFloats> getFloatSupplier(
int totalSize,
int sizePer,
ByteBuffer fromBuffer,
ByteOrder order,
CompressionStrategy strategy
)
{
if (strategy == CompressionStrategy.NONE) {
return new EntireLayoutColumnarFloatsSupplier(totalSize, fromBuffer, order... | java | public static Supplier<ColumnarFloats> getFloatSupplier(
int totalSize,
int sizePer,
ByteBuffer fromBuffer,
ByteOrder order,
CompressionStrategy strategy
)
{
if (strategy == CompressionStrategy.NONE) {
return new EntireLayoutColumnarFloatsSupplier(totalSize, fromBuffer, order... | [
"public",
"static",
"Supplier",
"<",
"ColumnarFloats",
">",
"getFloatSupplier",
"(",
"int",
"totalSize",
",",
"int",
"sizePer",
",",
"ByteBuffer",
"fromBuffer",
",",
"ByteOrder",
"order",
",",
"CompressionStrategy",
"strategy",
")",
"{",
"if",
"(",
"strategy",
"... | Float currently does not support any encoding types, and stores values as 4 byte float | [
"Float",
"currently",
"does",
"not",
"support",
"any",
"encoding",
"types",
"and",
"stores",
"values",
"as",
"4",
"byte",
"float"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/data/CompressionFactory.java#L341-L354 |
127,611 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java | LookupCoordinatorManager.getLookup | @Nullable
public LookupExtractorFactoryMapContainer getLookup(final String tier, final String lookupName)
{
final Map<String, Map<String, LookupExtractorFactoryMapContainer>> prior = getKnownLookups();
if (prior == null) {
LOG.warn("Requested tier [%s] lookupName [%s]. But no lookups exist!", tier, lo... | java | @Nullable
public LookupExtractorFactoryMapContainer getLookup(final String tier, final String lookupName)
{
final Map<String, Map<String, LookupExtractorFactoryMapContainer>> prior = getKnownLookups();
if (prior == null) {
LOG.warn("Requested tier [%s] lookupName [%s]. But no lookups exist!", tier, lo... | [
"@",
"Nullable",
"public",
"LookupExtractorFactoryMapContainer",
"getLookup",
"(",
"final",
"String",
"tier",
",",
"final",
"String",
"lookupName",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Map",
"<",
"String",
",",
"LookupExtractorFactoryMapContainer",
">",
... | Try to find a lookupName spec for the specified lookupName.
@param lookupName The lookupName to look for
@return The lookupName spec if found or null if not found or if no lookups at all are found | [
"Try",
"to",
"find",
"a",
"lookupName",
"spec",
"for",
"the",
"specified",
"lookupName",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java#L322-L336 |
127,612 | apache/incubator-druid | extensions-contrib/materialized-view-selection/src/main/java/org/apache/druid/query/materializedview/DerivativeDataSourceManager.java | DerivativeDataSourceManager.getAvgSizePerGranularity | private long getAvgSizePerGranularity(String datasource)
{
return connector.retryWithHandle(
new HandleCallback<Long>() {
Set<Interval> intervals = new HashSet<>();
long totalSize = 0;
@Override
public Long withHandle(Handle handle)
{
handle.cr... | java | private long getAvgSizePerGranularity(String datasource)
{
return connector.retryWithHandle(
new HandleCallback<Long>() {
Set<Interval> intervals = new HashSet<>();
long totalSize = 0;
@Override
public Long withHandle(Handle handle)
{
handle.cr... | [
"private",
"long",
"getAvgSizePerGranularity",
"(",
"String",
"datasource",
")",
"{",
"return",
"connector",
".",
"retryWithHandle",
"(",
"new",
"HandleCallback",
"<",
"Long",
">",
"(",
")",
"{",
"Set",
"<",
"Interval",
">",
"intervals",
"=",
"new",
"HashSet",... | calculate the average data size per segment granularity for a given datasource.
e.g. for a datasource, there're 5 segments as follows,
interval = "2018-04-01/2017-04-02", segment size = 1024 * 1024 * 2
interval = "2018-04-01/2017-04-02", segment size = 1024 * 1024 * 2
interval = "2018-04-02/2017-04-03", segment size =... | [
"calculate",
"the",
"average",
"data",
"size",
"per",
"segment",
"granularity",
"for",
"a",
"given",
"datasource",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-contrib/materialized-view-selection/src/main/java/org/apache/druid/query/materializedview/DerivativeDataSourceManager.java#L227-L265 |
127,613 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java | Filtration.optimize | public Filtration optimize(final DruidQuerySignature querySignature)
{
return transform(
this,
ImmutableList.of(
CombineAndSimplifyBounds.instance(),
MoveTimeFiltersToIntervals.instance(),
ConvertBoundsToSelectors.create(querySignature),
ConvertSelec... | java | public Filtration optimize(final DruidQuerySignature querySignature)
{
return transform(
this,
ImmutableList.of(
CombineAndSimplifyBounds.instance(),
MoveTimeFiltersToIntervals.instance(),
ConvertBoundsToSelectors.create(querySignature),
ConvertSelec... | [
"public",
"Filtration",
"optimize",
"(",
"final",
"DruidQuerySignature",
"querySignature",
")",
"{",
"return",
"transform",
"(",
"this",
",",
"ImmutableList",
".",
"of",
"(",
"CombineAndSimplifyBounds",
".",
"instance",
"(",
")",
",",
"MoveTimeFiltersToIntervals",
"... | Optimize a Filtration for querying, possibly pulling out intervals and simplifying the dimFilter in the process.
@return equivalent Filtration | [
"Optimize",
"a",
"Filtration",
"for",
"querying",
"possibly",
"pulling",
"out",
"intervals",
"and",
"simplifying",
"the",
"dimFilter",
"in",
"the",
"process",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java#L111-L124 |
127,614 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java | Filtration.optimizeFilterOnly | public Filtration optimizeFilterOnly(final DruidQuerySignature querySignature)
{
if (!intervals.equals(ImmutableList.of(eternity()))) {
throw new ISE("Cannot optimizeFilterOnly when intervals are set");
}
final Filtration transformed = transform(
this,
ImmutableList.of(
... | java | public Filtration optimizeFilterOnly(final DruidQuerySignature querySignature)
{
if (!intervals.equals(ImmutableList.of(eternity()))) {
throw new ISE("Cannot optimizeFilterOnly when intervals are set");
}
final Filtration transformed = transform(
this,
ImmutableList.of(
... | [
"public",
"Filtration",
"optimizeFilterOnly",
"(",
"final",
"DruidQuerySignature",
"querySignature",
")",
"{",
"if",
"(",
"!",
"intervals",
".",
"equals",
"(",
"ImmutableList",
".",
"of",
"(",
"eternity",
"(",
")",
")",
")",
")",
"{",
"throw",
"new",
"ISE",
... | Optimize a Filtration containing only a DimFilter, avoiding pulling out intervals.
@return equivalent Filtration | [
"Optimize",
"a",
"Filtration",
"containing",
"only",
"a",
"DimFilter",
"avoiding",
"pulling",
"out",
"intervals",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/filtration/Filtration.java#L131-L151 |
127,615 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java | DruidQuery.postAggregatorDirectColumnIsOk | private static boolean postAggregatorDirectColumnIsOk(
final RowSignature aggregateRowSignature,
final DruidExpression expression,
final RexNode rexNode
)
{
if (!expression.isDirectColumnAccess()) {
return false;
}
// Check if a cast is necessary.
final ExprType toExprType =... | java | private static boolean postAggregatorDirectColumnIsOk(
final RowSignature aggregateRowSignature,
final DruidExpression expression,
final RexNode rexNode
)
{
if (!expression.isDirectColumnAccess()) {
return false;
}
// Check if a cast is necessary.
final ExprType toExprType =... | [
"private",
"static",
"boolean",
"postAggregatorDirectColumnIsOk",
"(",
"final",
"RowSignature",
"aggregateRowSignature",
",",
"final",
"DruidExpression",
"expression",
",",
"final",
"RexNode",
"rexNode",
")",
"{",
"if",
"(",
"!",
"expression",
".",
"isDirectColumnAccess... | Returns true if a post-aggregation "expression" can be realized as a direct field access. This is true if it's
a direct column access that doesn't require an implicit cast.
@param aggregateRowSignature signature of the aggregation
@param expression post-aggregation expression
@param rexNode Re... | [
"Returns",
"true",
"if",
"a",
"post",
"-",
"aggregation",
"expression",
"can",
"be",
"realized",
"as",
"a",
"direct",
"field",
"access",
".",
"This",
"is",
"true",
"if",
"it",
"s",
"a",
"direct",
"column",
"access",
"that",
"doesn",
"t",
"require",
"an",... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L634-L654 |
127,616 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java | DruidQuery.toTimeseriesQuery | @Nullable
public TimeseriesQuery toTimeseriesQuery()
{
if (grouping == null || grouping.getHavingFilter() != null) {
return null;
}
final Granularity queryGranularity;
final boolean descending;
int timeseriesLimit = 0;
if (grouping.getDimensions().isEmpty()) {
queryGranularity =... | java | @Nullable
public TimeseriesQuery toTimeseriesQuery()
{
if (grouping == null || grouping.getHavingFilter() != null) {
return null;
}
final Granularity queryGranularity;
final boolean descending;
int timeseriesLimit = 0;
if (grouping.getDimensions().isEmpty()) {
queryGranularity =... | [
"@",
"Nullable",
"public",
"TimeseriesQuery",
"toTimeseriesQuery",
"(",
")",
"{",
"if",
"(",
"grouping",
"==",
"null",
"||",
"grouping",
".",
"getHavingFilter",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Granularity",
"queryGranu... | Return this query as a Timeseries query, or null if this query is not compatible with Timeseries.
@return query | [
"Return",
"this",
"query",
"as",
"a",
"Timeseries",
"query",
"or",
"null",
"if",
"this",
"query",
"is",
"not",
"compatible",
"with",
"Timeseries",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L773-L849 |
127,617 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java | DruidQuery.toTopNQuery | @Nullable
public TopNQuery toTopNQuery()
{
// Must have GROUP BY one column, ORDER BY zero or one column, limit less than maxTopNLimit, and no HAVING.
final boolean topNOk = grouping != null
&& grouping.getDimensions().size() == 1
&& limitSpec != null
... | java | @Nullable
public TopNQuery toTopNQuery()
{
// Must have GROUP BY one column, ORDER BY zero or one column, limit less than maxTopNLimit, and no HAVING.
final boolean topNOk = grouping != null
&& grouping.getDimensions().size() == 1
&& limitSpec != null
... | [
"@",
"Nullable",
"public",
"TopNQuery",
"toTopNQuery",
"(",
")",
"{",
"// Must have GROUP BY one column, ORDER BY zero or one column, limit less than maxTopNLimit, and no HAVING.",
"final",
"boolean",
"topNOk",
"=",
"grouping",
"!=",
"null",
"&&",
"grouping",
".",
"getDimension... | Return this query as a TopN query, or null if this query is not compatible with TopN.
@return query or null | [
"Return",
"this",
"query",
"as",
"a",
"TopN",
"query",
"or",
"null",
"if",
"this",
"query",
"is",
"not",
"compatible",
"with",
"TopN",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L856-L923 |
127,618 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java | DruidQuery.toGroupByQuery | @Nullable
public GroupByQuery toGroupByQuery()
{
if (grouping == null) {
return null;
}
final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature);
final DimFilterHavingSpec havingSpec;
if (grouping.getHavingFilter() != null) {
havingSpec = new DimFilter... | java | @Nullable
public GroupByQuery toGroupByQuery()
{
if (grouping == null) {
return null;
}
final Filtration filtration = Filtration.create(filter).optimize(sourceQuerySignature);
final DimFilterHavingSpec havingSpec;
if (grouping.getHavingFilter() != null) {
havingSpec = new DimFilter... | [
"@",
"Nullable",
"public",
"GroupByQuery",
"toGroupByQuery",
"(",
")",
"{",
"if",
"(",
"grouping",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Filtration",
"filtration",
"=",
"Filtration",
".",
"create",
"(",
"filter",
")",
".",
"optimize... | Return this query as a GroupBy query, or null if this query is not compatible with GroupBy.
@return query or null | [
"Return",
"this",
"query",
"as",
"a",
"GroupBy",
"query",
"or",
"null",
"if",
"this",
"query",
"is",
"not",
"compatible",
"with",
"GroupBy",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L930-L967 |
127,619 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java | DruidQuery.toScanQuery | @Nullable
public ScanQuery toScanQuery()
{
if (grouping != null) {
// Scan cannot GROUP BY.
return null;
}
if (limitSpec != null &&
(limitSpec.getColumns().size() > 1
|| (limitSpec.getColumns().size() == 1 && !Iterables.getOnlyElement(limitSpec.getColumns())
... | java | @Nullable
public ScanQuery toScanQuery()
{
if (grouping != null) {
// Scan cannot GROUP BY.
return null;
}
if (limitSpec != null &&
(limitSpec.getColumns().size() > 1
|| (limitSpec.getColumns().size() == 1 && !Iterables.getOnlyElement(limitSpec.getColumns())
... | [
"@",
"Nullable",
"public",
"ScanQuery",
"toScanQuery",
"(",
")",
"{",
"if",
"(",
"grouping",
"!=",
"null",
")",
"{",
"// Scan cannot GROUP BY.",
"return",
"null",
";",
"}",
"if",
"(",
"limitSpec",
"!=",
"null",
"&&",
"(",
"limitSpec",
".",
"getColumns",
"(... | Return this query as a Scan query, or null if this query is not compatible with Scan.
@return query or null | [
"Return",
"this",
"query",
"as",
"a",
"Scan",
"query",
"or",
"null",
"if",
"this",
"query",
"is",
"not",
"compatible",
"with",
"Scan",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java#L974-L1024 |
127,620 | apache/incubator-druid | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchMergeAggregatorFactory.java | SketchMergeAggregatorFactory.finalizeComputation | @Override
public Object finalizeComputation(Object object)
{
if (shouldFinalize) {
SketchHolder holder = (SketchHolder) object;
if (errorBoundsStdDev != null) {
return holder.getEstimateWithErrorBounds(errorBoundsStdDev);
} else {
return holder.getEstimate();
}
} else... | java | @Override
public Object finalizeComputation(Object object)
{
if (shouldFinalize) {
SketchHolder holder = (SketchHolder) object;
if (errorBoundsStdDev != null) {
return holder.getEstimateWithErrorBounds(errorBoundsStdDev);
} else {
return holder.getEstimate();
}
} else... | [
"@",
"Override",
"public",
"Object",
"finalizeComputation",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"shouldFinalize",
")",
"{",
"SketchHolder",
"holder",
"=",
"(",
"SketchHolder",
")",
"object",
";",
"if",
"(",
"errorBoundsStdDev",
"!=",
"null",
")",
"... | Finalize the computation on sketch object and returns estimate from underlying
sketch.
@param object the sketch object
@return sketch object | [
"Finalize",
"the",
"computation",
"on",
"sketch",
"object",
"and",
"returns",
"estimate",
"from",
"underlying",
"sketch",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchMergeAggregatorFactory.java#L120-L133 |
127,621 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java | Expressions.fromFieldAccess | public static RexNode fromFieldAccess(
final RowSignature rowSignature,
final Project project,
final int fieldNumber
)
{
if (project == null) {
// I don't think the factory impl matters here.
return RexInputRef.of(fieldNumber, rowSignature.getRelDataType(new JavaTypeFactoryImpl()))... | java | public static RexNode fromFieldAccess(
final RowSignature rowSignature,
final Project project,
final int fieldNumber
)
{
if (project == null) {
// I don't think the factory impl matters here.
return RexInputRef.of(fieldNumber, rowSignature.getRelDataType(new JavaTypeFactoryImpl()))... | [
"public",
"static",
"RexNode",
"fromFieldAccess",
"(",
"final",
"RowSignature",
"rowSignature",
",",
"final",
"Project",
"project",
",",
"final",
"int",
"fieldNumber",
")",
"{",
"if",
"(",
"project",
"==",
"null",
")",
"{",
"// I don't think the factory impl matters... | Translate a field access, possibly through a projection, to an underlying Druid dataSource.
@param rowSignature row signature of underlying Druid dataSource
@param project projection, or null
@param fieldNumber number of the field to access
@return row expression | [
"Translate",
"a",
"field",
"access",
"possibly",
"through",
"a",
"projection",
"to",
"an",
"underlying",
"Druid",
"dataSource",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java#L88-L100 |
127,622 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java | Expressions.toFilter | @Nullable
public static DimFilter toFilter(
final PlannerContext plannerContext,
final DruidQuerySignature querySignature,
final RexNode expression
)
{
final SqlKind kind = expression.getKind();
if (kind == SqlKind.IS_TRUE || kind == SqlKind.IS_NOT_FALSE) {
return toFilter(
... | java | @Nullable
public static DimFilter toFilter(
final PlannerContext plannerContext,
final DruidQuerySignature querySignature,
final RexNode expression
)
{
final SqlKind kind = expression.getKind();
if (kind == SqlKind.IS_TRUE || kind == SqlKind.IS_NOT_FALSE) {
return toFilter(
... | [
"@",
"Nullable",
"public",
"static",
"DimFilter",
"toFilter",
"(",
"final",
"PlannerContext",
"plannerContext",
",",
"final",
"DruidQuerySignature",
"querySignature",
",",
"final",
"RexNode",
"expression",
")",
"{",
"final",
"SqlKind",
"kind",
"=",
"expression",
"."... | Translates "condition" to a Druid filter, or returns null if we cannot translate the condition.
@param plannerContext planner context
@param querySignature row signature of the dataSource to be filtered
@param expression Calcite row expression | [
"Translates",
"condition",
"to",
"a",
"Druid",
"filter",
"or",
"returns",
"null",
"if",
"we",
"cannot",
"translate",
"the",
"condition",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java#L215-L269 |
127,623 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java | Expressions.toLeafFilter | @Nullable
private static DimFilter toLeafFilter(
final PlannerContext plannerContext,
final DruidQuerySignature querySignature,
final RexNode rexNode
)
{
if (rexNode.isAlwaysTrue()) {
return Filtration.matchEverything();
} else if (rexNode.isAlwaysFalse()) {
return Filtration... | java | @Nullable
private static DimFilter toLeafFilter(
final PlannerContext plannerContext,
final DruidQuerySignature querySignature,
final RexNode rexNode
)
{
if (rexNode.isAlwaysTrue()) {
return Filtration.matchEverything();
} else if (rexNode.isAlwaysFalse()) {
return Filtration... | [
"@",
"Nullable",
"private",
"static",
"DimFilter",
"toLeafFilter",
"(",
"final",
"PlannerContext",
"plannerContext",
",",
"final",
"DruidQuerySignature",
"querySignature",
",",
"final",
"RexNode",
"rexNode",
")",
"{",
"if",
"(",
"rexNode",
".",
"isAlwaysTrue",
"(",
... | Translates "condition" to a Druid filter, assuming it does not contain any boolean expressions. Returns null
if we cannot translate the condition.
@param plannerContext planner context
@param querySignature row signature of the dataSource to be filtered
@param rexNode Calcite row expression | [
"Translates",
"condition",
"to",
"a",
"Druid",
"filter",
"assuming",
"it",
"does",
"not",
"contain",
"any",
"boolean",
"expressions",
".",
"Returns",
"null",
"if",
"we",
"cannot",
"translate",
"the",
"condition",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java#L279-L300 |
127,624 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java | Expressions.toExpressionLeafFilter | @Nullable
private static DimFilter toExpressionLeafFilter(
final PlannerContext plannerContext,
final RowSignature rowSignature,
final RexNode rexNode
)
{
final DruidExpression druidExpression = toDruidExpression(plannerContext, rowSignature, rexNode);
return druidExpression != null
... | java | @Nullable
private static DimFilter toExpressionLeafFilter(
final PlannerContext plannerContext,
final RowSignature rowSignature,
final RexNode rexNode
)
{
final DruidExpression druidExpression = toDruidExpression(plannerContext, rowSignature, rexNode);
return druidExpression != null
... | [
"@",
"Nullable",
"private",
"static",
"DimFilter",
"toExpressionLeafFilter",
"(",
"final",
"PlannerContext",
"plannerContext",
",",
"final",
"RowSignature",
"rowSignature",
",",
"final",
"RexNode",
"rexNode",
")",
"{",
"final",
"DruidExpression",
"druidExpression",
"=",... | Translates to an "expression" type leaf filter. Used as a fallback if we can't use a simple leaf filter. | [
"Translates",
"to",
"an",
"expression",
"type",
"leaf",
"filter",
".",
"Used",
"as",
"a",
"fallback",
"if",
"we",
"can",
"t",
"use",
"a",
"simple",
"leaf",
"filter",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java#L539-L550 |
127,625 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/schema/MetadataSegmentView.java | MetadataSegmentView.getMetadataSegments | private JsonParserIterator<DataSegment> getMetadataSegments(
DruidLeaderClient coordinatorClient,
ObjectMapper jsonMapper,
BytesAccumulatingResponseHandler responseHandler,
Set<String> watchedDataSources
)
{
String query = "/druid/coordinator/v1/metadata/segments";
if (watchedDataSou... | java | private JsonParserIterator<DataSegment> getMetadataSegments(
DruidLeaderClient coordinatorClient,
ObjectMapper jsonMapper,
BytesAccumulatingResponseHandler responseHandler,
Set<String> watchedDataSources
)
{
String query = "/druid/coordinator/v1/metadata/segments";
if (watchedDataSou... | [
"private",
"JsonParserIterator",
"<",
"DataSegment",
">",
"getMetadataSegments",
"(",
"DruidLeaderClient",
"coordinatorClient",
",",
"ObjectMapper",
"jsonMapper",
",",
"BytesAccumulatingResponseHandler",
"responseHandler",
",",
"Set",
"<",
"String",
">",
"watchedDataSources",... | Note that coordinator must be up to get segments | [
"Note",
"that",
"coordinator",
"must",
"be",
"up",
"to",
"get",
"segments"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/schema/MetadataSegmentView.java#L182-L228 |
127,626 | apache/incubator-druid | server/src/main/java/org/apache/druid/segment/realtime/appenderator/BatchAppenderatorDriver.java | BatchAppenderatorDriver.startJob | @Override
@Nullable
public Object startJob()
{
final Object metadata = appenderator.startJob();
if (metadata != null) {
throw new ISE("Metadata should be null because BatchAppenderatorDriver never persists it");
}
return null;
} | java | @Override
@Nullable
public Object startJob()
{
final Object metadata = appenderator.startJob();
if (metadata != null) {
throw new ISE("Metadata should be null because BatchAppenderatorDriver never persists it");
}
return null;
} | [
"@",
"Override",
"@",
"Nullable",
"public",
"Object",
"startJob",
"(",
")",
"{",
"final",
"Object",
"metadata",
"=",
"appenderator",
".",
"startJob",
"(",
")",
";",
"if",
"(",
"metadata",
"!=",
"null",
")",
"{",
"throw",
"new",
"ISE",
"(",
"\"Metadata sh... | This method always returns null because batch ingestion doesn't support restoring tasks on failures.
@return always null | [
"This",
"method",
"always",
"returns",
"null",
"because",
"batch",
"ingestion",
"doesn",
"t",
"support",
"restoring",
"tasks",
"on",
"failures",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/realtime/appenderator/BatchAppenderatorDriver.java#L80-L89 |
127,627 | apache/incubator-druid | server/src/main/java/org/apache/druid/segment/realtime/appenderator/BatchAppenderatorDriver.java | BatchAppenderatorDriver.publishAll | public ListenableFuture<SegmentsAndMetadata> publishAll(final TransactionalSegmentPublisher publisher)
{
final Map<String, SegmentsForSequence> snapshot;
synchronized (segments) {
snapshot = ImmutableMap.copyOf(segments);
}
return publishInBackground(
new SegmentsAndMetadata(
... | java | public ListenableFuture<SegmentsAndMetadata> publishAll(final TransactionalSegmentPublisher publisher)
{
final Map<String, SegmentsForSequence> snapshot;
synchronized (segments) {
snapshot = ImmutableMap.copyOf(segments);
}
return publishInBackground(
new SegmentsAndMetadata(
... | [
"public",
"ListenableFuture",
"<",
"SegmentsAndMetadata",
">",
"publishAll",
"(",
"final",
"TransactionalSegmentPublisher",
"publisher",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"SegmentsForSequence",
">",
"snapshot",
";",
"synchronized",
"(",
"segments",
")",
... | Publish all segments.
@param publisher segment publisher
@return a {@link ListenableFuture} for the publish task | [
"Publish",
"all",
"segments",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/realtime/appenderator/BatchAppenderatorDriver.java#L191-L216 |
127,628 | apache/incubator-druid | indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java | JobHelper.setupClasspath | public static void setupClasspath(
final Path distributedClassPath,
final Path intermediateClassPath,
final Job job
)
throws IOException
{
String classpathProperty = System.getProperty("druid.hadoop.internal.classpath");
if (classpathProperty == null) {
classpathProperty = Syst... | java | public static void setupClasspath(
final Path distributedClassPath,
final Path intermediateClassPath,
final Job job
)
throws IOException
{
String classpathProperty = System.getProperty("druid.hadoop.internal.classpath");
if (classpathProperty == null) {
classpathProperty = Syst... | [
"public",
"static",
"void",
"setupClasspath",
"(",
"final",
"Path",
"distributedClassPath",
",",
"final",
"Path",
"intermediateClassPath",
",",
"final",
"Job",
"job",
")",
"throws",
"IOException",
"{",
"String",
"classpathProperty",
"=",
"System",
".",
"getProperty"... | Uploads jar files to hdfs and configures the classpath.
Snapshot jar files are uploaded to intermediateClasspath and not shared across multiple jobs.
Non-Snapshot jar files are uploaded to a distributedClasspath and shared across multiple jobs.
@param distributedClassPath classpath shared across multiple jobs
@param ... | [
"Uploads",
"jar",
"files",
"to",
"hdfs",
"and",
"configures",
"the",
"classpath",
".",
"Snapshot",
"jar",
"files",
"are",
"uploaded",
"to",
"intermediateClasspath",
"and",
"not",
"shared",
"across",
"multiple",
"jobs",
".",
"Non",
"-",
"Snapshot",
"jar",
"file... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java#L134-L178 |
127,629 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java | DataSourcesResource.getSegmentDataSourceSpecificInterval | @GET
@Path("/{dataSourceName}/intervals/{interval}/serverview")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(DatasourceResourceFilter.class)
public Response getSegmentDataSourceSpecificInterval(
@PathParam("dataSourceName") String dataSourceName,
@PathParam("interval") String interval,
... | java | @GET
@Path("/{dataSourceName}/intervals/{interval}/serverview")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(DatasourceResourceFilter.class)
public Response getSegmentDataSourceSpecificInterval(
@PathParam("dataSourceName") String dataSourceName,
@PathParam("interval") String interval,
... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{dataSourceName}/intervals/{interval}/serverview\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"ResourceFilters",
"(",
"DatasourceResourceFilter",
".",
"class",
")",
"public",
"Response",
"getSegmentData... | Provides serverView for a datasource and Interval which gives details about servers hosting segments for an interval
Used by the realtime tasks to fetch a view of the interval they are interested in. | [
"Provides",
"serverView",
"for",
"a",
"datasource",
"and",
"Interval",
"which",
"gives",
"details",
"about",
"servers",
"hosting",
"segments",
"for",
"an",
"interval",
"Used",
"by",
"the",
"realtime",
"tasks",
"to",
"fetch",
"a",
"view",
"of",
"the",
"interval... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java#L595-L625 |
127,630 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java | DataSourcesResource.isHandOffComplete | @GET
@Path("/{dataSourceName}/handoffComplete")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(DatasourceResourceFilter.class)
public Response isHandOffComplete(
@PathParam("dataSourceName") String dataSourceName,
@QueryParam("interval") final String interval,
@QueryParam("partitionNum... | java | @GET
@Path("/{dataSourceName}/handoffComplete")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(DatasourceResourceFilter.class)
public Response isHandOffComplete(
@PathParam("dataSourceName") String dataSourceName,
@QueryParam("interval") final String interval,
@QueryParam("partitionNum... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{dataSourceName}/handoffComplete\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"ResourceFilters",
"(",
"DatasourceResourceFilter",
".",
"class",
")",
"public",
"Response",
"isHandOffComplete",
"(",
"... | Used by the realtime tasks to learn whether a segment is handed off or not.
It returns true when the segment will never be handed off or is already handed off. Otherwise, it returns false. | [
"Used",
"by",
"the",
"realtime",
"tasks",
"to",
"learn",
"whether",
"a",
"segment",
"is",
"handed",
"off",
"or",
"not",
".",
"It",
"returns",
"true",
"when",
"the",
"segment",
"will",
"never",
"be",
"handed",
"off",
"or",
"is",
"already",
"handed",
"off"... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java#L631-L691 |
127,631 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/common/tasklogs/LogUtils.java | LogUtils.streamFile | public static InputStream streamFile(final File file, final long offset) throws IOException
{
final RandomAccessFile raf = new RandomAccessFile(file, "r");
final long rafLength = raf.length();
if (offset > 0) {
raf.seek(offset);
} else if (offset < 0 && offset < rafLength) {
raf.seek(Math.... | java | public static InputStream streamFile(final File file, final long offset) throws IOException
{
final RandomAccessFile raf = new RandomAccessFile(file, "r");
final long rafLength = raf.length();
if (offset > 0) {
raf.seek(offset);
} else if (offset < 0 && offset < rafLength) {
raf.seek(Math.... | [
"public",
"static",
"InputStream",
"streamFile",
"(",
"final",
"File",
"file",
",",
"final",
"long",
"offset",
")",
"throws",
"IOException",
"{",
"final",
"RandomAccessFile",
"raf",
"=",
"new",
"RandomAccessFile",
"(",
"file",
",",
"\"r\"",
")",
";",
"final",
... | Open a stream to a file.
@param offset If zero, stream the entire log. If positive, read from this byte position onwards. If negative,
read this many bytes from the end of the file.
@return input supplier for this log, if available from this provider | [
"Open",
"a",
"stream",
"to",
"a",
"file",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/common/tasklogs/LogUtils.java#L38-L48 |
127,632 | apache/incubator-druid | extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/DruidParquetReadSupport.java | DruidParquetReadSupport.getPartialReadSchema | private MessageType getPartialReadSchema(InitContext context)
{
MessageType fullSchema = context.getFileSchema();
String name = fullSchema.getName();
HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromConfiguration(context.getConfiguration());
ParseSpec parseSpec = config.getParser().get... | java | private MessageType getPartialReadSchema(InitContext context)
{
MessageType fullSchema = context.getFileSchema();
String name = fullSchema.getName();
HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromConfiguration(context.getConfiguration());
ParseSpec parseSpec = config.getParser().get... | [
"private",
"MessageType",
"getPartialReadSchema",
"(",
"InitContext",
"context",
")",
"{",
"MessageType",
"fullSchema",
"=",
"context",
".",
"getFileSchema",
"(",
")",
";",
"String",
"name",
"=",
"fullSchema",
".",
"getName",
"(",
")",
";",
"HadoopDruidIndexerConf... | Select the columns from the parquet schema that are used in the schema of the ingestion job
@param context The context of the file to be read
@return the partial schema that only contains the columns that are being used in the schema | [
"Select",
"the",
"columns",
"from",
"the",
"parquet",
"schema",
"that",
"are",
"used",
"in",
"the",
"schema",
"of",
"the",
"ingestion",
"job"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/DruidParquetReadSupport.java#L45-L87 |
127,633 | apache/incubator-druid | core/src/main/java/org/apache/druid/data/input/impl/prefetch/Fetcher.java | Fetcher.fetchIfNeeded | private void fetchIfNeeded(long remainingBytes)
{
if ((fetchFutures.isEmpty() || fetchFutures.peekLast().isDone())
&& remainingBytes <= prefetchConfig.getPrefetchTriggerBytes()) {
Future<Void> fetchFuture = fetchExecutor.submit(() -> {
fetch();
return null;
});
fetchFutur... | java | private void fetchIfNeeded(long remainingBytes)
{
if ((fetchFutures.isEmpty() || fetchFutures.peekLast().isDone())
&& remainingBytes <= prefetchConfig.getPrefetchTriggerBytes()) {
Future<Void> fetchFuture = fetchExecutor.submit(() -> {
fetch();
return null;
});
fetchFutur... | [
"private",
"void",
"fetchIfNeeded",
"(",
"long",
"remainingBytes",
")",
"{",
"if",
"(",
"(",
"fetchFutures",
".",
"isEmpty",
"(",
")",
"||",
"fetchFutures",
".",
"peekLast",
"(",
")",
".",
"isDone",
"(",
")",
")",
"&&",
"remainingBytes",
"<=",
"prefetchCon... | Submit a fetch task if remainingBytes is smaller than prefetchTriggerBytes. | [
"Submit",
"a",
"fetch",
"task",
"if",
"remainingBytes",
"is",
"smaller",
"than",
"prefetchTriggerBytes",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/data/input/impl/prefetch/Fetcher.java#L105-L115 |
127,634 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java | SeekableStreamIndexTaskRunner.isRecordAlreadyRead | private boolean isRecordAlreadyRead(
final PartitionIdType recordPartition,
final SequenceOffsetType recordSequenceNumber
)
{
final SequenceOffsetType lastReadOffset = lastReadOffsets.get(recordPartition);
if (lastReadOffset == null) {
return false;
} else {
return createSequenc... | java | private boolean isRecordAlreadyRead(
final PartitionIdType recordPartition,
final SequenceOffsetType recordSequenceNumber
)
{
final SequenceOffsetType lastReadOffset = lastReadOffsets.get(recordPartition);
if (lastReadOffset == null) {
return false;
} else {
return createSequenc... | [
"private",
"boolean",
"isRecordAlreadyRead",
"(",
"final",
"PartitionIdType",
"recordPartition",
",",
"final",
"SequenceOffsetType",
"recordSequenceNumber",
")",
"{",
"final",
"SequenceOffsetType",
"lastReadOffset",
"=",
"lastReadOffsets",
".",
"get",
"(",
"recordPartition"... | Returns true if the given record has already been read, based on lastReadOffsets. | [
"Returns",
"true",
"if",
"the",
"given",
"record",
"has",
"already",
"been",
"read",
"based",
"on",
"lastReadOffsets",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java#L1132-L1144 |
127,635 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java | SeekableStreamIndexTaskRunner.isMoreToReadBeforeReadingRecord | private boolean isMoreToReadBeforeReadingRecord(
final SequenceOffsetType recordSequenceNumber,
final SequenceOffsetType endSequenceNumber
)
{
final int compareToEnd = createSequenceNumber(recordSequenceNumber)
.compareTo(createSequenceNumber(endSequenceNumber));
return isEndOffsetExclu... | java | private boolean isMoreToReadBeforeReadingRecord(
final SequenceOffsetType recordSequenceNumber,
final SequenceOffsetType endSequenceNumber
)
{
final int compareToEnd = createSequenceNumber(recordSequenceNumber)
.compareTo(createSequenceNumber(endSequenceNumber));
return isEndOffsetExclu... | [
"private",
"boolean",
"isMoreToReadBeforeReadingRecord",
"(",
"final",
"SequenceOffsetType",
"recordSequenceNumber",
",",
"final",
"SequenceOffsetType",
"endSequenceNumber",
")",
"{",
"final",
"int",
"compareToEnd",
"=",
"createSequenceNumber",
"(",
"recordSequenceNumber",
")... | Returns true if, given that we want to start reading from recordSequenceNumber and end at endSequenceNumber, there
is more left to read. Used in pre-read checks to determine if there is anything left to read. | [
"Returns",
"true",
"if",
"given",
"that",
"we",
"want",
"to",
"start",
"reading",
"from",
"recordSequenceNumber",
"and",
"end",
"at",
"endSequenceNumber",
"there",
"is",
"more",
"left",
"to",
"read",
".",
"Used",
"in",
"pre",
"-",
"read",
"checks",
"to",
"... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java#L1150-L1159 |
127,636 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java | SeekableStreamIndexTaskRunner.isMoreToReadAfterReadingRecord | private boolean isMoreToReadAfterReadingRecord(
final SequenceOffsetType recordSequenceNumber,
final SequenceOffsetType endSequenceNumber
)
{
final int compareNextToEnd = createSequenceNumber(getNextStartOffset(recordSequenceNumber))
.compareTo(createSequenceNumber(endSequenceNumber));
... | java | private boolean isMoreToReadAfterReadingRecord(
final SequenceOffsetType recordSequenceNumber,
final SequenceOffsetType endSequenceNumber
)
{
final int compareNextToEnd = createSequenceNumber(getNextStartOffset(recordSequenceNumber))
.compareTo(createSequenceNumber(endSequenceNumber));
... | [
"private",
"boolean",
"isMoreToReadAfterReadingRecord",
"(",
"final",
"SequenceOffsetType",
"recordSequenceNumber",
",",
"final",
"SequenceOffsetType",
"endSequenceNumber",
")",
"{",
"final",
"int",
"compareNextToEnd",
"=",
"createSequenceNumber",
"(",
"getNextStartOffset",
"... | Returns true if, given that recordSequenceNumber has already been read and we want to end at endSequenceNumber,
there is more left to read. Used in post-read checks to determine if there is anything left to read. | [
"Returns",
"true",
"if",
"given",
"that",
"recordSequenceNumber",
"has",
"already",
"been",
"read",
"and",
"we",
"want",
"to",
"end",
"at",
"endSequenceNumber",
"there",
"is",
"more",
"left",
"to",
"read",
".",
"Used",
"in",
"post",
"-",
"read",
"checks",
... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java#L1165-L1175 |
127,637 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java | SeekableStreamIndexTaskRunner.authorizationCheck | private Access authorizationCheck(final HttpServletRequest req, Action action)
{
return IndexTaskUtils.datasourceAuthorizationCheck(req, action, task.getDataSource(), authorizerMapper);
} | java | private Access authorizationCheck(final HttpServletRequest req, Action action)
{
return IndexTaskUtils.datasourceAuthorizationCheck(req, action, task.getDataSource(), authorizerMapper);
} | [
"private",
"Access",
"authorizationCheck",
"(",
"final",
"HttpServletRequest",
"req",
",",
"Action",
"action",
")",
"{",
"return",
"IndexTaskUtils",
".",
"datasourceAuthorizationCheck",
"(",
"req",
",",
"action",
",",
"task",
".",
"getDataSource",
"(",
")",
",",
... | Authorizes action to be performed on this task's datasource
@return authorization result | [
"Authorizes",
"action",
"to",
"be",
"performed",
"on",
"this",
"task",
"s",
"datasource"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java#L1312-L1315 |
127,638 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java | SeekableStreamIndexTaskRunner.pauseHTTP | @POST
@Path("/pause")
@Produces(MediaType.APPLICATION_JSON)
public Response pauseHTTP(
@Context final HttpServletRequest req
) throws InterruptedException
{
authorizationCheck(req, Action.WRITE);
return pause();
} | java | @POST
@Path("/pause")
@Produces(MediaType.APPLICATION_JSON)
public Response pauseHTTP(
@Context final HttpServletRequest req
) throws InterruptedException
{
authorizationCheck(req, Action.WRITE);
return pause();
} | [
"@",
"POST",
"@",
"Path",
"(",
"\"/pause\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"public",
"Response",
"pauseHTTP",
"(",
"@",
"Context",
"final",
"HttpServletRequest",
"req",
")",
"throws",
"InterruptedException",
"{",
"authoriz... | Signals the ingestion loop to pause.
@return one of the following Responses: 400 Bad Request if the task has started publishing; 202 Accepted if the
method has timed out and returned before the task has paused; 200 OK with a map of the current partition sequences
in the response body if the task successfully paused | [
"Signals",
"the",
"ingestion",
"loop",
"to",
"pause",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java#L1631-L1640 |
127,639 | apache/incubator-druid | core/src/main/java/org/apache/druid/java/util/common/granularity/Granularity.java | Granularity.mergeGranularities | public static Granularity mergeGranularities(List<Granularity> toMerge)
{
if (toMerge == null || toMerge.size() == 0) {
return null;
}
Granularity result = toMerge.get(0);
for (int i = 1; i < toMerge.size(); i++) {
if (!Objects.equals(result, toMerge.get(i))) {
return null;
... | java | public static Granularity mergeGranularities(List<Granularity> toMerge)
{
if (toMerge == null || toMerge.size() == 0) {
return null;
}
Granularity result = toMerge.get(0);
for (int i = 1; i < toMerge.size(); i++) {
if (!Objects.equals(result, toMerge.get(i))) {
return null;
... | [
"public",
"static",
"Granularity",
"mergeGranularities",
"(",
"List",
"<",
"Granularity",
">",
"toMerge",
")",
"{",
"if",
"(",
"toMerge",
"==",
"null",
"||",
"toMerge",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"Granularity"... | simple merge strategy on query granularity that checks if all are equal or else
returns null. this can be improved in future but is good enough for most use-cases. | [
"simple",
"merge",
"strategy",
"on",
"query",
"granularity",
"that",
"checks",
"if",
"all",
"are",
"equal",
"or",
"else",
"returns",
"null",
".",
"this",
"can",
"be",
"improved",
"in",
"future",
"but",
"is",
"good",
"enough",
"for",
"most",
"use",
"-",
"... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/granularity/Granularity.java#L63-L77 |
127,640 | apache/incubator-druid | core/src/main/java/org/apache/druid/java/util/common/granularity/Granularity.java | Granularity.bucket | public final Interval bucket(DateTime t)
{
DateTime start = bucketStart(t);
return new Interval(start, increment(start));
} | java | public final Interval bucket(DateTime t)
{
DateTime start = bucketStart(t);
return new Interval(start, increment(start));
} | [
"public",
"final",
"Interval",
"bucket",
"(",
"DateTime",
"t",
")",
"{",
"DateTime",
"start",
"=",
"bucketStart",
"(",
"t",
")",
";",
"return",
"new",
"Interval",
"(",
"start",
",",
"increment",
"(",
"start",
")",
")",
";",
"}"
] | Return a granularity-sized Interval containing a particular DateTime. | [
"Return",
"a",
"granularity",
"-",
"sized",
"Interval",
"containing",
"a",
"particular",
"DateTime",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/granularity/Granularity.java#L139-L143 |
127,641 | apache/incubator-druid | core/src/main/java/org/apache/druid/java/util/common/granularity/Granularity.java | Granularity.getDateValues | final Integer[] getDateValues(String filePath, Formatter formatter)
{
Pattern pattern = defaultPathPattern;
switch (formatter) {
case DEFAULT:
case LOWER_DEFAULT:
break;
case HIVE:
pattern = hivePathPattern;
break;
default:
throw new IAE("Format %s not s... | java | final Integer[] getDateValues(String filePath, Formatter formatter)
{
Pattern pattern = defaultPathPattern;
switch (formatter) {
case DEFAULT:
case LOWER_DEFAULT:
break;
case HIVE:
pattern = hivePathPattern;
break;
default:
throw new IAE("Format %s not s... | [
"final",
"Integer",
"[",
"]",
"getDateValues",
"(",
"String",
"filePath",
",",
"Formatter",
"formatter",
")",
"{",
"Pattern",
"pattern",
"=",
"defaultPathPattern",
";",
"switch",
"(",
"formatter",
")",
"{",
"case",
"DEFAULT",
":",
"case",
"LOWER_DEFAULT",
":",... | Used by the toDate implementations. | [
"Used",
"by",
"the",
"toDate",
"implementations",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/granularity/Granularity.java#L146-L174 |
127,642 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/filtration/RangeSets.java | RangeSets.unionRanges | public static <T extends Comparable<T>> RangeSet<T> unionRanges(final Iterable<Range<T>> ranges)
{
RangeSet<T> rangeSet = null;
for (Range<T> range : ranges) {
if (rangeSet == null) {
rangeSet = TreeRangeSet.create();
}
rangeSet.add(range);
}
return rangeSet;
} | java | public static <T extends Comparable<T>> RangeSet<T> unionRanges(final Iterable<Range<T>> ranges)
{
RangeSet<T> rangeSet = null;
for (Range<T> range : ranges) {
if (rangeSet == null) {
rangeSet = TreeRangeSet.create();
}
rangeSet.add(range);
}
return rangeSet;
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"T",
">",
">",
"RangeSet",
"<",
"T",
">",
"unionRanges",
"(",
"final",
"Iterable",
"<",
"Range",
"<",
"T",
">",
">",
"ranges",
")",
"{",
"RangeSet",
"<",
"T",
">",
"rangeSet",
"=",
"null",
... | Unions a set of ranges, or returns null if the set is empty. | [
"Unions",
"a",
"set",
"of",
"ranges",
"or",
"returns",
"null",
"if",
"the",
"set",
"is",
"empty",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/filtration/RangeSets.java#L43-L53 |
127,643 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/filtration/RangeSets.java | RangeSets.unionRangeSets | public static <T extends Comparable<T>> RangeSet<T> unionRangeSets(final Iterable<RangeSet<T>> rangeSets)
{
final RangeSet<T> rangeSet = TreeRangeSet.create();
for (RangeSet<T> set : rangeSets) {
rangeSet.addAll(set);
}
return rangeSet;
} | java | public static <T extends Comparable<T>> RangeSet<T> unionRangeSets(final Iterable<RangeSet<T>> rangeSets)
{
final RangeSet<T> rangeSet = TreeRangeSet.create();
for (RangeSet<T> set : rangeSets) {
rangeSet.addAll(set);
}
return rangeSet;
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"T",
">",
">",
"RangeSet",
"<",
"T",
">",
"unionRangeSets",
"(",
"final",
"Iterable",
"<",
"RangeSet",
"<",
"T",
">",
">",
"rangeSets",
")",
"{",
"final",
"RangeSet",
"<",
"T",
">",
"rangeSet"... | Unions a set of rangeSets, or returns null if the set is empty. | [
"Unions",
"a",
"set",
"of",
"rangeSets",
"or",
"returns",
"null",
"if",
"the",
"set",
"is",
"empty",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/filtration/RangeSets.java#L58-L65 |
127,644 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/filtration/RangeSets.java | RangeSets.intersectRangeSets | public static <T extends Comparable<T>> RangeSet<T> intersectRangeSets(final Iterable<RangeSet<T>> rangeSets)
{
RangeSet<T> rangeSet = null;
for (final RangeSet<T> set : rangeSets) {
if (rangeSet == null) {
rangeSet = TreeRangeSet.create();
rangeSet.addAll(set);
} else {
ra... | java | public static <T extends Comparable<T>> RangeSet<T> intersectRangeSets(final Iterable<RangeSet<T>> rangeSets)
{
RangeSet<T> rangeSet = null;
for (final RangeSet<T> set : rangeSets) {
if (rangeSet == null) {
rangeSet = TreeRangeSet.create();
rangeSet.addAll(set);
} else {
ra... | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"T",
">",
">",
"RangeSet",
"<",
"T",
">",
"intersectRangeSets",
"(",
"final",
"Iterable",
"<",
"RangeSet",
"<",
"T",
">",
">",
"rangeSets",
")",
"{",
"RangeSet",
"<",
"T",
">",
"rangeSet",
"="... | Intersects a set of rangeSets, or returns null if the set is empty. | [
"Intersects",
"a",
"set",
"of",
"rangeSets",
"or",
"returns",
"null",
"if",
"the",
"set",
"is",
"empty",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/filtration/RangeSets.java#L87-L99 |
127,645 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/DruidNode.java | DruidNode.getHostAndPort | public String getHostAndPort()
{
if (enablePlaintextPort) {
if (plaintextPort < 0) {
return HostAndPort.fromString(host).toString();
} else {
return HostAndPort.fromParts(host, plaintextPort).toString();
}
}
return null;
} | java | public String getHostAndPort()
{
if (enablePlaintextPort) {
if (plaintextPort < 0) {
return HostAndPort.fromString(host).toString();
} else {
return HostAndPort.fromParts(host, plaintextPort).toString();
}
}
return null;
} | [
"public",
"String",
"getHostAndPort",
"(",
")",
"{",
"if",
"(",
"enablePlaintextPort",
")",
"{",
"if",
"(",
"plaintextPort",
"<",
"0",
")",
"{",
"return",
"HostAndPort",
".",
"fromString",
"(",
"host",
")",
".",
"toString",
"(",
")",
";",
"}",
"else",
... | Returns host and port together as something that can be used as part of a URI. | [
"Returns",
"host",
"and",
"port",
"together",
"as",
"something",
"that",
"can",
"be",
"used",
"as",
"part",
"of",
"a",
"URI",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/DruidNode.java#L242-L252 |
127,646 | apache/incubator-druid | indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java | ForkingTaskRunner.saveRunningTasks | @GuardedBy("tasks")
private void saveRunningTasks()
{
final File restoreFile = getRestoreFile();
final List<String> theTasks = new ArrayList<>();
for (ForkingTaskRunnerWorkItem forkingTaskRunnerWorkItem : tasks.values()) {
theTasks.add(forkingTaskRunnerWorkItem.getTaskId());
}
try {
... | java | @GuardedBy("tasks")
private void saveRunningTasks()
{
final File restoreFile = getRestoreFile();
final List<String> theTasks = new ArrayList<>();
for (ForkingTaskRunnerWorkItem forkingTaskRunnerWorkItem : tasks.values()) {
theTasks.add(forkingTaskRunnerWorkItem.getTaskId());
}
try {
... | [
"@",
"GuardedBy",
"(",
"\"tasks\"",
")",
"private",
"void",
"saveRunningTasks",
"(",
")",
"{",
"final",
"File",
"restoreFile",
"=",
"getRestoreFile",
"(",
")",
";",
"final",
"List",
"<",
"String",
">",
"theTasks",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
... | occur while saving. | [
"occur",
"while",
"saving",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java#L703-L719 |
127,647 | apache/incubator-druid | extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemasAvroBytesDecoder.java | InlineSchemasAvroBytesDecoder.parse | @Override
public GenericRecord parse(ByteBuffer bytes)
{
if (bytes.remaining() < 5) {
throw new ParseException("record must have at least 5 bytes carrying version and schemaId");
}
byte version = bytes.get();
if (version != V1) {
throw new ParseException("found record of arbitrary versi... | java | @Override
public GenericRecord parse(ByteBuffer bytes)
{
if (bytes.remaining() < 5) {
throw new ParseException("record must have at least 5 bytes carrying version and schemaId");
}
byte version = bytes.get();
if (version != V1) {
throw new ParseException("found record of arbitrary versi... | [
"@",
"Override",
"public",
"GenericRecord",
"parse",
"(",
"ByteBuffer",
"bytes",
")",
"{",
"if",
"(",
"bytes",
".",
"remaining",
"(",
")",
"<",
"5",
")",
"{",
"throw",
"new",
"ParseException",
"(",
"\"record must have at least 5 bytes carrying version and schemaId\"... | remaining bytes would have avro data | [
"remaining",
"bytes",
"would",
"have",
"avro",
"data"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemasAvroBytesDecoder.java#L100-L133 |
127,648 | apache/incubator-druid | core/src/main/java/org/apache/druid/java/util/common/StreamUtils.java | StreamUtils.copyAndClose | public static long copyAndClose(InputStream is, OutputStream os) throws IOException
{
try {
final long retval = ByteStreams.copy(is, os);
// Workarround for http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/759aa847dcaf
os.flush();
return retval;
}
finally {
is.close();
os.c... | java | public static long copyAndClose(InputStream is, OutputStream os) throws IOException
{
try {
final long retval = ByteStreams.copy(is, os);
// Workarround for http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/759aa847dcaf
os.flush();
return retval;
}
finally {
is.close();
os.c... | [
"public",
"static",
"long",
"copyAndClose",
"(",
"InputStream",
"is",
",",
"OutputStream",
"os",
")",
"throws",
"IOException",
"{",
"try",
"{",
"final",
"long",
"retval",
"=",
"ByteStreams",
".",
"copy",
"(",
"is",
",",
"os",
")",
";",
"// Workarround for ht... | Copy from `is` to `os` and close the streams regardless of the result.
@param is The `InputStream` to copy results from. It is closed
@param os The `OutputStream` to copy results to. It is closed
@return The count of bytes written to `os`
@throws IOException | [
"Copy",
"from",
"is",
"to",
"os",
"and",
"close",
"the",
"streams",
"regardless",
"of",
"the",
"result",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/StreamUtils.java#L74-L86 |
127,649 | apache/incubator-druid | core/src/main/java/org/apache/druid/indexer/TaskStatus.java | TaskStatus.truncateErrorMsg | private static String truncateErrorMsg(String errorMsg)
{
if (errorMsg != null && errorMsg.length() > MAX_ERROR_MSG_LENGTH) {
return errorMsg.substring(0, MAX_ERROR_MSG_LENGTH) + "...";
} else {
return errorMsg;
}
} | java | private static String truncateErrorMsg(String errorMsg)
{
if (errorMsg != null && errorMsg.length() > MAX_ERROR_MSG_LENGTH) {
return errorMsg.substring(0, MAX_ERROR_MSG_LENGTH) + "...";
} else {
return errorMsg;
}
} | [
"private",
"static",
"String",
"truncateErrorMsg",
"(",
"String",
"errorMsg",
")",
"{",
"if",
"(",
"errorMsg",
"!=",
"null",
"&&",
"errorMsg",
".",
"length",
"(",
")",
">",
"MAX_ERROR_MSG_LENGTH",
")",
"{",
"return",
"errorMsg",
".",
"substring",
"(",
"0",
... | The full error message will be available via a TaskReport. | [
"The",
"full",
"error",
"message",
"will",
"be",
"available",
"via",
"a",
"TaskReport",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/indexer/TaskStatus.java#L70-L77 |
127,650 | apache/incubator-druid | extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentMover.java | S3DataSegmentMover.selfCheckingMove | private void selfCheckingMove(
String s3Bucket,
String targetS3Bucket,
String s3Path,
String targetS3Path,
String copyMsg
) throws IOException, SegmentLoadingException
{
if (s3Bucket.equals(targetS3Bucket) && s3Path.equals(targetS3Path)) {
log.info("No need to move file[s3://... | java | private void selfCheckingMove(
String s3Bucket,
String targetS3Bucket,
String s3Path,
String targetS3Path,
String copyMsg
) throws IOException, SegmentLoadingException
{
if (s3Bucket.equals(targetS3Bucket) && s3Path.equals(targetS3Path)) {
log.info("No need to move file[s3://... | [
"private",
"void",
"selfCheckingMove",
"(",
"String",
"s3Bucket",
",",
"String",
"targetS3Bucket",
",",
"String",
"s3Path",
",",
"String",
"targetS3Path",
",",
"String",
"copyMsg",
")",
"throws",
"IOException",
",",
"SegmentLoadingException",
"{",
"if",
"(",
"s3Bu... | Copies an object and after that checks that the object is present at the target location, via a separate API call.
If it is not, an exception is thrown, and the object is not deleted at the old location. This "paranoic" check
is added after it was observed that S3 may report a successful move, and the object is not fou... | [
"Copies",
"an",
"object",
"and",
"after",
"that",
"checks",
"that",
"the",
"object",
"is",
"present",
"at",
"the",
"target",
"location",
"via",
"a",
"separate",
"API",
"call",
".",
"If",
"it",
"is",
"not",
"an",
"exception",
"is",
"thrown",
"and",
"the",... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentMover.java#L155-L222 |
127,651 | apache/incubator-druid | core/src/main/java/org/apache/druid/data/input/impl/prefetch/SqlFetcher.java | SqlFetcher.download | @Override
protected long download(T object, File outFile) throws IOException
{
openObjectFunction.open(object, outFile);
return outFile.length();
} | java | @Override
protected long download(T object, File outFile) throws IOException
{
openObjectFunction.open(object, outFile);
return outFile.length();
} | [
"@",
"Override",
"protected",
"long",
"download",
"(",
"T",
"object",
",",
"File",
"outFile",
")",
"throws",
"IOException",
"{",
"openObjectFunction",
".",
"open",
"(",
"object",
",",
"outFile",
")",
";",
"return",
"outFile",
".",
"length",
"(",
")",
";",
... | Downloads the entire resultset object into a file. This avoids maintaining a
persistent connection to the database. The retry is performed at the query execution layer.
@param object sql query for which the resultset is to be downloaded
@param outFile a file which the object data is stored
@return size of downloaded... | [
"Downloads",
"the",
"entire",
"resultset",
"object",
"into",
"a",
"file",
".",
"This",
"avoids",
"maintaining",
"a",
"persistent",
"connection",
"to",
"the",
"database",
".",
"The",
"retry",
"is",
"performed",
"at",
"the",
"query",
"execution",
"layer",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/data/input/impl/prefetch/SqlFetcher.java#L74-L79 |
127,652 | apache/incubator-druid | extensions-contrib/rabbitmq/src/main/java/org/apache/druid/firehose/rabbitmq/JacksonifiedConnectionFactory.java | JacksonifiedConnectionFactory.setUri | @JsonIgnore
@Override
public void setUri(URI uri) throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException
{
super.setUri(uri);
} | java | @JsonIgnore
@Override
public void setUri(URI uri) throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException
{
super.setUri(uri);
} | [
"@",
"JsonIgnore",
"@",
"Override",
"public",
"void",
"setUri",
"(",
"URI",
"uri",
")",
"throws",
"URISyntaxException",
",",
"NoSuchAlgorithmException",
",",
"KeyManagementException",
"{",
"super",
".",
"setUri",
"(",
"uri",
")",
";",
"}"
] | we are only overriding this to help Jackson not be confused about the two setURI methods | [
"we",
"are",
"only",
"overriding",
"this",
"to",
"help",
"Jackson",
"not",
"be",
"confused",
"about",
"the",
"two",
"setURI",
"methods"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-contrib/rabbitmq/src/main/java/org/apache/druid/firehose/rabbitmq/JacksonifiedConnectionFactory.java#L163-L168 |
127,653 | apache/incubator-druid | server/src/main/java/org/apache/druid/initialization/Initialization.java | Initialization.getHadoopDependencyFilesToLoad | public static File[] getHadoopDependencyFilesToLoad(
List<String> hadoopDependencyCoordinates,
ExtensionsConfig extensionsConfig
)
{
final File rootHadoopDependenciesDir = new File(extensionsConfig.getHadoopDependenciesDir());
if (rootHadoopDependenciesDir.exists() && !rootHadoopDependenciesDir.... | java | public static File[] getHadoopDependencyFilesToLoad(
List<String> hadoopDependencyCoordinates,
ExtensionsConfig extensionsConfig
)
{
final File rootHadoopDependenciesDir = new File(extensionsConfig.getHadoopDependenciesDir());
if (rootHadoopDependenciesDir.exists() && !rootHadoopDependenciesDir.... | [
"public",
"static",
"File",
"[",
"]",
"getHadoopDependencyFilesToLoad",
"(",
"List",
"<",
"String",
">",
"hadoopDependencyCoordinates",
",",
"ExtensionsConfig",
"extensionsConfig",
")",
"{",
"final",
"File",
"rootHadoopDependenciesDir",
"=",
"new",
"File",
"(",
"exten... | Find all the hadoop dependencies that should be loaded by druid
@param hadoopDependencyCoordinates e.g.["org.apache.hadoop:hadoop-client:2.3.0"]
@param extensionsConfig ExtensionsConfig configured by druid.extensions.xxx
@return an array of hadoop dependency files that will be loaded by druid process | [
"Find",
"all",
"the",
"hadoop",
"dependencies",
"that",
"should",
"be",
"loaded",
"by",
"druid"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/initialization/Initialization.java#L264-L286 |
127,654 | apache/incubator-druid | server/src/main/java/org/apache/druid/client/cache/MemcachedCache.java | MemcachedCache.computeKeyHash | private static String computeKeyHash(String memcachedPrefix, NamedKey key)
{
// hash keys to keep things under 250 characters for memcached
return memcachedPrefix + ":" + DigestUtils.sha1Hex(key.namespace) + ":" + DigestUtils.sha1Hex(key.key);
} | java | private static String computeKeyHash(String memcachedPrefix, NamedKey key)
{
// hash keys to keep things under 250 characters for memcached
return memcachedPrefix + ":" + DigestUtils.sha1Hex(key.namespace) + ":" + DigestUtils.sha1Hex(key.key);
} | [
"private",
"static",
"String",
"computeKeyHash",
"(",
"String",
"memcachedPrefix",
",",
"NamedKey",
"key",
")",
"{",
"// hash keys to keep things under 250 characters for memcached",
"return",
"memcachedPrefix",
"+",
"\":\"",
"+",
"DigestUtils",
".",
"sha1Hex",
"(",
"key"... | length of separators | [
"length",
"of",
"separators"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/client/cache/MemcachedCache.java#L612-L616 |
127,655 | apache/incubator-druid | core/src/main/java/org/apache/druid/timeline/SegmentId.java | SegmentId.tryExtractMostProbableDataSource | @VisibleForTesting
@Nullable
static String tryExtractMostProbableDataSource(String segmentId)
{
Matcher dateTimeMatcher = DateTimes.COMMON_DATE_TIME_PATTERN.matcher(segmentId);
while (true) {
if (!dateTimeMatcher.find()) {
return null;
}
int dataSourceEnd = dateTimeMatcher.start(... | java | @VisibleForTesting
@Nullable
static String tryExtractMostProbableDataSource(String segmentId)
{
Matcher dateTimeMatcher = DateTimes.COMMON_DATE_TIME_PATTERN.matcher(segmentId);
while (true) {
if (!dateTimeMatcher.find()) {
return null;
}
int dataSourceEnd = dateTimeMatcher.start(... | [
"@",
"VisibleForTesting",
"@",
"Nullable",
"static",
"String",
"tryExtractMostProbableDataSource",
"(",
"String",
"segmentId",
")",
"{",
"Matcher",
"dateTimeMatcher",
"=",
"DateTimes",
".",
"COMMON_DATE_TIME_PATTERN",
".",
"matcher",
"(",
"segmentId",
")",
";",
"while... | Heuristically tries to extract the most probable data source from a String segment id representation, or returns
null on failure.
This method is not guaranteed to return a non-null data source given a valid String segment id representation. | [
"Heuristically",
"tries",
"to",
"extract",
"the",
"most",
"probable",
"data",
"source",
"from",
"a",
"String",
"segment",
"id",
"representation",
"or",
"returns",
"null",
"on",
"failure",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/timeline/SegmentId.java#L213-L228 |
127,656 | apache/incubator-druid | core/src/main/java/org/apache/druid/timeline/SegmentId.java | SegmentId.dummy | public static SegmentId dummy(String dataSource, int partitionNum)
{
return of(dataSource, Intervals.ETERNITY, "dummy_version", partitionNum);
} | java | public static SegmentId dummy(String dataSource, int partitionNum)
{
return of(dataSource, Intervals.ETERNITY, "dummy_version", partitionNum);
} | [
"public",
"static",
"SegmentId",
"dummy",
"(",
"String",
"dataSource",
",",
"int",
"partitionNum",
")",
"{",
"return",
"of",
"(",
"dataSource",
",",
"Intervals",
".",
"ETERNITY",
",",
"\"dummy_version\"",
",",
"partitionNum",
")",
";",
"}"
] | Creates a dummy SegmentId with the given data source and partition number.
This method is useful in benchmark and test code. | [
"Creates",
"a",
"dummy",
"SegmentId",
"with",
"the",
"given",
"data",
"source",
"and",
"partition",
"number",
".",
"This",
"method",
"is",
"useful",
"in",
"benchmark",
"and",
"test",
"code",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/timeline/SegmentId.java#L254-L257 |
127,657 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/coordinator/helper/NewestSegmentFirstIterator.java | NewestSegmentFirstIterator.filterSkipIntervals | @VisibleForTesting
static List<Interval> filterSkipIntervals(Interval totalInterval, List<Interval> skipIntervals)
{
final List<Interval> filteredIntervals = new ArrayList<>(skipIntervals.size() + 1);
DateTime remainingStart = totalInterval.getStart();
DateTime remainingEnd = totalInterval.getEnd();
... | java | @VisibleForTesting
static List<Interval> filterSkipIntervals(Interval totalInterval, List<Interval> skipIntervals)
{
final List<Interval> filteredIntervals = new ArrayList<>(skipIntervals.size() + 1);
DateTime remainingStart = totalInterval.getStart();
DateTime remainingEnd = totalInterval.getEnd();
... | [
"@",
"VisibleForTesting",
"static",
"List",
"<",
"Interval",
">",
"filterSkipIntervals",
"(",
"Interval",
"totalInterval",
",",
"List",
"<",
"Interval",
">",
"skipIntervals",
")",
"{",
"final",
"List",
"<",
"Interval",
">",
"filteredIntervals",
"=",
"new",
"Arra... | Returns a list of intervals which are contained by totalInterval but don't ovarlap with skipIntervals.
@param totalInterval total interval
@param skipIntervals intervals to skip. This should be sorted by {@link Comparators#intervalsByStartThenEnd()}. | [
"Returns",
"a",
"list",
"of",
"intervals",
"which",
"are",
"contained",
"by",
"totalInterval",
"but",
"don",
"t",
"ovarlap",
"with",
"skipIntervals",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/coordinator/helper/NewestSegmentFirstIterator.java#L458-L488 |
127,658 | apache/incubator-druid | extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/tasklog/HdfsTaskLogs.java | HdfsTaskLogs.mergePaths | private static String mergePaths(String path1, String path2)
{
return path1 + (path1.endsWith(Path.SEPARATOR) ? "" : Path.SEPARATOR) + path2;
} | java | private static String mergePaths(String path1, String path2)
{
return path1 + (path1.endsWith(Path.SEPARATOR) ? "" : Path.SEPARATOR) + path2;
} | [
"private",
"static",
"String",
"mergePaths",
"(",
"String",
"path1",
",",
"String",
"path2",
")",
"{",
"return",
"path1",
"+",
"(",
"path1",
".",
"endsWith",
"(",
"Path",
".",
"SEPARATOR",
")",
"?",
"\"\"",
":",
"Path",
".",
"SEPARATOR",
")",
"+",
"pat... | some hadoop version Path.mergePaths does not exist | [
"some",
"hadoop",
"version",
"Path",
".",
"mergePaths",
"does",
"not",
"exist"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/tasklog/HdfsTaskLogs.java#L152-L155 |
127,659 | apache/incubator-druid | extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java | ParquetGroupConverter.convertRepeatedFieldToList | private static List<Object> convertRepeatedFieldToList(Group g, int fieldIndex, boolean binaryAsString)
{
Type t = g.getType().getFields().get(fieldIndex);
assert t.getRepetition().equals(Type.Repetition.REPEATED);
int repeated = g.getFieldRepetitionCount(fieldIndex);
List<Object> vals = new ArrayLis... | java | private static List<Object> convertRepeatedFieldToList(Group g, int fieldIndex, boolean binaryAsString)
{
Type t = g.getType().getFields().get(fieldIndex);
assert t.getRepetition().equals(Type.Repetition.REPEATED);
int repeated = g.getFieldRepetitionCount(fieldIndex);
List<Object> vals = new ArrayLis... | [
"private",
"static",
"List",
"<",
"Object",
">",
"convertRepeatedFieldToList",
"(",
"Group",
"g",
",",
"int",
"fieldIndex",
",",
"boolean",
"binaryAsString",
")",
"{",
"Type",
"t",
"=",
"g",
".",
"getType",
"(",
")",
".",
"getFields",
"(",
")",
".",
"get... | convert a repeated field into a list of primitives or groups | [
"convert",
"a",
"repeated",
"field",
"into",
"a",
"list",
"of",
"primitives",
"or",
"groups"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java#L104-L119 |
127,660 | apache/incubator-druid | extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java | ParquetGroupConverter.isLogicalListType | private static boolean isLogicalListType(Type listType)
{
return !listType.isPrimitive() &&
listType.getOriginalType() != null &&
listType.getOriginalType().equals(OriginalType.LIST) &&
listType.asGroupType().getFieldCount() == 1 &&
listType.asGroupType().getFields().ge... | java | private static boolean isLogicalListType(Type listType)
{
return !listType.isPrimitive() &&
listType.getOriginalType() != null &&
listType.getOriginalType().equals(OriginalType.LIST) &&
listType.asGroupType().getFieldCount() == 1 &&
listType.asGroupType().getFields().ge... | [
"private",
"static",
"boolean",
"isLogicalListType",
"(",
"Type",
"listType",
")",
"{",
"return",
"!",
"listType",
".",
"isPrimitive",
"(",
")",
"&&",
"listType",
".",
"getOriginalType",
"(",
")",
"!=",
"null",
"&&",
"listType",
".",
"getOriginalType",
"(",
... | check if a parquet type is a valid 'list' type | [
"check",
"if",
"a",
"parquet",
"type",
"is",
"a",
"valid",
"list",
"type"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java#L124-L131 |
127,661 | apache/incubator-druid | extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java | ParquetGroupConverter.isLogicalMapType | private static boolean isLogicalMapType(Type groupType)
{
OriginalType ot = groupType.getOriginalType();
if (groupType.isPrimitive() || ot == null || groupType.isRepetition(Type.Repetition.REPEATED)) {
return false;
}
if (groupType.getOriginalType().equals(OriginalType.MAP) ||
groupType.... | java | private static boolean isLogicalMapType(Type groupType)
{
OriginalType ot = groupType.getOriginalType();
if (groupType.isPrimitive() || ot == null || groupType.isRepetition(Type.Repetition.REPEATED)) {
return false;
}
if (groupType.getOriginalType().equals(OriginalType.MAP) ||
groupType.... | [
"private",
"static",
"boolean",
"isLogicalMapType",
"(",
"Type",
"groupType",
")",
"{",
"OriginalType",
"ot",
"=",
"groupType",
".",
"getOriginalType",
"(",
")",
";",
"if",
"(",
"groupType",
".",
"isPrimitive",
"(",
")",
"||",
"ot",
"==",
"null",
"||",
"gr... | check if a parquet type is a valid 'map' type | [
"check",
"if",
"a",
"parquet",
"type",
"is",
"a",
"valid",
"map",
"type"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java#L185-L205 |
127,662 | apache/incubator-druid | extensions-contrib/moving-average-query/src/main/java/org/apache/druid/query/movingaverage/AveragerFactoryWrapper.java | AveragerFactoryWrapper.finalizeComputation | @SuppressWarnings("unchecked")
@Override
public Object finalizeComputation(Object object)
{
return af.finalizeComputation((T) object);
} | java | @SuppressWarnings("unchecked")
@Override
public Object finalizeComputation(Object object)
{
return af.finalizeComputation((T) object);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"Object",
"finalizeComputation",
"(",
"Object",
"object",
")",
"{",
"return",
"af",
".",
"finalizeComputation",
"(",
"(",
"T",
")",
"object",
")",
";",
"}"
] | Not implemented. Throws UnsupportedOperationException. | [
"Not",
"implemented",
".",
"Throws",
"UnsupportedOperationException",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-contrib/moving-average-query/src/main/java/org/apache/druid/query/movingaverage/AveragerFactoryWrapper.java#L127-L132 |
127,663 | apache/incubator-druid | processing/src/main/java/org/apache/druid/query/search/UseIndexesStrategy.java | UseIndexesStrategy.partitionDimensionList | private static Pair<List<DimensionSpec>, List<DimensionSpec>> partitionDimensionList(
StorageAdapter adapter,
List<DimensionSpec> dimensions
)
{
final List<DimensionSpec> bitmapDims = new ArrayList<>();
final List<DimensionSpec> nonBitmapDims = new ArrayList<>();
final List<DimensionSpec> di... | java | private static Pair<List<DimensionSpec>, List<DimensionSpec>> partitionDimensionList(
StorageAdapter adapter,
List<DimensionSpec> dimensions
)
{
final List<DimensionSpec> bitmapDims = new ArrayList<>();
final List<DimensionSpec> nonBitmapDims = new ArrayList<>();
final List<DimensionSpec> di... | [
"private",
"static",
"Pair",
"<",
"List",
"<",
"DimensionSpec",
">",
",",
"List",
"<",
"DimensionSpec",
">",
">",
"partitionDimensionList",
"(",
"StorageAdapter",
"adapter",
",",
"List",
"<",
"DimensionSpec",
">",
"dimensions",
")",
"{",
"final",
"List",
"<",
... | Split the given dimensions list into bitmap-supporting dimensions and non-bitmap supporting ones.
Note that the returned lists are free to modify. | [
"Split",
"the",
"given",
"dimensions",
"list",
"into",
"bitmap",
"-",
"supporting",
"dimensions",
"and",
"non",
"-",
"bitmap",
"supporting",
"ones",
".",
"Note",
"that",
"the",
"returned",
"lists",
"are",
"free",
"to",
"modify",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/search/UseIndexesStrategy.java#L115-L141 |
127,664 | apache/incubator-druid | core/src/main/java/org/apache/druid/guice/ConditionalMultibind.java | ConditionalMultibind.create | public static <T> ConditionalMultibind<T> create(
Properties properties,
Binder binder,
Class<T> type,
Class<? extends Annotation> annotationType
)
{
return new ConditionalMultibind<T>(properties, Multibinder.newSetBinder(binder, type, annotationType));
} | java | public static <T> ConditionalMultibind<T> create(
Properties properties,
Binder binder,
Class<T> type,
Class<? extends Annotation> annotationType
)
{
return new ConditionalMultibind<T>(properties, Multibinder.newSetBinder(binder, type, annotationType));
} | [
"public",
"static",
"<",
"T",
">",
"ConditionalMultibind",
"<",
"T",
">",
"create",
"(",
"Properties",
"properties",
",",
"Binder",
"binder",
",",
"Class",
"<",
"T",
">",
"type",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationType",
")",
... | Create a ConditionalMultibind that resolves items to be added to the set at "binding" time.
@param properties the runtime properties.
@param binder the binder for the injector that is being configured.
@param type the type that will be injected.
@param <T> interface type.
@param annota... | [
"Create",
"a",
"ConditionalMultibind",
"that",
"resolves",
"items",
"to",
"be",
"added",
"to",
"the",
"set",
"at",
"binding",
"time",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/guice/ConditionalMultibind.java#L77-L85 |
127,665 | apache/incubator-druid | extensions-contrib/materialized-view-maintenance/src/main/java/org/apache/druid/indexing/materializedview/MaterializedViewSupervisor.java | MaterializedViewSupervisor.hasEnoughLag | private boolean hasEnoughLag(Interval target, Interval maxInterval)
{
return minDataLagMs <= (maxInterval.getStartMillis() - target.getStartMillis());
} | java | private boolean hasEnoughLag(Interval target, Interval maxInterval)
{
return minDataLagMs <= (maxInterval.getStartMillis() - target.getStartMillis());
} | [
"private",
"boolean",
"hasEnoughLag",
"(",
"Interval",
"target",
",",
"Interval",
"maxInterval",
")",
"{",
"return",
"minDataLagMs",
"<=",
"(",
"maxInterval",
".",
"getStartMillis",
"(",
")",
"-",
"target",
".",
"getStartMillis",
"(",
")",
")",
";",
"}"
] | check whether the start millis of target interval is more than minDataLagMs lagging behind maxInterval's
minDataLag is required to prevent repeatedly building data because of delay data.
@param target
@param maxInterval
@return true if the start millis of target interval is more than minDataLagMs lagging behind maxInt... | [
"check",
"whether",
"the",
"start",
"millis",
"of",
"target",
"interval",
"is",
"more",
"than",
"minDataLagMs",
"lagging",
"behind",
"maxInterval",
"s",
"minDataLag",
"is",
"required",
"to",
"prevent",
"repeatedly",
"building",
"data",
"because",
"of",
"delay",
... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-contrib/materialized-view-maintenance/src/main/java/org/apache/druid/indexing/materializedview/MaterializedViewSupervisor.java#L456-L459 |
127,666 | apache/incubator-druid | processing/src/main/java/org/apache/druid/query/aggregation/Histogram.java | Histogram.asVisual | public HistogramVisual asVisual()
{
float[] visualCounts = new float[bins.length - 2];
for (int i = 0; i < visualCounts.length; ++i) {
visualCounts[i] = (float) bins[i + 1];
}
return new HistogramVisual(breaks, visualCounts, new float[]{min, max});
} | java | public HistogramVisual asVisual()
{
float[] visualCounts = new float[bins.length - 2];
for (int i = 0; i < visualCounts.length; ++i) {
visualCounts[i] = (float) bins[i + 1];
}
return new HistogramVisual(breaks, visualCounts, new float[]{min, max});
} | [
"public",
"HistogramVisual",
"asVisual",
"(",
")",
"{",
"float",
"[",
"]",
"visualCounts",
"=",
"new",
"float",
"[",
"bins",
".",
"length",
"-",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"visualCounts",
".",
"length",
";",
"++... | Returns a visual representation of a histogram object.
Initially returns an array of just the min. and max. values
but can also support the addition of quantiles.
@return a visual representation of this histogram | [
"Returns",
"a",
"visual",
"representation",
"of",
"a",
"histogram",
"object",
".",
"Initially",
"returns",
"an",
"array",
"of",
"just",
"the",
"min",
".",
"and",
"max",
".",
"values",
"but",
"can",
"also",
"support",
"the",
"addition",
"of",
"quantiles",
"... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/aggregation/Histogram.java#L181-L188 |
127,667 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/QueryLifecycle.java | QueryLifecycle.runSimple | @SuppressWarnings("unchecked")
public <T> Sequence<T> runSimple(
final Query<T> query,
final AuthenticationResult authenticationResult,
@Nullable final String remoteAddress
)
{
initialize(query);
final Sequence<T> results;
try {
final Access access = authorize(authenticationR... | java | @SuppressWarnings("unchecked")
public <T> Sequence<T> runSimple(
final Query<T> query,
final AuthenticationResult authenticationResult,
@Nullable final String remoteAddress
)
{
initialize(query);
final Sequence<T> results;
try {
final Access access = authorize(authenticationR... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"Sequence",
"<",
"T",
">",
"runSimple",
"(",
"final",
"Query",
"<",
"T",
">",
"query",
",",
"final",
"AuthenticationResult",
"authenticationResult",
",",
"@",
"Nullable",
"final",
"... | For callers where simplicity is desired over flexibility. This method does it all in one call. If the request
is unauthorized, an IllegalStateException will be thrown. Logs and metrics are emitted when the Sequence is
either fully iterated or throws an exception.
@param query the query
@param authentica... | [
"For",
"callers",
"where",
"simplicity",
"is",
"desired",
"over",
"flexibility",
".",
"This",
"method",
"does",
"it",
"all",
"in",
"one",
"call",
".",
"If",
"the",
"request",
"is",
"unauthorized",
"an",
"IllegalStateException",
"will",
"be",
"thrown",
".",
"... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/QueryLifecycle.java#L120-L156 |
127,668 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/QueryLifecycle.java | QueryLifecycle.initialize | @SuppressWarnings("unchecked")
public void initialize(final Query baseQuery)
{
transition(State.NEW, State.INITIALIZED);
String queryId = baseQuery.getId();
if (Strings.isNullOrEmpty(queryId)) {
queryId = UUID.randomUUID().toString();
}
this.baseQuery = baseQuery.withId(queryId);
thi... | java | @SuppressWarnings("unchecked")
public void initialize(final Query baseQuery)
{
transition(State.NEW, State.INITIALIZED);
String queryId = baseQuery.getId();
if (Strings.isNullOrEmpty(queryId)) {
queryId = UUID.randomUUID().toString();
}
this.baseQuery = baseQuery.withId(queryId);
thi... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"initialize",
"(",
"final",
"Query",
"baseQuery",
")",
"{",
"transition",
"(",
"State",
".",
"NEW",
",",
"State",
".",
"INITIALIZED",
")",
";",
"String",
"queryId",
"=",
"baseQuery",
".",
... | Initializes this object to execute a specific query. Does not actually execute the query.
@param baseQuery the query | [
"Initializes",
"this",
"object",
"to",
"execute",
"a",
"specific",
"query",
".",
"Does",
"not",
"actually",
"execute",
"the",
"query",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/QueryLifecycle.java#L163-L175 |
127,669 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/coordination/ChangeRequestHistory.java | ChangeRequestHistory.addChangeRequests | public synchronized void addChangeRequests(List<T> requests)
{
for (T request : requests) {
changes.add(new Holder<>(request, getLastCounter().inc()));
}
singleThreadedExecutor.execute(resolveWaitingFuturesRunnable);
} | java | public synchronized void addChangeRequests(List<T> requests)
{
for (T request : requests) {
changes.add(new Holder<>(request, getLastCounter().inc()));
}
singleThreadedExecutor.execute(resolveWaitingFuturesRunnable);
} | [
"public",
"synchronized",
"void",
"addChangeRequests",
"(",
"List",
"<",
"T",
">",
"requests",
")",
"{",
"for",
"(",
"T",
"request",
":",
"requests",
")",
"{",
"changes",
".",
"add",
"(",
"new",
"Holder",
"<>",
"(",
"request",
",",
"getLastCounter",
"(",... | Add batch of segment changes update. | [
"Add",
"batch",
"of",
"segment",
"changes",
"update",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/coordination/ChangeRequestHistory.java#L80-L87 |
127,670 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/coordination/ChangeRequestHistory.java | ChangeRequestHistory.getRequestsSince | public synchronized ListenableFuture<ChangeRequestsSnapshot<T>> getRequestsSince(final Counter counter)
{
final CustomSettableFuture<T> future = new CustomSettableFuture<>(waitingFutures);
if (counter.counter < 0) {
future.setException(new IAE("counter[%s] must be >= 0", counter));
return future;... | java | public synchronized ListenableFuture<ChangeRequestsSnapshot<T>> getRequestsSince(final Counter counter)
{
final CustomSettableFuture<T> future = new CustomSettableFuture<>(waitingFutures);
if (counter.counter < 0) {
future.setException(new IAE("counter[%s] must be >= 0", counter));
return future;... | [
"public",
"synchronized",
"ListenableFuture",
"<",
"ChangeRequestsSnapshot",
"<",
"T",
">",
">",
"getRequestsSince",
"(",
"final",
"Counter",
"counter",
")",
"{",
"final",
"CustomSettableFuture",
"<",
"T",
">",
"future",
"=",
"new",
"CustomSettableFuture",
"<>",
"... | Returns a Future that, on completion, returns list of segment updates and associated counter.
If there are no update since given counter then Future completion waits till an updates is provided.
If counter is older than max number of changes maintained then {@link ChangeRequestsSnapshot} is returned
with {@link Change... | [
"Returns",
"a",
"Future",
"that",
"on",
"completion",
"returns",
"list",
"of",
"segment",
"updates",
"and",
"associated",
"counter",
".",
"If",
"there",
"are",
"no",
"update",
"since",
"given",
"counter",
"then",
"Future",
"completion",
"waits",
"till",
"an",
... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/coordination/ChangeRequestHistory.java#L108-L140 |
127,671 | apache/incubator-druid | core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java | NativeIO.trySkipCache | public static void trySkipCache(int fd, long offset, long len)
{
if (!initialized || !fadvisePossible || fd < 0) {
return;
}
try {
// we ignore the return value as this is just best effort to avoid the cache
posix_fadvise(fd, offset, len, POSIX_FADV_DONTNEED);
}
catch (Unsupporte... | java | public static void trySkipCache(int fd, long offset, long len)
{
if (!initialized || !fadvisePossible || fd < 0) {
return;
}
try {
// we ignore the return value as this is just best effort to avoid the cache
posix_fadvise(fd, offset, len, POSIX_FADV_DONTNEED);
}
catch (Unsupporte... | [
"public",
"static",
"void",
"trySkipCache",
"(",
"int",
"fd",
",",
"long",
"offset",
",",
"long",
"len",
")",
"{",
"if",
"(",
"!",
"initialized",
"||",
"!",
"fadvisePossible",
"||",
"fd",
"<",
"0",
")",
"{",
"return",
";",
"}",
"try",
"{",
"// we ign... | Remove pages from the file system page cache when they wont
be accessed again
@param fd The file descriptor of the source file.
@param offset The offset within the file.
@param len The length to be flushed. | [
"Remove",
"pages",
"from",
"the",
"file",
"system",
"page",
"cache",
"when",
"they",
"wont",
"be",
"accessed",
"again"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java#L131-L157 |
127,672 | apache/incubator-druid | core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java | NativeIO.trySyncFileRange | private static void trySyncFileRange(int fd, long offset, long nbytes, int flags)
{
if (!initialized || !syncFileRangePossible || fd < 0) {
return;
}
try {
int ret_code = sync_file_range(fd, offset, nbytes, flags);
if (ret_code != 0) {
log.warn("failed on syncing fd [%d], offset ... | java | private static void trySyncFileRange(int fd, long offset, long nbytes, int flags)
{
if (!initialized || !syncFileRangePossible || fd < 0) {
return;
}
try {
int ret_code = sync_file_range(fd, offset, nbytes, flags);
if (ret_code != 0) {
log.warn("failed on syncing fd [%d], offset ... | [
"private",
"static",
"void",
"trySyncFileRange",
"(",
"int",
"fd",
",",
"long",
"offset",
",",
"long",
"nbytes",
",",
"int",
"flags",
")",
"{",
"if",
"(",
"!",
"initialized",
"||",
"!",
"syncFileRangePossible",
"||",
"fd",
"<",
"0",
")",
"{",
"return",
... | Sync part of an open file to the file system.
@param fd The file descriptor of the source file.
@param offset The offset within the file.
@param nbytes The number of bytes to be synced.
@param flags Signal how to synchronize | [
"Sync",
"part",
"of",
"an",
"open",
"file",
"to",
"the",
"file",
"system",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/common/io/NativeIO.java#L167-L193 |
127,673 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.add | public void add(
double value
)
{
readWriteLock.writeLock().lock();
try {
if (value < lowerLimit) {
outlierHandler.handleOutlierAdd(false);
return;
} else if (value >= upperLimit) {
outlierHandler.handleOutlierAdd(true);
return;
}
count += 1;
... | java | public void add(
double value
)
{
readWriteLock.writeLock().lock();
try {
if (value < lowerLimit) {
outlierHandler.handleOutlierAdd(false);
return;
} else if (value >= upperLimit) {
outlierHandler.handleOutlierAdd(true);
return;
}
count += 1;
... | [
"public",
"void",
"add",
"(",
"double",
"value",
")",
"{",
"readWriteLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"value",
"<",
"lowerLimit",
")",
"{",
"outlierHandler",
".",
"handleOutlierAdd",
"(",
"false",
")... | Add a value to the histogram, using the outlierHandler to account for outliers.
@param value value to be added. | [
"Add",
"a",
"value",
"to",
"the",
"histogram",
"using",
"the",
"outlierHandler",
"to",
"account",
"for",
"outliers",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L382-L417 |
127,674 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.combineHistogram | public void combineHistogram(FixedBucketsHistogram otherHistogram)
{
if (otherHistogram == null) {
return;
}
readWriteLock.writeLock().lock();
otherHistogram.getReadWriteLock().readLock().lock();
try {
missingValueCount += otherHistogram.getMissingValueCount();
if (bucketSize ... | java | public void combineHistogram(FixedBucketsHistogram otherHistogram)
{
if (otherHistogram == null) {
return;
}
readWriteLock.writeLock().lock();
otherHistogram.getReadWriteLock().readLock().lock();
try {
missingValueCount += otherHistogram.getMissingValueCount();
if (bucketSize ... | [
"public",
"void",
"combineHistogram",
"(",
"FixedBucketsHistogram",
"otherHistogram",
")",
"{",
"if",
"(",
"otherHistogram",
"==",
"null",
")",
"{",
"return",
";",
"}",
"readWriteLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"otherHistogram",
... | Merge another histogram into this one. Only the state of this histogram is updated.
If the two histograms have identical buckets, a simpler algorithm is used.
@param otherHistogram | [
"Merge",
"another",
"histogram",
"into",
"this",
"one",
".",
"Only",
"the",
"state",
"of",
"this",
"histogram",
"is",
"updated",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L441-L465 |
127,675 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.combineHistogramSameBuckets | private void combineHistogramSameBuckets(FixedBucketsHistogram otherHistogram)
{
long[] otherHistogramArray = otherHistogram.getHistogram();
for (int i = 0; i < numBuckets; i++) {
histogram[i] += otherHistogramArray[i];
}
count += otherHistogram.getCount();
max = Math.max(max, otherHistogra... | java | private void combineHistogramSameBuckets(FixedBucketsHistogram otherHistogram)
{
long[] otherHistogramArray = otherHistogram.getHistogram();
for (int i = 0; i < numBuckets; i++) {
histogram[i] += otherHistogramArray[i];
}
count += otherHistogram.getCount();
max = Math.max(max, otherHistogra... | [
"private",
"void",
"combineHistogramSameBuckets",
"(",
"FixedBucketsHistogram",
"otherHistogram",
")",
"{",
"long",
"[",
"]",
"otherHistogramArray",
"=",
"otherHistogram",
".",
"getHistogram",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nu... | Merge another histogram that has the same range and same buckets.
@param otherHistogram | [
"Merge",
"another",
"histogram",
"that",
"has",
"the",
"same",
"range",
"and",
"same",
"buckets",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L472-L484 |
127,676 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.combineHistogramDifferentBuckets | private void combineHistogramDifferentBuckets(FixedBucketsHistogram otherHistogram)
{
if (otherHistogram.getLowerLimit() >= upperLimit) {
outlierHandler.handleOutliersCombineDifferentBucketsAllUpper(otherHistogram);
} else if (otherHistogram.getUpperLimit() <= lowerLimit) {
outlierHandler.handleOu... | java | private void combineHistogramDifferentBuckets(FixedBucketsHistogram otherHistogram)
{
if (otherHistogram.getLowerLimit() >= upperLimit) {
outlierHandler.handleOutliersCombineDifferentBucketsAllUpper(otherHistogram);
} else if (otherHistogram.getUpperLimit() <= lowerLimit) {
outlierHandler.handleOu... | [
"private",
"void",
"combineHistogramDifferentBuckets",
"(",
"FixedBucketsHistogram",
"otherHistogram",
")",
"{",
"if",
"(",
"otherHistogram",
".",
"getLowerLimit",
"(",
")",
">=",
"upperLimit",
")",
"{",
"outlierHandler",
".",
"handleOutliersCombineDifferentBucketsAllUpper"... | Merge another histogram that has different buckets from mine.
First, check if the other histogram falls entirely outside of my defined range. If so, call the appropriate
function for optimized handling.
Otherwise, this merges the histograms with a more general function.
@param otherHistogram | [
"Merge",
"another",
"histogram",
"that",
"has",
"different",
"buckets",
"from",
"mine",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L496-L505 |
127,677 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.getCumulativeCount | private double getCumulativeCount(double cutoff, boolean fromStart)
{
int cutoffBucket = (int) ((cutoff - lowerLimit) / bucketSize);
double count = 0;
if (fromStart) {
for (int i = 0; i <= cutoffBucket; i++) {
if (i == cutoffBucket) {
double bucketStart = i * bucketSize + lowerLim... | java | private double getCumulativeCount(double cutoff, boolean fromStart)
{
int cutoffBucket = (int) ((cutoff - lowerLimit) / bucketSize);
double count = 0;
if (fromStart) {
for (int i = 0; i <= cutoffBucket; i++) {
if (i == cutoffBucket) {
double bucketStart = i * bucketSize + lowerLim... | [
"private",
"double",
"getCumulativeCount",
"(",
"double",
"cutoff",
",",
"boolean",
"fromStart",
")",
"{",
"int",
"cutoffBucket",
"=",
"(",
"int",
")",
"(",
"(",
"cutoff",
"-",
"lowerLimit",
")",
"/",
"bucketSize",
")",
";",
"double",
"count",
"=",
"0",
... | Get a sum of bucket counts from either the start of a histogram's range or end, up to a specified cutoff value.
For example, if I have the following histogram with a range of 0-40, with 4 buckets and
per-bucket counts of 5, 2, 10, and 7:
| 5 | 2 | 24 | 7 |
0 10 20 30 40
Calling ... | [
"Get",
"a",
"sum",
"of",
"bucket",
"counts",
"from",
"either",
"the",
"start",
"of",
"a",
"histogram",
"s",
"range",
"or",
"end",
"up",
"to",
"a",
"specified",
"cutoff",
"value",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L527-L554 |
127,678 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.writeByteBufferCommonFields | private void writeByteBufferCommonFields(ByteBuffer buf)
{
buf.putDouble(lowerLimit);
buf.putDouble(upperLimit);
buf.putInt(numBuckets);
buf.put((byte) outlierHandlingMode.ordinal());
buf.putLong(count);
buf.putLong(lowerOutlierCount);
buf.putLong(upperOutlierCount);
buf.putLong(missi... | java | private void writeByteBufferCommonFields(ByteBuffer buf)
{
buf.putDouble(lowerLimit);
buf.putDouble(upperLimit);
buf.putInt(numBuckets);
buf.put((byte) outlierHandlingMode.ordinal());
buf.putLong(count);
buf.putLong(lowerOutlierCount);
buf.putLong(upperOutlierCount);
buf.putLong(missi... | [
"private",
"void",
"writeByteBufferCommonFields",
"(",
"ByteBuffer",
"buf",
")",
"{",
"buf",
".",
"putDouble",
"(",
"lowerLimit",
")",
";",
"buf",
".",
"putDouble",
"(",
"upperLimit",
")",
";",
"buf",
".",
"putInt",
"(",
"numBuckets",
")",
";",
"buf",
".",... | Serializes histogram fields that are common to both the full and sparse encoding modes.
@param buf Destination buffer | [
"Serializes",
"histogram",
"fields",
"that",
"are",
"common",
"to",
"both",
"the",
"full",
"and",
"sparse",
"encoding",
"modes",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L799-L813 |
127,679 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.toBytesFull | public byte[] toBytesFull(boolean withHeader)
{
int size = getFullStorageSize(numBuckets);
if (withHeader) {
size += SERDE_HEADER_SIZE;
}
ByteBuffer buf = ByteBuffer.allocate(size);
writeByteBufferFull(buf, withHeader);
return buf.array();
} | java | public byte[] toBytesFull(boolean withHeader)
{
int size = getFullStorageSize(numBuckets);
if (withHeader) {
size += SERDE_HEADER_SIZE;
}
ByteBuffer buf = ByteBuffer.allocate(size);
writeByteBufferFull(buf, withHeader);
return buf.array();
} | [
"public",
"byte",
"[",
"]",
"toBytesFull",
"(",
"boolean",
"withHeader",
")",
"{",
"int",
"size",
"=",
"getFullStorageSize",
"(",
"numBuckets",
")",
";",
"if",
"(",
"withHeader",
")",
"{",
"size",
"+=",
"SERDE_HEADER_SIZE",
";",
"}",
"ByteBuffer",
"buf",
"... | Serialize the histogram in full encoding mode.
For efficiency, the header is not written when the histogram
is serialized for localized internal use within the buffer aggregator implementation.
@param withHeader If true, include the serialization header
@return Serialized histogram with full encoding | [
"Serialize",
"the",
"histogram",
"in",
"full",
"encoding",
"mode",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L824-L833 |
127,680 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.writeByteBufferFull | private void writeByteBufferFull(ByteBuffer buf, boolean withHeader)
{
if (withHeader) {
writeByteBufferSerdeHeader(buf, FULL_ENCODING_MODE);
}
writeByteBufferCommonFields(buf);
buf.asLongBuffer().put(histogram);
buf.position(buf.position() + Long.BYTES * histogram.length);
} | java | private void writeByteBufferFull(ByteBuffer buf, boolean withHeader)
{
if (withHeader) {
writeByteBufferSerdeHeader(buf, FULL_ENCODING_MODE);
}
writeByteBufferCommonFields(buf);
buf.asLongBuffer().put(histogram);
buf.position(buf.position() + Long.BYTES * histogram.length);
} | [
"private",
"void",
"writeByteBufferFull",
"(",
"ByteBuffer",
"buf",
",",
"boolean",
"withHeader",
")",
"{",
"if",
"(",
"withHeader",
")",
"{",
"writeByteBufferSerdeHeader",
"(",
"buf",
",",
"FULL_ENCODING_MODE",
")",
";",
"}",
"writeByteBufferCommonFields",
"(",
"... | Helper method for toBytesFull
@param buf Destination buffer
@param withHeader If true, include the serialization header | [
"Helper",
"method",
"for",
"toBytesFull"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L841-L851 |
127,681 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.toBytesSparse | public byte[] toBytesSparse(int nonEmptyBuckets)
{
int size = SERDE_HEADER_SIZE + getSparseStorageSize(nonEmptyBuckets);
ByteBuffer buf = ByteBuffer.allocate(size);
writeByteBufferSparse(buf, nonEmptyBuckets);
return buf.array();
} | java | public byte[] toBytesSparse(int nonEmptyBuckets)
{
int size = SERDE_HEADER_SIZE + getSparseStorageSize(nonEmptyBuckets);
ByteBuffer buf = ByteBuffer.allocate(size);
writeByteBufferSparse(buf, nonEmptyBuckets);
return buf.array();
} | [
"public",
"byte",
"[",
"]",
"toBytesSparse",
"(",
"int",
"nonEmptyBuckets",
")",
"{",
"int",
"size",
"=",
"SERDE_HEADER_SIZE",
"+",
"getSparseStorageSize",
"(",
"nonEmptyBuckets",
")",
";",
"ByteBuffer",
"buf",
"=",
"ByteBuffer",
".",
"allocate",
"(",
"size",
... | Serialize the histogram in sparse encoding mode.
The serialization header is always written, since the sparse encoding is only used in situations where the
header is required.
@param nonEmptyBuckets Number of non-empty buckets in the histogram
@return Serialized histogram with sparse encoding | [
"Serialize",
"the",
"histogram",
"in",
"sparse",
"encoding",
"mode",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L862-L868 |
127,682 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.writeByteBufferSparse | public void writeByteBufferSparse(ByteBuffer buf, int nonEmptyBuckets)
{
writeByteBufferSerdeHeader(buf, SPARSE_ENCODING_MODE);
writeByteBufferCommonFields(buf);
buf.putInt(nonEmptyBuckets);
int bucketsWritten = 0;
for (int i = 0; i < numBuckets; i++) {
if (histogram[i] > 0) {
buf.p... | java | public void writeByteBufferSparse(ByteBuffer buf, int nonEmptyBuckets)
{
writeByteBufferSerdeHeader(buf, SPARSE_ENCODING_MODE);
writeByteBufferCommonFields(buf);
buf.putInt(nonEmptyBuckets);
int bucketsWritten = 0;
for (int i = 0; i < numBuckets; i++) {
if (histogram[i] > 0) {
buf.p... | [
"public",
"void",
"writeByteBufferSparse",
"(",
"ByteBuffer",
"buf",
",",
"int",
"nonEmptyBuckets",
")",
"{",
"writeByteBufferSerdeHeader",
"(",
"buf",
",",
"SPARSE_ENCODING_MODE",
")",
";",
"writeByteBufferCommonFields",
"(",
"buf",
")",
";",
"buf",
".",
"putInt",
... | Helper method for toBytesSparse
@param buf Destination buffer
@param nonEmptyBuckets Number of non-empty buckets in the histogram | [
"Helper",
"method",
"for",
"toBytesSparse"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L876-L893 |
127,683 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.fromBytes | public static FixedBucketsHistogram fromBytes(byte[] bytes)
{
ByteBuffer buf = ByteBuffer.wrap(bytes);
return fromByteBuffer(buf);
} | java | public static FixedBucketsHistogram fromBytes(byte[] bytes)
{
ByteBuffer buf = ByteBuffer.wrap(bytes);
return fromByteBuffer(buf);
} | [
"public",
"static",
"FixedBucketsHistogram",
"fromBytes",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"ByteBuffer",
"buf",
"=",
"ByteBuffer",
".",
"wrap",
"(",
"bytes",
")",
";",
"return",
"fromByteBuffer",
"(",
"buf",
")",
";",
"}"
] | General deserialization method for FixedBucketsHistogram.
@param bytes
@return | [
"General",
"deserialization",
"method",
"for",
"FixedBucketsHistogram",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L914-L918 |
127,684 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.fromByteBuffer | public static FixedBucketsHistogram fromByteBuffer(ByteBuffer buf)
{
byte serializationVersion = buf.get();
Preconditions.checkArgument(
serializationVersion == SERIALIZATION_VERSION,
StringUtils.format("Only serialization version %s is supported.", SERIALIZATION_VERSION)
);
byte mode ... | java | public static FixedBucketsHistogram fromByteBuffer(ByteBuffer buf)
{
byte serializationVersion = buf.get();
Preconditions.checkArgument(
serializationVersion == SERIALIZATION_VERSION,
StringUtils.format("Only serialization version %s is supported.", SERIALIZATION_VERSION)
);
byte mode ... | [
"public",
"static",
"FixedBucketsHistogram",
"fromByteBuffer",
"(",
"ByteBuffer",
"buf",
")",
"{",
"byte",
"serializationVersion",
"=",
"buf",
".",
"get",
"(",
")",
";",
"Preconditions",
".",
"checkArgument",
"(",
"serializationVersion",
"==",
"SERIALIZATION_VERSION",... | Deserialization helper method
@param buf Source buffer containing serialized histogram
@return Deserialized object | [
"Deserialization",
"helper",
"method"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L926-L941 |
127,685 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.fromByteBufferFullNoSerdeHeader | protected static FixedBucketsHistogram fromByteBufferFullNoSerdeHeader(ByteBuffer buf)
{
double lowerLimit = buf.getDouble();
double upperLimit = buf.getDouble();
int numBuckets = buf.getInt();
OutlierHandlingMode outlierHandlingMode = OutlierHandlingMode.values()[buf.get()];
long count = buf.get... | java | protected static FixedBucketsHistogram fromByteBufferFullNoSerdeHeader(ByteBuffer buf)
{
double lowerLimit = buf.getDouble();
double upperLimit = buf.getDouble();
int numBuckets = buf.getInt();
OutlierHandlingMode outlierHandlingMode = OutlierHandlingMode.values()[buf.get()];
long count = buf.get... | [
"protected",
"static",
"FixedBucketsHistogram",
"fromByteBufferFullNoSerdeHeader",
"(",
"ByteBuffer",
"buf",
")",
"{",
"double",
"lowerLimit",
"=",
"buf",
".",
"getDouble",
"(",
")",
";",
"double",
"upperLimit",
"=",
"buf",
".",
"getDouble",
"(",
")",
";",
"int"... | Helper method for deserializing histograms with full encoding mode. Assumes that the serialization header is not
present or has already been read.
@param buf Source buffer containing serialized full-encoding histogram.
@return Deserialized object | [
"Helper",
"method",
"for",
"deserializing",
"histograms",
"with",
"full",
"encoding",
"mode",
".",
"Assumes",
"that",
"the",
"serialization",
"header",
"is",
"not",
"present",
"or",
"has",
"already",
"been",
"read",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L950-L982 |
127,686 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.fromBytesSparse | private static FixedBucketsHistogram fromBytesSparse(ByteBuffer buf)
{
double lowerLimit = buf.getDouble();
double upperLimit = buf.getDouble();
int numBuckets = buf.getInt();
OutlierHandlingMode outlierHandlingMode = OutlierHandlingMode.values()[buf.get()];
long count = buf.getLong();
long l... | java | private static FixedBucketsHistogram fromBytesSparse(ByteBuffer buf)
{
double lowerLimit = buf.getDouble();
double upperLimit = buf.getDouble();
int numBuckets = buf.getInt();
OutlierHandlingMode outlierHandlingMode = OutlierHandlingMode.values()[buf.get()];
long count = buf.getLong();
long l... | [
"private",
"static",
"FixedBucketsHistogram",
"fromBytesSparse",
"(",
"ByteBuffer",
"buf",
")",
"{",
"double",
"lowerLimit",
"=",
"buf",
".",
"getDouble",
"(",
")",
";",
"double",
"upperLimit",
"=",
"buf",
".",
"getDouble",
"(",
")",
";",
"int",
"numBuckets",
... | Helper method for deserializing histograms with sparse encoding mode. Assumes that the serialization header is not
present or has already been read.
@param buf Source buffer containing serialized sparse-encoding histogram.
@return Deserialized object | [
"Helper",
"method",
"for",
"deserializing",
"histograms",
"with",
"sparse",
"encoding",
"mode",
".",
"Assumes",
"that",
"the",
"serialization",
"header",
"is",
"not",
"present",
"or",
"has",
"already",
"been",
"read",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L991-L1027 |
127,687 | apache/incubator-druid | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java | FixedBucketsHistogram.getSparseStorageSize | public static int getSparseStorageSize(int nonEmptyBuckets)
{
return COMMON_FIELDS_SIZE +
Integer.BYTES +
(Integer.BYTES + Long.BYTES) * nonEmptyBuckets;
} | java | public static int getSparseStorageSize(int nonEmptyBuckets)
{
return COMMON_FIELDS_SIZE +
Integer.BYTES +
(Integer.BYTES + Long.BYTES) * nonEmptyBuckets;
} | [
"public",
"static",
"int",
"getSparseStorageSize",
"(",
"int",
"nonEmptyBuckets",
")",
"{",
"return",
"COMMON_FIELDS_SIZE",
"+",
"Integer",
".",
"BYTES",
"+",
"(",
"Integer",
".",
"BYTES",
"+",
"Long",
".",
"BYTES",
")",
"*",
"nonEmptyBuckets",
";",
"}"
] | Compute the size in bytes of a sparse-encoding serialized histogram, without the serialization header
@param nonEmptyBuckets number of non-empty buckets
@return sparse serialized size in bytes | [
"Compute",
"the",
"size",
"in",
"bytes",
"of",
"a",
"sparse",
"-",
"encoding",
"serialized",
"histogram",
"without",
"the",
"serialization",
"header"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java#L1047-L1052 |
127,688 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/SegmentManager.java | SegmentManager.getDataSourceSizes | public Map<String, Long> getDataSourceSizes()
{
return dataSources.entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getTotalSegmentSize()));
} | java | public Map<String, Long> getDataSourceSizes()
{
return dataSources.entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getTotalSegmentSize()));
} | [
"public",
"Map",
"<",
"String",
",",
"Long",
">",
"getDataSourceSizes",
"(",
")",
"{",
"return",
"dataSources",
".",
"entrySet",
"(",
")",
".",
"stream",
"(",
")",
".",
"collect",
"(",
"Collectors",
".",
"toMap",
"(",
"Entry",
"::",
"getKey",
",",
"ent... | Returns a map of dataSource to the total byte size of segments managed by this segmentManager. This method should
be used carefully because the returned map might be different from the actual data source states.
@return a map of dataSources and their total byte sizes | [
"Returns",
"a",
"map",
"of",
"dataSource",
"to",
"the",
"total",
"byte",
"size",
"of",
"segments",
"managed",
"by",
"this",
"segmentManager",
".",
"This",
"method",
"should",
"be",
"used",
"carefully",
"because",
"the",
"returned",
"map",
"might",
"be",
"dif... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/SegmentManager.java#L116-L120 |
127,689 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/SegmentManager.java | SegmentManager.getDataSourceCounts | public Map<String, Long> getDataSourceCounts()
{
return dataSources.entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getNumSegments()));
} | java | public Map<String, Long> getDataSourceCounts()
{
return dataSources.entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getNumSegments()));
} | [
"public",
"Map",
"<",
"String",
",",
"Long",
">",
"getDataSourceCounts",
"(",
")",
"{",
"return",
"dataSources",
".",
"entrySet",
"(",
")",
".",
"stream",
"(",
")",
".",
"collect",
"(",
"Collectors",
".",
"toMap",
"(",
"Entry",
"::",
"getKey",
",",
"en... | Returns a map of dataSource to the number of segments managed by this segmentManager. This method should be
carefully because the returned map might be different from the actual data source states.
@return a map of dataSources and number of segments | [
"Returns",
"a",
"map",
"of",
"dataSource",
"to",
"the",
"number",
"of",
"segments",
"managed",
"by",
"this",
"segmentManager",
".",
"This",
"method",
"should",
"be",
"carefully",
"because",
"the",
"returned",
"map",
"might",
"be",
"different",
"from",
"the",
... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/SegmentManager.java#L128-L132 |
127,690 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/SegmentManager.java | SegmentManager.loadSegment | public boolean loadSegment(final DataSegment segment) throws SegmentLoadingException
{
final Segment adapter = getAdapter(segment);
final SettableSupplier<Boolean> resultSupplier = new SettableSupplier<>();
// compute() is used to ensure that the operation for a data source is executed atomically
da... | java | public boolean loadSegment(final DataSegment segment) throws SegmentLoadingException
{
final Segment adapter = getAdapter(segment);
final SettableSupplier<Boolean> resultSupplier = new SettableSupplier<>();
// compute() is used to ensure that the operation for a data source is executed atomically
da... | [
"public",
"boolean",
"loadSegment",
"(",
"final",
"DataSegment",
"segment",
")",
"throws",
"SegmentLoadingException",
"{",
"final",
"Segment",
"adapter",
"=",
"getAdapter",
"(",
"segment",
")",
";",
"final",
"SettableSupplier",
"<",
"Boolean",
">",
"resultSupplier",... | Load a single segment.
@param segment segment to load
@return true if the segment was newly loaded, false if it was already loaded
@throws SegmentLoadingException if the segment cannot be loaded | [
"Load",
"a",
"single",
"segment",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/SegmentManager.java#L155-L190 |
127,691 | apache/incubator-druid | server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java | SegmentLoadDropHandler.loadSegment | private void loadSegment(DataSegment segment, DataSegmentChangeCallback callback) throws SegmentLoadingException
{
final boolean loaded;
try {
loaded = segmentManager.loadSegment(segment);
}
catch (Exception e) {
removeSegment(segment, callback, false);
throw new SegmentLoadingExcept... | java | private void loadSegment(DataSegment segment, DataSegmentChangeCallback callback) throws SegmentLoadingException
{
final boolean loaded;
try {
loaded = segmentManager.loadSegment(segment);
}
catch (Exception e) {
removeSegment(segment, callback, false);
throw new SegmentLoadingExcept... | [
"private",
"void",
"loadSegment",
"(",
"DataSegment",
"segment",
",",
"DataSegmentChangeCallback",
"callback",
")",
"throws",
"SegmentLoadingException",
"{",
"final",
"boolean",
"loaded",
";",
"try",
"{",
"loaded",
"=",
"segmentManager",
".",
"loadSegment",
"(",
"se... | Load a single segment. If the segment is loaded successfully, this function simply returns. Otherwise it will
throw a SegmentLoadingException
@throws SegmentLoadingException if it fails to load the given segment | [
"Load",
"a",
"single",
"segment",
".",
"If",
"the",
"segment",
"is",
"loaded",
"successfully",
"this",
"function",
"simply",
"returns",
".",
"Otherwise",
"it",
"will",
"throw",
"a",
"SegmentLoadingException"
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java#L260-L287 |
127,692 | apache/incubator-druid | sql/src/main/java/org/apache/druid/sql/calcite/expression/TimeUnits.java | TimeUnits.toQueryGranularity | public static PeriodGranularity toQueryGranularity(final TimeUnitRange timeUnitRange, final DateTimeZone timeZone)
{
final Period period = PERIOD_MAP.get(timeUnitRange);
if (period == null) {
return null;
}
return new PeriodGranularity(period, null, timeZone);
} | java | public static PeriodGranularity toQueryGranularity(final TimeUnitRange timeUnitRange, final DateTimeZone timeZone)
{
final Period period = PERIOD_MAP.get(timeUnitRange);
if (period == null) {
return null;
}
return new PeriodGranularity(period, null, timeZone);
} | [
"public",
"static",
"PeriodGranularity",
"toQueryGranularity",
"(",
"final",
"TimeUnitRange",
"timeUnitRange",
",",
"final",
"DateTimeZone",
"timeZone",
")",
"{",
"final",
"Period",
"period",
"=",
"PERIOD_MAP",
".",
"get",
"(",
"timeUnitRange",
")",
";",
"if",
"("... | Returns the Druid QueryGranularity corresponding to a Calcite TimeUnitRange, or null if there is none.
@param timeUnitRange time unit
@param timeZone session time zone
@return queryGranularity, or null | [
"Returns",
"the",
"Druid",
"QueryGranularity",
"corresponding",
"to",
"a",
"Calcite",
"TimeUnitRange",
"or",
"null",
"if",
"there",
"is",
"none",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/expression/TimeUnits.java#L51-L59 |
127,693 | apache/incubator-druid | processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java | IncrementalIndex.makeColumnSelectorFactory | public static ColumnSelectorFactory makeColumnSelectorFactory(
final VirtualColumns virtualColumns,
final AggregatorFactory agg,
final Supplier<InputRow> in,
final boolean deserializeComplexMetrics
)
{
final RowBasedColumnSelectorFactory baseSelectorFactory = RowBasedColumnSelectorFactor... | java | public static ColumnSelectorFactory makeColumnSelectorFactory(
final VirtualColumns virtualColumns,
final AggregatorFactory agg,
final Supplier<InputRow> in,
final boolean deserializeComplexMetrics
)
{
final RowBasedColumnSelectorFactory baseSelectorFactory = RowBasedColumnSelectorFactor... | [
"public",
"static",
"ColumnSelectorFactory",
"makeColumnSelectorFactory",
"(",
"final",
"VirtualColumns",
"virtualColumns",
",",
"final",
"AggregatorFactory",
"agg",
",",
"final",
"Supplier",
"<",
"InputRow",
">",
"in",
",",
"final",
"boolean",
"deserializeComplexMetrics"... | Column selector used at ingestion time for inputs to aggregators.
@param agg the aggregator
@param in ingestion-time input row supplier
@param deserializeComplexMetrics whether complex objects should be deserialized by a {@link ComplexMetricExtractor}
@return column select... | [
"Column",
"selector",
"used",
"at",
"ingestion",
"time",
"for",
"inputs",
"to",
"aggregators",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java#L126-L223 |
127,694 | apache/incubator-druid | extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/KerberosAuthenticator.java | KerberosAuthenticator.tokenToAuthCookie | private static void tokenToAuthCookie(
HttpServletResponse resp,
String token,
String domain,
String path,
long expires,
boolean isCookiePersistent,
boolean isSecure
)
{
resp.addHeader("Set-Cookie", tokenToCookieString(token, domain, path, expires, isCookiePersistent, i... | java | private static void tokenToAuthCookie(
HttpServletResponse resp,
String token,
String domain,
String path,
long expires,
boolean isCookiePersistent,
boolean isSecure
)
{
resp.addHeader("Set-Cookie", tokenToCookieString(token, domain, path, expires, isCookiePersistent, i... | [
"private",
"static",
"void",
"tokenToAuthCookie",
"(",
"HttpServletResponse",
"resp",
",",
"String",
"token",
",",
"String",
"domain",
",",
"String",
"path",
",",
"long",
"expires",
",",
"boolean",
"isCookiePersistent",
",",
"boolean",
"isSecure",
")",
"{",
"res... | Creates the Hadoop authentication HTTP cookie.
@param resp the response object.
@param token authentication token for the cookie.
@param domain the cookie domain.
@param path the cookie path.
@param expires UNIX timestamp that indicates the expire date of the
cookie. It has no effect if its value < 0.
@param isSecu... | [
"Creates",
"the",
"Hadoop",
"authentication",
"HTTP",
"cookie",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/druid-kerberos/src/main/java/org/apache/druid/security/kerberos/KerberosAuthenticator.java#L674-L685 |
127,695 | apache/incubator-druid | processing/src/main/java/org/apache/druid/segment/VirtualColumns.java | VirtualColumns.splitColumnName | public static Pair<String, String> splitColumnName(String columnName)
{
final int i = columnName.indexOf('.');
if (i < 0) {
return Pair.of(columnName, null);
} else {
return Pair.of(columnName.substring(0, i), columnName.substring(i + 1));
}
} | java | public static Pair<String, String> splitColumnName(String columnName)
{
final int i = columnName.indexOf('.');
if (i < 0) {
return Pair.of(columnName, null);
} else {
return Pair.of(columnName.substring(0, i), columnName.substring(i + 1));
}
} | [
"public",
"static",
"Pair",
"<",
"String",
",",
"String",
">",
"splitColumnName",
"(",
"String",
"columnName",
")",
"{",
"final",
"int",
"i",
"=",
"columnName",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"return",
... | Split a dot-style columnName into the "main" columnName and the subColumn name after the dot. Useful for
columns that support dot notation.
@param columnName columnName like "foo" or "foo.bar"
@return pair of main column name (will not be null) and subColumn name (may be null) | [
"Split",
"a",
"dot",
"-",
"style",
"columnName",
"into",
"the",
"main",
"columnName",
"and",
"the",
"subColumn",
"name",
"after",
"the",
"dot",
".",
"Useful",
"for",
"columns",
"that",
"support",
"dot",
"notation",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/VirtualColumns.java#L63-L71 |
127,696 | apache/incubator-druid | processing/src/main/java/org/apache/druid/segment/VirtualColumns.java | VirtualColumns.makeColumnValueSelector | public ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory)
{
final VirtualColumn virtualColumn = getVirtualColumn(columnName);
if (virtualColumn == null) {
throw new IAE("No such virtual column[%s]", columnName);
} else {
final ColumnValueSelector<?... | java | public ColumnValueSelector<?> makeColumnValueSelector(String columnName, ColumnSelectorFactory factory)
{
final VirtualColumn virtualColumn = getVirtualColumn(columnName);
if (virtualColumn == null) {
throw new IAE("No such virtual column[%s]", columnName);
} else {
final ColumnValueSelector<?... | [
"public",
"ColumnValueSelector",
"<",
"?",
">",
"makeColumnValueSelector",
"(",
"String",
"columnName",
",",
"ColumnSelectorFactory",
"factory",
")",
"{",
"final",
"VirtualColumn",
"virtualColumn",
"=",
"getVirtualColumn",
"(",
"columnName",
")",
";",
"if",
"(",
"vi... | Create a column value selector.
@param columnName column mame
@param factory base column selector factory
@return selector
@throws IllegalArgumentException if the virtual column does not exist (see {@link #exists(String)} | [
"Create",
"a",
"column",
"value",
"selector",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/VirtualColumns.java#L184-L194 |
127,697 | apache/incubator-druid | processing/src/main/java/org/apache/druid/query/cache/CacheKeyBuilder.java | CacheKeyBuilder.appendStrings | public CacheKeyBuilder appendStrings(Collection<String> input)
{
appendItem(STRING_LIST_KEY, stringCollectionToByteArray(input, true));
return this;
} | java | public CacheKeyBuilder appendStrings(Collection<String> input)
{
appendItem(STRING_LIST_KEY, stringCollectionToByteArray(input, true));
return this;
} | [
"public",
"CacheKeyBuilder",
"appendStrings",
"(",
"Collection",
"<",
"String",
">",
"input",
")",
"{",
"appendItem",
"(",
"STRING_LIST_KEY",
",",
"stringCollectionToByteArray",
"(",
"input",
",",
"true",
")",
")",
";",
"return",
"this",
";",
"}"
] | Add a collection of strings to the cache key.
Strings in the collection are concatenated with a separator of '0xFF',
and they appear in the cache key in their input order.
@param input a collection of strings to be included in the cache key
@return this instance | [
"Add",
"a",
"collection",
"of",
"strings",
"to",
"the",
"cache",
"key",
".",
"Strings",
"in",
"the",
"collection",
"are",
"concatenated",
"with",
"a",
"separator",
"of",
"0xFF",
"and",
"they",
"appear",
"in",
"the",
"cache",
"key",
"in",
"their",
"input",
... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/cache/CacheKeyBuilder.java#L221-L225 |
127,698 | apache/incubator-druid | processing/src/main/java/org/apache/druid/query/cache/CacheKeyBuilder.java | CacheKeyBuilder.appendStringsIgnoringOrder | public CacheKeyBuilder appendStringsIgnoringOrder(Collection<String> input)
{
appendItem(STRING_LIST_KEY, stringCollectionToByteArray(input, false));
return this;
} | java | public CacheKeyBuilder appendStringsIgnoringOrder(Collection<String> input)
{
appendItem(STRING_LIST_KEY, stringCollectionToByteArray(input, false));
return this;
} | [
"public",
"CacheKeyBuilder",
"appendStringsIgnoringOrder",
"(",
"Collection",
"<",
"String",
">",
"input",
")",
"{",
"appendItem",
"(",
"STRING_LIST_KEY",
",",
"stringCollectionToByteArray",
"(",
"input",
",",
"false",
")",
")",
";",
"return",
"this",
";",
"}"
] | Add a collection of strings to the cache key.
Strings in the collection are sorted by their byte representation and
concatenated with a separator of '0xFF'.
@param input a collection of strings to be included in the cache key
@return this instance | [
"Add",
"a",
"collection",
"of",
"strings",
"to",
"the",
"cache",
"key",
".",
"Strings",
"in",
"the",
"collection",
"are",
"sorted",
"by",
"their",
"byte",
"representation",
"and",
"concatenated",
"with",
"a",
"separator",
"of",
"0xFF",
"."
] | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/cache/CacheKeyBuilder.java#L235-L239 |
127,699 | apache/incubator-druid | processing/src/main/java/org/apache/druid/query/cache/CacheKeyBuilder.java | CacheKeyBuilder.appendCacheables | public CacheKeyBuilder appendCacheables(Collection<? extends Cacheable> input)
{
appendItem(CACHEABLE_LIST_KEY, cacheableCollectionToByteArray(input, true));
return this;
} | java | public CacheKeyBuilder appendCacheables(Collection<? extends Cacheable> input)
{
appendItem(CACHEABLE_LIST_KEY, cacheableCollectionToByteArray(input, true));
return this;
} | [
"public",
"CacheKeyBuilder",
"appendCacheables",
"(",
"Collection",
"<",
"?",
"extends",
"Cacheable",
">",
"input",
")",
"{",
"appendItem",
"(",
"CACHEABLE_LIST_KEY",
",",
"cacheableCollectionToByteArray",
"(",
"input",
",",
"true",
")",
")",
";",
"return",
"this"... | Add a collection of Cacheables to the cache key.
Cacheables in the collection are concatenated without any separator,
and they appear in the cache key in their input order.
@param input a collection of Cacheables to be included in the cache key
@return this instance | [
"Add",
"a",
"collection",
"of",
"Cacheables",
"to",
"the",
"cache",
"key",
".",
"Cacheables",
"in",
"the",
"collection",
"are",
"concatenated",
"without",
"any",
"separator",
"and",
"they",
"appear",
"in",
"the",
"cache",
"key",
"in",
"their",
"input",
"orde... | f776b9408962b9006cfcfe4d6c1794751972cc8e | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/cache/CacheKeyBuilder.java#L291-L295 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.