Package org.apache.hadoop.mapred.tools

Examples of org.apache.hadoop.mapred.tools.MRAdmin.run()


    System.out.println(Arrays.toString(str_groups));
    for(int i=0; i<g2.size(); i++) {
      assertEquals("Should be same group ", g1.get(i), g2.get(i));
    }
    // run refresh command
    admin.run(args);
   
    System.out.println("third attempt(after refresh command), should be different:");
    List<String> g3 = groups.getGroups(user);
    g3.toArray(str_groups);
    System.out.println(Arrays.toString(str_groups));
View Full Code Here


    String rsrc = "testRefreshSuperUserGroupsConfiguration_rsrc.xml";
    addNewConfigResource(rsrc, userKeyGroups, "gr2", userKeyHosts, "127.0.0.1")

    MRAdmin admin = new MRAdmin(config);
    String [] args = new String[]{"-refreshSuperUserGroupsConfiguration"};
    admin.run(args);

    try {
      ProxyUsers.authorize(ugi2, "127.0.0.1", config);
      fail("second auth for " + ugi2.getShortUserName() + " should've failed ");
    } catch (AuthorizationException e) {
View Full Code Here

      // Start the mini mr cluster
      mr = new MiniMRCluster(1, "file:///", 1, null, null, conf);

      // Invoke MRAdmin commands
      MRAdmin mrAdmin = new MRAdmin(mr.createJobConf());
      assertEquals(0, mrAdmin.run(new String[] { "-refreshQueueAcls" }));
      assertEquals(0, mrAdmin.run(new String[] { "-refreshNodes" }));
    } finally {
      if (mr != null) {
        mr.shutdown();
      }
View Full Code Here

      mr = new MiniMRCluster(1, "file:///", 1, null, null, conf);

      // Invoke MRAdmin commands
      MRAdmin mrAdmin = new MRAdmin(mr.createJobConf());
      assertEquals(0, mrAdmin.run(new String[] { "-refreshQueueAcls" }));
      assertEquals(0, mrAdmin.run(new String[] { "-refreshNodes" }));
    } finally {
      if (mr != null) {
        mr.shutdown();
      }
    }
View Full Code Here

    System.out.println(Arrays.toString(str_groups));
    for(int i=0; i<g2.size(); i++) {
      assertEquals("Should be same group ", g1.get(i), g2.get(i));
    }
    // run refresh command
    admin.run(args);
   
    System.out.println("third attempt(after refresh command), should be different:");
    List<String> g3 = groups.getGroups(user);
    g3.toArray(str_groups);
    System.out.println(Arrays.toString(str_groups));
View Full Code Here

    String rsrc = "testRefreshSuperUserGroupsConfiguration_rsrc.xml";
    addNewConfigResource(rsrc, userKeyGroups, "gr2", userKeyHosts, "127.0.0.1")

    MRAdmin admin = new MRAdmin(config);
    String [] args = new String[]{"-refreshSuperUserGroupsConfiguration"};
    admin.run(args);

    try {
      ProxyUsers.authorize(ugi2, "127.0.0.1", config);
      fail("second auth for " + ugi2.getShortUserName() + " should've failed ");
    } catch (AuthorizationException e) {
View Full Code Here

    System.out.println(Arrays.toString(str_groups));
    for(int i=0; i<g2.size(); i++) {
      assertEquals("Should be same group ", g1.get(i), g2.get(i));
    }
    // run refresh command
    admin.run(args);
   
    System.out.println("third attempt(after refresh command), should be different:");
    List<String> g3 = groups.getGroups(user);
    g3.toArray(str_groups);
    System.out.println(Arrays.toString(str_groups));
View Full Code Here

    checkForConfigFile();
    Document doc = createDocument();
    createSimpleDocumentWithAcls(doc, "false");
    writeToFile(doc, CONFIG);
    MRAdmin admin = new MRAdmin(miniMRCluster.createJobConf());
    admin.run(new String[] { "-refreshQueues" });

    // submit job to queue p1:p11 by any user not in acls-submit-job
    Job job = submitSleepJob(0, 0, 0, 0, true, "u2,g1", "p1" + NAME_SEPARATOR
        + "p11", conf);
    assertTrue("Job submitted for u2 in queue p1:p11 is not successful.",
View Full Code Here

    checkForConfigFile();
    Document doc = createDocument();
    refreshDocument(doc);
    writeToFile(doc, CONFIG);
    MRAdmin admin = new MRAdmin(miniMRCluster.createJobConf());
    admin.run(new String[] { "-refreshQueues" });
    try {
      submitSleepJob(10, 10, 100, 100, false, "u1,g1", "p1"
          + NAME_SEPARATOR + "p11", conf);
      fail("user u1 is not in the submit jobs' list");
    } catch (Exception e) {
View Full Code Here

    }
    checkForConfigFile();
    doc = createDocument();
    createSimpleDocumentWithAcls(doc, "true");
    writeToFile(doc, CONFIG);
    admin.run(new String[] { "-refreshQueues" });
  }

  private void refreshDocument(Document doc) {
    Element queues = createQueuesNode(doc, "true");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.