HBASE-19467 rsgroups shell commands don't properly display elapsed time

This commit is contained in:
Andrew Purtell 2017-12-08 15:06:37 -08:00
parent bae3b0b966
commit 4698cf16ed
4 changed files with 8 additions and 4 deletions

View File

@ -32,11 +32,12 @@ EOF
end
def command(group_name)
now = Time.now
formatter.header(['GROUP INFORMATION'])
rsgroup_admin.get_rsgroup(group_name) do |s|
formatter.row([s])
end
formatter.footer()
formatter.footer(now, 1)
end
end
end

View File

@ -30,9 +30,10 @@ EOF
end
def command(server)
now = Time.now
group_name = rsgroup_admin.get_rsgroup_of_server(server).getName
formatter.row([group_name])
formatter.footer(1)
formatter.footer(now, 1)
end
end
end

View File

@ -30,10 +30,11 @@ EOF
end
def command(table)
now = Time.now
group_name =
rsgroup_admin.get_rsgroup_of_table(table).getName
formatter.row([group_name])
formatter.footer(1)
formatter.footer(now, 1)
end
end
end

View File

@ -34,6 +34,7 @@ EOF
end
def command(regex = '.*')
now = Time.now
formatter.header(['GROUPS'])
regex = /#{regex}/ unless regex.is_a?(Regexp)
@ -42,7 +43,7 @@ EOF
formatter.row([group])
end
formatter.footer(list.size)
formatter.footer(now, list.size)
end
end
end