grigain无法执行请求(连接失败)

ioekq8ef  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(367)

我正在运行一个hadoop作业,它迭代一个浮点矩阵来做一些计算。除此之外,我正在使用gridgain hadoop acelerator在内存中完成这项工作。然而,当我尝试用1000次迭代运行我的计算时,发生了一些奇怪的事情。这个例外是thown: Caused by: class org.gridgain.client.impl.connection.GridClientConnectionResetException: Failed to perform request (connection failed): /127.0.0.1:11211 更奇怪的是,当抛出异常时,节点是正常的,计算似乎继续,但由于异常,我无法获得最终打印结果。
以下是在Map阶段完成的计算代码:

  1. float lineResult = 0.0f;
  2. float[] linesResults = new float[lines.length];
  3. for(int x = 0; x < numberOfIterationsPerLine; x++)
  4. {
  5. for(int y = 0; y < lines.length; y++)//line by line
  6. {
  7. lineResult = 0.0f;
  8. for(int i = 0; i < lines[y].length; i++)//value by value
  9. {
  10. if(i == 0)
  11. lineResult += lines[y][i] * lines[y][i];
  12. else
  13. {
  14. for(int j = 0; j <= i; j++)
  15. lineResult += lines[y][j] * lines[y][i];
  16. }
  17. }
  18. linesResults[y] += lineResult;
  19. }
  20. }
  21. for(int z = 0; z < lines.length; z++)
  22. //write the result
  23. context.write(new LongWritable(1), new FloatWritable(linesResults[z]));

我还尝试了不同大小的节点堆,从2gb到4gb。这都是在同一台机器上完成的。
有人遇到过类似的问题吗?
谢谢你的关注。

qvtsj1bj

qvtsj1bj1#

这可能是由于ignite job tracker(默认端口11211)上的空闲超时造成的。请尝试通过节点配置增加空闲超时(默认值为7000):

  1. <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
  2. ...
  3. <property name="connectorConfiguration">
  4. <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
  5. <property name="port" value="11211"/>
  6. <property name="idleTimeout" value="100000"/>
  7. </bean>
  8. </property>

相关问题