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 019package org.apache.oozie.client; 020 021import java.util.Date; 022import java.util.List; 023 024/** 025 * Bean that represents an Oozie application. 026 */ 027public interface CoordinatorJob extends Job { 028 029 /** 030 * Defines the possible execution order of an Oozie application. 031 */ 032 enum Execution { 033 FIFO, LIFO, LAST_ONLY, NONE 034 } 035 036 /** 037 * Defines the possible frequency unit of an Oozie application. 038 */ 039 enum Timeunit { 040 MINUTE, HOUR, DAY, WEEK, MONTH, END_OF_DAY, END_OF_MONTH, CRON, NONE 041 } 042 043 /** 044 * Return the path to the Oozie application. 045 * 046 * @return the path to the Oozie application. 047 */ 048 String getAppPath(); 049 050 /** 051 * Return the name of the Oozie application (from the application definition). 052 * 053 * @return the name of the Oozie application. 054 */ 055 String getAppName(); 056 057 /** 058 * Return the application ID. 059 * 060 * @return the application ID. 061 */ 062 String getId(); 063 064 /** 065 * Return the application configuration. 066 * 067 * @return the application configuration. 068 */ 069 String getConf(); 070 071 /** 072 * Return the application status. 073 * 074 * @return the application status. 075 */ 076 Status getStatus(); 077 078 /** 079 * Return the frequency for the coord job in unit of minute 080 * 081 * @return the frequency for the coord job in unit of minute 082 */ 083 String getFrequency(); 084 085 /** 086 * Return the timeUnit for the coord job, it could be, Timeunit enum, e.g. MINUTE, HOUR, DAY, WEEK or MONTH 087 * 088 * @return the time unit for the coord job 089 */ 090 Timeunit getTimeUnit(); 091 092 /** 093 * Return the time zone information for the coord job 094 * 095 * @return the time zone information for the coord job 096 */ 097 String getTimeZone(); 098 099 /** 100 * Return the concurrency for the coord job 101 * 102 * @return the concurrency for the coord job 103 */ 104 int getConcurrency(); 105 106 /** 107 * Return the execution order policy for the coord job 108 * 109 * @return the execution order policy for the coord job 110 */ 111 Execution getExecutionOrder(); 112 113 /** 114 * Return the time out value for the coord job 115 * 116 * @return the time out value for the coord job 117 */ 118 int getTimeout(); 119 120 /** 121 * Return the date for the last action of the coord job 122 * 123 * @return the date for the last action of the coord job 124 */ 125 Date getLastActionTime(); 126 127 /** 128 * Return the application next materialized time. 129 * 130 * @return the application next materialized time. 131 */ 132 Date getNextMaterializedTime(); 133 134 /** 135 * Return the application start time. 136 * 137 * @return the application start time. 138 */ 139 Date getStartTime(); 140 141 /** 142 * Return the application end time. 143 * 144 * @return the application end time. 145 */ 146 Date getEndTime(); 147 148 /** 149 * Return the application user owner. 150 * 151 * @return the application user owner. 152 */ 153 String getUser(); 154 155 /** 156 * Return the application group. 157 * <p> 158 * Use the {@link #getAcl()} method instead. 159 * 160 * @return the application group. 161 */ 162 @Deprecated 163 String getGroup(); 164 165 /** 166 * Return the workflow job group. 167 * 168 * @return the workflow job group. 169 */ 170 String getAcl(); 171 172 /** 173 * Return the BundleId. 174 * 175 * @return the BundleId. 176 */ 177 String getBundleId(); 178 179 /** 180 * Return the application console URL. 181 * 182 * @return the application console URL. 183 */ 184 String getConsoleUrl(); 185 186 /** 187 * Return list of coordinator actions. 188 * 189 * @return the list of coordinator actions. 190 */ 191 List<CoordinatorAction> getActions(); 192}