public class SparkWork extends AbstractOperatorDesc
Modifier and Type | Class and Description |
---|---|
class |
SparkWork.Dependency |
Modifier and Type | Field and Description |
---|---|
protected Map<org.apache.commons.lang3.tuple.Pair<BaseWork,BaseWork>,SparkEdgeProperty> |
edgeProperties |
protected Map<BaseWork,List<BaseWork>> |
invertedWorkGraph |
protected Map<BaseWork,List<BaseWork>> |
workGraph |
opProps, opTraits, statistics, vectorMode
Modifier and Type | Method and Description |
---|---|
void |
add(BaseWork w)
add creates a new node in the graph without any connections
|
void |
addAll(BaseWork[] bws)
Add all nodes in the collection without any connections.
|
void |
addAll(Collection<BaseWork> c)
Add all nodes in the collection without any connections.
|
void |
connect(BaseWork a,
BaseWork b,
SparkEdgeProperty edgeProp)
connect adds an edge between a and b.
|
boolean |
contains(BaseWork w)
Whether the specified BaseWork is a vertex in this graph
|
void |
disconnect(BaseWork a,
BaseWork b)
disconnect removes an edge between a and b.
|
List<ReduceWork> |
getAllReduceWork() |
List<BaseWork> |
getAllWork() |
Collection<BaseWork> |
getAllWorkUnsorted() |
List<BaseWork> |
getChildren(BaseWork work)
getChildren returns all the nodes with edges leading out of work
|
Map<BaseWork,BaseWork> |
getCloneToWork() |
Map<org.apache.hadoop.hive.ql.plan.SparkWork.ComparableName,List<SparkWork.Dependency>> |
getDependencyMap() |
SparkEdgeProperty |
getEdgeProperty(BaseWork a,
BaseWork b)
returns the edge type connecting work a and b
|
Set<BaseWork> |
getLeaves()
getLeaves returns all nodes that do not have a child
|
String |
getName() |
List<BaseWork> |
getParents(BaseWork work)
getParents returns all the nodes with edges leading into work
|
Map<String,List<String>> |
getRequiredCounterPrefix() |
Set<BaseWork> |
getRoots()
getRoots returns all nodes that do not have a parent.
|
Map<String,BaseWork> |
getWorkMap() |
void |
remove(BaseWork work)
remove removes a node from the graph and removes all edges with
work as start or end point.
|
void |
setCloneToWork(Map<BaseWork,BaseWork> cloneToWork) |
void |
setRequiredCounterPrefix(Map<String,List<String>> requiredCounterPrefix) |
clone, getOpProps, getStatistics, getTraits, getVectorMode, setOpProps, setStatistics, setTraits, setVectorMode
protected final Map<org.apache.commons.lang3.tuple.Pair<BaseWork,BaseWork>,SparkEdgeProperty> edgeProperties
public SparkWork(String name)
public String getName()
public Collection<BaseWork> getAllWorkUnsorted()
public void addAll(Collection<BaseWork> c)
public void addAll(BaseWork[] bws)
public boolean contains(BaseWork w)
w
- the BaseWork to checkpublic void add(BaseWork w)
public void disconnect(BaseWork a, BaseWork b)
public void setRequiredCounterPrefix(Map<String,List<String>> requiredCounterPrefix)
public List<BaseWork> getParents(BaseWork work)
public List<BaseWork> getChildren(BaseWork work)
public void remove(BaseWork work)
public SparkEdgeProperty getEdgeProperty(BaseWork a, BaseWork b)
public void connect(BaseWork a, BaseWork b, SparkEdgeProperty edgeProp)
- public Map<org.apache.hadoop.hive.ql.plan.SparkWork.ComparableName,List<SparkWork.Dependency>> getDependencyMap()
public List<ReduceWork> getAllReduceWork()
Copyright © 2017 The Apache Software Foundation. All rights reserved.