Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24086 )

Change subject: KUDU-3749 Fix range key hex encoding
......................................................................


Patch Set 3: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24086/3/src/kudu/master/auto_rebalancer.cc
File src/kudu/master/auto_rebalancer.cc:

http://gerrit.cloudera.org:8080/#/c/24086/3/src/kudu/master/auto_rebalancer.cc@614
PS3, Line 614:           std::ostringstream ss_range_key_begin;
             :           for (size_t i = 0; i < range_key_begin.size(); ++i) {
             :             ss_range_key_begin << std::hex << std::setw(2) << 
std::setfill('0')
             :                                << 
static_cast<uint16_t>(static_cast<uint8_t>(range_key_begin[i]));
             :           }
Alright, it's now obvious that this pattern has too many instances :)

I guess at this point it's time to introduce a utility function to keep the 
implementation in one place.

Consider moving this into a separate function somewhere under 
$KUDU_HOME/src/kudu/util (maybe, into hexdump.{h,cc}?).

Also, consider switching to StringAppendF() if it turns to be more performant 
than formatted std::ostringstream output operands.



--
To view, visit http://gerrit.cloudera.org:8080/24086
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d7f0304c0f5bb88ae79a28c740a8791c2eaa03a
Gerrit-Change-Number: 24086
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Tue, 17 Mar 2026 21:58:09 +0000
Gerrit-HasComments: Yes

Reply via email to