Пример #1
0
 @Test(expected = HIHOException.class)
 public void testCheckMandatoryConfsForJdbcUrl() throws HIHOException {
   String[] args =
       new String[] {
         "-inputPath",
         "input",
         "-url",
         "-userName",
         "root",
         "-password",
         "newpwd",
         "-querySuffix",
         "mrTest fields terminated by ','"
       };
   ExportToMySQLDB exportToMySQLDB = new ExportToMySQLDB();
   Configuration conf = new Configuration();
   exportToMySQLDB.populateConfiguration(args, conf);
   exportToMySQLDB.checkMandatoryConfs(conf);
 }
Пример #2
0
 @Test(expected = HIHOException.class)
 public void testCheckMandatoryConfsForQuerySuffix() throws HIHOException {
   String[] args =
       new String[] {
         "-inputPath",
         "input",
         "-url",
         "jdbc:mysql://localhost:3306/hiho",
         "-userName",
         "username",
         "-password",
         "passwd",
         "-querySuffix"
       };
   ExportToMySQLDB exportToMySQLDB = new ExportToMySQLDB();
   Configuration conf = new Configuration();
   exportToMySQLDB.populateConfiguration(args, conf);
   exportToMySQLDB.checkMandatoryConfs(conf);
 }
Пример #3
0
 @Test
 public void testCheckMandatoryConfsValidValues() throws HIHOException {
   String[] args =
       new String[] {
         "-inputPath",
         "input",
         "-url",
         "jdbc:mysql://localhost:3306/hiho",
         "-userName",
         "root",
         "-password",
         "newpwd",
         "-querySuffix",
         "mrTest fields terminated by ','"
       };
   ExportToMySQLDB exportToMySQLDB = new ExportToMySQLDB();
   Configuration conf = new Configuration();
   exportToMySQLDB.populateConfiguration(args, conf);
   exportToMySQLDB.checkMandatoryConfs(conf);
 }