private void submitExecutionScript(StorageClient pSms) throws Exception { LOGGER.info("Submit job execution script."); InputStream source = UnicoreClient.class.getResourceAsStream(JOB_EXECUTION_SCRIPT); RByteIOClient fileClient = pSms.getImport("/" + JOB_EXECUTION_SCRIPT); fileClient.writeAllData(source); }
/** * @param pSms * @param tc * @throws Exception */ private void submitExecutionScript(StorageClient pSms) throws Exception { LOGGER.info("Submit job execution script."); InputStream source = Unicore6Client.class.getResourceAsStream(JOB_EXECUTION_SCRIPT); RByteIOClient fileClient = pSms.getImport("/" + JOB_EXECUTION_SCRIPT); fileClient.writeAllData(source); }
protected void submitWpsConfiguration(StorageClient pSms) throws Exception { RByteIOClient fileClient = pSms.getImport("/wps_config.xml"); File f = new File(WPSConfig.getConfigPath()); FileInputStream is = new FileInputStream(f); fileClient.writeAllData(is); is.close(); } }
/** * @param pSms * @param pAlgorithmInput * @param tc * @throws Exception */ private void submitInputFiles(StorageClient pSms, DistributedAlgorithmInput pAlgorithmInput) throws Exception { // create compressed input data LOGGER.info("Serialize input data."); byte[] data = CompressUtilities.serialize(pAlgorithmInput); byte[] dataCompressed = CompressUtilities.createCompressedData(data); LOGGER.info("Compress input data (ratio: " + ((double) dataCompressed.length) / ((double) data.length) + ")."); // submit input data LOGGER.info("Submit input data."); RByteIOClient fileClient = pSms.getImport("/" + TARGET_SYSTEM_INPUT_FILE_NAME); fileClient.write(dataCompressed); }
protected void submitInputData(StorageClient pSms, UnicoreAlgorithmInput pAlgorithmInput) throws Exception { RByteIOClient fileClient = pSms.getImport("/" + TARGET_SYSTEM_INPUT_FILE_NAME); // create serialized input data LOGGER.info("Serialize input data."); byte[] data = Compression.toByteArray(pAlgorithmInput); // create input data Properties unicoreProperties = UnicoreAlgorithmRepository.getInstance().getUnicoreProperties(); byte[] dataCompressed = null; if (Boolean.parseBoolean(unicoreProperties.getProperty(UnicoreAlgorithmRepository.CFG_COMPRESSION))) { dataCompressed = Compression.createCompressedData(data, Boolean.parseBoolean(unicoreProperties .getProperty(UnicoreAlgorithmRepository.CFG_COMPRESSION))); LOGGER.info("Compress input data (ratio: " + ((double) dataCompressed.length) / ((double) data.length) + ")."); } // submit input data if (Boolean.parseBoolean(unicoreProperties.getProperty(UnicoreAlgorithmRepository.CFG_COMPRESSION))) { LOGGER.info("Submit compressed input data."); fileClient.write(dataCompressed); } else { LOGGER.info("Submit input data."); fileClient.write(data); } }
is=new FileInputStream(localFile.getAbsolutePath()); boolean append=Mode.append.equals(mode); ftc=sms.getImport(remotePath, append, extraParameters, protocol); configure(ftc, extraParameters); if(append)ftc.setAppend(true);