xy720 commented on a change in pull request #4163: URL: https://github.com/apache/incubator-doris/pull/4163#discussion_r460533414
########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/SparkResource.java ########## @@ -144,6 +146,28 @@ public SparkResource getCopiedResource() { return new SparkResource(name, Maps.newHashMap(sparkConfigs), workingDir, broker, brokerProperties); } + public SparkRepository getRemoteRepository() { + String remoteRepositoryPath = workingDir + "/" + Catalog.getCurrentCatalog().getClusterId() + + "/" + SparkRepository.REPOSITORY_DIR; + BrokerDesc brokerDesc = new BrokerDesc(broker, getBrokerPropertiesWithoutPrefix()); + return new SparkRepository(remoteRepositoryPath, brokerDesc); + } + + // Each SparkResource has and only has one SparkRepository. + // This method get the remote archive which matches the dpp version from remote repository + public synchronized SparkRepository.SparkArchive prepareArchive() throws LoadException { + SparkRepository.SparkArchive archive = null; + String remoteRepositoryPath = workingDir + "/" + Catalog.getCurrentCatalog().getClusterId() + + "/" + SparkRepository.REPOSITORY_DIR + name; + BrokerDesc brokerDesc = new BrokerDesc(broker, getBrokerPropertiesWithoutPrefix()); + SparkRepository repository = new SparkRepository(remoteRepositoryPath, brokerDesc); + boolean isPrepare = repository.prepare(); Review comment: done ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org