2015-04-17 28 views
0

我正在運行一個迭代浮點矩陣來做一些計算的hadoop作業。除此之外,我正在使用GridGain Hadoop acelerator在內存中完成此操作。然而,當我嘗試用1000次迭代運行我的計算時,發生了一些奇怪的事情。此異常thown:GriGain無法執行請求(連接失敗)

Caused by: class org.gridgain.client.impl.connection.GridClientConnectionResetException: Failed to perform request (connection failed): /127.0.0.1:11211

什麼是更奇怪的是,當拋出異常的節點是確定和計算似乎還在繼續,但我不能讓因爲異常的最終印刷品。

這裏是在地圖階段完成的計算的代碼:

float lineResult = 0.0f; 
float[] linesResults = new float[lines.length]; 

for(int x = 0; x < numberOfIterationsPerLine; x++) 
{ 
    for(int y = 0; y < lines.length; y++)//line by line 
    { 
     lineResult = 0.0f; 
     for(int i = 0; i < lines[y].length; i++)//value by value 
     { 
      if(i == 0) 
       lineResult += lines[y][i] * lines[y][i]; 
      else 
      { 
       for(int j = 0; j <= i; j++) 
        lineResult += lines[y][j] * lines[y][i]; 
      } 
     } 
     linesResults[y] += lineResult; 
    } 
} 

for(int z = 0; z < lines.length; z++) 
    //write the result 
    context.write(new LongWritable(1), new FloatWritable(linesResults[z])); 

我也試着堆的大小不同的節點,從2GB到4GB。這全部在同一臺機器上完成。

有沒有人遇到過類似的問題?

感謝您的關注。

回答

0

這可能是由於Ignite作業跟蹤器(默認端口11211)上的空閒超時而發生的。 請嘗試通過將節點配置,增加空閒超時(默認值是7000):

<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> 
... 
    <property name="connectorConfiguration"> 
     <bean class="org.apache.ignite.configuration.ConnectorConfiguration"> 
      <property name="port" value="11211"/> 
      <property name="idleTimeout" value="100000"/> 
     </bean> 
    </property> 
+0

很抱歉,但我使用GridGain並不能複製你的答案。你知道如何在GridGain中做到這一點嗎? – DMagro

+0

感謝您的回答,我可以通過使用屬性''來實現GridGain的解決方案。 – DMagro

相關問題