internal void BuildDryadLinqAssembly(HpcLinqQueryGen queryGen) { lock (s_codeGenLock) { // this method only gets called from HpcLinqQueryGen.GenerateDryadProgram() before job submission. // Since we don't load the generated vertex DLL after that, the check for // "should re-gen?" below is based on m_generatedVertexDllPath being set if (this.m_generatedVertexDllPath== null) { queryGen.CodeGenVisit(); this.BuildAssembly(false); } } }
/// <summary> /// Explain a query plan in terms of elementary operations. /// </summary> /// <param name="gen">Query generator.</param> /// <returns>A string explaining the plan.</returns> internal string Explain(HpcLinqQueryGen gen) { StringBuilder plan = new StringBuilder(); gen.CodeGenVisit(); this.CodeShowVisit(plan, gen.QueryPlan()); return plan.ToString(); }
internal DryadInputNode(HpcLinqQueryGen queryGen, ConstantExpression queryExpr) : base(QueryNodeType.InputTable, queryGen, queryExpr) { this.m_table = queryExpr.Value as DryadLinqQuery; if (this.m_table == null) { throw DryadLinqException.Create(HpcLinqErrorCode.UnknownError, SR.InputMustBeHpcLinqSource, queryExpr); } if (TypeSystem.IsTypeOrAnyGenericParamsAnonymous(queryExpr.Type.GetGenericArguments()[0])) { throw DryadLinqException.Create(HpcLinqErrorCode.InputTypeCannotBeAnonymous, SR.InputTypeCannotBeAnonymous, queryExpr); } this.m_outputDataSetInfo = ((DryadLinqQuery)this.m_table).DataSetInfo; this.m_partitionCount = this.m_outputDataSetInfo.partitionInfo.Count; this.m_dynamicManager = DynamicManager.None; }
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; }
private Type m_outputType; // type of output channel #endregion Fields #region Constructors /// <summary> /// Create a dummy node with a specific code generator. /// </summary> /// <param name="queryGen">Query generator to instantiate.</param> /// <param name="outputType">Type of the single output.</param> /// <param name="children">The upstream nodes</param> internal DryadDummyNode(HpcLinqQueryGen queryGen, Type outputType, params DryadQueryNode[] children) : base(QueryNodeType.Dummy, queryGen, null, children) { this.m_outputDataSetInfo = new DataSetInfo(); this.DynamicManager = DynamicManager.None; this.m_outputType = outputType; }