LuciferYang opened a new pull request #35672:
URL: https://github.com/apache/spark/pull/35672


   ### What changes were proposed in this pull request?
   This pr use `Ivy.retrieve(ModuleRevisionId, RetrieveOptions)` instead of  
deprecated `Ivy.retrieve(ModuleRevisionId, String, RetrieveOptions)` to  clean 
up deprecation compilation warning.
   
   The refactor way refer to the Implementation of  `RetrieveEngine#retrieve` 
method as follows:
   
   ```java
       @Deprecated
       public int retrieve(ModuleRevisionId mrid, String destFilePattern, 
RetrieveOptions options)
               throws IOException {
           RetrieveOptions retrieveOptions = new RetrieveOptions(options);
           retrieveOptions.setDestArtifactPattern(destFilePattern);
   
           RetrieveReport result = retrieve(mrid, retrieveOptions);
           return result.getNbrArtifactsCopied();
       }
   ```
   
   ### Why are the changes needed?
   Clean up deprecated api usage.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Pass GA


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to