Below are the steps I followed for ignite with spark on Yarn but I am stuck
after spending almost all day on this.


   - copied apache-ignite-fabric-2.1.0-bin (tried 2.3.0 initially but the
   it didnt work) to all the 4 slave nodes of Spark cluster and started ignite
   with ./bin/ignite.sh. It shows as given below,  after starting

*Topology snapshot [ver=10, servers=4, clients=0, CPUs=32, heap=4.0GB]*


   - updated the spark-env.sh on all slave nodes with IGNITE_HOME and class
   paths as below

IGNITE_HOME=/home/ec2-user/rchalil/apache-ignite-fabric-2.1.0-bin

IGNITE_LIBS="${IGNITE_HOME}/libs/*"

for file in ${IGNITE_HOME}/libs/*

do

    if [ -d ${file} ] && [ "${file}" != "${IGNITE_HOME}"/libs/optional ];
then

        IGNITE_LIBS=${IGNITE_LIBS}:${file}/*

    fi

done

export spark.driver.extraClassPath=$IGNITE_LIBS

export spark.executor.extraClassPath=$IGNITE_LIBS


   - updated the default config.xml as attached with the static ips
   - On the Spark Master node (Only), added the  - <property name=
   "clientMode" value="true"/>


In the simple test code, i tried 2 things, both without success:

1. Added config/default-config.xml directly under the project and added the
below snippet.

val CONFIG = "config/default-config.xml"
val igniteContext = new IgniteContext(sparkContext, CONFIG, true)
val sharedRDD: IgniteRDD[Int, Int] = igniteContext.fromCache[Int,
Int]("sharedRDD")
sharedRDD.savePairs(sparkContext.parallelize(1 to 100000, 10).map(i => (i, i)))
sharedRDD.mapValues(x => (x * x))

During execution, it complains that - class
org.apache.ignite.IgniteCheckedException:
Spring XML configuration path is invalid: config/default-config.xml. Note
that this path should be either absolute or a relative local file system
path, relative to META-INF in classpath or valid URL to IGNITE_HOME.


2. Commented the above snippet and used the below:

val ic = new IgniteContext(sparkContext, () => new IgniteConfiguration())
val sharedRDD: IgniteRDD[Int, Int] = ic.fromCache("partitioned")
sharedRDD.savePairs(sparkContext.parallelize(1 to 100000, 10).map(i => (i, i)))

Now it complains that "it cannot find any IPs from multicast or IPFinder.

Not sure what am i doing not right. I also have a cluster.properties file
but I am not sure if it is needed for the yarn setup and I am not
explicitly calling it anywhere. Thank you.
<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<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 class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                        <property name="addresses">
                            <list>
                                <value>10.20.19.239</value>
                                <value>10.20.19.61</value>
                                <value>10.20.19.162</value>
                                <value>10.20.19.182</value>
                                <value>10.20.19.84</value>
                            </list>
                        </property>
                    </bean>
                </property>

                <property name="joinTimeout" value="60000"/>
            </bean>
        </property>
    </bean>
</beans>

Reply via email to