code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
public Map<String, Map<String, List<String>>> getAlertersConfigs() { return this.alertersConfigs; }
Construct the SLA Option from the original SlaOption, which has been renamed to {@link SlaOptionDeprecated}.
getAlertersConfigs
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public boolean isComponentType(final SlaType.ComponentType componentType) { return this.type.getComponent() == componentType; }
Check the SlaType's ComponentType of this SlaOption's @param componentType component Type @return true/false
isComponentType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public Map<String, Object> toObject() { final List<String> slaActions = new ArrayList<>(); final Map<String, Object> slaInfo = new HashMap<>(); slaInfo.put(SlaOptionDeprecated.INFO_FLOW_NAME, this.flowName); if (hasAlert()) { slaActions.add(SlaOptionDeprecated.ACTION_ALERT); slaInfo.put(Sla...
Convert the SLA option to the original JSON format, used by {@link SlaOptionDeprecated}. @return the JSON format for {@link SlaOptionDeprecated}.
toObject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public String toJSON() { return new GsonBuilder().setPrettyPrinting().create().toJson(toObject()); }
Convert the SLA option to the original JSON format, used by {@link SlaOptionDeprecated}. @return the JSON format for {@link SlaOptionDeprecated}.
toJSON
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public static SlaOption fromObject(Object json) { return new SlaOption(SlaOptionDeprecated.fromObject(json)); }
Convert the original JSON format, used by {@link SlaOptionDeprecated}, to an SLA option. @param json the original JSON format for {@link SlaOptionDeprecated}. @return the SLA option.
fromObject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public Object toWebObject() { final HashMap<String, Object> slaObj = new HashMap<>(); if (this.type.getComponent() == SlaType.ComponentType.FLOW) { slaObj.put(WEB_ID, ""); } else { slaObj.put(WEB_ID, this.jobName); } slaObj.put(WEB_DURATION, durationToString(this.duration)); slaObj....
@return the web object representation for the SLA option.
toWebObject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public static List<SlaOption> getJobLevelSLAOptions(final List<SlaOption> options, final String jobId) { return filterSLAOptions(options, ComponentType.JOB, jobId); }
@param options a list of SLA options. @return the job level SLA options.
getJobLevelSLAOptions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public static List<SlaOption> getFlowLevelSLAOptions(final List<SlaOption> options) { return filterSLAOptions(options, ComponentType.FLOW, null); }
@param options a list of SLA options. @return the flow level SLA options.
getFlowLevelSLAOptions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
private static List<SlaOption> filterSLAOptions(final List<SlaOption> options, final ComponentType componentType, final String jobId) { return options.stream().filter( option -> option.isComponentType(componentType) && StringUtils.equals(option.getJobName(), jobId)).collect(Collectors.toLi...
@param options a list of SLA options. @return the flow level SLA options.
filterSLAOptions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
@Override public String toString() { return "SlaOption{" + "type=" + this.type + ", flowName='" + this.flowName + '\'' + ", jobName='" + this.jobName + '\'' + ", duration=" + this.duration + ", actions=" + this.actions + ", emails=" + this.emails + ", alerte...
@param options a list of SLA options. @return the flow level SLA options.
toString
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SlaOption slaOption = (SlaOption) o; return type == slaOption.type && Objects.equals(flowName, slaOption.flowName) && Objects.e...
@param options a list of SLA options. @return the flow level SLA options.
equals
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
@Override public int hashCode() { return Objects.hash(type, flowName, jobName, duration, actions, emails, alertersConfigs); }
@param options a list of SLA options. @return the flow level SLA options.
hashCode
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOption.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOption.java
Apache-2.0
public static SlaOptionDeprecated fromObject(final Object object) { final HashMap<String, Object> slaObj = (HashMap<String, Object>) object; final String type = (String) slaObj.get("type"); final List<String> actions = (List<String>) slaObj.get("actions"); final Map<String, Object> info = (Map<String, ...
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
fromObject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public String getType() { return this.type; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
getType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public void setType(final String type) { this.type = type; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
setType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public Map<String, Object> getInfo() { return this.info; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
getInfo
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public void setInfo(final Map<String, Object> info) { this.info = info; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
setInfo
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public List<String> getActions() { return this.actions; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
getActions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public void setActions(final List<String> actions) { this.actions = actions; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
setActions
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public Map<String, Object> toObject() { final HashMap<String, Object> slaObj = new HashMap<>(); slaObj.put("type", this.type); slaObj.put("info", this.info); slaObj.put("actions", this.actions); return slaObj; }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
toObject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
@Override public String toString() { return "Sla of " + getType() + getInfo() + getActions(); }
The original version of SlaOption. This has been replaced with a newer version, but is being kept for backward compatibility, for reading and writing the original version from the database.
toString
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaOptionDeprecated.java
Apache-2.0
public String getName() { return name; }
Constructor. @param name the SLA type name. @param component The component the SLA is for, either flow or job. @param status the status the SLA is for, either succeed or finish.
getName
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaType.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaType.java
Apache-2.0
public ComponentType getComponent() { return component; }
Constructor. @param name the SLA type name. @param component The component the SLA is for, either flow or job. @param status the status the SLA is for, either succeed or finish.
getComponent
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaType.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaType.java
Apache-2.0
public StatusType getStatus() { return status; }
Constructor. @param name the SLA type name. @param component The component the SLA is for, either flow or job. @param status the status the SLA is for, either succeed or finish.
getStatus
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/sla/SlaType.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/sla/SlaType.java
Apache-2.0
@Override public InputStream getProject(final String key) { throw new UnsupportedOperationException( "Not implemented yet. Use get(projectId, version) instead"); }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
getProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
public ProjectFileHandler getProject(final int projectId, final int version) { return this.projectLoader.getUploadedFile(projectId, version); }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
getProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
@Override public String putProject(final ProjectStorageMetadata metadata, final File localFile) { this.projectLoader.uploadProjectFile(metadata.getProjectId(), metadata.getVersion(), localFile, metadata.getUploader(), metadata.getUploaderIPAddr()); return null; }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
putProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
@Override public InputStream getDependency(final Dependency dep) { throw new UnsupportedOperationException( "Not implemented yet. Must use HdfsStorage or LocalStorage."); }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
getDependency
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
@Override public boolean dependencyFetchingEnabled() { return false; }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
dependencyFetchingEnabled
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
@Override public String getDependencyRootPath() { return null; }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
getDependencyRootPath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
@Override public boolean deleteProject(final String key) { throw new UnsupportedOperationException("Delete is not supported"); }
DatabaseStorage This class helps in storing projects in the DB itself. This is intended to be the default since it is the current behavior of Azkaban.
deleteProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/DatabaseStorage.java
Apache-2.0
@Override public void authorize() { if (this.isSecurityEnabled) { try { login(this.keytabPrincipal, this.keytabPath); } catch (final IOException e) { log.error(e); throw new AzkabanException(String.format( "Error: Unable to authorize to Hadoop. Principal: %s Keytab:...
API to authorize HDFS access. This logins in the configured user via the keytab. If the user is already logged in then it renews the TGT.
authorize
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
Apache-2.0
private void login(final String keytabPrincipal, final String keytabPath) throws IOException { if (this.loggedInUser == null) { log.info( String.format("Logging in using Principal: %s Keytab: %s", keytabPrincipal, keytabPath)); UserGroupInformation.loginUserFromKeytab(keytabPrincipal, keytabP...
This method is used to login using keytab and set loggedInUser. @param keytabPrincipal @param keytabPath @throws IOException
login
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsAuth.java
Apache-2.0
@VisibleForTesting static void uploadLocalFile(final Path localPath, final Path remotePath, final FileContext remoteFileContext) throws IOException { FSDataInputStream localStream = null; FSDataOutputStream remoteStream = null; final String actionString = String.format("upload of local file %s to r...
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
uploadLocalFile
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
@Override public String putProject(final ProjectStorageMetadata metadata, final File localFile) { this.hdfsAuth.authorize(); final Path projectsPath = new Path(this.projectRootUri.getPath(), String.valueOf(metadata.getProjectId())); try { this.hdfsFileContext.mkdir(projectsPath, FsPermission...
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
putProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
@Override public InputStream getDependency(final Dependency dep) throws IOException { if (!dependencyFetchingEnabled()) { throw new UnsupportedOperationException("Dependency fetching is not enabled."); } // CachedHttpFileSystem will cache in HDFS, so it needs to be authenticated to access HDFS! ...
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
getDependency
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
@Override public boolean dependencyFetchingEnabled() { return this.http != null; }
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
dependencyFetchingEnabled
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
@Override public boolean deleteProject(final String key) { this.hdfsAuth.authorize(); final Path path = fullProjectPath(key); try { return this.hdfsFileContext.delete(path, false); } catch (final IOException e) { log.error("HDFS project file delete failed on " + path, e); return fals...
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
deleteProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
private Path fullProjectPath(final String key) { return new Path(this.projectRootUri.toString(), key); }
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
fullProjectPath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
private Path resolveAbsoluteDependencyURI(final Dependency dep) { return new Path(this.dependencyRootUri.toString(), StorageUtils.getTargetDependencyPath(dep)); }
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
resolveAbsoluteDependencyURI
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
@Override public String getDependencyRootPath() { return this.dependencyRootUri != null ? this.dependencyRootUri.toString() : null; }
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
getDependencyRootPath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
private String getRelativeProjectPath(final Path targetPath) { return URI.create(this.projectRootUri.getPath()).relativize(targetPath.toUri()).getPath(); }
Copy a file from the local file system to a location given by the file context. {@code remotePath and remoteFileContext} will typically point to an external location but don't have to. If {@code remotePath} already exists, it will be overwritten. <p> Note that FileSystem includes a convenient {@code copyFromLocalFile} ...
getRelativeProjectPath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/HdfsStorage.java
Apache-2.0
@Override public InputStream getDependency(final Dependency dep) throws IOException { if (!dependencyFetchingEnabled()) { throw new UnsupportedOperationException("Dependency fetching is not enabled."); } return this.http.open(resolveAbsoluteDependencyURI(dep)); }
LocalHadoopStorage is an extension of LocalStorage that adds support for dependency fetching. LocalHadoopStorage depends on hadoop-common and can only be injected when hadoop-common is on the classpath.
getDependency
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
Apache-2.0
@Override public boolean dependencyFetchingEnabled() { return this.http != null; }
LocalHadoopStorage is an extension of LocalStorage that adds support for dependency fetching. LocalHadoopStorage depends on hadoop-common and can only be injected when hadoop-common is on the classpath.
dependencyFetchingEnabled
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
Apache-2.0
@Override public String getDependencyRootPath() { return dependencyFetchingEnabled() ? this.dependencyRootUri.toString() : null; }
LocalHadoopStorage is an extension of LocalStorage that adds support for dependency fetching. LocalHadoopStorage depends on hadoop-common and can only be injected when hadoop-common is on the classpath.
getDependencyRootPath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
Apache-2.0
private Path resolveAbsoluteDependencyURI(final Dependency dep) { return new Path(this.dependencyRootUri.toString(), getTargetDependencyPath(dep)); }
LocalHadoopStorage is an extension of LocalStorage that adds support for dependency fetching. LocalHadoopStorage depends on hadoop-common and can only be injected when hadoop-common is on the classpath.
resolveAbsoluteDependencyURI
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalHadoopStorage.java
Apache-2.0
@Override public InputStream getProject(final String key) throws IOException { return new FileInputStream(getFileInRoot(key)); }
@param key Relative path of the file from the baseDirectory
getProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
@Override public String putProject(final ProjectStorageMetadata metadata, final File localFile) { final File projectDir = new File(this.rootDirectory, String.valueOf(metadata.getProjectId())); if (projectDir.mkdir()) { log.info("Created project dir: " + projectDir.getAbsolutePath()); } final Fil...
@param key Relative path of the file from the baseDirectory
putProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
@Override public InputStream getDependency(final Dependency dep) throws IOException { throw new UnsupportedOperationException( "Dependency fetching is not supported with LocalStorage."); }
@param key Relative path of the file from the baseDirectory
getDependency
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
@Override public boolean dependencyFetchingEnabled() { return false; }
@param key Relative path of the file from the baseDirectory
dependencyFetchingEnabled
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
@Override public String getDependencyRootPath() { return null; }
@param key Relative path of the file from the baseDirectory
getDependencyRootPath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
@Override public boolean deleteProject(final String key) { final File file = getFileInRoot(key); final boolean result = file.exists() && file.delete(); if (result) { log.warn("Deleted project file: " + file.getAbsolutePath()); } else { log.warn("Unable to delete project file: " + file.getA...
@param key Relative path of the file from the baseDirectory
deleteProject
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
private String getRelativePath(final File targetFile) { return this.rootDirectory.toURI().relativize(targetFile.toURI()).getPath(); }
@param key Relative path of the file from the baseDirectory
getRelativePath
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/LocalStorage.java
Apache-2.0
@VisibleForTesting boolean isCleanupPermitted() { return this.maxArtifactsPerProject > 0; }
The query must sort the versions in reverse order for the cleanup operation to work correctly! TODO spyne: Refactor database storage cleanup to use this When using DatabaseStorage, resourceId is always NULL. Hence, those rows will currently be never cleaned up.
isCleanupPermitted
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
Apache-2.0
public void cleanupProjectArtifacts(final int projectId, final List<Integer> versionsToExclude) { if (!isCleanupPermitted()) { return; } final Set<String> allResourceIds = findResourceIdsToDelete(projectId, versionsToExclude); if (allResourceIds.size() == 0) { return; } log.warn(Str...
Remove all but: - last N artifacts as configured by AZKABAN_STORAGE_ARTIFACT_MAX_RETENTION - artifacts with the versions provided Since multiple versions can share the same filename, the algo is to collect all filenames and from them, remove the latest ones. The remaining ones are deleted by the respective storage. F...
cleanupProjectArtifacts
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
Apache-2.0
private Set<String> findResourceIdsToDelete(final int projectId, final List<Integer> versionsToExclude) { final List<Pair<String, Integer>> resourceIdOrderedList = fetchResourceIdOrderedList(projectId); if (resourceIdOrderedList.size() <= this.maxArtifactsPerProject) { return Collections.emptySet();...
Remove all but: - last N artifacts as configured by AZKABAN_STORAGE_ARTIFACT_MAX_RETENTION - artifacts with the versions provided Since multiple versions can share the same filename, the algo is to collect all filenames and from them, remove the latest ones. The remaining ones are deleted by the respective storage. F...
findResourceIdsToDelete
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
Apache-2.0
private boolean delete(final String resourceId) { final boolean isDeleted = this.storage.deleteProject(resourceId) && removeDbEntry(resourceId); if (!isDeleted) { log.info("Failed to delete resourceId: " + resourceId); } return isDeleted; }
Main Delete Utility. Delete the storage first. Then remove metadata from DB. Warning! This order cannot be reversed since if the metadata is lost, there is no reference of the storage blob. @param resourceId the storage key to be deleted. @return true if deletion was successful. false otherwise
delete
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
Apache-2.0
private boolean removeDbEntry(final String resourceId) { try { final int nAffectedRows = this.databaseOperator.update(SQL_DELETE_RESOURCE_ID, resourceId); return nAffectedRows > 0; } catch (final SQLException e) { log.error("Error while deleting DB metadata resource ID: " + resourceId, e); ...
Main Delete Utility. Delete the storage first. Then remove metadata from DB. Warning! This order cannot be reversed since if the metadata is lost, there is no reference of the storage blob. @param resourceId the storage key to be deleted. @return true if deletion was successful. false otherwise
removeDbEntry
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
Apache-2.0
private List<Pair<String, Integer>> fetchResourceIdOrderedList(final int projectId) { try { return this.databaseOperator.query(SQL_FETCH_PVR, rs -> { final List<Pair<String, Integer>> results = new ArrayList<>(); while (rs.next()) { final Pair<String, Integer> p...
Main Delete Utility. Delete the storage first. Then remove metadata from DB. Warning! This order cannot be reversed since if the metadata is lost, there is no reference of the storage blob. @param resourceId the storage key to be deleted. @return true if deletion was successful. false otherwise
fetchResourceIdOrderedList
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/storage/StorageCleaner.java
Apache-2.0
public synchronized static void setCheckerLoader(final CheckerTypeLoader loader) { Condition.checkerLoader = loader; }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
setCheckerLoader
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public static Condition fromJson(final Object obj) throws Exception { if (checkerLoader == null) { throw new Exception("Condition Checker loader not initialized!"); } final Map<String, Object> jsonObj = (HashMap<String, Object>) obj; Condition cond = null; List<Long> missedCheckTimes = new Ar...
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
fromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public long getNextCheckTime() { return this.nextCheckTime; }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
getNextCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public List<Long> getMissedCheckTimes() { return this.missedCheckTimes; }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
getMissedCheckTimes
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public Map<String, ConditionChecker> getCheckers() { return this.checkers; }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
getCheckers
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
private void setCheckers(final Map<String, ConditionChecker> checkers) { this.checkers = checkers; for (final ConditionChecker checker : checkers.values()) { this.context.set(checker.getId(), checker); } updateNextCheckTime(); }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
setCheckers
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
private void updateNextCheckTime() { long time = Long.MAX_VALUE; for (final ConditionChecker checker : this.checkers.values()) { time = Math.min(time, checker.getNextCheckTime()); } this.nextCheckTime = time; }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
updateNextCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public void resetCheckers() { for (final ConditionChecker checker : this.checkers.values()) { checker.reset(); if (checker instanceof BasicTimeChecker) { this.missedCheckTimes = ((BasicTimeChecker) checker).getMissedCheckTimesBeforeNow(); } } updateNextCheckTime(); logger.info(...
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
resetCheckers
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public String getExpression() { return this.expression.getExpression(); }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
getExpression
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public void setExpression(final String expr) { this.expression = jexl.createExpression(expr); }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
setExpression
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public boolean isMet() { if (logger.isDebugEnabled()) { logger.debug("Testing condition " + this.expression); } return this.expression.evaluate(this.context).equals(Boolean.TRUE); }
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
isMet
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public Object toJson() { final Map<String, Object> jsonObj = new HashMap<>(); jsonObj.put("expression", this.expression.getExpression()); final List<Object> checkersJson = new ArrayList<>(); for (final ConditionChecker checker : this.checkers.values()) { final Map<String, Object> oneChecker = new...
Used when reload Trigger from DB. It's possible to have missed schedule from last check point.
toJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/Condition.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/Condition.java
Apache-2.0
public static BasicTimeChecker createFromJson(final Object obj) throws Exception { return createFromJson((HashMap<String, Object>) obj); }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
createFromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public static BasicTimeChecker createFromJson(final HashMap<String, Object> obj) throws Exception { final Map<String, Object> jsonObj = (HashMap<String, Object>) obj; if (!jsonObj.get("type").equals(type)) { throw new Exception("Cannot create checker of " + type + " from " + jsonObj.get("type")); } ...
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
createFromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public long getFirstCheckTime() { return this.firstCheckTime; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
getFirstCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public DateTimeZone getTimeZone() { return this.timezone; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
getTimeZone
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public boolean isRecurring() { return this.isRecurring; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
isRecurring
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public boolean isSkipPastChecks() { return this.skipPastChecks; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
isSkipPastChecks
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public ReadablePeriod getPeriod() { return this.period; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
getPeriod
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public long getNextCheckTime() { return this.nextCheckTime; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
getNextCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public String getCronExpression() { return this.cronExpression; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
getCronExpression
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public List<Long> getMissedCheckTimesBeforeNow() { return this.missedCheckTimesBeforeNow; }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
getMissedCheckTimesBeforeNow
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public Boolean eval() { return this.nextCheckTime < DateTimeUtils.currentTimeMillis(); }
This constructor used when recover from DB or end checkers, thus nextCheckTime is specified instead of calculated.
eval
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public void reset() { final NextCheckTime nextCheckTimeObj = calculateNextCheckTime(); this.nextCheckTime = nextCheckTimeObj.nextValidCheckTimeFromNow; nextCheckTimeObj.missedCheckTimeBeforeNow.remove(nextCheckTimeObj.missedCheckTimeBeforeNow.size() - 1); this.missedCheckTimesBeforeNow = nex...
Reset trigger when trigger fired associated action by updating next check time after Now. It will also refresh missedCheckTime list based on this round's check. First miss check would be removed from list because reset happens after trigger fires, thus the first one has already used and does not count towards miss chec...
reset
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public String getId() { return this.id; }
Reset trigger when trigger fired associated action by updating next check time after Now. It will also refresh missedCheckTime list based on this round's check. First miss check would be removed from list because reset happens after trigger fires, thus the first one has already used and does not count towards miss chec...
getId
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public String getType() { return type; }
Reset trigger when trigger fired associated action by updating next check time after Now. It will also refresh missedCheckTime list based on this round's check. First miss check would be removed from list because reset happens after trigger fires, thus the first one has already used and does not count towards miss chec...
getType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public BasicTimeChecker fromJson(final Object obj) throws Exception { return createFromJson(obj); }
Reset trigger when trigger fired associated action by updating next check time after Now. It will also refresh missedCheckTime list based on this round's check. First miss check would be removed from list because reset happens after trigger fires, thus the first one has already used and does not count towards miss chec...
fromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
protected void updateNextCheckTime() { final NextCheckTime nextCheckTimeObj = calculateNextCheckTime(); this.nextCheckTime = nextCheckTimeObj.nextValidCheckTimeFromNow; this.missedCheckTimesBeforeNow = nextCheckTimeObj.missedCheckTimeBeforeNow; }
Only used on reload trigger from DB to recover Trigger object. missedCheckTimes would count all previous missed checks including the first one. For example: nextCheckTime from last update is 20:00, the schedule is triggered every minute. Now is system time is 20:00:30, restart process reloads last check point from DB. ...
updateNextCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
private NextCheckTime calculateNextCheckTime() { DateTime date = new DateTime(this.nextCheckTime).withZone(this.timezone); LOG.debug("calculate next check time, current nextCheckTime is {} by cron {}", date, this.cronExpression); final NextCheckTime nextCheckTimeObj = new NextCheckTime(); int count = 0;...
Only used on reload trigger from DB to recover Trigger object. missedCheckTimes would count all previous missed checks including the first one. For example: nextCheckTime from last update is 20:00, the schedule is triggered every minute. Now is system time is 20:00:30, restart process reloads last check point from DB. ...
calculateNextCheckTime
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public Object getNum() { return null; }
A metadata class records next check time from cronExpression.
getNum
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public Object toJson() { final Map<String, Object> jsonObj = new HashMap<>(); jsonObj.put("type", type); jsonObj.put("firstCheckTime", String.valueOf(this.firstCheckTime)); jsonObj.put("timezone", this.timezone.getID()); jsonObj.put("nextCheckTime", String.valueOf(this.nextCheckTime)); ...
A metadata class records next check time from cronExpression.
toJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public void stopChecker() { return; }
A metadata class records next check time from cronExpression.
stopChecker
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
@Override public void setContext(final Map<String, Object> context) { }
A metadata class records next check time from cronExpression.
setContext
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/BasicTimeChecker.java
Apache-2.0
public static void setExecutorManager(final ExecutorManagerAdapter em) { executorManagerAdapter = em; }
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
setExecutorManager
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
public static KillExecutionAction createFromJson(final Object obj) { return createFromJson((HashMap<String, Object>) obj); }
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
createFromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
public static KillExecutionAction createFromJson(final HashMap<String, Object> obj) { final Map<String, Object> jsonObj = (HashMap<String, Object>) obj; final String objType = (String) jsonObj.get("type"); if (!objType.equals(type)) { throw new RuntimeException("Cannot create action of " + type + " fr...
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
createFromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
@Override public String getId() { return this.actionId; }
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
getId
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
@Override public String getType() { return type; }
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
getType
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
@Override public KillExecutionAction fromJson(final Object obj) throws Exception { return createFromJson((HashMap<String, Object>) obj); }
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
fromJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
@Override public Object toJson() { final Map<String, Object> jsonObj = new HashMap<>(); jsonObj.put("actionId", this.actionId); jsonObj.put("type", type); jsonObj.put("execId", String.valueOf(this.execId)); return jsonObj; }
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
toJson
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0
@Override public void doAction() throws Exception { final ExecutableFlow exFlow = executorManagerAdapter.getExecutableFlow(this.execId); logger.info("ready to kill execution " + this.execId); if (!Status.isStatusFinished(exFlow.getStatus())) { logger.info("Killing execution " + this.execId); e...
@deprecated Create a new KillExecutionAction using FlowRunnerManager instead of ExecutorManager to kill flow. Still keep the old one here for being compatible with existing SLA trigger in the database. Will remove the old one when all existing triggers expire.
doAction
java
azkaban/azkaban
azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
https://github.com/azkaban/azkaban/blob/master/azkaban-common/src/main/java/azkaban/trigger/builtin/KillExecutionAction.java
Apache-2.0