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; 022 023/** 024 * Bean that represents an Oozie application instance. 025 */ 026 027public interface CoordinatorAction { 028 /** 029 * Defines the possible status of an application instance. 030 */ 031 enum Status { 032 WAITING, 033 READY, 034 SUBMITTED, 035 RUNNING, 036 SUSPENDED, 037 TIMEDOUT, 038 SUCCEEDED, 039 KILLED, 040 FAILED, 041 IGNORED, 042 SKIPPED 043 } 044 045 /** 046 * Return the coordinator job ID. 047 * 048 * @return the coordinator job ID. 049 */ 050 String getJobId(); 051 052 /** 053 * Return the application instance ID. 054 * 055 * @return the application instance ID. 056 */ 057 String getId(); 058 059 /** 060 * Return the nominal time for the application instance 061 * 062 * @return the nominal time for the application instance 063 */ 064 Date getNominalTime(); 065 066 /** 067 * Return the creation time for the application instance 068 * 069 * @return the creation time for the application instance 070 */ 071 Date getCreatedTime(); 072 073 /** 074 * Return the application instance ?? created configuration. 075 * 076 * @return the application instance configuration. 077 */ 078 String getCreatedConf(); 079 080 081 /** 082 * Return the last modified time 083 * 084 * @return the last modified time 085 */ 086 Date getLastModifiedTime(); 087 088 /** 089 * Return the action number 090 * 091 * @return the action number 092 */ 093 int getActionNumber(); 094 095 /** 096 * Return the run-time configuration 097 * 098 * @return the run-time configuration 099 */ 100 String getRunConf(); 101 102 /** 103 * Return the current status of the application instance. 104 * 105 * @return the current status of the application instance. 106 */ 107 Status getStatus(); 108 109 /** 110 * Return the PULL-based (directory based) missing dependencies for the 111 * particular action 112 * 113 * @return the missing dependencies for the particular action 114 */ 115 String getMissingDependencies(); 116 117 /** 118 * Return the PUSH-based (e.d HCatalog partition-based ) missing 119 * dependencies for the particular action 120 * 121 * @return the missing dependencies for the particular action 122 */ 123 String getPushMissingDependencies(); 124 125 /** 126 * Return the external status of the application instance. 127 * 128 * @return the external status of the application instance. 129 */ 130 String getExternalStatus(); 131 132 /** 133 * Return the URL to programmatically track the status of the application instance. 134 * 135 * @return the URL to programmatically track the status of the application instance. 136 */ 137 String getTrackerUri(); 138 139 /** 140 * Return the URL to the web console of the system executing the application instance. 141 * 142 * @return the URL to the web console of the system executing the application instance. 143 */ 144 String getConsoleUrl(); 145 146 /** 147 * Return the error code of the application instance, if it ended in ERROR. 148 * 149 * @return the error code of the application instance. 150 */ 151 String getErrorCode(); 152 153 /** 154 * Return the error message of the application instance, if it ended in ERROR. 155 * 156 * @return the error message of the application instance. 157 */ 158 String getErrorMessage(); 159 160 void setErrorCode(String errorCode); 161 162 void setErrorMessage(String errorMessage); 163 164 String getExternalId(); 165 166}