Here's the code I'm running
package test;
import java.io.FileInputStream;
import java.util.concurrent.ExecutorService;
import org.apache.ignite.Ignite;
import org.apache.ignite.Ignition;
import org.apache.ignite.lang.IgniteRunnable;
public class test {
public static void main(String[] args) throws Exception {
Ignite ignite = Ignition.start(new FileInputStream(args[0]));
// Get cluster-enabled executor service.
ExecutorService exec = ignite.executorService();
// Iterate through all words in the sentence and create jobs.
for (final String word : "Print words using runnable".split("
")) {
// Execute runnable on some node.
exec.submit(new IgniteRunnable() {
public void run() {
System.out.println(">>> ABOUT TO PRINT
SOMETHING");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(">>> Printing '" +
word
+ "' on this node from
grid job.");
}
});
}
}
}
When I kill the second node EC2 instance during the 10 second sleep, the
first node does not pickup the compute process. Below is the configuration
file I"m passing in
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="peerClassLoadingEnabled" value="true"/>
<property name="cacheConfiguration">
<list>
<bean
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="partitioned"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="0"/>
<property
name="writeSynchronizationMode" value="FULL_ASYNC"/>
<property name="atomicityMode"
value="ATOMIC"/>
</bean>
</list>
</property>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
<property name="awsCredentials" ref="aws.creds"/>
<property name="bucketName" value="mybucket"/>
</bean>
</property>
</bean>
</property>
</bean>
<bean id="aws.creds" class="com.amazonaws.auth.BasicAWSCredentials">
<constructor-arg value="YOUR_ACCESS_KEY_ID" />
<constructor-arg value="YOUR_SECRET_ACCESS_KEY" />
</bean>
</beans>
I did have to modify some of the aws codebase to use IAM role inheritance
versus having to specify access/secret access keys. But I doubt this change
could be causing the issue.
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Computations-not-fault-tolerant-tp833p850.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.