[ https://issues.apache.org/jira/browse/BIGTOP-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294731#comment-13294731 ]
Sujay Rau commented on BIGTOP-614: ---------------------------------- Namenodes in HA might always be specified from hdfs-site.xml, so changing the following to your tests in the setUp() might get rid of the need to specify -Dservice.id.1=nn1 and -Dservice.id.2=nn2 from the command line. import org.apache.hadoop.conf.Configuration; static void setUp() { Configuration conf = new Configuration(); conf.addResource('hdfs-site.xml'); String namenodes = conf.get("dfs.ha.namenodes.ha-nn-uri"); service_id_1 = namenodes.split(",")[0]; service_id_2 = namenodes.split(",")[1]; assertTrue("Unspecified service id 1", service_id_1 != null); assertTrue("Unspecified service id 2", service_id_2 != null); num_failover = Integer.parseInt(System.getProperty("num.failover", "10")); } > Add HDFS HA tests > ----------------- > > Key: BIGTOP-614 > URL: https://issues.apache.org/jira/browse/BIGTOP-614 > Project: Bigtop > Issue Type: Test > Components: Tests > Reporter: Stephen Chu > Assignee: Stephen Chu > Attachments: HATests.patch > > > In this patch, I am adding 2 tests and a test util class. > 1) TestHAFailover: Fails over between the NameNodes a configurable number of > times. Checks the service state of each NN after each failover to ensure that > the service state is correct. > 2) TestKilLNNFailover: Kills the Active NN. Waits and fails over to the > standby NN. Waits and checks that the former standby is now active. Restarts > the killed NN and checks that it is now standby. Goes through this process a > configurable number of times. > 3) HATestUtil: Helper methods to fail over and kill the NameNodes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira