HBASE-21781 list_deadservers elapsed time is incorrect

This commit is contained in:
xuqinya 2019-03-28 13:24:49 +01:00 committed by Peter Somogyi
parent c8d04cf127
commit cb47285d9c
2 changed files with 8 additions and 2 deletions

View File

@ -34,7 +34,10 @@ module Shell
EOF
end
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
def command(*dead_servers)
now = Time.now
servers = admin.clear_deadservers(dead_servers)
if servers.size <= 0
formatter.row(['true'])
@ -44,9 +47,11 @@ module Shell
servers.each do |server|
formatter.row([server.toString])
end
formatter.footer(servers.size)
formatter.footer(now, servers.size)
end
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength
end
end
end

View File

@ -29,6 +29,7 @@ module Shell
end
def command
now = Time.now
formatter.header(['SERVERNAME'])
servers = admin.list_deadservers
@ -36,7 +37,7 @@ module Shell
formatter.row([server.toString])
end
formatter.footer(servers.size)
formatter.footer(now, servers.size)
end
end
end