mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 21:32:58 +00:00
feat: import datanode
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -11228,6 +11228,7 @@ dependencies = [
|
|||||||
"common-macro",
|
"common-macro",
|
||||||
"common-meta",
|
"common-meta",
|
||||||
"common-recordbatch",
|
"common-recordbatch",
|
||||||
|
"datanode",
|
||||||
"datatypes",
|
"datatypes",
|
||||||
"futures",
|
"futures",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ pub mod heartbeat;
|
|||||||
pub mod metrics;
|
pub mod metrics;
|
||||||
pub mod region_server;
|
pub mod region_server;
|
||||||
pub mod service;
|
pub mod service;
|
||||||
mod store;
|
pub mod store;
|
||||||
#[cfg(any(test, feature = "testing"))]
|
#[cfg(any(test, feature = "testing"))]
|
||||||
pub mod tests;
|
pub mod tests;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
//! object storage utilities
|
//! object storage utilities
|
||||||
|
|
||||||
mod azblob;
|
mod azblob;
|
||||||
mod fs;
|
pub mod fs;
|
||||||
mod gcs;
|
mod gcs;
|
||||||
mod oss;
|
mod oss;
|
||||||
mod s3;
|
mod s3;
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ use crate::config::FileConfig;
|
|||||||
use crate::error::{self, Result};
|
use crate::error::{self, Result};
|
||||||
use crate::store;
|
use crate::store;
|
||||||
|
|
||||||
pub(crate) async fn new_fs_object_store(
|
/// A helper function to create a file system object store.
|
||||||
|
pub async fn new_fs_object_store(
|
||||||
data_home: &str,
|
data_home: &str,
|
||||||
_file_config: &FileConfig,
|
_file_config: &FileConfig,
|
||||||
) -> Result<ObjectStore> {
|
) -> Result<ObjectStore> {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ common-error.workspace = true
|
|||||||
common-macro.workspace = true
|
common-macro.workspace = true
|
||||||
common-meta.workspace = true
|
common-meta.workspace = true
|
||||||
common-recordbatch.workspace = true
|
common-recordbatch.workspace = true
|
||||||
|
datanode.workspace = true
|
||||||
datatypes.workspace = true
|
datatypes.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
|
|||||||
@@ -73,6 +73,13 @@ pub enum Error {
|
|||||||
#[snafu(implicit)]
|
#[snafu(implicit)]
|
||||||
location: Location,
|
location: Location,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
#[snafu(display("Datanode error"))]
|
||||||
|
Datanode {
|
||||||
|
source: datanode::error::Error,
|
||||||
|
#[snafu(implicit)]
|
||||||
|
location: Location,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Result<T, E = Error> = std::result::Result<T, E>;
|
pub type Result<T, E = Error> = std::result::Result<T, E>;
|
||||||
@@ -87,6 +94,7 @@ impl ErrorExt for Error {
|
|||||||
Error::MissingTable { .. } => StatusCode::TableNotFound,
|
Error::MissingTable { .. } => StatusCode::TableNotFound,
|
||||||
Error::MissingColumn { .. } => StatusCode::TableColumnNotFound,
|
Error::MissingColumn { .. } => StatusCode::TableColumnNotFound,
|
||||||
Error::Mito { source, .. } => source.status_code(),
|
Error::Mito { source, .. } => source.status_code(),
|
||||||
|
Error::Datanode { source, .. } => source.status_code(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user