Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
paomian committed Mar 28, 2023
1 parent a71a309 commit 3ef17c1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/datanode/src/datanode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use common_base::readable_size::ReadableSize;
use common_telemetry::info;
use meta_client::MetaClientOptions;
use serde::{Deserialize, Serialize};
use servers::Mode;
use servers::http::HttpOptions;
use servers::Mode;
use storage::config::EngineConfig as StorageEngineConfig;
use storage::scheduler::SchedulerConfig;

Expand Down
1 change: 0 additions & 1 deletion src/datanode/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use std::net::SocketAddr;
use std::sync::Arc;

use common_runtime::Builder as RuntimeBuilder;
use common_telemetry::info;
use servers::grpc::GrpcServer;
use servers::http::{HttpOptions, HttpServer};
use servers::metrics_handler::MetricsHandler;
Expand Down
2 changes: 1 addition & 1 deletion src/meta-srv/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use api::v1::meta::lock_server::LockServer;
use api::v1::meta::router_server::RouterServer;
use api::v1::meta::store_server::StoreServer;
use etcd_client::Client;
use servers::http::{HttpOptions, HttpServer};
use servers::http::HttpServer;
use servers::metrics_handler::MetricsHandler;
use servers::server::Server;
use snafu::ResultExt;
Expand Down
1 change: 0 additions & 1 deletion src/servers/src/http/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use aide::transform::TransformOperation;
use axum::extract::{Json, Query, State};
use axum::{Extension, Form};
use common_error::status_code::StatusCode;
use common_telemetry::metric;
use query::parser::PromQuery;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
Expand Down
19 changes: 1 addition & 18 deletions src/servers/src/metrics_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::default::Default;
use std::net::SocketAddr;
use std::sync::Arc;

use async_trait::async_trait;
use common_telemetry::metric::try_handle;
use common_telemetry::{info, metric};
use hyper::server::Server;
use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Response, StatusCode};
use snafu::{ensure, ResultExt};
use tokio::sync::oneshot::{self, Sender};
use tokio::sync::Mutex;

use crate::error::{AlreadyStartedSnafu, HyperSnafu, Result};
use crate::server::Server as ServerTrait;

pub const METRIC_SERVER: &str = "METRIC_SERVER";
use common_telemetry::metric;

/// a server that serves metrics
/// only start when datanode starts in distributed mode
Expand Down

0 comments on commit 3ef17c1

Please sign in to comment.