airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shameera Rathnayaka <shameerai...@gmail.com>
Subject Re: [2/4] airavata git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata
Date Tue, 25 Nov 2014 17:02:30 GMT
Hi msmemon,

This commit break the build - compilation error, Seems you haven't resolve
merge conflicts.

Thanks,
Shameera.

On Mon, Nov 24, 2014 at 10:14 AM, <msmemon@apache.org> wrote:

> Merge branch 'master' of
> https://git-wip-us.apache.org/repos/asf/airavata
>
> Conflicts:
>
> airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
>
> airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
>
>
> Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
> Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/dc1898df
> Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/dc1898df
> Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/dc1898df
>
> Branch: refs/heads/master
> Commit: dc1898dfe05465fdd1102b1f1c382540dd229f26
> Parents: a838b66 f348ef4
> Author: msmemon <shahbaz.memon@gmail.com>
> Authored: Mon Nov 24 15:44:43 2014 +0100
> Committer: msmemon <shahbaz.memon@gmail.com>
> Committed: Mon Nov 24 15:44:43 2014 +0100
>
> ----------------------------------------------------------------------
>  .../server/handler/AiravataServerHandler.java   |    94 +-
>  .../java/org/apache/airavata/api/Airavata.java  | 19662 +++++++++--------
>  .../main/resources/lib/airavata/Airavata.cpp    |   852 +-
>  .../src/main/resources/lib/airavata/Airavata.h  |   227 +-
>  .../lib/airavata/Airavata_server.skeleton.cpp   |    11 +-
>  .../applicationInterfaceModel_types.cpp         |    22 +-
>  .../airavata/applicationInterfaceModel_types.h  |    22 +-
>  .../lib/airavata/computeResourceModel_types.cpp |   218 +-
>  .../lib/airavata/computeResourceModel_types.h   |    28 +-
>  .../lib/airavata/experimentModel_types.cpp      |   521 +-
>  .../lib/airavata/experimentModel_types.h        |   124 +-
>  .../gatewayResourceProfileModel_types.cpp       |    48 +-
>  .../gatewayResourceProfileModel_types.h         |    19 +-
>  .../lib/airavata/messagingEvents_types.cpp      |     6 +-
>  .../lib/airavata/messagingEvents_types.h        |     9 +-
>  .../resources/lib/Airavata/API/Airavata.php     |   562 +-
>  .../Model/AppCatalog/AppInterface/Types.php     |    20 +-
>  .../Model/AppCatalog/ComputeResource/Types.php  |    29 +
>  .../Model/AppCatalog/GatewayProfile/Types.php   |    20 +-
>  .../Airavata/Model/Messaging/Event/Types.php    |     4 +-
>  .../Model/Workspace/Experiment/Types.php        |   171 +-
>  .../registerApplicationInterface.php            |     2 +-
>  .../client/samples/CreateLaunchExperiment.java  |   843 +-
>  .../samples/CreateLaunchExperimentUS3.java      |   239 +-
>  .../tools/RegisterOGCEUS3Application.java       |     4 +-
>  .../tools/RegisterSampleApplications.java       |    12 +-
>  .../tools/RegisterSampleApplicationsUtils.java  |     7 +-
>  .../ApplicationInterfaceDescription.java        |   104 +-
>  .../model/appcatalog/appinterface/DataType.java |     8 +-
>  .../appcatalog/computeresource/MonitorMode.java |    73 +
>  .../computeresource/SSHJobSubmission.java       |   121 +-
>  .../ComputeResourcePreference.java              |    68 +-
>  .../messaging/event/TaskOutputChangeEvent.java  |    40 +-
>  .../workspace/experiment/DataObjectType.java    |   719 -
>  .../model/workspace/experiment/DataType.java    |    71 -
>  .../model/workspace/experiment/Experiment.java  |    76 +-
>  .../model/workspace/experiment/TaskDetails.java |    76 +-
>  .../experiment/WorkflowNodeDetails.java         |    76 +-
>  .../model/util/ExperimentModelUtil.java         |    15 +-
>  .../airavataAPI.thrift                          |    16 +-
>  .../applicationInterfaceModel.thrift            |     6 +-
>  .../computeResourceModel.thrift                 |    19 +-
>  .../experimentModel.thrift                      |    32 +-
>  .../gatewayResourceProfileModel.thrift          |     5 +-
>  .../messagingEvents.thrift                      |     3 +-
>  .../apache/airavata/client/AiravataClient.java  |    14 +-
>  .../apache/airavata/client/api/AiravataAPI.java |     2 +-
>  .../airavata/client/api/ApplicationManager.java |   502 +-
>  .../client/api/builder/DescriptorBuilder.java   |   170 +-
>  .../client/impl/ApplicationManagerImpl.java     |   994 +-
>  .../airavata/client/tools/DocumentCreator.java  |  1796 +-
>  .../client/tools/DocumentCreatorNew.java        |  1612 +-
>  .../client/tools/DocumentCreatorUtils.java      |     4 +-
>  .../client/tools/UltrascanDocumentCreator.java  |   888 +-
>  .../data/impl/ApplicationInterfaceImpl.java     |    65 +-
>  .../data/impl/GwyResourceProfileImpl.java       |    19 +-
>  .../resources/AppModuleMappingResource.java     |    29 +-
>  .../resources/ApplicationInputResource.java     |     6 +-
>  .../resources/ApplicationOutputResource.java    |    31 +-
>  .../data/util/AppCatalogThriftConversion.java   |    10 +-
>  .../app/catalog/test/AppInterfaceTest.java      |    17 +-
>  .../app/catalog/test/GatewayProfileTest.java    |     8 +-
>  .../app/catalog/test/util/Initialize.java       |     2 +-
>  .../server/src/main/resources/gfac-config.xml   |    14 +-
>  .../src/main/assembly/bin-assembly.xml          |    17 +-
>  modules/distribution/client/java/pom.xml        |    10 +-
>  .../java/src/main/assembly/bin-assembly.xml     |     4 +-
>  modules/distribution/gfac-server/pom.xml        |    12 +-
>  .../src/main/assembly/bin-assembly.xml          |   131 +-
>  .../src/main/assembly/bin-assembly.xml          |    56 +-
>  modules/distribution/server/pom.xml             |    10 +-
>  .../server/src/main/assembly/bin-assembly.xml   |     4 +-
>  modules/distribution/xbaya-gui/pom.xml          |   471 +
>  .../src/main/assembly/bin-assembly.xml          |   101 +
>  .../airavata/distribution/xbaya/jnlp/Main.java  |   156 +
>  .../xbaya-gui/src/main/resources/INSTALL        |    44 +
>  .../xbaya-gui/src/main/resources/LICENSE        |  2273 ++
>  .../xbaya-gui/src/main/resources/NOTICE         |   163 +
>  .../xbaya-gui/src/main/resources/README         |   101 +
>  .../src/main/resources/airavata-logo.gif        |   Bin 0 -> 13895 bytes
>  .../xbaya-gui/src/main/resources/bin/setenv.bat |    42 +
>  .../xbaya-gui/src/main/resources/bin/setenv.sh  |    77 +
>  .../src/main/resources/bin/xbaya-gui.bat        |    23 +
>  .../src/main/resources/bin/xbaya-gui.sh         |    22 +
>  .../src/main/resources/conf/log4j.properties    |    40 +
>  .../xbaya-gui/src/main/resources/jnlp/INSTALL   |    48 +
>  .../xbaya-gui/src/main/resources/jnlp/LICENSE   |  2272 ++
>  .../xbaya-gui/src/main/resources/jnlp/NOTICE    |   163 +
>  .../xbaya-gui/src/main/resources/jnlp/README    |    91 +
>  .../src/main/resources/jnlp/xbaya.jnlp          |    42 +
>  .../xbaya-gui/src/main/resources/xbaya.jks      |   Bin 0 -> 2234 bytes
>  .../airavata/gfac/server/GfacServerHandler.java |     6 +-
>  .../src/main/resources/gfac-config.xml          |   106 -
>  .../src/test/resources/gfac-config.xml          |    90 -
>  .../gfac/bes/handlers/AbstractSMSHandler.java   |    74 +-
>  .../gfac/bes/provider/impl/BESProvider.java     |   180 +-
>  .../bes/security/UNICORESecurityContext.java    |     4 +-
>  .../gfac/bes/utils/ApplicationProcessor.java    |   212 +-
>  .../gfac-bes/src/test/resources/gfac-config.xml |    26 -
>  .../org/apache/airavata/gfac/Constants.java     |     3 +
>  .../org/apache/airavata/gfac/Scheduler.java     |   110 +-
>  .../gfac/core/context/ApplicationContext.java   |    44 +-
>  .../gfac/core/context/JobExecutionContext.java  |   215 +-
>  .../airavata/gfac/core/cpi/BetterGfacImpl.java  |   434 +-
>  .../handler/AbstractRecoverableHandler.java     |     4 +-
>  .../core/handler/AppDescriptorCheckHandler.java |    55 +-
>  .../airavata/gfac/core/monitor/MonitorID.java   |    20 +-
>  .../gfac/core/provider/utils/ProviderUtils.java |    18 +-
>  .../airavata/gfac/core/utils/GFacUtils.java     |  1047 +-
>  .../airavata/gfac/core/utils/OutputUtils.java   |    72 +-
>  .../apache/airavata/job/GFacConfigXmlTest.java  |    80 +-
>  .../src/test/resources/gfac-config.xml          |     2 +-
>  .../apache/airavata/gfac/ec2/EC2Provider.java   |   113 +-
>  .../airavata/gfac/ec2/EC2ProviderTest.java      |   366 +-
>  .../gfac-ec2/src/test/resources/gfac-config.xml |    26 -
>  .../gfac/gram/handler/GridFTPOutputHandler.java |     5 +-
>  .../src/test/resources/gfac-config.xml          |    36 -
>  .../handler/GSISSHDirectorySetupHandler.java    |    24 +-
>  .../gfac/gsissh/handler/GSISSHInputHandler.java |   102 +-
>  .../gsissh/handler/GSISSHOutputHandler.java     |   116 +-
>  .../gsissh/provider/impl/GSISSHProvider.java    |    77 +-
>  .../gfac/gsissh/util/GFACGSISSHUtils.java       |   215 +-
>  .../impl/GSISSHProviderTestWithMyProxyAuth.java |   465 +-
>  .../src/test/resources/gfac-config.xml          |    33 -
>  .../src/test/resources/gfac-config.xml          |    30 -
>  .../handler/LocalDirectorySetupHandler.java     |    19 +-
>  .../gfac/local/provider/impl/LocalProvider.java |    54 +-
>  .../gfac/local/utils/LocalProviderUtil.java     |    15 +-
>  .../gfac/services/impl/LocalProviderTest.java   |   368 +-
>  .../src/test/resources/gfac-config.xml          |    27 -
>  .../airavata/gfac/monitor/HPCMonitorID.java     |    36 +-
>  .../airavata/gfac/monitor/HostMonitorData.java  |    40 +-
>  .../handlers/GridPullMonitorHandler.java        |     2 +-
>  .../monitor/impl/pull/qstat/HPCPullMonitor.java |    83 +-
>  .../impl/pull/qstat/ResourceConnection.java     |    20 +-
>  .../monitor/impl/push/amqp/AMQPMonitor.java     |    57 +-
>  .../airavata/gfac/monitor/util/CommonUtils.java |    83 +-
>  .../apache/airavata/job/AMQPMonitorTest.java    |    64 +-
>  .../job/QstatMonitorTestWithMyProxyAuth.java    |   344 +-
>  .../src/test/resources/gfac-config.xml          |    65 -
>  .../ssh/handler/AdvancedSCPInputHandler.java    |    82 +-
>  .../ssh/handler/AdvancedSCPOutputHandler.java   |    48 +-
>  .../ssh/handler/SSHDirectorySetupHandler.java   |    23 +-
>  .../gfac/ssh/handler/SSHInputHandler.java       |   105 +-
>  .../gfac/ssh/handler/SSHOutputHandler.java      |   185 +-
>  .../gfac/ssh/provider/impl/SSHProvider.java     |   239 +-
>  .../airavata/gfac/ssh/util/GFACSSHUtils.java    |   356 +-
>  .../services/impl/BigRed2TestWithSSHAuth.java   |   504 +-
>  .../impl/SSHProviderTestWithSSHAuth.java        |   342 +-
>  .../gfac-ssh/src/test/resources/gfac-config.xml |    51 -
>  modules/gfac/pom.xml                            |     6 +-
>  .../apache/airavata/integration/BaseCaseIT.java |    49 +-
>  .../airavata/integration/DataRetrievalIT.java   |    15 +-
>  .../airavata/integration/SimpleEchoIT.java      |    23 +-
>  .../integration/tools/DocumentCreatorUtils.java |     4 +-
>  .../src/test/resources/gfac-config.xml          |    80 +-
>  modules/messaging/core/pom.xml                  |    11 +-
>  .../src/main/resources/gfac-config.xml          |   106 -
>  .../src/test/resources/gfac-config.xml          |    90 -
>  .../sample/OrchestratorClientSample.java        |    22 +-
>  .../core/impl/GFACEmbeddedJobSubmitter.java     |     2 +-
>  .../core/utils/OrchestratorUtils.java           |     7 -
>  .../src/test/resources/gfac-config.xml          |   104 -
>  modules/registry/airavata-jpa-registry/pom.xml  |    10 +-
>  .../registry/jpa/impl/ExperimentRegistry.java   |   124 +-
>  .../registry/jpa/impl/RegistryImpl.java         |    13 +-
>  .../jpa/utils/ThriftDataModelConversion.java    |   101 +-
>  modules/test-suite/pom.xml                      |    10 +-
>  modules/workflow-model/workflow-engine/pom.xml  |    10 +-
>  .../engine/interpretor/WorkflowInterpreter.java |    81 +-
>  .../component/ws/WSComponentApplication.java    |     2 +-
>  modules/xbaya-gui/pom.xml                       |    10 +-
>  .../ui/experiment/LaunchApplicationWindow.java  |    58 +-
>  .../WorkflowInterpreterLaunchWindow.java        |    17 +-
>  .../airavata/gsi/ssh/api/job/JobDescriptor.java |     7 +
>  .../apache/airavata/gsi/ssh/util/SSHUtils.java  |     4 +-
>  176 files changed, 26791 insertions(+), 19657 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/dc1898df/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
> ----------------------------------------------------------------------
> diff --cc
> airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
> index b0ee5a0,34d419c..c5cbc79
> ---
> a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
> +++
> b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
> @@@ -55,9 -57,15 +57,21 @@@ public class CreateLaunchExperiment
>       private static final String DEFAULT_GATEWAY =
> "default.registry.gateway";
>       private static Airavata.Client airavataClient;
>
> ++<<<<<<< HEAD
>  +    private static String echoAppId =
> "Echo_7405adc7-9519-4478-8529-21846b837cd3";
>  +    private static String wrfAppId =
> "WRF_d41bdc86-e280-4eb6-a045-708f69a8c116";
>  +    private static String amberAppId =
> "Amber_b23ee051-90d6-4892-827e-622a2f6c95ee";
> ++=======
> +     private static String echoAppId =
> "Echo_36fbb479-5b41-4f48-a9c5-382ee910ac6b";
> +     private static String wrfAppId =
> "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
> +     private static String amberAppId =
> "Amber_49b16f6f-93ab-4885-9971-6ab2ab5eb3d3";
> +     private static String gromacsAppId =
> "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
> +     private static String espressoAppId =
> "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
> +     private static String lammpsAppId =
> "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f";
> +     private static String nwchemAppId =
> "NWChem_2c8fee64-acf9-4a89-b6d3-91eb53c7640c";
> +     private static String trinityAppId =
> "Trinity_e894acf5-9bca-46e8-a1bd-7e2d5155191a";
> +     private static String autodockAppId =
> "AutoDock_43d9fdd0-c404-49f4-b913-3abf9080a8c9";
> ++>>>>>>> f348ef4c59c7f6a8c0fa347bde5b203ae17f7dde
>
>
>       private static String localHost = "localhost";
> @@@ -206,24 -219,23 +225,41 @@@
>
>       public static String createEchoExperimentForFSD(Airavata.Client
> client) throws TException {
>           try {
> ++<<<<<<< HEAD
>  +              // these are template variables and do not need to have
> values, as it is a data model.
>  +            List<DataObjectType> exInputs = new
> ArrayList<DataObjectType>();
>  +            DataObjectType i1 = new DataObjectType();
>  +            i1.setKey("i1");
>  +            i1.setType(DataType.STRING);
>  +            i1.setValue("Test echo output");
>  +            exInputs.add(i1);
>  +            DataObjectType i2 = new DataObjectType();
>  +            i2.setKey("i2");
> ++=======
> +             List<InputDataObjectType> exInputs = new
> ArrayList<InputDataObjectType>();
> +             InputDataObjectType input = new InputDataObjectType();
> +             input.setName("Input_to_Echo");
> +             input.setType(DataType.STRING);
> +             input.setValue("Echoed_Output=Hello World");
> +             exInputs.add(input);
> +             InputDataObjectType i2 = new InputDataObjectType();
> +             i2.setName("Input_to_Echo1");
> ++>>>>>>> f348ef4c59c7f6a8c0fa347bde5b203ae17f7dde
>               i2.setType(DataType.URI);
>  -            i2.setValue("http://shrib.com/22QmrrX4");
>  +            i2.setValue("http://textfiles.com/art/152614.txt");
>               exInputs.add(i2);
>
> ++<<<<<<< HEAD
>  +            List<DataObjectType> exOut = new ArrayList<DataObjectType>();
>  +            DataObjectType output = new DataObjectType();
>  +            output.setKey("o1");
> ++=======
> +             List<OutputDataObjectType> exOut = new
> ArrayList<OutputDataObjectType>();
> +             OutputDataObjectType output = new OutputDataObjectType();
> +             output.setName("Echoed_Output");
> ++>>>>>>> f348ef4c59c7f6a8c0fa347bde5b203ae17f7dde
>               output.setType(DataType.STRING);
>  -            output.setValue("22QmrrX4");
>  +            output.setValue("152614.txt");
>               exOut.add(output);
>
>
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/dc1898df/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
> ----------------------------------------------------------------------
> diff --cc
> airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
> index d9ccebb,41020a0..6e1bb20
> ---
> a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
> +++
> b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java
> @@@ -529,19 -529,14 +529,21 @@@ public class RegisterSampleApplication
>               List<String> appModules = new ArrayList<String>();
>               appModules.add(echoModuleId);
>
>  -            InputDataObjectType input1 =
> RegisterSampleApplicationsUtils.createAppInput("Input_to_Echo", "Hello
> World",
>  +            InputDataObjectType input1 =
> RegisterSampleApplicationsUtils.createAppInput("i1", "",
>                       DataType.STRING, null, false, "A test string to
> Echo", null);
>
> ++<<<<<<< HEAD
>  +            InputDataObjectType input2 =
> RegisterSampleApplicationsUtils.createAppInput("i2", "",
>  +                    DataType.URI, null, false, "A test uri to Echo",
> null);
>  +
>  +
> ++=======
> ++>>>>>>> f348ef4c59c7f6a8c0fa347bde5b203ae17f7dde
>               List<InputDataObjectType> applicationInputs = new
> ArrayList<InputDataObjectType>();
>               applicationInputs.add(input1);
> -             applicationInputs.add(input2);
>
>  -            OutputDataObjectType output1 =
> RegisterSampleApplicationsUtils.createAppOutput("Echoed_Output",
>  -                    "22QmrrX4", DataType.STRING);
>  +            OutputDataObjectType output1 =
> RegisterSampleApplicationsUtils.createAppOutput("o1",
>  +                    "", DataType.STRING);
>
>               List<OutputDataObjectType> applicationOutputs = new
> ArrayList<OutputDataObjectType>();
>               applicationOutputs.add(output1);
>
>
> http://git-wip-us.apache.org/repos/asf/airavata/blob/dc1898df/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
> ----------------------------------------------------------------------
> diff --cc
> modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
> index 044ffa2,964e6d1..b0fa422
> ---
> a/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
> +++
> b/modules/gfac/gfac-bes/src/main/java/org/apache/airavata/gfac/bes/provider/impl/BESProvider.java
> @@@ -101,9 -105,170 +105,170 @@@ public class BESProvider extends Abstra
>
>         public void execute(JobExecutionContext jobExecutionContext)
>                         throws GFacProviderException, GFacException {
>  -<<<<<<< HEAD
> ++
> +         StorageClient sc = null;
> +         try {
> +             JobSubmissionInterface preferredJobSubmissionInterface =
> jobExecutionContext.getPreferredJobSubmissionInterface();
> +             JobSubmissionProtocol protocol =
> preferredJobSubmissionInterface.getJobSubmissionProtocol();
> +             String interfaceId =
> preferredJobSubmissionInterface.getJobSubmissionInterfaceId();
> +             String factoryUrl = null;
> +             if (protocol.equals(JobSubmissionProtocol.UNICORE)) {
> +                 UnicoreJobSubmission unicoreJobSubmission =
> GFacUtils.getUnicoreJobSubmission(interfaceId);
> +                 factoryUrl =
> unicoreJobSubmission.getUnicoreEndPointURL();
> +             }
> +             EndpointReferenceType eprt = EndpointReferenceType.Factory
> +                     .newInstance();
> +             eprt.addNewAddress().setStringValue(factoryUrl);
> +             String userDN = getUserName(jobExecutionContext);
> +
> +             // TODO: to be removed
> +             if (userDN == null || userDN.equalsIgnoreCase("admin")) {
> +                 userDN = "CN=zdv575, O=Ultrascan Gateway, C=DE";
> +             }
> +             CreateActivityDocument cad = CreateActivityDocument.Factory
> +                     .newInstance();
> +             JobDefinitionDocument jobDefDoc =
> JobDefinitionDocument.Factory
> +                     .newInstance();
> +
> +             // create storage
> +             StorageCreator storageCreator = new
> StorageCreator(secProperties,
> +                     factoryUrl, 5, null);
> +             sc = storageCreator.createStorage();
> +
> +             JobDefinitionType jobDefinition =
> JSDLGenerator.buildJSDLInstance(
> +                     jobExecutionContext, sc.getUrl()).getJobDefinition();
> +             cad.addNewCreateActivity().addNewActivityDocument()
> +                     .setJobDefinition(jobDefinition);
> +             log.info("JSDL" + jobDefDoc.toString());
> +
> +             // upload files if any
> +             DataTransferrer dt = new
> DataTransferrer(jobExecutionContext, sc);
> +             dt.uploadLocalFiles();
> +
> +             JobDetails jobDetails = new JobDetails();
> +             FactoryClient factory = new FactoryClient(eprt,
> secProperties);
> +
> +             log.info(String.format("Activity Submitting to %s ... \n",
> +                     factoryUrl));
> +             jobExecutionContext.getNotifier().publish(new
> StartExecutionEvent());
> +             CreateActivityResponseDocument response =
> factory.createActivity(cad);
> +             log.info(String.format("Activity Submitted to %s \n",
> factoryUrl));
> +
> +             EndpointReferenceType activityEpr =
> response.getCreateActivityResponse().getActivityIdentifier();
> +
> +             log.info("Activity : " +
> activityEpr.getAddress().getStringValue() + " Submitted.");
> +
> +             // factory.waitWhileActivityIsDone(activityEpr, 1000);
> +             jobId = WSUtilities.extractResourceID(activityEpr);
> +             if (jobId == null) {
> +                 jobId = new
> Long(Calendar.getInstance().getTimeInMillis())
> +                         .toString();
> +             }
> +             log.info("JobID: " + jobId);
> +             jobDetails.setJobID(activityEpr.toString());
> +             jobDetails.setJobDescription(activityEpr.toString());
> +
> +             jobExecutionContext.setJobDetails(jobDetails);
> +             log.info(formatStatusMessage(activityEpr.getAddress()
> +                     .getStringValue(),
> factory.getActivityStatus(activityEpr)
> +                     .toString()));
> +
> +             jobExecutionContext.getNotifier().publish(new
> UnicoreJobIDEvent(jobId));
> +             GFacUtils.saveJobStatus(jobExecutionContext, details,
> JobState.SUBMITTED);
> +
> +             factory.getActivityStatus(activityEpr);
> +             log.info(formatStatusMessage(activityEpr.getAddress()
> +                     .getStringValue(),
> factory.getActivityStatus(activityEpr)
> +                     .toString()));
> +
> +             // TODO publish the status messages to the message bus
> +             while ((factory.getActivityStatus(activityEpr) !=
> ActivityStateEnumeration.FINISHED)
> +                     && (factory.getActivityStatus(activityEpr) !=
> ActivityStateEnumeration.FAILED)
> +                     && (factory.getActivityStatus(activityEpr) !=
> ActivityStateEnumeration.CANCELLED)) {
> +
> +                 ActivityStatusType activityStatus = getStatus(factory,
> activityEpr);
> +                 JobState applicationJobStatus =
> getApplicationJobStatus(activityStatus);
> +                 String jobStatusMessage = "Status of job " + jobId + "is
> "
> +                         + applicationJobStatus;
> +                 GFacUtils.updateJobStatus(jobExecutionContext,
> jobDetails,
> +                         applicationJobStatus);
> +
> +                 jobExecutionContext.getNotifier().publish(
> +                         new StatusChangeEvent(jobStatusMessage));
> +
> +                 //
> GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId,
> +                 // applicationJobStatus);
> +                 try {
> +                     Thread.sleep(5000);
> +                 } catch (InterruptedException e) {
> +                 }
> +                 continue;
> +             }
> +
> +             ActivityStatusType activityStatus = null;
> +             activityStatus = getStatus(factory, activityEpr);
> +             log.info(formatStatusMessage(activityEpr.getAddress().getStringValue(),
> activityStatus.getState().toString()));
> +             ActivityClient activityClient;
> +             activityClient = new ActivityClient(activityEpr,
> secProperties);
> +             dt.setStorageClient(activityClient.getUspaceClient());
> +
> +             if ((activityStatus.getState() ==
> ActivityStateEnumeration.FAILED)) {
> +                 String error = activityStatus.getFault().getFaultcode()
> +                         .getLocalPart()
> +                         + "\n"
> +                         + activityStatus.getFault().getFaultstring()
> +                         + "\n EXITCODE: " + activityStatus.getExitCode();
> +                 log.info(error);
> +                 try {
> +                     Thread.sleep(5000);
> +                 } catch (InterruptedException e) {
> +                 }
> +                 dt.downloadStdOuts();
> +             } else if (activityStatus.getState() ==
> ActivityStateEnumeration.CANCELLED) {
> +                 JobState applicationJobStatus = JobState.CANCELED;
> +                 String jobStatusMessage = "Status of job " + jobId + "is
> "
> +                         + applicationJobStatus;
> +                 jobExecutionContext.getNotifier().publish(
> +                         new StatusChangeEvent(jobStatusMessage));
> +                 GFacUtils.updateJobStatus(jobExecutionContext,
> jobDetails,
> +                         applicationJobStatus);
> +                 throw new GFacProviderException(
> +                         jobExecutionContext.getExperimentID() + "Job
> Canceled");
> +             } else if (activityStatus.getState() ==
> ActivityStateEnumeration.FINISHED) {
> +                 try {
> +                     Thread.sleep(5000);
> +                 } catch (InterruptedException e) {
> +                 }
> +                 if (activityStatus.getExitCode() == 0) {
> +                     dt.downloadRemoteFiles();
> +                 } else {
> +                     dt.downloadStdOuts();
> +                 }
> +             }
> +         } catch (AppCatalogException e) {
> +             log.error("Error while retrieving UNICORE job submission..");
> +             throw new GFacProviderException("Error while retrieving
> UNICORE job submission..", e);
> +         } catch (Exception e) {
> +             log.error("Cannot create storage..");
> +             throw new GFacProviderException("Cannot create storage..",
> e);
> +         } finally {
> +             // destroy sms instance
> +             try {
> +                 if (sc != null) {
> +                     sc.destroy();
> +                 }
> +             } catch (Exception e) {
> +                 log.warn(
> +                         "Cannot destroy temporary SMS instance:" +
> sc.getUrl(),
> +                         e);
> +             }
> +         }
> +
> +     }
>  -=======
> ++
>                 UnicoreHostType host = (UnicoreHostType)
> jobExecutionContext
>
> .getApplicationContext().getHostDescription().getType();
> --
> ++
>                 String factoryUrl = host.getUnicoreBESEndPointArray()[0];
>
>                 EndpointReferenceType eprt = EndpointReferenceType.Factory
> @@@ -304,7 -469,8 +469,8 @@@
>                 }
>
>         }
>  ->>>>>>> f7de359dcae3694912248e50a1a2fd5e30fc613e
>  +
> +
>         private JobState getApplicationJobStatus(ActivityStatusType
> activityStatus) {
>                 if (activityStatus == null) {
>                         return JobState.UNKNOWN;
>
>


-- 
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

Mime
View raw message