Github user aweisberg commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/184#discussion_r163086795
--- Diff: src/java/org/apache/cassandra/net/MessageIn.java ---
@@ -89,37 +88,39 @@ private MessageIn(InetAddress from,
public static <T2> MessageIn<T2> read(DataInputPlus in, int version,
int id, long constructionTime) throws IOException
{
- InetAddress from =
CompactEndpointSerializationHelper.deserialize(in);
+ InetAddressAndPort from =
CompactEndpointSerializationHelper.instance.deserialize(in, version);
MessagingService.Verb verb =
MessagingService.Verb.fromId(in.readInt());
- Map<String, byte[]> parameters = readParameters(in);
+ Map<ParameterType, Object> parameters = readParameters(in,
version);
int payloadSize = in.readInt();
return read(in, version, id, constructionTime, from, payloadSize,
verb, parameters);
}
- public static Map<String, byte[]> readParameters(DataInputPlus in)
throws IOException
+ public static Map<ParameterType, Object> readParameters(DataInputPlus
in, int version) throws IOException
{
int parameterCount = in.readInt();
+ Map<ParameterType, Object> parameters;
if (parameterCount == 0)
{
return Collections.emptyMap();
}
else
{
- ImmutableMap.Builder<String, byte[]> builder =
ImmutableMap.builder();
+ ImmutableMap.Builder<ParameterType, Object> builder =
ImmutableMap.builder();
for (int i = 0; i < parameterCount; i++)
{
String key = in.readUTF();
+ ParameterType type = ParameterType.byName.get(key);
--- End diff --
OK, I think no one does do that and it could be added back even in a minor
version so I will have it silently skip it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]