bbeaudreault commented on a change in pull request #3536:
URL: https://github.com/apache/hbase/pull/3536#discussion_r685947498
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
##########
@@ -1577,12 +1577,20 @@ public static IsMasterRunningRequest
buildIsMasterRunningRequest() {
}
/**
- * Creates a protocol buffer BalanceRequest
- *
+ * Creates a protocol buffer BalanceRequest from a client BalanceRequest
+ * @param request
* @return a BalanceRequest
*/
- public static BalanceRequest buildBalanceRequest(boolean force) {
- return BalanceRequest.newBuilder().setForce(force).build();
+ public static MasterProtos.BalanceRequest toBalanceRequest(BalanceRequest
request) {
+ return MasterProtos.BalanceRequest.newBuilder()
+ .setDryRun(request.isDryRun())
+ .setIgnoreRit(request.isIgnoreRegionsInTransition())
+ .build();
+ }
+
+ public static BalanceRequest toBalanceRequest(MasterProtos.BalanceRequest
request) {
+ BalanceRequest newRequest = request.getDryRun() ? BalanceRequest.dryRun()
: BalanceRequest.execute();
Review comment:
The default for booleans is always false. I don't think this is
necessary and feels somewhat redundant, but I'll add it in the next commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]