Skip to content

Commit

Permalink
refactor: normalize internal crate names
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed Dec 15, 2023
1 parent 8f4a558 commit 307986f
Show file tree
Hide file tree
Showing 1,971 changed files with 20,798 additions and 20,630 deletions.
4,044 changes: 2,022 additions & 2,022 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/bendpy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ crate-type = ["cdylib"]
arrow = { workspace = true, features = ["pyarrow"] }
arrow-schema = { workspace = true }

common-config = { path = "../query/config" }
common-exception = { path = "../common/exception" }
common-expression = { path = "../query/expression" }
common-license = { path = "../common/license" }
common-meta-app = { path = "../meta/app" }
common-meta-embedded = { path = "../meta/embedded" }
databend-common-config = { path = "../query/config" }
databend-common-exception = { path = "../common/exception" }
databend-common-expression = { path = "../query/expression" }
databend-common-license = { path = "../common/license" }
databend-common-meta-app = { path = "../meta/app" }
databend-common-meta-embedded = { path = "../meta/embedded" }
databend-query = { path = "../query/service", features = [
"simd",
"disable_initial_exec_tls",
Expand Down
8 changes: 4 additions & 4 deletions src/bendpy/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

use std::sync::Arc;

use common_exception::Result;
use common_meta_app::principal::GrantObject;
use common_meta_app::principal::UserInfo;
use common_meta_app::principal::UserPrivilegeSet;
use databend_common_exception::Result;
use databend_common_meta_app::principal::GrantObject;
use databend_common_meta_app::principal::UserInfo;
use databend_common_meta_app::principal::UserPrivilegeSet;
use databend_query::sessions::QueryContext;
use databend_query::sessions::Session;
use databend_query::sessions::SessionManager;
Expand Down
6 changes: 3 additions & 3 deletions src/bendpy/src/datablock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use common_expression::block_debug::box_render;
use common_expression::DataBlock;
use common_expression::DataSchemaRef;
use databend_common_expression::block_debug::box_render;
use databend_common_expression::DataBlock;
use databend_common_expression::DataSchemaRef;
use pyo3::prelude::*;

use crate::dataframe::PyBoxSize;
Expand Down
4 changes: 2 additions & 2 deletions src/bendpy/src/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use std::sync::Arc;
use arrow::pyarrow::PyArrowType;
use arrow::pyarrow::ToPyArrow;
use arrow_schema::Schema as ArrowSchema;
use common_exception::Result;
use common_expression::DataBlock;
use databend_common_exception::Result;
use databend_common_expression::DataBlock;
use databend_query::interpreters::InterpreterFactory;
use databend_query::sessions::QueryContext;
use databend_query::sql::plans::Plan;
Expand Down
14 changes: 7 additions & 7 deletions src/bendpy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ mod utils;
use std::env;
use std::path::Path;

use common_config::Config;
use common_config::InnerConfig;
use common_license::license_manager::LicenseManager;
use common_license::license_manager::OssLicenseManager;
use common_meta_app::storage::StorageFsConfig;
use common_meta_app::storage::StorageParams;
use common_meta_embedded::MetaEmbedded;
use databend_common_config::Config;
use databend_common_config::InnerConfig;
use databend_common_license::license_manager::LicenseManager;
use databend_common_license::license_manager::OssLicenseManager;
use databend_common_meta_app::storage::StorageFsConfig;
use databend_common_meta_app::storage::StorageParams;
use databend_common_meta_embedded::MetaEmbedded;
use databend_query::clusters::ClusterDiscovery;
use databend_query::GlobalServices;
use pyo3::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion src/bendpy/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use common_expression::DataSchemaRef;
use databend_common_expression::DataSchemaRef;
use pyo3::prelude::*;

#[pyclass(name = "Schema", module = "databend", subclass)]
Expand Down
58 changes: 31 additions & 27 deletions src/binaries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,52 @@ edition = { workspace = true }

[features]
default = ["simd", "jemalloc", "z3-prove"]
memory-profiling = ["databend-meta/memory-profiling", "databend-query/memory-profiling", "common-base/memory-profiling"]
memory-profiling = [
"databend-meta/memory-profiling",
"databend-query/memory-profiling",
"databend-common-base/memory-profiling",
]
simd = ["databend-meta/simd", "databend-query/simd"]
z3-prove = ["databend-query/z3-prove"]
jemalloc = ["common-base/jemalloc"]
jemalloc = ["databend-common-base/jemalloc"]
tokio-console = [
"databend-meta/tokio-console",
"databend-query/io-uring",
"common-base/tracing",
"common-tracing/console",
"databend-common-base/tracing",
"databend-common-tracing/console",
]
io-uring = [
"databend-meta/io-uring",
"databend-query/io-uring",
"common-meta-store/io-uring",
"common-meta-sled-store/io-uring",
"common-meta-raft-store/io-uring",
"databend-common-meta-store/io-uring",
"databend-common-meta-sled-store/io-uring",
"databend-common-meta-raft-store/io-uring",
]

[dependencies]
# Workspace dependencies
common-base = { path = "../common/base" }
common-config = { path = "../query/config" }
common-exception = { path = "../common/exception" }
common-grpc = { path = "../common/grpc" }
common-license = { path = "../common/license" }
common-meta-api = { path = "../meta/api" }
common-meta-app = { path = "../meta/app" }
common-meta-client = { path = "../meta/client" }
common-meta-kvapi = { path = "../meta/kvapi" }
common-meta-raft-store = { path = "../meta/raft-store" }
common-meta-sled-store = { path = "../meta/sled-store" }
common-meta-store = { path = "../meta/store" }
common-meta-types = { path = "../meta/types" }
common-storage = { path = "../common/storage" }
common-tracing = { path = "../common/tracing" }
databend-common-base = { path = "../common/base" }
databend-common-config = { path = "../query/config" }
databend-common-exception = { path = "../common/exception" }
databend-common-grpc = { path = "../common/grpc" }
databend-common-license = { path = "../common/license" }
databend-common-meta-api = { path = "../meta/api" }
databend-common-meta-app = { path = "../meta/app" }
databend-common-meta-client = { path = "../meta/client" }
databend-common-meta-kvapi = { path = "../meta/kvapi" }
databend-common-meta-raft-store = { path = "../meta/raft-store" }
databend-common-meta-sled-store = { path = "../meta/sled-store" }
databend-common-meta-store = { path = "../meta/store" }
databend-common-meta-types = { path = "../meta/types" }
databend-common-storage = { path = "../common/storage" }
databend-common-tracing = { path = "../common/tracing" }
databend-enterprise-query = { path = "../query/ee" }
databend-meta = { path = "../meta/service" }
databend-query = { path = "../query/service" }
enterprise-query = { path = "../query/ee" }
# enterprise-meta = { path = "../meta/ee" }
background-service = { path = "../query/ee_features/background_service" }
sharing-endpoint = { path = "../query/sharing_endpoint" }
storages-common-table-meta = { path = "../query/storages/common/table_meta" }
# databend-enterprise-meta = { path = "../meta/ee" }
databend-enterprise-background-service = { path = "../query/ee_features/background_service" }
databend-sharing-endpoint = { path = "../query/sharing_endpoint" }
databend-storages-common-table-meta = { path = "../query/storages/common/table_meta" }
# Crates.io dependencies
anyerror = { workspace = true }
anyhow = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion src/binaries/meta/ee_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
mod entry;
mod kvapi;

use common_base::mem_allocator::GlobalAllocator;
use databend_common_base::mem_allocator::GlobalAllocator;
use databend_meta::configs::Config;

#[global_allocator]
Expand Down
32 changes: 16 additions & 16 deletions src/binaries/meta/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ use std::sync::Arc;
use std::time::Duration;

use anyerror::AnyError;
use common_base::base::StopHandle;
use common_base::base::Stoppable;
use common_grpc::RpcClientConf;
use common_meta_raft_store::ondisk::OnDisk;
use common_meta_raft_store::ondisk::DATA_VERSION;
use common_meta_sled_store::get_sled_db;
use common_meta_sled_store::init_sled_db;
use common_meta_sled_store::openraft::MessageSummary;
use common_meta_store::MetaStoreProvider;
use common_meta_types::Cmd;
use common_meta_types::LogEntry;
use common_meta_types::MetaAPIError;
use common_meta_types::Node;
use common_tracing::init_logging;
use common_tracing::set_panic_hook;
use databend_common_base::base::StopHandle;
use databend_common_base::base::Stoppable;
use databend_common_grpc::RpcClientConf;
use databend_common_meta_raft_store::ondisk::OnDisk;
use databend_common_meta_raft_store::ondisk::DATA_VERSION;
use databend_common_meta_sled_store::get_sled_db;
use databend_common_meta_sled_store::init_sled_db;
use databend_common_meta_sled_store::openraft::MessageSummary;
use databend_common_meta_store::MetaStoreProvider;
use databend_common_meta_types::Cmd;
use databend_common_meta_types::LogEntry;
use databend_common_meta_types::MetaAPIError;
use databend_common_meta_types::Node;
use databend_common_tracing::init_logging;
use databend_common_tracing::set_panic_hook;
use databend_meta::api::GrpcServer;
use databend_meta::api::HttpService;
use databend_meta::configs::Config;
Expand Down Expand Up @@ -66,7 +66,7 @@ pub async fn entry(conf: Config) -> anyhow::Result<()> {
.unwrap_or_else(|_| panic!("`{}` was defined but could not be parsed", s))
});
_sentry_guard = Some(sentry::init((bend_sentry_env, sentry::ClientOptions {
release: common_tracing::databend_semver!(),
release: databend_common_tracing::databend_semver!(),
traces_sample_rate,
..Default::default()
})));
Expand Down
12 changes: 6 additions & 6 deletions src/binaries/meta/kvapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

use std::sync::Arc;

use common_meta_kvapi::kvapi;
use common_meta_kvapi::kvapi::UpsertKVReq;
use common_meta_types::KVMeta;
use common_meta_types::MetaError;
use common_meta_types::SeqV;
use common_meta_types::With;
use databend_common_meta_kvapi::kvapi;
use databend_common_meta_kvapi::kvapi::UpsertKVReq;
use databend_common_meta_types::KVMeta;
use databend_common_meta_types::MetaError;
use databend_common_meta_types::SeqV;
use databend_common_meta_types::With;
use databend_meta::configs::Config;

pub enum KvApiCommand {
Expand Down
2 changes: 1 addition & 1 deletion src/binaries/meta/oss_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
mod entry;
mod kvapi;

use common_base::mem_allocator::GlobalAllocator;
use databend_common_base::mem_allocator::GlobalAllocator;
use databend_meta::configs::Config;

#[global_allocator]
Expand Down
48 changes: 24 additions & 24 deletions src/binaries/metabench/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ use std::time::Instant;

use chrono::Utc;
use clap::Parser;
use common_base::base::tokio;
use common_meta_api::serialize_struct;
use common_meta_api::txn_op_put;
use common_meta_api::SchemaApi;
use common_meta_app::schema::CreateDatabaseReq;
use common_meta_app::schema::CreateTableReq;
use common_meta_app::schema::DatabaseNameIdent;
use common_meta_app::schema::DropTableByIdReq;
use common_meta_app::schema::GetTableReq;
use common_meta_app::schema::TableCopiedFileInfo;
use common_meta_app::schema::TableCopiedFileNameIdent;
use common_meta_app::schema::TableNameIdent;
use common_meta_app::schema::UpsertTableOptionReq;
use common_meta_client::ClientHandle;
use common_meta_client::MetaGrpcClient;
use common_meta_kvapi::kvapi::KVApi;
use common_meta_kvapi::kvapi::UpsertKVReq;
use common_meta_types::MatchSeq;
use common_meta_types::Operation;
use common_meta_types::TxnRequest;
use common_tracing::init_logging;
use common_tracing::FileConfig;
use common_tracing::StderrConfig;
use databend_common_base::base::tokio;
use databend_common_meta_api::serialize_struct;
use databend_common_meta_api::txn_op_put;
use databend_common_meta_api::SchemaApi;
use databend_common_meta_app::schema::CreateDatabaseReq;
use databend_common_meta_app::schema::CreateTableReq;
use databend_common_meta_app::schema::DatabaseNameIdent;
use databend_common_meta_app::schema::DropTableByIdReq;
use databend_common_meta_app::schema::GetTableReq;
use databend_common_meta_app::schema::TableCopiedFileInfo;
use databend_common_meta_app::schema::TableCopiedFileNameIdent;
use databend_common_meta_app::schema::TableNameIdent;
use databend_common_meta_app::schema::UpsertTableOptionReq;
use databend_common_meta_client::ClientHandle;
use databend_common_meta_client::MetaGrpcClient;
use databend_common_meta_kvapi::kvapi::KVApi;
use databend_common_meta_kvapi::kvapi::UpsertKVReq;
use databend_common_meta_types::MatchSeq;
use databend_common_meta_types::Operation;
use databend_common_meta_types::TxnRequest;
use databend_common_tracing::init_logging;
use databend_common_tracing::FileConfig;
use databend_common_tracing::StderrConfig;
use databend_meta::version::METASRV_COMMIT_VERSION;
use serde::Deserialize;
use serde::Serialize;
Expand Down Expand Up @@ -83,7 +83,7 @@ struct Config {
async fn main() {
let config = Config::parse();

let log_config = common_tracing::Config {
let log_config = databend_common_tracing::Config {
file: FileConfig {
on: true,
level: config.log_level.clone(),
Expand Down
6 changes: 3 additions & 3 deletions src/binaries/metactl/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use std::fs::File;
use std::io::Write;
use std::time::Duration;

use common_meta_client::MetaGrpcClient;
use common_meta_raft_store::key_spaces::RaftStoreEntry;
use common_meta_types::protobuf::Empty;
use databend_common_meta_client::MetaGrpcClient;
use databend_common_meta_raft_store::key_spaces::RaftStoreEntry;
use databend_common_meta_types::protobuf::Empty;
use tokio_stream::StreamExt;

pub async fn export_meta(addr: &str, save: String) -> anyhow::Result<()> {
Expand Down
14 changes: 7 additions & 7 deletions src/binaries/metactl/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ use std::collections::BTreeMap;
use std::time::Duration;

use clap::Parser;
use common_base::base::tokio;
use common_meta_client::MetaGrpcClient;
use common_meta_kvapi::kvapi::KVApi;
use common_meta_raft_store::config::RaftConfig;
use common_tracing::init_logging;
use common_tracing::Config as LogConfig;
use common_tracing::FileConfig;
use databend_common_base::base::tokio;
use databend_common_meta_client::MetaGrpcClient;
use databend_common_meta_kvapi::kvapi::KVApi;
use databend_common_meta_raft_store::config::RaftConfig;
use databend_common_tracing::init_logging;
use databend_common_tracing::Config as LogConfig;
use databend_common_tracing::FileConfig;
use databend_meta::version::METASRV_COMMIT_VERSION;
use serde::Deserialize;
use serde::Serialize;
Expand Down
Loading

0 comments on commit 307986f

Please sign in to comment.