sanpwc commented on code in PR #6604:
URL: https://github.com/apache/ignite-3/pull/6604#discussion_r2387169818


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/exception/EmptyDataNodesException.java:
##########
@@ -15,17 +15,25 @@
  * limitations under the License.
  */
 
-package org.apache.ignite.internal.cluster.management;
+package org.apache.ignite.internal.distributionzones.exception;
 
-import static 
org.apache.ignite.lang.ErrorGroups.CommonConfiguration.CONFIGURATION_VALIDATION_ERR;
+import static org.apache.ignite.internal.lang.IgniteStringFormatter.format;
+import static 
org.apache.ignite.lang.ErrorGroups.DistributionZones.EMPTY_DATA_NODES_ERR;
 
-import org.apache.ignite.internal.lang.IgniteInternalException;
+import org.apache.ignite.lang.IgniteException;
 
 /**
- * Exception representing invalid node configuration.
+ * Exception thrown when there are no data nodes for the given zone.
  */
-public class InvalidNodeConfigurationException extends IgniteInternalException 
{
-    public InvalidNodeConfigurationException(String message) {
-        super(CONFIGURATION_VALIDATION_ERR, message);
+public class EmptyDataNodesException extends IgniteException {
+    private static final long serialVersionUID = 5691362165660196984L;
+
+    /**
+     * Constructor.
+     *
+     * @param zoneId Zone ID.
+     */
+    public EmptyDataNodesException(int zoneId) {
+        super(EMPTY_DATA_NODES_ERR, format("Empty data nodes for zone 
[zoneId={}].", zoneId));

Review Comment:
   It actually looks like user-facing exception (despite the fact that it's in 
internal package).
   
   1. Should we move it from internal to public package?
   2. Should we add zone name to exception params?



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