Examples of InputStreamToFileWriter


Examples of org.apache.airavata.core.gfac.provider.utils.InputStreamToFileWriter

        try {
            // running cmd
            Process process = builder.start();

            Thread t1 = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread t2 = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            t1.setDaemon(true);
            t2.setDaemon(true);
            t1.start();
            t2.start();

            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();

            // make sure other two threads are done
            t1.join();
            t2.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.core.gfac.provider.utils.InputStreamToFileWriter

        try {
            // running cmd
            Process process = builder.start();

            Thread t1 = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread t2 = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            t1.setDaemon(true);
            t2.setDaemon(true);
            t1.start();
            t2.start();

            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();

            // make sure other two threads are done
            t1.join();
            t2.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.core.gfac.provider.utils.InputStreamToFileWriter

        try {
            // running cmd
            Process process = builder.start();

            Thread t1 = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread t2 = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            t1.setDaemon(true);
            t2.setDaemon(true);
            t1.start();
            t2.start();

            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();

            // make sure other two threads are done
            t1.join();
            t2.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.gfac.local.utils.InputStreamToFileWriter

            jobDetails.setJobDescription(app.toString());
            GFacUtils.saveJobStatus(jobExecutionContext,jobDetails, JobState.SETUP);
          // running cmd
            Process process = builder.start();

            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            standardOutWriter.setDaemon(true);
            standardErrorWriter.setDaemon(true);
            standardOutWriter.start();
            standardErrorWriter.start();

            int returnValue = process.waitFor();

            // make sure other two threads are done
            standardOutWriter.join();
            standardErrorWriter.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.gfac.utils.InputStreamToFileWriter

        try {
            // running cmd
            Process process = builder.start();

            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            standardOutWriter.setDaemon(true);
            standardErrorWriter.setDaemon(true);
            standardOutWriter.start();
            standardErrorWriter.start();

            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();

            // make sure other two threads are done
            standardOutWriter.join();
            standardErrorWriter.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.gfac.utils.InputStreamToFileWriter

            jobId="Local_"+Calendar.getInstance().getTimeInMillis();
            if(jobExecutionContext.getGFacConfiguration().getAiravataAPI() != null){
            saveApplicationJob(jobExecutionContext);
          }
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.INITIALIZE);
            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            standardOutWriter.setDaemon(true);
            standardErrorWriter.setDaemon(true);
            standardOutWriter.start();
            standardErrorWriter.start();
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.EXECUTING);
            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.FINALIZE);

            // make sure other two threads are done
            standardOutWriter.join();
            standardErrorWriter.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.gfac.utils.InputStreamToFileWriter

            jobId="Local_"+Calendar.getInstance().getTimeInMillis();
            if(jobExecutionContext.getGFacConfiguration().getAiravataAPI() != null){
            saveApplicationJob(jobExecutionContext);
          }
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.INITIALIZE);
            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            standardOutWriter.setDaemon(true);
            standardErrorWriter.setDaemon(true);
            standardOutWriter.start();
            standardErrorWriter.start();
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.EXECUTING);
            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.FINALIZE);

            // make sure other two threads are done
            standardOutWriter.join();
            standardErrorWriter.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here

Examples of org.apache.airavata.gfac.utils.InputStreamToFileWriter

            jobId="Local_"+Calendar.getInstance().getTimeInMillis();
            if(jobExecutionContext.getGFacConfiguration().getAiravataAPI() != null){
            saveApplicationJob(jobExecutionContext);
          }
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.INITIALIZE);
            Thread standardOutWriter = new InputStreamToFileWriter(process.getInputStream(), app.getStandardOutput());
            Thread standardErrorWriter = new InputStreamToFileWriter(process.getErrorStream(), app.getStandardError());

            // start output threads
            standardOutWriter.setDaemon(true);
            standardErrorWriter.setDaemon(true);
            standardOutWriter.start();
            standardErrorWriter.start();
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.EXECUTING);
            // wait for the process (application) to finish executing
            int returnValue = process.waitFor();
            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.FINALIZE);

            // make sure other two threads are done
            standardOutWriter.join();
            standardErrorWriter.join();

            /*
             * check return value. usually not very helpful to draw conclusions based on return values so don't bother.
             * just provide warning in the log messages
             */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.