5 commented on code in PR #198:
URL: https://github.com/apache/cassandra-sidecar/pull/198#discussion_r1988209774
##########
server/src/main/java/org/apache/cassandra/sidecar/datahub/SchemaReporter.java:
##########
@@ -113,13 +113,23 @@ protected SchemaReporter(@NotNull IdentifiersProvider
identifiersProvider,
/**
* Public method for converting and reporting the Cassandra schema
*
- * @param cluster a {@link Cluster} to extract Cassandra schema from
+ * @param cluster the {@link Cluster} to extract Cassandra schema from
*/
public void process(@NotNull Cluster cluster)
+ {
+ process(cluster.getMetadata());
+ }
+
+ /**
+ * Public method for converting and reporting the Cassandra schema
+ *
+ * @param metadata the {@link Metadata} to extract Cassandra schema from
+ */
+ public void process(@NotNull Metadata metadata)
{
try (Emitter emitter = emitterFactory.emitter())
{
- stream(cluster.getMetadata())
+ stream(metadata)
.forEach(ThrowableUtils.consumer(emitter::emit));
Review Comment:
It's way easier to read *and* put breakpoints in this way.
Giving it another thought, three lines make even more sense, updated.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]