2015-04-17 29 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

相关问题