timoninmaxim commented on a change in pull request #8109:
URL: https://github.com/apache/ignite/pull/8109#discussion_r465011193



##########
File path: 
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/DataGenerationApplication.java
##########
@@ -34,13 +35,13 @@ public DataGenerationApplication(Ignite ignite) {
     }
 
     /** {@inheritDoc} */
-    @Override protected void run(String[] args) {
+    @Override protected void run(JsonNode jsonNode) {
         log.info("Creating cache...");
 
-        IgniteCache<Integer, Integer> cache = ignite.createCache(args[0]);
+        IgniteCache<Integer, Integer> cache = 
ignite.createCache(jsonNode.get("cacheName").asText());
 
         try (IgniteDataStreamer<Integer, Integer> stmr = 
ignite.dataStreamer(cache.getName())) {
-            for (int i = 0; i < Integer.parseInt(args[1]); i++) {
+            for (int i = 0; i < jsonNode.get("range").asInt(); i++) {

Review comment:
       Additional classes are ok. In case of complex hierarchy I'd prefer use 
generics (for example smth like `obj.getList().get(0).getRange()`) instead of 
ugly constructions (smth like 
`node.get("list").asArray()[0].get("range").asInt()`). 
   
   DTOs make code much much clearer, also it provides sanity checks out of the 
box.




----------------------------------------------------------------
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:
[email protected]


Reply via email to