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