You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/11/20 22:49:42 UTC

[GitHub] [geode] kohlmu-pivotal commented on a change in pull request #5767: GEODE-8717: INFO command returns specified sections

kohlmu-pivotal commented on a change in pull request #5767:
URL: https://github.com/apache/geode/pull/5767#discussion_r528011451



##########
File path: geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/server/AbstractInfoIntegrationTest.java
##########
@@ -39,6 +44,71 @@
   private static final int REDIS_CLIENT_TIMEOUT =
       Math.toIntExact(GeodeAwaitility.getTimeout().toMillis());
 
+  final List<String> SERVER_PROPERTIES =
+      Arrays.asList(
+          "# Server",
+          "redis_version:",
+          "redis_mode:",
+          "tcp_port:",
+          "uptime_in_days:",
+          "uptime_in_seconds:");
+
+  final List<String> PERSISTENCE_PROPERTIES =
+      Arrays.asList(
+          "# Persistence",
+          "rdb_changes_since_last_save",
+          "rdb_last_save_time",
+          "loading:");
+
+  final List<String> REPLICATION_PROPERTIES =
+      Arrays.asList(
+          "# Replication",
+          "role:",
+          "connected_slaves:");
+
+  final List<String> CLUSTER_PROPERTIES =
+      Arrays.asList(
+          "# Cluster",
+          "cluster_enabled:");
+
+  final List<String> CLIENTS_PROPERTIES =
+      Arrays.asList(
+          "# Clients",
+          "connected_clients:",
+          "blocked_clients:");
+
+  final List<String> MEMORY_PROPERTIES =
+      Arrays.asList(
+          "# Memory",
+          "used_memory:",
+          "mem_fragmentation_ratio:");
+
+  final List<String> KEYSPACE_PROPERTIES =
+      Arrays.asList(
+          "# Keyspace",
+          "db0:");
+
+  final List<String> STATS_PROPERTIES =
+      Arrays.asList(
+          "# Stats",
+          "total_commands_processed:",
+          "instantaneous_ops_per_sec:",
+          "total_net_input_bytes:",
+          "instantaneous_input_kbps:",
+          "total_connections_received:",
+          "keyspace_hits:",
+          "keyspace_misses:",
+          "evicted_keys:",
+          "rejected_connections:");
+
+
+  final List<String> ALL_PROPERTIES =
+      Stream.of(SERVER_PROPERTIES, PERSISTENCE_PROPERTIES, CLUSTER_PROPERTIES,
+          MEMORY_PROPERTIES, CLIENTS_PROPERTIES, STATS_PROPERTIES, REPLICATION_PROPERTIES)
+          .flatMap(Collection::stream)
+          .collect(
+              Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList));

Review comment:
       Wow... this seems so hard compared to `list.addAll`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org