Todd Lipcon has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8422 )

Change subject: [mini-cluster] allow 18-bit PID in LOOPBACK bind mode
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8422/1/src/kudu/mini-cluster/mini_cluster.cc
File src/kudu/mini-cluster/mini_cluster.cc:

http://gerrit.cloudera.org:8080/#/c/8422/1/src/kudu/mini-cluster/mini_cluster.cc@37
PS1, Line 37:   static const uint8_t INDEX_MAX = 0x3f; // 2^6 - 1
I think this function could probably be rewritten to be a bit clearer now that 
it's more complicated than it was before. The magic numbers here make it hard 
to follow. something along the lines of:

int kPidBits = 18;
int kServerBits = 24 - kPidBits;
CHECK_LT(index, 1 << kServerBits);
CHECK_LT(pid, 1 << kPidBits);
uint32_t ip = (pid << kServerBits) | kServer;
... extract octets from 'ip'



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I958729d71ed363e98bea99f3d932cc6b0546e130
Gerrit-Change-Number: 8422
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Tue, 31 Oct 2017 00:13:33 +0000
Gerrit-HasComments: Yes

Reply via email to