错误:无法构建Microsoft.Hpc.Linq0.dll。 [英] error:Failed to build Microsoft.Hpc.Linq0.dll.

查看:55
本文介绍了错误:无法构建Microsoft.Hpc.Linq0.dll。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI

我写了一个MapReduce程序。当我提交程序时,发生错误:

I wrote a MapReduce program.When i submited the program,an error occured:

Microsoft.Hpc.Linq .HpcLinqException未处理

 消息=无法构建Microsoft.Hpc.Linq0.dll。请参阅日志以获取编译错误消息。

 来源= Microsoft.Hpc.Linq

  ErrorCode = 33554440

 堆栈跟踪:

       在Microsoft.Hpc.Linq.Internal.HpcLinqCodeGen.GenerateCodeAndCompile(字符串dummyFile,字符串SRCFILE,字符串

Microsoft.Hpc.Linq.HpcLinqException was unhandled
  Message=Failed to build Microsoft.Hpc.Linq0.dll. See the log for compilation error messages.
  Source=Microsoft.Hpc.Linq
  ErrorCode=33554440
  StackTrace:
       at Microsoft.Hpc.Linq.Internal.HpcLinqCodeGen.GenerateCodeAndCompile(String dummyFile, String srcFile, String

binFile)

        at Microsoft.Hpc.Linq.Internal.HpcLinqCodeGen.BuildAssembly()

       在Microsoft.Hpc.Linq.Internal.HpcLinqCodeGen.BuildDryadLinqAssembly(HpcLinqQueryGen queryGen)

     &NBSP ; 在Microsoft.Hpc.Linq.HpcLinqQueryGen.GenerateDryadProgram()

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在Microsoft.Hpc.Linq.HpcLinqQueryGen.InvokeDryad()<登记/>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在Microsoft.Hpc.Linq.HpcLinqQueryable.Submit [TSource](IQueryable`1源)

&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在HpcLinqExtras.QueriableExtensions.SubmitAndWait [TRecord](IQueryable`1查询,HpcLinqContext上下文)&NBSP;位置

binFile)
       at Microsoft.Hpc.Linq.Internal.HpcLinqCodeGen.BuildAssembly()
       at Microsoft.Hpc.Linq.Internal.HpcLinqCodeGen.BuildDryadLinqAssembly(HpcLinqQueryGen queryGen)
       at Microsoft.Hpc.Linq.HpcLinqQueryGen.GenerateDryadProgram()
       at Microsoft.Hpc.Linq.HpcLinqQueryGen.InvokeDryad()
       at Microsoft.Hpc.Linq.HpcLinqQueryable.Submit[TSource](IQueryable`1 source)
       at HpcLinqExtras.QueriableExtensions.SubmitAndWait[TRecord](IQueryable`1 query, HpcLinqContext context) location

d:\XC\\ \\w yf\Samples\Common\QueriableExtensions.cs:line 22

        at Generate.Class_FileRecord.Rule_Subproperty(String lastfileset,LinkedList`1 currentfileset,HpcLinqContext

D:\XC\wyf\Samples\Common\QueriableExtensions.cs:line 22
       at Generate.Class_FileRecord.Rule_Subproperty(String lastfileset, LinkedList`1 currentfileset, HpcLinqContext

context)  location D:\ XC \wyf \Samples\Generate\Class_FileRecord.cs:第79行

  ;       at Generate.Class_FileRecord.Main()  location D:\ XC \wyf \Samples \ Genenerate \Class_FileRecord.cs:第61行
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.AppDomain._nExecuteAssembly(大会组件,字串[] args)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.Threading.ExecutionContext.Run(ExecutionContext中的ExecutionContext ,ContextCallback回调,对象

context) location D:\XC\wyf\Samples\Generate\Class_FileRecord.cs:line 79
       at Generate.Class_FileRecord.Main() location D:\XC\wyf\Samples\Generate\Class_FileRecord.cs:line 61
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object

状态)

       在System.Threading.ThreadHelper.ThreadStart()

 的InnerException:

state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

我不熟悉树精map\reduce opertion.The MapReduce的方法如下:

I am not familiar with the dryad map\reduce opertion.The MapReduce method is as follows:

&NBSP;表达式来; Func键< FileRecord,IEnumerable< Key_Value>>> mapper = file => getSuperProperty(getPredicate(file.FilePath),context," subproperty")。AsQueryable()。选择(l => new Key_Value(l,file.FileData));

   &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;表达式< Func< Key_Value,string>> selector =(key_value)=> key_value._key;

           表达式< Func< string,IEnumerable< Key_Value>,FileRecord>> reducer =(key,values)=>新FileRecord(键,values.SelectMany(R => r._value).ToArray<字符串>());

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; context.FromDsc< FileRecord>(lastfileset)

                .MapReduce(映射器,选择器,减速机)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; .ToDsc(" FirstMapReduceRule7")

                .SubmitAndWait(context);

 Expression<Func<FileRecord, IEnumerable<Key_Value>>> mapper = file => getSuperProperty(getPredicate(file.FilePath),context,"subproperty").AsQueryable().Select(l=>new Key_Value(l,file.FileData));
            Expression<Func<Key_Value, string>> selector = (key_value) => key_value._key;
            Expression<Func<string, IEnumerable<Key_Value>, FileRecord>> reducer = (key, values) => new FileRecord(key, values.SelectMany(r=>r._value).ToArray<string>());
                context.FromDsc<FileRecord>(lastfileset)
                .MapReduce(mapper, selector, reducer)
                .ToDsc("FirstMapReduceRule7")
                .SubmitAndWait(context);

Key_Value和FileRecord 是我定义的类.getSuperProperty和getPredicate是方法。错误列表窗口中没有显示语法错误。

Key_Value and FileRecord are classes i defined.getSuperProperty and getPredicate are methods.There is no syntax error displayed on the Error List window.

Key_Value的定义是:

The defination of Key_Value is:

公共类Key_Value

    {

        public string _key;

        public string [] _value; 

public class Key_Value
    {
        public string _key;
        public string[] _value; 

        public Key_Value(string k,string [] v)

        {

            _key = k;

            _value = v;

        }
    }

        public Key_Value(string k, string[] v)
        {
            _key = k;
            _value = v;
        }
    }

我该如何处理呢?期待您的帮助!

How can i deal with it?Looking forward for your help!

xfengm

推荐答案

您好,

FileRecord和Key_Value类是否公开并标记为[Serializable]?您需要提供一个默认构造函数才能使序列化正常工作。

Are the FileRecord and Key_Value classes public and marked as [Serializable] ? You will need to provide a default constructor for serialization to work correctly.

Ade

 

这篇关于错误:无法构建Microsoft.Hpc.Linq0.dll。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆