-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sarthak Aggarwal <[email protected]>
- Loading branch information
1 parent
11895f1
commit 7d5a389
Showing
8 changed files
with
52 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
...er/src/main/java/org/opensearch/index/compositeindex/datacube/startree/node/StarTree.java
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
...main/java/org/opensearch/index/compositeindex/datacube/startree/node/StarTreeFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
package org.opensearch.index.compositeindex.datacube.startree.node; | ||
|
||
import org.apache.lucene.store.IndexInput; | ||
import org.apache.lucene.store.RandomAccessInput; | ||
import org.opensearch.index.compositeindex.datacube.startree.fileformats.meta.StarTreeMetadata; | ||
import org.opensearch.index.compositeindex.datacube.startree.fileformats.node.FixedLengthStarTreeNode; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* A factory class for creating off-heap implementations of star-tree nodes. | ||
* | ||
* <p>This class provides a static factory method to create instances of {@link StarTreeNode} | ||
* from an {@link IndexInput} and {@link StarTreeMetadata}. The implementation uses an | ||
* off-heap data structure to store and access the star-tree data efficiently using random access. | ||
* | ||
* @opensearch.experimental | ||
*/ | ||
public class StarTreeFactory { | ||
Check warning on line 26 in server/src/main/java/org/opensearch/index/compositeindex/datacube/startree/node/StarTreeFactory.java Codecov / codecov/patchserver/src/main/java/org/opensearch/index/compositeindex/datacube/startree/node/StarTreeFactory.java#L26
|
||
|
||
/** | ||
* Creates a new instance of {@link StarTreeNode} from the provided {@link IndexInput} and | ||
* {@link StarTreeMetadata}. | ||
* | ||
* @param data The {@link IndexInput} containing the star-tree data. | ||
* @param starTreeMetadata The {@link StarTreeMetadata} containing metadata about the star-tree. | ||
* @return A new instance of {@link StarTreeNode} representing the root of the star-tree. | ||
* @throws IOException If an error occurs while reading the star-tree data. | ||
*/ | ||
public static StarTreeNode createStarTree(IndexInput data, StarTreeMetadata starTreeMetadata) throws IOException { | ||
RandomAccessInput in = data.randomAccessSlice(0, starTreeMetadata.getDataLength()); | ||
return new FixedLengthStarTreeNode(in, 0); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters