maedhroz commented on code in PR #2420:
URL: https://github.com/apache/cassandra/pull/2420#discussion_r1242492118


##########
src/java/org/apache/cassandra/io/sstable/SSTableZeroCopyWriter.java:
##########
@@ -61,12 +61,14 @@ public SSTableZeroCopyWriter(Builder<?, ?> builder,
         lifecycleNewTracker.trackNew(this);
         this.componentWriters = new HashMap<>();
 
-        if 
(!descriptor.getFormat().streamingComponents().containsAll(components))
-            throw new AssertionError(format("Unsupported streaming component 
detected %s",
-                                            
Sets.difference(ImmutableSet.copyOf(components), 
descriptor.getFormat().streamingComponents())));
+        Set<Component> unsupported = components.stream()
+                                               .filter(c -> !c.type.streamable)
+                                               .collect(Collectors.toSet());
+        if (!unsupported.isEmpty())
+            throw new AssertionError(format("Unsupported streaming component 
detected %s", unsupported));

Review Comment:
   ```suggestion
               throw new AssertionError(format("Unsupported streaming 
components detected: %s", unsupported));
   ```



-- 
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]

Reply via email to