@@ -350,7 +350,7 @@ private Job distCpUpdate(final Path srcDir, final Path destDir)
350350 .withDeleteMissing (true )
351351 .withSyncFolder (true )
352352 .withCRC (true )
353- .withDirectWrite (directWriteAlways ())
353+ .withDirectWrite (shouldUseDirectWrite ())
354354 .withOverwrite (false )));
355355 }
356356
@@ -404,7 +404,7 @@ public void testTrackDeepDirectoryStructureToRemote() throws Exception {
404404 inputDirUnderOutputDir )
405405 .withTrackMissing (trackDir )
406406 .withSyncFolder (true )
407- .withDirectWrite (directWriteAlways ())
407+ .withDirectWrite (shouldUseDirectWrite ())
408408 .withOverwrite (false )));
409409
410410 lsR ("tracked udpate" , remoteFS , destDir );
@@ -598,13 +598,13 @@ protected int getDefaultDistCPSizeKb() {
598598 /**
599599 * Executes DistCp and asserts that the job finished successfully.
600600 * The choice of direct/indirect is based on the value of
601- * {@link #directWriteAlways ()}.
601+ * {@link #shouldUseDirectWrite ()}.
602602 * @param src source path
603603 * @param dst destination path
604604 * @throws Exception if there is a failure
605605 */
606606 private void runDistCp (Path src , Path dst ) throws Exception {
607- if (directWriteAlways ()) {
607+ if (shouldUseDirectWrite ()) {
608608 runDistCpDirectWrite (src , dst );
609609 } else {
610610 runDistCpWithRename (src , dst );
@@ -651,7 +651,7 @@ private static void mkdirs(FileSystem fs, Path dir) throws Exception {
651651 @ Test
652652 public void testDirectWrite () throws Exception {
653653 describe ("copy file from local to remote using direct write option" );
654- if (directWriteAlways ()) {
654+ if (shouldUseDirectWrite ()) {
655655 skip ("not needed as all other tests use the -direct option." );
656656 }
657657 directWrite (localFS , localDir , remoteFS , remoteDir , true );
@@ -710,32 +710,32 @@ private int getTotalFiles() {
710710 * false by default; enable for stores where rename is slow.
711711 * @return true if direct write should be used in all tests.
712712 */
713- protected boolean directWriteAlways () {
713+ protected boolean shouldUseDirectWrite () {
714714 return false ;
715715 }
716716
717717 /**
718718 * Return the default options for distcp, including,
719- * if {@link #directWriteAlways ()} is true,
719+ * if {@link #shouldUseDirectWrite ()} is true,
720720 * the -direct option.
721721 * Append or prepend this to string CLIs.
722722 * @return default options.
723723 */
724724 protected String getDefaultCLIOptions () {
725- return directWriteAlways ()
725+ return shouldUseDirectWrite ()
726726 ? " -direct "
727727 : "" ;
728728 }
729729
730730 /**
731731 * Return the default options for distcp, including,
732- * if {@link #directWriteAlways ()} is true,
732+ * if {@link #shouldUseDirectWrite ()} is true,
733733 * the -direct option, null if there are no
734734 * defaults.
735735 * @return default options.
736736 */
737737 protected String getDefaultCLIOptionsOrNull () {
738- return directWriteAlways ()
738+ return shouldUseDirectWrite ()
739739 ? " -direct "
740740 : null ;
741741 }
0 commit comments