[cat/recovery] Make recovery time a TimeValue()
Recovery `time` should be a TimeValue() to match other cat APIs. Closes #9209
This commit is contained in:
parent
6c3f6778df
commit
dd2f26ca40
|
@ -28,6 +28,7 @@ import org.elasticsearch.common.Strings;
|
||||||
import org.elasticsearch.common.Table;
|
import org.elasticsearch.common.Table;
|
||||||
import org.elasticsearch.common.inject.Inject;
|
import org.elasticsearch.common.inject.Inject;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
|
import org.elasticsearch.common.unit.TimeValue;
|
||||||
import org.elasticsearch.indices.recovery.RecoveryState;
|
import org.elasticsearch.indices.recovery.RecoveryState;
|
||||||
import org.elasticsearch.rest.RestChannel;
|
import org.elasticsearch.rest.RestChannel;
|
||||||
import org.elasticsearch.rest.RestController;
|
import org.elasticsearch.rest.RestController;
|
||||||
|
@ -142,7 +143,7 @@ public class RestRecoveryAction extends AbstractCatAction {
|
||||||
t.startRow();
|
t.startRow();
|
||||||
t.addCell(index);
|
t.addCell(index);
|
||||||
t.addCell(state.getShardId().id());
|
t.addCell(state.getShardId().id());
|
||||||
t.addCell(state.getTimer().time());
|
t.addCell(new TimeValue(state.getTimer().time()));
|
||||||
t.addCell(state.getType().toString().toLowerCase(Locale.ROOT));
|
t.addCell(state.getType().toString().toLowerCase(Locale.ROOT));
|
||||||
t.addCell(state.getStage().toString().toLowerCase(Locale.ROOT));
|
t.addCell(state.getStage().toString().toLowerCase(Locale.ROOT));
|
||||||
t.addCell(state.getSourceNode() == null ? "n/a" : state.getSourceNode().getHostName());
|
t.addCell(state.getSourceNode() == null ? "n/a" : state.getSourceNode().getHostName());
|
||||||
|
|
Loading…
Reference in New Issue