Search code examples
hadoopgridgain

GriGain Failed to perform request (connection failed)


I'm running a hadoop job that iterates a float matrix to do some calculations. Besides that I'm using the GridGain Hadoop acelerator to get this done in-memory. However, something strange is happening when I try to run my computation with 1000 iterations. This exception is thown:

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

What is more strange is that when the exception is thrown the node is OK and the computations seems to continue, but I can't get the final prints because of the exception.

Here is the code of the computation that is done in the map phase:

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]));

I've tried also different sizes of heap for the node, from 2GB to 4GB. This is all done in the same machine.

Has anybody encountered a similar problem?

Thanks for the attention.


Solution

  • This may happen due to idle timeout on Ignite job tracker (default port 11211). Please try to increase the idle timeout via the node configuration (default value is 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>