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 @Deprecated
081 String getGroup();
082
083 /**
084 * Return the workflow job group.
085 *
086 * @return the workflow job group.
087 */
088 String getAcl();
089
090 /**
091 * Return the JOB console URL.
092 *
093 * @return the JOB console URL.
094 */
095 String getConsoleUrl();
096
097 /**
098 * Return the JOB start time.
099 *
100 * @return the JOB start time.
101 */
102 Date getStartTime();
103
104 /**
105 * Return the JOB end time.
106 *
107 * @return the JOB end time.
108 */
109 Date getEndTime();
110
111 /**
112 * Set the status of the job
113 *
114 * @param status
115 */
116 void setStatus(Job.Status status);
117
118 /**
119 * Set pending to true
120 */
121 void setPending();
122
123 /**
124 * Set pending to
125 */
126 void resetPending();
127
128 /**
129 * Get pauseTime
130 *
131 * @return pauseTime
132 */
133 public Date getPauseTime();
134
135 /**
136 * Return externalId
137 *
138 * @return externalId
139 */
140 public String getExternalId();
141
142 }