Package eu.stratosphere.client.CliFrontendTestUtils

Examples of eu.stratosphere.client.CliFrontendTestUtils.TestingCliFrontend


  public void testInvalidConfig() {
    try {
      String[] arguments = {};
      CommandLine line = new PosixParser().parse(CliFrontend.getJobManagerAddressOption(new Options()), arguments, false);
       
      TestingCliFrontend frontend = new TestingCliFrontend(CliFrontendTestUtils.getInvalidConfigDir());
     
      assertTrue(frontend.getJobManagerAddress(line) == null);
    }
    catch (Exception e) {
      System.err.println(e.getMessage());
      e.printStackTrace();
      fail("Program caused an exception: " + e.getMessage());
View Full Code Here


  public void testValidConfig() {
    try {
      String[] arguments = {};
      CommandLine line = new PosixParser().parse(CliFrontend.getJobManagerAddressOption(new Options()), arguments, false);
       
      TestingCliFrontend frontend = new TestingCliFrontend(CliFrontendTestUtils.getConfigDir());
     
      InetSocketAddress address = frontend.getJobManagerAddress(line);
     
      assertNotNull(address);
      assertEquals(CliFrontendTestUtils.TEST_JOB_MANAGER_ADDRESS, address.getAddress().getHostAddress());
      assertEquals(CliFrontendTestUtils.TEST_JOB_MANAGER_PORT, address.getPort());
    }
View Full Code Here

  public void testYarnConfig() {
    try {
      String[] arguments = {};
      CommandLine line = new PosixParser().parse(CliFrontend.getJobManagerAddressOption(new Options()), arguments, false);
       
      TestingCliFrontend frontend = new TestingCliFrontend(CliFrontendTestUtils.getConfigDirWithYarnFile());
     
      InetSocketAddress address = frontend.getJobManagerAddress(line);
     
      assertNotNull(address);
      assertEquals(CliFrontendTestUtils.TEST_YARN_JOB_MANAGER_ADDRESS, address.getAddress().getHostAddress());
      assertEquals(CliFrontendTestUtils.TEST_YARN_JOB_MANAGER_PORT, address.getPort());
    }
View Full Code Here

  public void testInvalidYarnConfig() {
    try {
      String[] arguments = {};
      CommandLine line = new PosixParser().parse(CliFrontend.getJobManagerAddressOption(new Options()), arguments, false);
       
      TestingCliFrontend frontend = new TestingCliFrontend(CliFrontendTestUtils.getConfigDirWithInvalidYarnFile());
     
      assertTrue(frontend.getJobManagerAddress(line) == null);
    }
    catch (Exception e) {
      System.err.println(e.getMessage());
      e.printStackTrace();
      fail("Program caused an exception: " + e.getMessage());
View Full Code Here

  public void testManualOptionsOverridesConfig() {
    try {
      String[] arguments = {"-m", "10.221.130.22:7788"};
      CommandLine line = new PosixParser().parse(CliFrontend.getJobManagerAddressOption(new Options()), arguments, false);
       
      TestingCliFrontend frontend = new TestingCliFrontend(CliFrontendTestUtils.getConfigDir());
     
      InetSocketAddress address = frontend.getJobManagerAddress(line);
     
      assertNotNull(address);
      assertEquals("10.221.130.22", address.getAddress().getHostAddress());
      assertEquals(7788, address.getPort());
    }
View Full Code Here

  public void testManualOptionsOverridesYarn() {
    try {
      String[] arguments = {"-m", "10.221.130.22:7788"};
      CommandLine line = new PosixParser().parse(CliFrontend.getJobManagerAddressOption(new Options()), arguments, false);
       
      TestingCliFrontend frontend = new TestingCliFrontend(CliFrontendTestUtils.getConfigDirWithYarnFile());
     
      InetSocketAddress address = frontend.getJobManagerAddress(line);
     
      assertNotNull(address);
      assertEquals("10.221.130.22", address.getAddress().getHostAddress());
      assertEquals(7788, address.getPort());
    }
View Full Code Here

TOP

Related Classes of eu.stratosphere.client.CliFrontendTestUtils.TestingCliFrontend

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.