This project has retired. For details please refer to its
Attic page.
001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018 package org.apache.oozie.client;
019
020 import java.util.Date;
021
022 /**
023 * Interface that represents an Oozie Job.
024 */
025 public interface Job {
026 /**
027 * Defines the possible status of an Oozie JOB.
028 */
029 public static enum Status {
030 PREMATER, PREP, RUNNING, SUSPENDED, SUCCEEDED, KILLED, FAILED, PAUSED, PREPPAUSED, PREPSUSPENDED, RUNNINGWITHERROR, SUSPENDEDWITHERROR, PAUSEDWITHERROR, DONEWITHERROR
031 }
032
033 /**
034 * Return the path to the Oozie application.
035 *
036 * @return the path to the Oozie application.
037 */
038 String getAppPath();
039
040 /**
041 * Return the name of the Oozie application (from the application definition).
042 *
043 * @return the name of the Oozie application.
044 */
045 String getAppName();
046
047 /**
048 * Return the JOB ID.
049 *
050 * @return the JOB ID.
051 */
052 String getId();
053
054 /**
055 * Return the JOB configuration.
056 *
057 * @return the JOB configuration.
058 */
059 String getConf();
060
061 /**
062 * Return the JOB status.
063 *
064 * @return the JOB status.
065 */
066 Status getStatus();
067
068 /**
069 * Return the JOB user owner.
070 *
071 * @return the JOB user owner.
072 */
073 String getUser();
074
075 /**
076 * Return the JOB group.
077 *
078 * @return the JOB group.
079 */
080 String getGroup();
081
082 /**
083 * Return the JOB console URL.
084 *
085 * @return the JOB console URL.
086 */
087 String getConsoleUrl();
088
089 /**
090 * Return the JOB start time.
091 *
092 * @return the JOB start time.
093 */
094 Date getStartTime();
095
096 /**
097 * Return the JOB end time.
098 *
099 * @return the JOB end time.
100 */
101 Date getEndTime();
102
103 /**
104 * Set the status of the job
105 *
106 * @param status
107 */
108 void setStatus(Job.Status status);
109
110 /**
111 * Set pending to true
112 */
113 void setPending();
114
115 /**
116 * Set pending to
117 */
118 void resetPending();
119
120 /**
121 * Get pauseTime
122 *
123 * @return pauseTime
124 */
125 public Date getPauseTime();
126
127 /**
128 * Return externalId
129 *
130 * @return externalId
131 */
132 public String getExternalId();
133
134 }