ibessonov commented on code in PR #2432:
URL: https://github.com/apache/ignite-3/pull/2432#discussion_r1290066161


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -982,4 +1002,13 @@ private static CatalogHashIndexDescriptor 
createHashIndexDescriptor(
 
         return CatalogUtils.fromParams(indexId, table.id(), params);
     }
+
+    @Override
+    public void listen(CatalogEvent evt, EventListener<? extends 
CatalogEventParameters> closure) {
+        listen(evt, (EventListener<CatalogEventParameters>) closure);
+    }
+
+    private static @Nullable CatalogDataStorageDescriptor 
dataStorage(@Nullable DataStorageParams params) {
+        return params == null ? null : fromParams(params);

Review Comment:
   Can "fromParams" accept nullable parameters?



##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -982,4 +1002,13 @@ private static CatalogHashIndexDescriptor 
createHashIndexDescriptor(
 
         return CatalogUtils.fromParams(indexId, table.id(), params);
     }
+
+    @Override
+    public void listen(CatalogEvent evt, EventListener<? extends 
CatalogEventParameters> closure) {
+        listen(evt, (EventListener<CatalogEventParameters>) closure);
+    }

Review Comment:
   I think that the proper solution would be making 
`org.apache.ignite.internal.manager.Event` class parameterized. We could 
postpone that refactoring for the future.
   Anyway, I'm fine with this new method for now, it's more convenient



##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogZoneDescriptor.java:
##########
@@ -44,19 +44,20 @@ public class CatalogZoneDescriptor extends 
CatalogObjectDescriptor {
     private final String filter;
 
     /** Data storage descriptor. */
-    private CatalogDataStorageDescriptor dataStorage;
+    private final CatalogDataStorageDescriptor dataStorage;
 
     /**
      * Constructs a distribution zone descriptor.
      *
      * @param id Id of the distribution zone.
      * @param name Name of the zone.
-     * @param partitions Number of partitions in distributions zone.
-     * @param replicas Number of partition replicas.
+     * @param partitions Amount of partitions in distributions zone.
+     * @param replicas Amount of partition replicas.

Review Comment:
   "Amount" is only used for uncountable stuff, right? Like "the amount of 
water", where you can't say "2 waters". But you can say 2 partitions or 2 
replicas. I believe you're wrong here. We may consult folks who know English 
better that I do to be confident.



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

Reply via email to