@@ -172,7 +172,7 @@ public void testCp() throws Exception {
172172 AbstractDistribZkTestBase .copyConfigUp (configSet , "cloud-subdirs" , "cp1" , zkAddr );
173173
174174 // Now copy it somewhere else on ZK.
175- String [] args = new String [] {"--recurse " , "--zk-host" , zkAddr , "zk:/configs/cp1" , "zk:/cp2" };
175+ String [] args = new String [] {"--recursive " , "--zk-host" , zkAddr , "zk:/configs/cp1" , "zk:/cp2" };
176176
177177 ZkCpTool cpTool = new ZkCpTool ();
178178
@@ -184,7 +184,7 @@ public void testCp() throws Exception {
184184 Path tmp = createTempDir ("tmpNewPlace2" );
185185 args =
186186 new String [] {
187- "--recurse " , "--zk-host" , zkAddr , "zk:/configs/cp1" , "file:" + tmp .toAbsolutePath ()
187+ "--recursive " , "--zk-host" , zkAddr , "zk:/configs/cp1" , "file:" + tmp .toAbsolutePath ()
188188 };
189189
190190 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
@@ -195,7 +195,7 @@ public void testCp() throws Exception {
195195 tmp = createTempDir ("tmpNewPlace3" );
196196 args =
197197 new String [] {
198- "--recurse " , "--zk-host" , zkAddr , "zk:/configs/cp1" , tmp .toAbsolutePath ().toString ()
198+ "--recursive " , "--zk-host" , zkAddr , "zk:/configs/cp1" , tmp .toAbsolutePath ().toString ()
199199 };
200200
201201 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
@@ -205,7 +205,7 @@ public void testCp() throws Exception {
205205 // try with local->zk
206206 args =
207207 new String [] {
208- "--recurse " , "--zk-host" , zkAddr , srcPathCheck .toAbsolutePath ().toString (), "zk:/cp3"
208+ "--recursive " , "--zk-host" , zkAddr , srcPathCheck .toAbsolutePath ().toString (), "zk:/cp3"
209209 };
210210
211211 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
@@ -215,19 +215,19 @@ public void testCp() throws Exception {
215215 // try with local->zk, file: specified
216216 args =
217217 new String [] {
218- "--recurse " , "--zk-host" , zkAddr , "file:" + srcPathCheck .toAbsolutePath (), "zk:/cp4"
218+ "--recursive " , "--zk-host" , zkAddr , "file:" + srcPathCheck .toAbsolutePath (), "zk:/cp4"
219219 };
220220
221221 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
222222 assertEquals ("Copy should have succeeded." , 0 , res );
223223 verifyZkLocalPathsMatch (srcPathCheck , "/cp4" );
224224
225- // try with recurse not specified, and therefore not happening
225+ // try with recursive not specified, and therefore not happening
226226 args =
227227 new String [] {"--zk-host" , zkAddr , "file:" + srcPathCheck .toAbsolutePath (), "zk:/cp5Fail" };
228228
229229 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
230- assertTrue ("Copy should NOT have succeeded, recurse not specified." , 0 != res );
230+ assertTrue ("Copy should NOT have succeeded, recursive not specified." , 0 != res );
231231
232232 // NOTE: really can't test copying to '.' because the test framework doesn't allow altering the
233233 // source tree and at least IntelliJ's CWD is in the source tree.
@@ -309,7 +309,7 @@ public void testCp() throws Exception {
309309 // source path to the dst
310310 args =
311311 new String [] {
312- "--recurse " , "--zk-host" , zkAddr , "file:" + srcPathCheck .toAbsolutePath (), "zk:/cp7/"
312+ "--recursive " , "--zk-host" , zkAddr , "file:" + srcPathCheck .toAbsolutePath (), "zk:/cp7/"
313313 };
314314
315315 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
@@ -341,7 +341,9 @@ public void testCp() throws Exception {
341341
342342 tmp = createTempDir ("cp8" );
343343 args =
344- new String [] {"--recurse" , "--zk-host" , zkAddr , "zk:/cp7" , "file:" + tmp .toAbsolutePath ()};
344+ new String [] {
345+ "--recursive" , "--zk-host" , zkAddr , "zk:/cp7" , "file:" + tmp .toAbsolutePath ()
346+ };
345347 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
346348 assertEquals ("Copy should have succeeded." , 0 , res );
347349
@@ -351,7 +353,9 @@ public void testCp() throws Exception {
351353
352354 // Finally, copy up to cp8 and verify that the data is up there.
353355 args =
354- new String [] {"--recurse" , "--zk-host" , zkAddr , "file:" + tmp .toAbsolutePath (), "zk:/cp9" };
356+ new String [] {
357+ "--recursive" , "--zk-host" , zkAddr , "file:" + tmp .toAbsolutePath (), "zk:/cp9"
358+ };
355359
356360 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
357361 assertEquals ("Copy should have succeeded." , 0 , res );
@@ -394,7 +398,7 @@ public void testCp() throws Exception {
394398
395399 args =
396400 new String [] {
397- "--recurse " ,
401+ "--recursive " ,
398402 "--zk-host" ,
399403 zkAddr ,
400404 "file:" + emptyFile .getParent ().getParent ().toString (),
@@ -408,7 +412,7 @@ public void testCp() throws Exception {
408412 tmp2 = createTempDir ("cp10" );
409413 args =
410414 new String [] {
411- "--recurse " , "--zk-host" , zkAddr , "zk:/cp10" , "file:" + tmp2 .toAbsolutePath ()
415+ "--recursive " , "--zk-host" , zkAddr , "zk:/cp10" , "file:" + tmp2 .toAbsolutePath ()
412416 };
413417 res = cpTool .runTool (SolrCLI .processCommandLineArgs (cpTool , args ));
414418 assertEquals ("Copy should have succeeded." , 0 , res );
@@ -516,7 +520,7 @@ public void testLs() throws Exception {
516520 assertFalse ("Return should NOT contain a child node" , content .contains ("solrconfig.xml" ));
517521
518522 // ls with recursion
519- args = new String [] {"--recurse " , "--zk-host" , zkAddr , "/configs" };
523+ args = new String [] {"--recursive " , "--zk-host" , zkAddr , "/configs" };
520524
521525 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
522526 content = baos .toString (StandardCharsets .UTF_8 );
@@ -526,7 +530,7 @@ public void testLs() throws Exception {
526530 assertTrue ("Return should contain a child node" , content .contains ("solrconfig.xml" ));
527531
528532 // Saw a case where going from root didn't work, so test it.
529- args = new String [] {"--recurse " , "--zk-host" , zkAddr , "/" };
533+ args = new String [] {"--recursive " , "--zk-host" , zkAddr , "/" };
530534
531535 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
532536 content = baos .toString (StandardCharsets .UTF_8 );
@@ -543,7 +547,7 @@ public void testLs() throws Exception {
543547 assertFalse ("Return should not contain /zookeeper" , content .contains ("/zookeeper" ));
544548
545549 // Saw a case where ending in slash didn't work, so test it.
546- args = new String [] {"--recurse " , "--zk-host" , zkAddr , "/configs/" };
550+ args = new String [] {"--recursive " , "--zk-host" , zkAddr , "/configs/" };
547551
548552 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
549553 content = baos .toString (StandardCharsets .UTF_8 );
@@ -562,43 +566,44 @@ public void testRm() throws Exception {
562566 AbstractDistribZkTestBase .copyConfigUp (configSet , "cloud-subdirs" , "rm1" , zkAddr );
563567 AbstractDistribZkTestBase .copyConfigUp (configSet , "cloud-subdirs" , "rm2" , zkAddr );
564568
565- // Should fail if recurse not set.
569+ // Should fail if recursive not set.
566570 String [] args = new String [] {"--zk-host" , zkAddr , "/configs/rm1" };
567571
568572 ZkRmTool tool = new ZkRmTool ();
569573
570574 int res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
571575
572- assertTrue ("Should have failed to remove node with children unless --recurse is set" , res != 0 );
576+ assertTrue (
577+ "Should have failed to remove node with children unless --recursive is set" , res != 0 );
573578
574579 // Are we sure all the znodes are still there?
575580 verifyZkLocalPathsMatch (srcPathCheck , "/configs/rm1" );
576581
577- // run without recurse specified
582+ // run without recursive specified
578583 args = new String [] {"--zk-host" , zkAddr , "zk:/configs/rm1" };
579584
580585 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
581586
582587 assertTrue (
583- "Should have failed to remove node with children if --recurse is set to false" , res != 0 );
588+ "Should have failed to remove node with children if --recursive is set to false" , res != 0 );
584589
585- args = new String [] {"--recurse " , "--zk-host" , zkAddr , "/configs/rm1" };
590+ args = new String [] {"--recursive " , "--zk-host" , zkAddr , "/configs/rm1" };
586591
587592 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
588593 assertEquals ("Should have removed node /configs/rm1" , res , 0 );
589594 assertFalse (
590595 "Znode /configs/toremove really should be gone" , zkClient .exists ("/configs/rm1" , true ));
591596
592597 // Check that zk prefix also works.
593- args = new String [] {"--recurse " , "--zk-host" , zkAddr , "zk:/configs/rm2" };
598+ args = new String [] {"--recursive " , "--zk-host" , zkAddr , "zk:/configs/rm2" };
594599
595600 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
596601 assertEquals ("Should have removed node /configs/rm2" , res , 0 );
597602 assertFalse (
598603 "Znode /configs/toremove2 really should be gone" , zkClient .exists ("/configs/rm2" , true ));
599604
600605 // This should silently just refuse to do anything to the / or /zookeeper
601- args = new String [] {"--recurse " , "--zk-host" , zkAddr , "zk:/" };
606+ args = new String [] {"--recursive " , "--zk-host" , zkAddr , "zk:/" };
602607
603608 AbstractDistribZkTestBase .copyConfigUp (configSet , "cloud-subdirs" , "rm3" , zkAddr );
604609 res = tool .runTool (SolrCLI .processCommandLineArgs (tool , args ));
0 commit comments