Skip to content

Commit

Permalink
Rebase on master
Browse files Browse the repository at this point in the history
  • Loading branch information
heng committed Jul 4, 2019
1 parent 774c031 commit 55e32f4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/meta/processors/admin/BalanceProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <gtest/gtest_prod.h>
#include "meta/processors/BaseProcessor.h"
#include "meta/ActiveHostsMan.h"
#include "time/TimeUtils.h"

namespace nebula {
namespace meta {
Expand Down
6 changes: 3 additions & 3 deletions src/meta/processors/admin/BalanceTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const std::string kBalanceTaskTable = "__b_task__"; // NOLINT
void BalanceTask::invoke() {
CHECK_NOTNULL(client_);
if (ret_ == Result::FAILED) {
endTimeMs_ = time::TimeUtils::nowInSeconds();
endTimeMs_ = time::WallClock::fastNowInSec();
saveInStore();
onError_();
return;
Expand All @@ -33,7 +33,7 @@ void BalanceTask::invoke() {
LOG(INFO) << taskIdStr_ << "Start to move part!";
status_ = Status::CHANGE_LEADER;
ret_ = Result::IN_PROGRESS;
startTimeMs_ = time::TimeUtils::nowInSeconds();
startTimeMs_ = time::WallClock::fastNowInSec();
}
case Status::CHANGE_LEADER: {
LOG(INFO) << taskIdStr_ << "Ask the src to give up the leadership.";
Expand Down Expand Up @@ -131,7 +131,7 @@ void BalanceTask::invoke() {
}
case Status::END: {
LOG(INFO) << taskIdStr_ << "Part has been moved successfully!";
endTimeMs_ = time::TimeUtils::nowInSeconds();
endTimeMs_ = time::WallClock::fastNowInSec();
SAVE_STATE();
onFinished_();
break;
Expand Down
2 changes: 1 addition & 1 deletion src/meta/processors/admin/BalanceTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <gtest/gtest_prod.h>
#include "meta/ActiveHostsMan.h"
#include "time/TimeUtils.h"
#include "time/WallClock.h"
#include "kvstore/KVStore.h"
#include "network/NetworkUtils.h"
#include "meta/processors/admin/AdminClient.h"
Expand Down
2 changes: 1 addition & 1 deletion src/meta/processors/admin/Balancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Status Balancer::buildBalancePlan() {
iter->next();
}
}
plan_ = std::make_unique<BalancePlan>(time::TimeUtils::nowInSeconds(), kv_, client_.get());
plan_ = std::make_unique<BalancePlan>(time::WallClock::fastNowInSec(), kv_, client_.get());
for (auto spaceId : spaces) {
auto tasks = genTasks(spaceId);
for (auto& task : tasks) {
Expand Down
2 changes: 1 addition & 1 deletion src/meta/processors/admin/Balancer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include <gtest/gtest_prod.h>
#include <folly/executors/CPUThreadPoolExecutor.h>
#include "time/TimeUtils.h"
#include "kvstore/KVStore.h"
#include "network/NetworkUtils.h"
#include "time/WallClock.h"
#include "meta/processors/admin/AdminClient.h"
#include "meta/processors/admin/BalanceTask.h"
#include "meta/processors/admin/BalancePlan.h"
Expand Down

0 comments on commit 55e32f4

Please sign in to comment.