2016-02-25 77 views
1

我正在使用Hadoop Streaming在C#中的Azure中的Linux羣集上運行mapreduce作業。但是,我需要使用MathNet.Numerics庫。我使用NuGet包管理器抓取了dll,然後將dll作爲參考文件包含在lib文件夾中,並確保生成操作設置爲:Embedded Resource。Hadoop Streaming,C#和Azure與外部庫

每當我試着運行下面的命令:

hadoop jar ./hadoop-streaming-2.6.0.jar -input wasb:///CSV/ -output 
wasb:///Output/reducer1.txt -file ./Mapper.exe -mapper Mapper.exe 
-file ./Reducer.exe -reducer Reducer.exe 

我碰到下面的錯誤在我的輸出文件:

System.IO.FileNotFoundException: Could not load file or assembly 
'MathNet.Numerics, Version=3.11.0.0, Culture=neutral, PublicKeyToken=null' 
or one of its dependencies. 
File name: 'MathNet.Numerics, Version=3.11.0.0, Culture=neutral, PublicKeyToken=null' 

我還嘗試複製到MathNet.Numerics.dll到集羣並在初始命令中包含具有標籤的文件:

hadoop jar ./hadoop-streaming-2.6.0.jar -input wasb:///CSV/ -output 
wasb:///Output/reducer1.txt -file ./Mapper.exe -mapper Mapper.exe 
-file ./Reducer.exe -reducer Reducer.exe -file ./MathNet.Numerics.dll 

但是具有相同的結果。

回答

0

在VS 2014+的窗口中 右鍵單擊解決方案資源管理器中的「引用」。 - 選擇:管理NuGet軟件包 單擊瀏覽,然後鍵入試圖安裝的庫,它應該獲取所需的所有內容,包括依賴關係。

在Linux上使用Mono: - https://docs.nuget.org/contribute/setting-up-the-nuget-development-environment -Scroll下降到Linux的安裝說明

我沒有用過的NuGet上單聲道,但我認爲它應該工作完全相同的方式。我至少會試着看看你是否僅僅在某個地方錯過了一個依賴項,因爲它應該自動地爲你自動獲取它們。

+0

感謝您的回覆。這就是我最初下載dll的方式。我編輯了我的問題以反映 – michef

+0

然後,我會認爲某個地方可能存在未聲明的依賴關係,這被某人忽略,或者發佈版與發行版之間存在未公開的錯誤。也許嘗試恢復到稍微舊的版本?或者向開發團隊發送IRC /論壇上的消息? – Jscix