Package org.apache.druid.segment
@EverythingIsNonnullByDefault
package org.apache.druid.segment
-
ClassDescriptionAn abstract class that provides an implementation of
AbstractDimensionSelector.getObject().Aggregate projection schema and row count information to store inMetadatawhich itself is stored inside a segment, defining which projections exist for the segment.ArrayListSegment<RowType>ASegmentthat is based on a stream of objects.Column merger forAutoTypeColumnIndexerto eventually produce some form ofNestedCommonFormatColumn.CommonDimensionSchemafor ingestion of 'standard' Druid built-inColumnTypedatatypes.Double value selecting polymorphic "part" of theColumnValueSelectorinterface.Float value selecting polymorphic "part" of theColumnValueSelectorinterface.Long value selecting polymorphic "part" of theColumnValueSelectorinterface.Null value checking polymorphic "part" of theColumnValueSelectorinterface for primitive values.Object value selecting polymorphic "part" of theColumnValueSelectorinterface.A CloseableShapeshifter is an interface created to allow Segments to be used fromCloseableShapeshifter.as(Class), but also to be able to ensure that any resource used by the object returned from theCloseableShapeshifter.as(Class)method have proper management of their lifecycle.WrapsQueryableIndexandVirtualColumns, providing a unified view of physical and virtual columns, as well as lifecycle management for physical columns.Class that encapsulates knowledge about how to create "column processors", which are...Creates "column processors", which are objects that wrap a single input column and provide some functionality on top of it.Factory class for MetricSelectorsBase type for interfaces that manage column value selection, e.g.ComparatorbasedDimensionDictionarythere are a lot of unused methods in here for now since the only thing this is used for is to build up the unsorted dictionary and then it is converted to aComparatorSortedDimensionDictionary, but leaving the unused methods in place for now to be basically compatible with the other implementation.ComparatorbasedSortedDimensionDictionaryThere are a number of unused methods, because nested columns don't merge bitmap indexes during the merge phase, rather they are created when serializing the column, but leaving for now for compatibility with the other implementationContains theDataSegmentandSegment.Cursor is an interface for iteration over a range of data points, used during query execution.Defines the plan for how the reader will scan, filter, transform, group and aggregate, and or order the data from aCursorFactoryso that an appropriateCursorHoldercan be constructed.ProvidesCursorand if available,VectorCursorwhich readers can use to scan a set of rows defined originally from aCursorBuildSpecwhich describes how data is to be scanned, transformed, filter, grouped and aggregated, and/or ordered.This immutable class encapsulates segments metadata and corresponding schema.Immutable wrapper class for segment and schema.DictionaryEncodedColumnIndexer<KeyType,ActualType extends Comparable<ActualType>> Basic structure for indexing dictionary encoded columnsDictionaryEncodedColumnMerger<T extends Comparable<T>>Base structure for merging dictionary encoded columnsSpecifies any additional per value indexes which should be constructed whenDictionaryEncodedColumnMerger.writeIndexes(List)is called, on top of the standard bitmap index created withDictionaryEncodedColumnMerger.mergeBitmaps(java.util.List<java.nio.IntBuffer>, org.apache.druid.collections.bitmap.BitmapFactory, org.apache.druid.segment.DictionaryEncodedColumnMerger.IndexSeeker[], int)Get old dictId from new dictId, and only support access in orderPeristent dictionary id conversion mappings, artifacts created during segment merge which map old dictionary ids to new dictionary ids.Closer ofDictionaryEncodedColumnMerger.PersistedIdConversionand a parent path which they are stored in for easy cleanup when the segment is closed.DictionaryMergingIterator<T extends Comparable<T>>Iterator for merging dictionaries for some comparable type into a single sorted dictionary, useful when merging dictionary encoded columnsDimensionDictionary<T extends Comparable<T>>Buildable dictionary for some comparable type.Interface containing dictionary-related methods common toDimensionSelector,SingleValueDimensionVectorSelector, andMultiValueDimensionVectorSelector.DimensionHandler<EncodedType extends Comparable<EncodedType>,EncodedKeyComponentType, ActualType extends Comparable<ActualType>> Processing related interface A DimensionHandler is an object that encapsulates indexing, column merging/building, and querying operations for a given dimension type (e.g., dict-encoded String, Long).DimensionHandlerProvider<EncodedType extends Comparable<EncodedType>,EncodedKeyComponentType, ActualType extends Comparable<ActualType>> DimensionIndexer<EncodedType extends Comparable<EncodedType>,EncodedKeyComponentType, ActualType extends Comparable<ActualType>> Processing related interface A DimensionIndexer is a per-dimension stateful object that encapsulates type-specific operations and data structures used during the in-memory ingestion process (i.e., work done byIncrementalIndex).Processing related interface A DimensionMerger is a per-dimension stateful object that encapsulates type-specific operations and data structures used during the segment merging process (i.e., work done byIndexMerger).Processing related interface DimensionMerger subclass to be used with IndexMergerV9.Selector for a string-typed column, either single- or multi-valued.This class not a public API.This interface is convenient for implementation of "double-sourcing"ColumnValueSelectors, it provides default implementations for allColumnValueSelector's methods exceptBaseDoubleColumnValueSelector.getDouble().Column Serializer for double column.Represents the encoded component of a row key corresponding to a single dimension.This interface is convenient for implementation of "float-sourcing"ColumnValueSelectors, it provides default implementations for allColumnValueSelector's methods exceptBaseFloatColumnValueSelector.getFloat().Column Serializer for float column.Implementation ofTransformableRowIteratorthat just delegates all methods to some baseIterator (adapter pattern).GenericColumnSerializer can be implemented in custom aggregator extensions that would like to take full control of column serialization."Mixin" forDimensionSelector.Map some set of dictionary id to a smaller set of dictionaryIds (or...An adapter to an indexIndexSpec defines segment storage format options to be used at indexing time, such as bitmap type, and column compression formats.This interface is convenient for implementation of "long-sourcing"ColumnValueSelectors, it provides default implementations for allColumnValueSelector's methods exceptBaseLongColumnValueSelector.getLong().Unsafe for concurrent use from multiple threads.Column Serializer for long column.Inspector used byDataSourceMetadataQueryto populateDataSourceMetadataResultValue.getMaxIngestedEventTime().Nested columnDimensionSchema.Represents "absent" column.A no-op implementation of QueryableIndex.Object based column selector.Restricts selector usage to only allowBaseObjectColumnValueSelector.getObject().Interface for methods describing physical segments such asQueryableIndexSegmentandIncrementalIndexSegmentthat is not typically used at query time (outside of metadata queries).Direct interface to memory mapped segments.The basic implementation ofColumnSelectorFactoryover a historical segment (i.ReferenceCountedObjectProvider<T extends Closeable>Interface to capture the pattern of providing tracked usage of some resource.Helper object to assist in managingSegmentstorage lifecycle.Base type to markSegmentreturned byReferenceCountedObjectProvider<Segment>as 'leaf' segments, to distinguish from other transformations which can be done on top of this segment, such as bySegmentMapFunctionReferenceCountingCloseableObject<BaseObject extends Closeable>ReferenceCountingCloseableObject implements something like automatic reference count-based resource management, backed by aPhaser.A factory class for creatingCursorinstances with strict adherence toPolicyrestrictions.RowAdapter<RowType>An adapter between arbitrary types and the needs of callers that want to read specific columns out of those types (treating them as rows).Utility class for creatingRowAdapter.AColumnSelectorFactorythat is based on an object supplier and aRowAdapterfor that type of object.RowBasedCursor<RowType>ACursorthat is based on a stream of objects.RowBasedCursorFactory<RowType>RowBasedSegment<RowType>ASegmentthat is based on a stream of objects.Returned byColumnSelectorFactory.getRowIdSupplier().Could be used as a simple "row number supplier" forRowPointerimplementations.Extension ofTimeAndDimsPointer, that keeps "row number" of the current data point in some collection of data points, that actually makes this data point to be called "row", and the collection, thus, "collection of rows".RowWalker<T>Used byRowBasedCursorFactoryandRowBasedCursorto walk through rows.Representation of schema payload, includes information like RowSignature and aggregator factories.Wrapper overSchemaPayloadto includenumRowsinformation.The difference between this class andDataSegmentis thatDataSegmentcontains the segment metadata only, while this class represents the actual body of segment data, queryable.Encapsulates segment level information like numRows, schema fingerprint.Wrapper for aSegmentDescriptorandOptional<Segment>, the latter being created by aSegmentMapFunctionbeing applied to aReferenceCountedSegmentProvider.Compact representation of segment schema for multiple segments.Utility methods useful for implementing deep storage extensions.Utility for creatingSegmentobjects for concrete datasources.SimpleDictionaryMergingIterator<T extends Comparable<T>>A specialDimensionSelectorfor projected time columns - it assumes time values are scanned once and values are grouped together (i.e.SortedDimensionDictionary<T extends Comparable<T>>Creates a sorted dictionary given some existing dictionary, storing a mapping of both sorted id to unsorted id and unsorted id to sorted idDimensionDictionary for String dimension values.TimeAndDimsIterator (in conjunction withTimeAndDimsPointer) is anIterator-like abstraction, designed for allocation-free transformation, merging, combining and iteration over a stream of data points.TimeAndDimsPointer is used in conjunction withTimeAndDimsIterator, it's an _immutable_ object that points to different logical data points, asTimeAndDimsIterator.moveToNext()is called.Returns min/max values ofColumnHolder.TIME_COLUMN_NAMEfor a segment.oddly specificSegmentinspector for topN optimizationsTransformableRowIterator tightensRowIterator.getPointer()contract, that allows to transform iterated rows without allocations on each iterations, and reuse the mechanics of the underlying iterator.The cursor to help unnest MVDs without dictionary encoding and ARRAY type selectors.The cursor to help unnest MVDs with dictionary encoding.Class that encapsulates knowledge about how to create vector column processors.Virtual columns are "views" created over aColumnSelectorFactoryorColumnSelector.Class allowing lookup and usage of virtual columns.JsonIncludefilter forgetVirtualColumns().SimpleSegmentimplementation for a segment that wraps a base segment such asUnnestSegmentorFilteredSegmentWrapper forTimeBoundaryInspectorused bySegmentimplementations that may filter out rows from an underlying segment, but do not modifyColumnHolder.TIME_COLUMN_NAME.