Repository: airavata Updated Branches: refs/heads/master 9c4f64a96 -> 219063e0d
adding missing resource files AIRAVATA-1055 Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/219063e0 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/219063e0 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/219063e0 Branch: refs/heads/master Commit: 219063e0df324509d24b68dfdd2bc65032219e1b Parents: 9c4f64a Author: chathuri <[email protected]> Authored: Fri Mar 7 10:38:19 2014 -0500 Committer: chathuri <[email protected]> Committed: Fri Mar 7 10:38:19 2014 -0500 ---------------------------------------------------------------------- .../airavata/client/tools/DocumentCreator.java | 1 + .../src/test/resources/PBSTemplate.xslt | 77 +++++++++++++++++ .../src/test/resources/gfac-config.xml | 90 ++++++++++++++++++++ .../src/test/resources/gsissh.properties | 26 ++++++ .../registry/jpa/impl/ExperimentRegistry.java | 3 +- 5 files changed, 195 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/219063e0/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java ---------------------------------------------------------------------- diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java index eac7214..4138eb2 100644 --- a/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java +++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/tools/DocumentCreator.java @@ -212,6 +212,7 @@ public class DocumentCreator { HostDescription host = new HostDescription(GsisshHostType.type); host.getType().setHostAddress(hpcHostAddress); host.getType().setHostName(gsiSshHostName); + ((GsisshHostType) host.getType()).setPort(22); try { airavataAPI.getApplicationManager().saveHostDescription(host); http://git-wip-us.apache.org/repos/asf/airavata/blob/219063e0/modules/integration-tests/src/test/resources/PBSTemplate.xslt ---------------------------------------------------------------------- diff --git a/modules/integration-tests/src/test/resources/PBSTemplate.xslt b/modules/integration-tests/src/test/resources/PBSTemplate.xslt new file mode 100644 index 0000000..e4398e0 --- /dev/null +++ b/modules/integration-tests/src/test/resources/PBSTemplate.xslt @@ -0,0 +1,77 @@ +<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file + distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under + the Apache License, Version 2.0 (theà "License"); you may not use this file except in compliance with the License. You may + obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to + in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + ANY ~ KIND, either express or implied. See the License for the specific language governing permissions and limitations under + the License. --> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://airavata.apache.org/gsi/ssh/2012/12"> +<xsl:output method="text" /> +<xsl:template match="/ns:JobDescriptor"> +#! /bin/sh +# <xsl:choose> + <xsl:when test="ns:shellName"> +##PBS -S <xsl:value-of select="ns:shellName"/> + </xsl:when></xsl:choose> + <xsl:choose> + <xsl:when test="ns:queueName"> +#PBS -q <xsl:value-of select="ns:queueName"/> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="ns:mailOptions"> +#PBS -m <xsl:value-of select="ns:mailOptions"/> + </xsl:when> + </xsl:choose> + <xsl:choose> +<xsl:when test="ns:acountString"> +#PBS -A <xsl:value-of select="ns:acountString"/> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="ns:maxWallTime"> +#PBS -l walltime=<xsl:value-of select="ns:maxWallTime"/> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="ns:jobName"> +#PBS -N <xsl:value-of select="ns:jobName"/> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="ns:standardOutFile"> +#PBS -o <xsl:value-of select="ns:standardOutFile"/> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="ns:standardOutFile"> +#PBS -e <xsl:value-of select="ns:standardErrorFile"/> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="(ns:nodes) and (ns:processesPerNode)"> +#PBS -l nodes=<xsl:value-of select="ns:nodes"/>:ppn=<xsl:value-of select="ns:processesPerNode"/> +<xsl:text>
</xsl:text> + </xsl:when> + </xsl:choose> +<xsl:for-each select="ns:exports/ns:name"> +<xsl:value-of select="."/>=<xsl:value-of select="./@value"/><xsl:text>
</xsl:text> +export<xsl:text> </xsl:text><xsl:value-of select="."/> +<xsl:text>
</xsl:text> +</xsl:for-each> +<xsl:for-each select="ns:preJobCommands/ns:command"> + <xsl:value-of select="."/><xsl:text> </xsl:text> + </xsl:for-each> +cd <xsl:text> </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text>
</xsl:text> + <xsl:choose><xsl:when test="ns:jobSubmitterCommand"> +<xsl:value-of select="ns:jobSubmitterCommand"/><xsl:text> </xsl:text></xsl:when></xsl:choose><xsl:value-of select="ns:executablePath"/><xsl:text> </xsl:text> +<xsl:for-each select="ns:inputs/ns:input"> + <xsl:value-of select="."/><xsl:text> </xsl:text> + </xsl:for-each> +<xsl:for-each select="ns:postJobCommands/ns:command"> + <xsl:value-of select="."/><xsl:text> </xsl:text> +</xsl:for-each> + +</xsl:template> + +</xsl:stylesheet> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/219063e0/modules/integration-tests/src/test/resources/gfac-config.xml ---------------------------------------------------------------------- diff --git a/modules/integration-tests/src/test/resources/gfac-config.xml b/modules/integration-tests/src/test/resources/gfac-config.xml new file mode 100644 index 0000000..61dca4f --- /dev/null +++ b/modules/integration-tests/src/test/resources/gfac-config.xml @@ -0,0 +1,90 @@ +<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more + contributor license agreements. See the NOTICE file ~ distributed with this + work for additional information ~ regarding copyright ownership. The ASF + licenses this file ~ to you under the Apache License, Version 2.0 (the ~ + "License"); you may not use this file except in compliance ~ with the License. + You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ ~ Unless required by applicable law or agreed to in writing, ~ software + distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the + License for the ~ specific language governing permissions and limitations + ~ under the License. --> + +<GFac> + <GlobalHandlers> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.AppDescriptorCheckHandler"> + <property name="name" value="value"/> + </Handler> + </InHandlers> + <OutHandlers></OutHandlers> + </GlobalHandlers> + <Provider class="org.apache.airavata.gfac.provider.impl.LocalProvider" host="org.apache.airavata.schemas.gfac.impl.HostDescriptionTypeImpl"> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.LocalDirectorySetupHandler"/> + </InHandlers> + </Provider> + <Provider class="org.apache.airavata.gfac.provider.impl.GramProvider" host="org.apache.airavata.schemas.gfac.impl.GlobusHostTypeImpl"> + <property name="name" value="value"/> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.GramDirectorySetupHandler"> + <property name="name" value="value"/> + </Handler> + <Handler class="org.apache.airavata.gfac.handler.GridFTPInputHandler"/> + </InHandlers> + <OutHandlers> + <Handler class="org.apache.airavata.gfac.handler.GridFTPOutputHandler"/> + </OutHandlers> + </Provider> + <Provider class="org.apache.airavata.gfac.provider.impl.BESProvider" host="org.apache.airavata.schemas.gfac.impl.UnicoreHostTypeImpl"> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.GramDirectorySetupHandler"/> + <Handler class="org.apache.airavata.gfac.handler.GridFTPInputHandler"/> + </InHandlers> + <OutHandlers> + <Handler class="org.apache.airavata.gfac.handler.GridFTPOutputHandler"/> + </OutHandlers> + </Provider> + + <Provider class="org.apache.airavata.gfac.ec2.EC2Provider" host="org.apache.airavata.schemas.gfac.impl.Ec2HostTypeImpl"> + <InHandlers/> + <OutHandlers/> + </Provider> + + <Provider class="org.apache.airavata.gfac.provider.impl.HadoopProvider" host="org.apache.airavata.schemas.gfac.impl.HadoopHostTypeImpl"> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.HadoopDeploymentHandler"/> + <Handler class="org.apache.airavata.gfac.handler.HDFSDataMovementHandler"/> + </InHandlers> + <OutHandlers/> + </Provider> + + <Application name="UltraScan"> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.GramDirectorySetupHandler"/> + <Handler class="org.apache.airavata.gfac.handler.GridFTPInputHandler"/> + </InHandlers> + <OutHandlers> + <Handler class="org.apache.airavata.gfac.handler.GridFTPOutputHandler"/> + </OutHandlers> + </Application> + + <Provider class="org.apache.airavata.gfac.provider.impl.SSHProvider" host="org.apache.airavata.schemas.gfac.impl.SSHHostTypeImpl"> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.SCPDirectorySetupHandler"/> + <Handler class="org.apache.airavata.gfac.handler.SCPInputHandler"/> + </InHandlers> + <OutHandlers> + <Handler class="org.apache.airavata.gfac.handler.SCPOutputHandler"/> + </OutHandlers> + </Provider> + <Provider class="org.apache.airavata.gfac.provider.impl.GSISSHProvider" host="org.apache.airavata.schemas.gfac.impl.GsisshHostTypeImpl"> + <InHandlers> + <Handler class="org.apache.airavata.gfac.handler.SCPDirectorySetupHandler"/> + <Handler class="org.apache.airavata.gfac.handler.SCPInputHandler"/> + </InHandlers> + <OutHandlers> + <Handler class="org.apache.airavata.gfac.handler.SCPOutputHandler"/> + </OutHandlers> + </Provider> +</GFac> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/219063e0/modules/integration-tests/src/test/resources/gsissh.properties ---------------------------------------------------------------------- diff --git a/modules/integration-tests/src/test/resources/gsissh.properties b/modules/integration-tests/src/test/resources/gsissh.properties new file mode 100644 index 0000000..3fdf76d --- /dev/null +++ b/modules/integration-tests/src/test/resources/gsissh.properties @@ -0,0 +1,26 @@ +# +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +########################################################################### +# Specifies system level configurations as a key/value pairs. +########################################################################### + +StrictHostKeyChecking=no +ssh.session.timeout=360000 http://git-wip-us.apache.org/repos/asf/airavata/blob/219063e0/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java ---------------------------------------------------------------------- diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java index bf86bf0..85beb7f 100644 --- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java +++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java @@ -2485,7 +2485,6 @@ public class ExperimentRegistry { } public Timestamp getTime(long time) { - Date date = new Date(time); - return new Timestamp(date.getTime()); + return new Timestamp(time); } }
