Package org.hive2hive.core.processes.framework.abstracts

Examples of org.hive2hive.core.processes.framework.abstracts.ProcessComponent


      logger.debug("Starting to download the restored file under the name '{}'.", recoveredFileName);
      File destination = new File(context.getFile().getParentFile(), recoveredFileName);

      // add the process to download the file
      ProcessComponent downloadProcess = ProcessFactory.instance().createDownloadFileProcess(
          selectedNode.getFilePublicKey(), selected.getIndex(), destination, networkManager);
      getParent().add(downloadProcess);

      // add the process to upload the file
      ProcessComponent addProcess = ProcessFactory.instance().createNewFileProcess(destination,
          networkManager);
      getParent().add(addProcess);
    } catch (Hive2HiveException e) {
      throw new ProcessExecutionException(e);
    }
View Full Code Here


    }

    // create put chunks steps
    int chunks = FileChunkUtil.getNumberOfChunks(file, config.getChunkSize());
    logger.trace("{} chunks to upload for file '{}'.", Integer.toString(chunks), file.getName());
    ProcessComponent prev = this;
    for (int i = 0; i < chunks; i++) {
      String chunkId = UUID.randomUUID().toString();
      PutSingleChunkStep putChunkStep = new PutSingleChunkStep(context, i, chunkId, dataManager, config);

      // insert just after this step
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.framework.abstracts.ProcessComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.