Uploaded image for project: 'Apache Whirr (retired)'
  1. Apache Whirr (retired)
  2. WHIRR-736

It will be nice to upload a group of local files to the remote instance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.8.2
    • 0.9.0
    • core
    • None
    • ubuntu, Openstack

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeremy_lv Jeremy Lv
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: