예제 #1
0
        public virtual void TestGetHaNnHttpAddresses()
        {
            string        LogicalHostName = "ns1";
            string        Ns1Nn1Addr      = "ns1-nn1.example.com:8020";
            string        Ns1Nn2Addr      = "ns1-nn2.example.com:8020";
            Configuration conf            = CreateWebHDFSHAConfiguration(LogicalHostName, Ns1Nn1Addr, Ns1Nn2Addr
                                                                         );
            IDictionary <string, IDictionary <string, IPEndPoint> > map = DFSUtil.GetHaNnWebHdfsAddresses
                                                                              (conf, "webhdfs");

            NUnit.Framework.Assert.AreEqual(Ns1Nn1Addr, map["ns1"]["nn1"].ToString());
            NUnit.Framework.Assert.AreEqual(Ns1Nn2Addr, map["ns1"]["nn2"].ToString());
        }