internal virtual string Visit(DryadSuperNode node, CodeMemberMethod vertexMethod, string[] readerNames, string[] writerNames) { return node.AddVertexCode(vertexMethod, readerNames, writerNames); }
private void SwitchTo(DryadQueryNode curNode, DryadSuperNode node) { if (curNode.SuperNode == this) { curNode.SuperNode = node; foreach (DryadQueryNode child in curNode.Children) { this.SwitchTo(child, node); } } }
internal DryadQueryNode PipelineReduce() { if (!this.CanBePipelined()) { return this; } DryadQueryNode[] nodeChildren = this.Children; DryadSuperNode resNode = new DryadSuperNode(this); List<DryadQueryNode> childList = new List<DryadQueryNode>(); for (int i = 0; i < nodeChildren.Length; i++) { DryadQueryNode child = nodeChildren[i]; if (this.CanNotBePipelinedWith(child)) { childList.Add(child); bool found = child.UpdateParent(this, resNode); } else { if (child is DryadSuperNode) { DryadSuperNode superChild = (DryadSuperNode)child; nodeChildren[i] = superChild.RootNode; superChild.SwitchTo(resNode); } else { child.SuperNode = resNode; } // Fix the child's children foreach (DryadQueryNode child1 in child.Children) { childList.Add(child1); bool found = child1.UpdateParent(child, resNode); } } } DryadQueryNode[] resChildren = new DryadQueryNode[childList.Count]; for (int i = 0; i < resChildren.Length; i++) { resChildren[i] = childList[i]; } resNode.Children = resChildren; resNode.OutputDataSetInfo = resNode.RootNode.OutputDataSetInfo; return resNode; }
internal void SwitchTo(DryadSuperNode node) { this.SwitchTo(this.m_rootNode, node); }
internal DryadQueryNode(QueryNodeType nodeType, HpcLinqQueryGen queryGen, Expression queryExpr, params DryadQueryNode[] children) { this.m_nodeType = nodeType; this.m_queryGen = queryGen; this.m_queryExpression = queryExpr; this.m_parents = new List<DryadQueryNode>(1); this.m_children = children; foreach (DryadQueryNode child in children) { child.Parents.Add(this); } this.m_superNode = null; this.m_isForked = false; this.m_uniqueId = HpcLinqQueryGen.StartPhaseId; this.m_channelType = ChannelType.DiskFile; this.m_conOpType = ConnectionOpType.Pointwise; this.m_opName = null; this.m_vertexEntryMethod = null; this.m_outputDataSetInfo = null; this.m_partitionCount = -1; this.m_dynamicManager = null; }