public class Dependency extends ImageWriter
Modifier and Type | Field and Description |
---|---|
List<Integer> |
mChildrenFiles |
String |
mCommandPrefix |
String |
mComment |
long |
mCreationTimeMs |
List<ByteBuffer> |
mData |
DependencyType |
mDependencyType |
String |
mFramework |
String |
mFrameworkVersion |
int |
mId |
List<Integer> |
mParentDependencies |
List<Integer> |
mParentFiles |
Constructor and Description |
---|
Dependency(int id,
List<Integer> parents,
List<Integer> children,
String commandPrefix,
List<ByteBuffer> data,
String comment,
String framework,
String frameworkVersion,
DependencyType type,
Collection<Integer> parentDependencies,
long creationTimeMs)
Create a new dependency
|
Modifier and Type | Method and Description |
---|---|
void |
addChildrenDependency(int childDependencyId)
Add a child dependency, which means one of the children of the current dependency is a parent
of the added dependency.
|
void |
addLostFile(int fileId)
A file lost.
|
void |
childCheckpointed(int childFileId)
A child file has been checkpointed.
|
ClientDependencyInfo |
generateClientDependencyInfo()
Generate a ClientDependencyInfo, which is used for the thrift server.
|
List<Integer> |
getChildrenDependency()
Get the children dependencies of this dependency.
|
String |
getCommand()
Get the command used for the recomputation.
|
List<Integer> |
getLostFiles()
Get the lost files of the dependency.
|
boolean |
hasCheckpointed()
Return true if the dependency has checkpointed, which means all the children files are
checkpointed.
|
boolean |
hasChildrenDependency()
Return true if it has children dependency.
|
boolean |
hasLostFile()
Return true if there exists lost file of the dependency.
|
String |
toString() |
void |
writeImage(com.fasterxml.jackson.databind.ObjectWriter objWriter,
DataOutputStream dos)
Write image to the specified DataOutputStream.
|
writeElement
public final int mId
public final long mCreationTimeMs
public final String mCommandPrefix
public final List<ByteBuffer> mData
public final String mComment
public final String mFramework
public final String mFrameworkVersion
public final DependencyType mDependencyType
public Dependency(int id, List<Integer> parents, List<Integer> children, String commandPrefix, List<ByteBuffer> data, String comment, String framework, String frameworkVersion, DependencyType type, Collection<Integer> parentDependencies, long creationTimeMs)
id
- The id of the dependencyparents
- The input files' id of the dependencychildren
- The output files' id of the dependencycommandPrefix
- The prefix of the command used for recomputationdata
- The list of the data used for recomputationcomment
- The comment of the dependencyframework
- The framework of the dependency, used for recomputationframeworkVersion
- The version of the frameworktype
- The type of the dependency, DependencyType.Wide or DependencyType.NarrowparentDependencies
- The id of the parents' dependenciescreationTimeMs
- The create time of the dependency, in millisecondspublic void addChildrenDependency(int childDependencyId)
childDependencyId
- The id of the child dependency to be addedpublic void addLostFile(int fileId)
fileId
- The id of the lost filepublic void childCheckpointed(int childFileId)
childFileId
- The id of the checkpointed child filepublic ClientDependencyInfo generateClientDependencyInfo()
public List<Integer> getChildrenDependency()
public String getCommand()
public List<Integer> getLostFiles()
public boolean hasCheckpointed()
public boolean hasChildrenDependency()
public boolean hasLostFile()
public void writeImage(com.fasterxml.jackson.databind.ObjectWriter objWriter, DataOutputStream dos) throws IOException
ImageWriter
objWriter
- The used object writerdos
- The target data output streamIOException
Copyright © 2015. All Rights Reserved.