Skip to content

Commit

Permalink
[improve][admin] Pretty print bookies racks-placement command output
Browse files Browse the repository at this point in the history
  • Loading branch information
vineeth1995 committed Jun 8, 2023
1 parent da04f24 commit ad7dec2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import com.beust.jcommander.Parameters;
import com.google.common.base.Strings;
import java.util.function.Supplier;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import lombok.NonNull;
import org.apache.pulsar.client.admin.PulsarAdmin;
import org.apache.pulsar.common.policies.data.BookieInfo;
Expand All @@ -35,7 +38,8 @@ private class GetAll extends CliCommand {

@Override
void run() throws Exception {
print(getAdmin().bookies().getBookiesRackInfo());
Gson gson = new GsonBuilder().setPrettyPrinting().create();
System.out.println(gson.toJson(getAdmin().bookies().getBookiesRackInfo()));
}
}

Expand Down

0 comments on commit ad7dec2

Please sign in to comment.