You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Kobe <rk...@mailcity.com> on 2015/12/10 17:56:44 UTC

Connecting two nodes in IGFS

I have a fairly basic question on IGFS. I am following the examples of igfs
on github.

I have a an igfs node on my localhost. I wish to create another igfs node on
server B
and have my localhost and server B share the igfs instance.

I assume the way to accomplish is this is using
org.apache.ignite.igfs.IgfsIpcEndpointConfiguration
as follows?
   [CODE]
     <property name="ipcEndpointConfiguration">
                        <bean
class="org.apache.ignite.igfs.IgfsIpcEndpointConfiguration">
                            <property name="type" value="TCP" />
                        </bean>
                    </property>
   [/CODE]

If so, why do I not see a localPort setting where igfs listens to peers?
What is the default port?

Also, could you please explain the purpose of TcpDiscoveryVmIpFinder vs.
TcpDiscoveryMulticastIpFinder?
(example below).

[CODE]
 
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    
                    
                    
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>
                                
                                <value>127.0.0.1:47500..47509</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>

[/CODE]

For multicast discovery, I assume I will have to configure my firewall to
allow it.

thankx,

/Kobe



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connecting-two-nodes-in-IGFS-tp2196.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Connecting two nodes in IGFS

Posted by vkulichenko <va...@gmail.com>.
Kobe,

Yes, your understanding is correct. Let us know if anything doesn't work for
you.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connecting-two-nodes-in-IGFS-tp2196p2203.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Connecting two nodes in IGFS

Posted by Kobe <rk...@mailcity.com>.
vkulichenko wrote
> If you simply need to distribute your file system data across, you need to
> start several Ignite nodes with proper discoverySpi configuration (your
> second code example) so that they form a cluster. Data will be
> automatically partitioned.

Ok, so I assume that I create a server A with same data and meta caches with
the same name on server A and server B and enable discoverySpi to have to
join together in a cluster?

*Server A:
*[CODE]
      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="igfs-data"/>
                    <property name="cacheMode" value="REPLICATED"/>
                   //...  
       </bean>

      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="igfs-meta"/>
                    <property name="cacheMode" value="REPLICATED"/>
                               //...  
       </bean>
        <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>serverA:47500..47509</value>
                                <value>serverB:47500..47509</value>
                            </list>
                        </property>
                    </bean>
               </property>
            </bean>
        </property>
[/CODE]

*Server B:
*[CODE]
      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="igfs-data"/>
                    <property name="cacheMode" value="REPLICATED"/>
                   //...  
       </bean>

      <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="igfs-meta"/>
                    <property name="cacheMode" value="REPLICATED"/>
                               //...  
       </bean>
        <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>serverA:47500..47509</value>
                                <value>serverB:47500..47509</value>
                            </list>
                        </property>
                    </bean>
               </property>
            </bean>
        </property>
[/CODE]

Thankx,

/Kobe



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connecting-two-nodes-in-IGFS-tp2196p2200.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Connecting two nodes in IGFS

Posted by vkulichenko <va...@gmail.com>.
Hi Kobe,

IPC endpoint is used to communicate with HDFS, it's used by Hadoop
Accelerator.

If you simply need to distribute your file system data across, you need to
start several Ignite nodes with proper discoverySpi configuration (your
second code example) so that they form a cluster. Data will be automatically
partitioned.

Difference between TcpDiscoveryVmIpFinder and TcpDiscoveryMulticastIpFinder
is that the second one uses multicast protocol to get other nodes'
coordinates, while the first one allows only explicitly provided list of
addresses.

For example, with VM IP finder you can provide addresses of both servers to
make this work, like this:

<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
    <property name="addresses">
        <list>
            <value>address1:47500..47509</value>
            <value>address2:47500..47509</value>
        </list>
    </property>
</bean>

Multicast IP finder doesn't require any additional configuration by default,
but yes, your firewall has to allow it.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Connecting-two-nodes-in-IGFS-tp2196p2198.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.