Details
Description
ClusterActionHandlerSupport.java
public static String prepareRemoteFileUrl(ClusterActionEvent event, String rawUrl) throws IOException { if (rawUrl != null && rawUrl.startsWith("file://")) { try { URI uri = new URI(rawUrl); File localFile = new File(uri); BlobCache cache = BlobCache.getInstance(event.getCompute(), event.getClusterSpec()); cache.putIfAbsent(localFile); final String basePath = "/tmp/whirr/cache/files/"; addStatement(event, cache.getAsSaveToStatement(basePath, uri)); cache.removeContainer(); return "file://" + basePath + localFile.getName(); } catch (URISyntaxException e) { throw new IOException(e); } } else if(rawUrl != null && rawUrl.startsWith("remote://")) { return rawUrl.replaceFirst("remote://", "file://"); } return rawUrl; }
As we can see from the above codes, the whirr will only support to upload only one file defined as "whirr.zookeeper.tarball.url" to the remote instance, I think it will be nice to upload a group of local files to the remote instance instead of just upload only one file.
For example: we can define the whirr.zookeeper.tarball.url = "file1, file2, file3" which is separated by comma or colon.