You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2014/03/26 04:40:49 UTC

git commit: removing wrong files

Repository: airavata
Updated Branches:
  refs/heads/master dc01f7cec -> c1f3429eb


removing wrong files


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c1f3429e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c1f3429e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c1f3429e

Branch: refs/heads/master
Commit: c1f3429eb7783776a4142a56f7ece2a71c0d0c8c
Parents: dc01f7c
Author: lahiru <la...@apache.org>
Authored: Tue Mar 25 23:40:42 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Tue Mar 25 23:40:42 2014 -0400

----------------------------------------------------------------------
 .../airavata/job/monitor/AMQPMonitorTest.java   | 138 -------------------
 .../airavata/job/monitor/QstatMonitorTest.java  | 136 ------------------
 2 files changed, 274 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c1f3429e/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java b/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java
deleted file mode 100644
index 4e35434..0000000
--- a/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/AMQPMonitorTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-package org.apache.airavata.job.monitor;
-
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class AMQPMonitorTest {
-    private MonitorManager monitorManager;
-
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String pbsFilePath;
-    private String workingDirectory;
-    private HostDescription hostDescription;
-
-    @Before
-    public void setUp() throws Exception {
-        System.setProperty("myproxy.user", "ogce");
-        System.setProperty("myproxy.password", "");
-        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-        System.setProperty("gsi.working.directory", "/home/ogce");
-        myProxyUserName = System.getProperty("myproxy.user");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-        String pomDirectory = System.getProperty("basedir");
-        certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
-        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-
-        monitorManager = new MonitorManager();
-        AMQPMonitor amqpMonitor = new
-                AMQPMonitor(monitorManager.getMonitorPublisher(),
-                monitorManager.getPullQueue(), monitorManager.getFinishQueue(),"/Users/lahirugunathilake/Downloads/x509up_u503876","xsede_private",
-                Arrays.asList("info1.dyn.teragrid.org,info2.dyn.teragrid.org".split(",")));
-        try {
-            monitorManager.addPushMonitor(amqpMonitor);
-            monitorManager.launchMonitor();
-        } catch (AiravataMonitorException e) {
-            e.printStackTrace();
-        }
-
-        hostDescription = new HostDescription(GsisshHostType.type);
-        hostDescription.getType().setHostAddress("gordon.sdsc.xsede.org");
-        hostDescription.getType().setHostName("gsissh-gordon");
-    }
-
-    @Test
-    public void testAMQPMonitor() throws SSHApiException {
-        /* now have to submit a job to some machine and add that job to the queue */
-        //Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
-
-
-        Cluster pbsCluster = new
-                PBSCluster(serverInfo, authenticationInfo, org.apache.airavata.gsi.ssh.util.CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-
-
-        // Execute command
-        System.out.println("Target PBS file path: " + workingDirectory);
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("60");
-        jobDescriptor.setAcountString("sds128");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setOwner("ogce");
-        inputs.add("Hello World");
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-        System.out.println(jobID);
-        try {
-            monitorManager.addAJobToMonitor(new MonitorID(hostDescription, jobID,null,null, "ogce"));
-        } catch (AiravataMonitorException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-        try {
-            Thread.sleep(10000);
-        } catch (InterruptedException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c1f3429e/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java b/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java
deleted file mode 100644
index 548b9c5..0000000
--- a/modules/gfac/gfac-monitor/src/main/test/java/org/apache/airavata/job/monitor/QstatMonitorTest.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-package org.apache.airavata.job.monitor;
-
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.gsi.ssh.api.Cluster;
-import org.apache.airavata.gsi.ssh.api.SSHApiException;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.api.job.JobDescriptor;
-import org.apache.airavata.gsi.ssh.impl.PBSCluster;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.CommonUtils;
-import org.apache.airavata.job.monitor.exception.AiravataMonitorException;
-import org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor;
-import org.apache.airavata.schemas.gfac.GsisshHostType;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public class QstatMonitorTest {
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String pbsFilePath;
-    private String workingDirectory;
-    private HostDescription hostDescription;
-
-    @Before
-    public void setUp() throws Exception {
-        System.setProperty("myproxy.user", "ogce");
-        System.setProperty("myproxy.password", "");
-        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-        System.setProperty("gsi.working.directory", "/home/ogce");
-        myProxyUserName = System.getProperty("myproxy.user");
-        myProxyPassword = System.getProperty("myproxy.password");
-        workingDirectory = System.getProperty("gsi.working.directory");
-        String pomDirectory = System.getProperty("basedir");
-        certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
-        if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-
-        monitorManager = new MonitorManager();
-        QstatMonitor qstatMonitor = new
-                QstatMonitor(monitorManager.getPullQueue(), monitorManager.getMonitorPublisher());
-        try {
-            monitorManager.addPullMonitor(qstatMonitor);
-            monitorManager.launchMonitor();
-        } catch (AiravataMonitorException e) {
-            e.printStackTrace();
-        }
-
-        hostDescription = new HostDescription(GsisshHostType.type);
-        hostDescription.getType().setHostAddress("trestles.sdsc.edu");
-        hostDescription.getType().setHostName("gsissh-gordon");
-    }
-
-    @Test
-    public void testQstatMonitor() throws SSHApiException {
-        /* now have to submit a job to some machine and add that job to the queue */
-        //Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000, certificateLocation);
-
-        // Server info
-        ServerInfo serverInfo = new ServerInfo("ogce", hostDescription.getType().getHostAddress());
-
-
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
-
-
-        // Execute command
-        System.out.println("Target PBS file path: " + workingDirectory);
-        // constructing the job object
-        JobDescriptor jobDescriptor = new JobDescriptor();
-        jobDescriptor.setWorkingDirectory(workingDirectory);
-        jobDescriptor.setShellName("/bin/bash");
-        jobDescriptor.setJobName("GSI_SSH_SLEEP_JOB");
-        jobDescriptor.setExecutablePath("/bin/echo");
-        jobDescriptor.setAllEnvExport(true);
-        jobDescriptor.setMailOptions("n");
-        jobDescriptor.setStandardOutFile(workingDirectory + File.separator + "application.out");
-        jobDescriptor.setStandardErrorFile(workingDirectory + File.separator + "application.err");
-        jobDescriptor.setNodes(1);
-        jobDescriptor.setProcessesPerNode(1);
-        jobDescriptor.setQueueName("normal");
-        jobDescriptor.setMaxWallTime("60");
-        jobDescriptor.setAcountString("sds128");
-        List<String> inputs = new ArrayList<String>();
-        jobDescriptor.setOwner("ogce");
-        inputs.add("Hello World");
-        jobDescriptor.setInputValues(inputs);
-        //finished construction of job object
-        System.out.println(jobDescriptor.toXML());
-        for (int i = 0; i < 1; i++) {
-            String jobID = pbsCluster.submitBatchJob(jobDescriptor);
-            MonitorID monitorID = new MonitorID(hostDescription, jobID,null,null, "ogce");
-            monitorID.setAuthenticationInfo(authenticationInfo);
-            try {
-                monitorManager.addAJobToMonitor(monitorID);
-            } catch (AiravataMonitorException e) {
-                e.printStackTrace();
-            }
-        }
-        try {
-            Thread.sleep(10000000);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-}