Skip to content

Commit 3b80659

Browse files
committed
fix ci
1 parent e489848 commit 3b80659

26 files changed

+89
-92
lines changed

rocketmq-broker/src/broker_controller.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use std::net::SocketAddr;
18-
use std::sync::Arc;
17+
use std::{net::SocketAddr, sync::Arc};
1918

20-
use tracing::{info, warn};
21-
22-
use rocketmq_common::common::config_manager::ConfigManager;
23-
use rocketmq_common::TokioExecutorService;
24-
use rocketmq_remoting::code::request_code::RequestCode;
25-
use rocketmq_remoting::server::rocketmq_server::RocketmqDefaultServer;
26-
use rocketmq_remoting::server::RemotingServer;
19+
use rocketmq_common::{common::config_manager::ConfigManager, TokioExecutorService};
20+
use rocketmq_remoting::{
21+
code::request_code::RequestCode,
22+
server::{rocketmq_server::RocketmqDefaultServer, RemotingServer},
23+
};
2724
use rocketmq_store::{
2825
base::store_enum::StoreType, config::message_store_config::MessageStoreConfig,
2926
log_file::MessageStore, message_store::local_file_store::LocalFileMessageStore,
3027
status::manager::broker_stats_manager::BrokerStatsManager,
3128
timer::timer_message_store::TimerMessageStore,
3229
};
30+
use tracing::{info, warn};
3331

3432
use crate::{
3533
broker_config::BrokerConfig,

rocketmq-broker/src/processor/ack_message_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
1817
use rocketmq_remoting::{
19-
protocol::remoting_command::RemotingCommand, runtime::processor::RequestProcessor,
18+
protocol::remoting_command::RemotingCommand,
19+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
2020
};
2121

2222
#[derive(Default)]

rocketmq-broker/src/processor/change_invisible_time_processor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::processor::RequestProcessor;
18-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
17+
use rocketmq_remoting::runtime::{processor::RequestProcessor, server::ConnectionHandlerContext};
1918

2019
#[derive(Default)]
2120
pub struct ChangeInvisibleTimeProcessor {}

rocketmq-broker/src/processor/notification_processor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::processor::RequestProcessor;
18-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
17+
use rocketmq_remoting::runtime::{processor::RequestProcessor, server::ConnectionHandlerContext};
1918

2019
#[derive(Default)]
2120
pub struct NotificationProcessor {}

rocketmq-broker/src/processor/peek_message_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
1817
use rocketmq_remoting::{
19-
protocol::remoting_command::RemotingCommand, runtime::processor::RequestProcessor,
18+
protocol::remoting_command::RemotingCommand,
19+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
2020
};
2121

2222
#[derive(Default)]

rocketmq-broker/src/processor/polling_info_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
1817
use rocketmq_remoting::{
19-
protocol::remoting_command::RemotingCommand, runtime::processor::RequestProcessor,
18+
protocol::remoting_command::RemotingCommand,
19+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
2020
};
2121

2222
#[derive(Default)]

rocketmq-broker/src/processor/pop_message_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
1817
use rocketmq_remoting::{
19-
protocol::remoting_command::RemotingCommand, runtime::processor::RequestProcessor,
18+
protocol::remoting_command::RemotingCommand,
19+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
2020
};
2121

2222
#[derive(Default)]

rocketmq-broker/src/processor/pull_message_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
1817
use rocketmq_remoting::{
19-
protocol::remoting_command::RemotingCommand, runtime::processor::RequestProcessor,
18+
protocol::remoting_command::RemotingCommand,
19+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
2020
};
2121

2222
#[derive(Default)]

rocketmq-broker/src/processor/reply_message_processor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::processor::RequestProcessor;
18-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
17+
use rocketmq_remoting::runtime::{processor::RequestProcessor, server::ConnectionHandlerContext};
1918

2019
#[derive(Default)]
2120
pub struct ReplyMessageProcessor {}

rocketmq-broker/src/processor/send_message_processor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
1817
use rocketmq_remoting::{
19-
protocol::remoting_command::RemotingCommand, runtime::processor::RequestProcessor,
18+
protocol::remoting_command::RemotingCommand,
19+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
2020
};
2121

2222
#[derive(Default)]

rocketmq-common/src/common.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,23 @@
1717

1818
use std::fmt;
1919

20+
pub use faq::FAQUrl;
2021
use serde::{Deserialize, Deserializer, Serialize, Serializer};
2122

23+
pub use crate::common::sys_flag::topic_sys_flag as TopicSysFlag;
24+
25+
pub mod attribute;
26+
pub mod boundary_type;
27+
pub mod broker;
2228
pub mod config;
29+
pub mod config_manager;
2330
pub mod constant;
2431
mod faq;
25-
pub use faq::FAQUrl;
32+
pub mod message;
2633
pub mod mix_all;
2734
pub mod mq_version;
2835
pub mod namesrv;
2936
mod sys_flag;
30-
pub use crate::common::sys_flag::topic_sys_flag as TopicSysFlag;
31-
pub mod attribute;
32-
pub mod boundary_type;
33-
pub mod broker;
34-
pub mod config_manager;
35-
pub mod message;
3637
pub mod topic;
3738

3839
#[derive(Debug, Clone)]

rocketmq-common/src/common/broker/broker_config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use serde::Deserialize;
1919

20-
use crate::common::{mix_all, topic::TopicValidator};
20+
use crate::common::mix_all;
2121

2222
#[derive(Debug, Default, Deserialize)]
2323
#[serde(rename_all = "camelCase")]

rocketmq-common/src/common/message.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
* limitations under the License.
1616
*/
1717

18+
use std::{
19+
collections::{HashMap, HashSet},
20+
string::ToString,
21+
};
22+
23+
use lazy_static::lazy_static;
24+
1825
pub mod message_batch;
1926
pub mod message_id;
2027
pub mod message_queue;
2128
pub mod message_single;
2229

23-
use std::collections::HashMap;
24-
2530
pub trait MessageTrait {
2631
fn get_topic(&self) -> &str;
2732

@@ -99,10 +104,6 @@ impl MessageVersion {
99104
}
100105
}
101106

102-
use std::{collections::HashSet, string::ToString};
103-
104-
use lazy_static::lazy_static;
105-
106107
pub struct MessageConst;
107108

108109
impl MessageConst {

rocketmq-common/src/lib.rs

+10-7
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@
1818
#![allow(dead_code)]
1919
#![allow(unused_imports)]
2020

21-
pub use crate::thread_pool::{
22-
FuturesExecutorService, FuturesExecutorServiceBuilder, ScheduledExecutorService,
23-
TokioExecutorService,
21+
pub use crate::{
22+
thread_pool::{
23+
FuturesExecutorService, FuturesExecutorServiceBuilder, ScheduledExecutorService,
24+
TokioExecutorService,
25+
},
26+
utils::{
27+
crc32_utils as CRC32Utils, env_utils as EnvUtils, file_utils as FileUtils,
28+
parse_config_file as ParseConfigFile, time_utils as TimeUtils,
29+
},
2430
};
2531

2632
pub mod common;
2733
pub mod log;
2834
mod thread_pool;
2935
pub mod utils;
30-
pub use crate::utils::{
31-
crc32_utils as CRC32Utils, env_utils as EnvUtils, file_utils as FileUtils,
32-
parse_config_file as ParseConfigFile, time_utils as TimeUtils,
33-
};
36+
3437
#[cfg(test)]
3538
mod tests {}

rocketmq-namesrv/src/bin/bootstrap_server.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@
1818
use std::{collections::HashMap, net::SocketAddr, path::PathBuf, sync::Arc, time::Duration};
1919

2020
use clap::Parser;
21-
use tokio::{net::TcpListener, sync::broadcast, task::JoinHandle};
22-
use tracing::info;
23-
24-
use rocketmq_common::common::Pair;
2521
use rocketmq_common::{
26-
common::namesrv::namesrv_config::NamesrvConfig, EnvUtils::EnvUtils, ParseConfigFile,
27-
ScheduledExecutorService, TokioExecutorService,
22+
common::{namesrv::namesrv_config::NamesrvConfig, Pair},
23+
EnvUtils::EnvUtils,
24+
ParseConfigFile, ScheduledExecutorService, TokioExecutorService,
2825
};
2926
use rocketmq_namesrv::{
3027
processor::{default_request_processor::DefaultRequestProcessor, ClientRequestProcessor},
@@ -35,6 +32,8 @@ use rocketmq_remoting::{
3532
runtime::{processor::RequestProcessor, server},
3633
};
3734
use rocketmq_rust::rocketmq;
35+
use tokio::{net::TcpListener, sync::broadcast, task::JoinHandle};
36+
use tracing::info;
3837

3938
#[rocketmq::main]
4039
async fn main() -> anyhow::Result<()> {

rocketmq-namesrv/src/kvconfig.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
* limitations under the License.
1616
*/
1717

18-
pub mod kvconfig_mananger;
19-
2018
use std::collections::HashMap;
2119

2220
use rocketmq_remoting::protocol::RemotingSerializable;
2321
use serde::{Deserialize, Serialize};
2422

23+
pub mod kvconfig_mananger;
24+
2525
#[derive(Clone, Debug, Serialize, Deserialize)]
2626
pub struct KVConfigSerializeWrapper {
2727
#[serde(rename = "configTable")]

rocketmq-namesrv/src/lib.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@
1717

1818
#![allow(dead_code)]
1919

20+
pub use self::{
21+
kvconfig::kvconfig_mananger::KVConfigManager,
22+
namesrv_config_parse::parse_command_and_config_file,
23+
route::route_info_manager::RouteInfoManager,
24+
};
25+
26+
mod kvconfig;
2027
mod namesrv_config_parse;
21-
pub use self::namesrv_config_parse::parse_command_and_config_file;
2228
pub mod processor;
2329
mod route;
24-
pub use self::route::route_info_manager::RouteInfoManager;
25-
mod kvconfig;
26-
pub use self::kvconfig::kvconfig_mananger::KVConfigManager;
2730
mod route_info;

rocketmq-namesrv/src/processor.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
mod client_request_processor;
1918
pub use self::client_request_processor::ClientRequestProcessor;
19+
20+
mod client_request_processor;
2021
pub mod default_request_processor;

rocketmq-namesrv/src/processor/client_request_processor.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,19 @@ use std::{
2424
};
2525

2626
use bytes::Bytes;
27-
use tracing::warn;
28-
2927
use rocketmq_common::{
3028
common::{namesrv::namesrv_config::NamesrvConfig, FAQUrl},
3129
TimeUtils,
3230
};
33-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
3431
use rocketmq_remoting::{
3532
code::response_code::{RemotingSysResponseCode, ResponseCode},
3633
protocol::{
3734
header::client_request_header::GetRouteInfoRequestHeader,
3835
remoting_command::RemotingCommand, RemotingSerializable,
3936
},
40-
runtime::processor::RequestProcessor,
37+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
4138
};
39+
use tracing::warn;
4240

4341
use crate::{
4442
kvconfig::kvconfig_mananger::KVConfigManager, route::route_info_manager::RouteInfoManager,

rocketmq-namesrv/src/processor/default_request_processor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use rocketmq_common::{
2222
common::{mix_all, mq_version::RocketMqVersion, namesrv::namesrv_config::NamesrvConfig},
2323
CRC32Utils,
2424
};
25-
use rocketmq_remoting::runtime::server::ConnectionHandlerContext;
2625
use rocketmq_remoting::{
2726
code::{
2827
request_code::RequestCode,
@@ -62,7 +61,7 @@ use rocketmq_remoting::{
6261
route::route_data_view::TopicRouteData,
6362
DataVersion, RemotingSerializable,
6463
},
65-
runtime::processor::RequestProcessor,
64+
runtime::{processor::RequestProcessor, server::ConnectionHandlerContext},
6665
};
6766
use tracing::{info, warn};
6867

rocketmq-remoting/src/clients.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pub use blocking_client::BlockingClient;
2626
pub use client::Client;
2727
use rocketmq_common::TokioExecutorService;
2828

29-
use crate::net::ResponseFuture;
3029
use crate::{
30+
net::ResponseFuture,
3131
protocol::remoting_command::RemotingCommand,
3232
remoting::{InvokeCallback, RemotingService},
3333
runtime::processor::RequestProcessor,

rocketmq-remoting/src/remoting.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
use crate::net::ResponseFuture;
19-
use crate::{protocol::remoting_command::RemotingCommand, runtime::RPCHook};
18+
use crate::{net::ResponseFuture, protocol::remoting_command::RemotingCommand, runtime::RPCHook};
2019

2120
pub trait RemotingService: Send {
2221
fn start(&mut self) -> impl std::future::Future<Output = ()> + Send;

0 commit comments

Comments
 (0)