Skip to content

Commit

Permalink
Merge pull request #553 from yvxiang/show_tag
Browse files Browse the repository at this point in the history
Show chunkserver tag is SysStat #551
  • Loading branch information
lylei committed Oct 31, 2016
2 parents 07731c3 + a297044 commit ba525e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sdk/fs_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ int32_t FSImpl::SysStat(const std::string& stat_name, std::string* result) {
return TIMEOUT;
}
bool stat_all = (stat_name == "StatAll");
common::TPrinter tp(7);
tp.AddRow(7, "", "id", "address", "data_size", "blocks", "alive", "last_check");
common::TPrinter tp(8);
tp.AddRow(8, "", "id", "address", "data_size", "blocks", "tag", "alive", "last_check");
for (int i = 0; i < response.chunkservers_size(); i++) {
const ChunkServerInfo& chunkserver = response.chunkservers(i);
if (!stat_all && chunkserver.is_dead()) {
Expand All @@ -443,6 +443,7 @@ int32_t FSImpl::SysStat(const std::string& stat_name, std::string* result) {
vs.push_back(chunkserver.address());
vs.push_back(common::HumanReadableString(chunkserver.data_size()) + "B");
vs.push_back(common::NumToString(chunkserver.block_num()));
vs.push_back(chunkserver.tag());
vs.push_back(chunkserver.is_dead() ? "dead" : "alive");
vs.push_back(common::NumToString(
common::timer::now_time() - chunkserver.last_heartbeat()));
Expand Down

0 comments on commit ba525e2

Please sign in to comment.