Skip to content

Commit

Permalink
add manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Sep 10, 2024
1 parent 4aa0602 commit 710c087
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/metric-engine-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ on:
- 'horaedb/**'
pull_request:
paths:
- 'src/**'
- 'horaedb/**'

# Common environment variables
Expand All @@ -45,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- run: |
Expand All @@ -63,3 +62,7 @@ jobs:
working-directory: horaedb
run: |
make fmt sort clippy
- name: Check lock
working-directory: horaedb
run: |
git diff --exit-code
1 change: 1 addition & 0 deletions horaedb/metric_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//! Storage Engine for metrics.

pub mod error;
mod manifest;
mod sst;
pub mod storage;
pub mod types;
Expand Down
25 changes: 25 additions & 0 deletions horaedb/metric_engine/src/manifest.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

pub struct Manifest {}

impl Manifest {
pub fn new(id: u64) -> Self {
// Recover the manifest using the id from storage.
Self {}
}
}
3 changes: 3 additions & 0 deletions horaedb/metric_engine/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use arrow::{array::RecordBatch, datatypes::Schema};
use async_trait::async_trait;

use crate::{
manifest::Manifest,
sst::SSTable,
types::{ObjectStoreRef, Predicate, TimeRange},
Result,
Expand Down Expand Up @@ -46,6 +47,7 @@ pub struct CloudObjectStorage {
id: u64,
store: ObjectStoreRef,
sstables: Vec<SSTable>,
manifest: Manifest,
}

impl CloudObjectStorage {
Expand All @@ -55,6 +57,7 @@ impl CloudObjectStorage {
id,
store,
sstables: Vec::new(),
manifest: Manifest::new(id),
}
}
}
Expand Down

0 comments on commit 710c087

Please sign in to comment.