Skip to content

Instantly share code, notes, and snippets.

View ascherbakoff's full-sized avatar

Aleksei Scherbakov ascherbakoff

View GitHub Profile
package com.sbt.dpl.gridgain;
import com.sbt.persistence.exceptions.DPLException;
import java.util.Collections;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.cache.affinity.AffinityFunctionContext;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.binary.BinaryObjectImpl;
import java.io.Serializable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
public class SyncTest {
public static void main(String[] args) throws FileNotFoundException, InterruptedException {
if (args.length != 2)
return;
class org.apache.ignite.IgniteCheckedException: Failed to send message (node may have left the grid or TCP connection cannot be established due to firewall is
sues) [node=TcpDiscoveryNode [id=2b7e58a4-4f12-4b72-a214-ac1335620520, addrs=[0:0:0:0:0:0:0:1%1, 10.116.145.200, 127.0.0.1], sockAddrs=[sbt-oabs-364.ca.sbrf.r
u/10.116.145.200:0, /0:0:0:0:0:0:0:1%1:0, /10.116.145.200:0, /127.0.0.1:0], discPort=0, order=38, intOrder=20, lastExchangeTime=1466515909523, loc=false, ver=
1.5.11#20160408-sha1:4a9dc5eb, isClient=true], topic=TOPIC_JOB, msg=GridJobExecuteRequest [subjId=64e0a662-24f2-45b6-a810-4145413113f4, sesId=11cf48d6551-64e0
a662-24f2-45b6-a810-4145413113f4, jobId=21cf48d6551-2b7e58a4-4f12-4b72-a214-ac1335620520, startTaskTime=1466515915696, timeout=9223372036854775807, taskName=o
rg.gridgain.grid.internal.visor.node.VisorGridGainNodeDataCollectorTask, userVer=0, taskClsName=org.gridgain.grid.internal.visor.node.VisorGridGainNodeDataCol
lectorTask, ldrParticipants=null, cpSpi=null, createTime=1466515915707
public static final int GRID_CNT = 3;
static public void main(String... args) {
// -- spark context
SparkConf conf = new SparkConf();
conf.set("spark.executor.instances", String.valueOf(GRID_CNT));
JavaSparkContext sc = new JavaSparkContext("local[" + GRID_CNT + "]", "test", conf);