-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where is RpbGetServerInfoReq defined? #73
Comments
Ok, I looked in the Java client and found this in interface RiakMessageCodes {
public static final int MSG_ErrorResp = 0;
public static final int MSG_PingReq = 1;
public static final int MSG_PingResp = 2;
public static final int MSG_GetClientIdReq = 3;
public static final int MSG_GetClientIdResp = 4;
public static final int MSG_SetClientIdReq = 5;
public static final int MSG_SetClientIdResp = 6;
public static final int MSG_GetServerInfoReq = 7;
public static final int MSG_GetServerInfoResp = 8;
// ...
} |
Why not define these codes in this repository? They are defined for Erlang, so why not Java? %% @doc Converts a symbolic message name into a message code. Replaces
%% `riakc_pb:msg_code/1'.
-spec msg_code(atom()) -> integer().
msg_code(rpberrorresp) -> 0;
msg_code(rpbpingreq) -> 1;
msg_code(rpbpingresp) -> 2;
msg_code(rpbgetclientidreq) -> 3;
msg_code(rpbgetclientidresp) -> 4;
msg_code(rpbsetclientidreq) -> 5;
msg_code(rpbsetclientidresp) -> 6;
msg_code(rpbgetserverinforeq) -> 7;
msg_code(rpbgetserverinforesp) -> 8;
msg_code(rpbgetreq) -> 9; |
I'm reopening so Basho might see my comment, above. |
If you look in the readme the code is defined as 7. Since there are no fields, there's no point in defining a message structure. |
@evanmcc: Hello. I'm aware of what you said, but it isn't directly tied to my suggestion. My argument is this: Since the Riak messages codes are part of the Riak PB API, it would be best for them to be kept in this source code. I'd suggest creating constants for them in a Java file that becomes part of the Maven artifact and can be referred to. Otherwise, a Java/Clojure/Scala/Groovy client has to define them in their own. That's error prone, but that is the way it is now. It would be better to define the constants in one place. Here, in this repo. One might make the argument that only Protocol Buffer files belong in this repo. Meh. This repo is (or should be) about anything that Basho can provide so that JVM languages can make API calls without duplicating things. That includes Would you ask a developer to "go write you own .proto files"? Probably not. So why tell them to go write their own constants? |
This has now been addressed, see #82 |
Thanks! |
I'm pretty new to protocol buffers. This is what I see in
riak.proto
:Where is
RpbGetServerInfoReq
defined?The text was updated successfully, but these errors were encountered: