You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bb...@apache.org on 2020/10/06 21:46:48 UTC
[geode-native] branch develop updated: GEODE-8578: Parse partition
resolver in RESPONSE_CLIENT_PARTITION_ATTRIBUTES message (#669)
This is an automated email from the ASF dual-hosted git repository.
bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new 3ae0f32 GEODE-8578: Parse partition resolver in RESPONSE_CLIENT_PARTITION_ATTRIBUTES message (#669)
3ae0f32 is described below
commit 3ae0f3236f512af5c69a56bbdc38bf384ea8c096
Author: Alberto Bustamante Reyes <al...@users.noreply.github.com>
AuthorDate: Tue Oct 6 23:46:40 2020 +0200
GEODE-8578: Parse partition resolver in RESPONSE_CLIENT_PARTITION_ATTRIBUTES message (#669)
---
tools/gnmsg/server_messages.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/tools/gnmsg/server_messages.py b/tools/gnmsg/server_messages.py
index 365f829..b0a4758 100644
--- a/tools/gnmsg/server_messages.py
+++ b/tools/gnmsg/server_messages.py
@@ -36,16 +36,20 @@ def read_bucket_count(message_bytes, offset):
def read_partition_attributes(properties, message_bytes, offset):
- if properties["Parts"] != 2 and properties["Parts"] != 4:
- raise Exception(
- "Don't know how to parse a RESPONSE_CLIENT_PARTITION_ATTRIBUTES message with "
- + properties["Parts"]
- + " parts (should have 2 or 4 only)."
- )
-
(properties["BucketCount"], offset) = read_bucket_count(message_bytes, offset)
(properties["ColocatedWith"], offset) = parse_key_or_value(message_bytes, offset)
- # TODO: parse parts 3 and 4 (partition resolver and list of partition attributes), if they exist
+ if properties["Parts"] == 4:
+ (properties["PartitionResolverName"], offset) = parse_key_or_value(message_bytes, offset)
+ # TODO: parse part 4 (list of partition attributes)
+ elif properties["Parts"] == 3:
+ try:
+ (properties["PartitionResolverName"], offset) = parse_key_or_value(message_bytes, offset)
+ except:
+ raise Exception(
+ "Don't know how to parse a RESPONSE_CLIENT_PARTITION_ATTRIBUTES message with "
+ + "3 parts and fpa attribute."
+ )
+ # TODO: parse part 3 if it is not partition resolver but list of partition attributes
server_message_parsers = {