iotdb
iotdb copied to clipboard
[IoTDB-804] Index Framework Part 2: Core
Description
This pull request is about the index framework, aiming at enabling IoTDB to support similar research and other index types. We appreciate all comments and suggestions. Thanks to all reviewers.
It is the second part of the index framework, which is about the core codes of the framework and interfaces for index developers.
- The design document (temporarily in Chinese) can be viewed in the project docs (docs/zh/SystemDesign/Index/Index.md) or website
- The previous part is at PR-2024
- The issue is at JIRA-804.
This PR has:
- [x] been self-reviewed.
- [x] concurrent read
- [x] concurrent write
- [x] concurrent read and write
- [x] added documentation for new or modified features or behaviors.
- [x] added Javadocs for most classes and all non-trivial methods.
- [x] added or updated version, license, or notice information
- [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage.
- [x] added integration tests.
- [ ] been tested in a test IoTDB cluster.
Key changed/added classes
Most codes are under the package org.apache.iotdb.db.index:
- The framework codes:
IndexManagerand others - A brief query code: package
read - The interface of the feature extractor:
feature.IndexFeatureExtractor - The index interface opened for the index developers and researchers
algorithm.IoTDBIndexand a demo implementationalgorithm.NoIndex - Related UT and IT.
The implementation of FeatureExtractor and IoTDBIndex (the whole-matching index RTree+PAA and the subsequence matching index ELB) will be submitted in the third part (the last part). We appreciate more other index integration.
Interactions with Other Modules
- Start: be called in
RegisterManager#register - Create/Drop Index: be called in
PlanExecutor#createIndexandPlanExecutor#dropIndex - Insert: so far, the index insertion will only be called in
MemTableFlushTask - Query: be called in
QueryIndexExecutor#executeIndexQuery.