-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate chunkserver left space of each physical pool #199
Conversation
80882cd
to
755f8af
Compare
src/tools/mds_client.cpp
Outdated
@@ -795,6 +795,34 @@ int MDSClient::ListServersInCluster(std::vector<ServerInfo>* servers) { | |||
return 0; | |||
} | |||
|
|||
int MDSClient::ListServersInCluster(std::unordered_map<PoolIdType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要增加这个函数吧,上面的ListServerInCluster里面得出的ServerInfo里面有server所属的physicalPoolID,physicalPoolName字段,在外面解析即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要增加这个函数吧,上面的ListServerInCluster里面得出的ServerInfo里面有server所属的physicalPoolID,physicalPoolName字段,在外面解析即可
done
src/tools/status_tool.cpp
Outdated
double var = sum / leftSize.second.size(); | ||
std:: cout.setf(std::ios::fixed); | ||
std::cout<< std::setprecision(2); | ||
std::cout<< name << leftSize.first; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样打出来是chunkfilepool 1 left,非常不清晰。建议改成pool 1 chunkfilepool left,pool 2 chunkfilepool left这种。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样打出来是chunkfilepool 1 left,非常不清晰。建议改成pool 1 chunkfilepool left,pool 2 chunkfilepool left这种。
done
src/tools/mds_client.cpp
Outdated
@@ -812,6 +840,29 @@ int MDSClient::ListChunkServersInCluster( | |||
return 0; | |||
} | |||
|
|||
int MDSClient::ListChunkServersInCluster(std::unordered_map<PoolIdType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数可以这么写,但是上面那个ListServer的接口没必要加,直接用之前的ListServerInCluster也可以实现。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数可以这么写,但是上面那个ListServer的接口没必要加,直接用之前的ListServerInCluster也可以实现。
done
fa1a990
to
898514e
Compare
src/tools/mds_client.cpp
Outdated
@@ -771,7 +771,7 @@ int MDSClient::GetCopySetsInCluster(std::vector<CopysetInfo>* copysets) { | |||
|
|||
int MDSClient::ListServersInCluster(std::vector<ServerInfo>* servers) { | |||
assert(servers != nullptr); | |||
// 先列出逻辑池 | |||
// 先列出物理池 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英文表达
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英文表达
done
std::vector<ChunkServerInfo>>* chunkservers) { | ||
assert(chunkservers != nullptr); | ||
std::vector<ServerInfo> servers; | ||
if (ListServersInCluster(&servers) != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有直接listchunkserverinphysicalpool的接口吗?这个看起来很迂回
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有直接listchunkserverinphysicalpool的接口吗?这个看起来很迂回
没有,它是一层一层的, chunkserver->server->zone->physicalpool->cluster
898514e
to
6870e5d
Compare
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List