Package org.apache.accumulo.core.util.shell

Examples of org.apache.accumulo.core.util.shell.Shell$DeleteScanIterCommand


      this.cmd = null;
      this.cmdIndex = 0;
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, new OutputStreamWriter(output, Constants.UTF8));
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, Constants.UTF8)));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
          throw new IOException("mock shell config error");
      } else if (shell.config("-u", username, "-p", password)) {
View Full Code Here


  @Before
  public void setupShell() throws Exception {
    // start the shell
    output = new TestOutputStream();
    PrintWriter pw = new PrintWriter(new OutputStreamWriter(output));
    shell = new Shell(new ConsoleReader(new FileInputStream(FileDescriptor.in), new OutputStreamWriter(output)), pw);
    shell.setLogErrorsToConsole();
    shell.config("-u", "root", "-p", secret, "-z", cluster.getInstanceName(), cluster.getZooKeepers());
    exec("quit", true);
    shell.start();
    shell.setExit(false);
View Full Code Here

      this.cmd = null;
      this.cmdIndex = 0;
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, new OutputStreamWriter(output));
      this.shell = new Shell(reader, new PrintWriter(output));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
          throw new IOException("mock shell config error");
      } else if (shell.config("-u", username, "-p", password)) {
View Full Code Here

    TestShell(String rootPass, String instanceName, String zookeepers, String configFile) throws IOException {
      // start the shell
      output = new TestOutputStream();
      input = new StringInputStream();
      PrintWriter pw = new PrintWriter(new OutputStreamWriter(output));
      shell = new Shell(new ConsoleReader(input, output), pw);
      shell.setLogErrorsToConsole();
      shell.config("-u", "root", "-p", rootPass, "-z", instanceName, zookeepers, "--config-file", configFile);
      exec("quit", true);
      shell.start();
      shell.setExit(false);
View Full Code Here

      this.cmd = null;
      this.cmdIndex = 0;
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, output);
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, Constants.UTF8)));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
          throw new IOException("mock shell config error");
      } else if (shell.config("-u", username, "-p", password)) {
View Full Code Here

   
    System.setProperty("HOME", folder.getRoot().getAbsolutePath());
   
    // start the shell
    output = new TestOutputStream();
    shell = new Shell(new ConsoleReader(new FileInputStream(FileDescriptor.in), new OutputStreamWriter(output)));
    shell.setLogErrorsToConsole();
    shell.config("-u", "root", "-p", secret, "-z", cluster.getInstanceName(), cluster.getZooKeepers());
    exec("quit", true);
    shell.start();
    shell.setExit(false);
View Full Code Here

 
  @Before
  public void setupShell() throws Exception {
    // start the shell
    output = new TestOutputStream();
    shell = new Shell(new ConsoleReader(new FileInputStream(FileDescriptor.in), new OutputStreamWriter(output)));
    shell.setLogErrorsToConsole();
    shell.config("-u", "root", "-p", secret, "-z", cluster.getInstanceName(), cluster.getZooKeepers());
    exec("quit", true);
    shell.start();
    shell.setExit(false);
View Full Code Here

      this.cmd = null;
      this.cmdIndex = 0;
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, new OutputStreamWriter(output, Constants.UTF8));
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, Constants.UTF8)));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
          throw new IOException("mock shell config error");
      } else if (shell.config("-u", username, "-p", password)) {
View Full Code Here

    String input = String.format("!1%n"); // Construct a platform dependent new-line
    reader = new ConsoleReader(new ByteArrayInputStream(input.getBytes()), baos);
    reader.setHistory(history);

    shell = new Shell(reader, null);
  }
View Full Code Here

      this.cmd = null;
      this.cmdIndex = 0;
      this.readWait = false;
      this.output = new StringBuilderOutputStream();
      ConsoleReader reader = new ConsoleReader(this, output);
      this.shell = new Shell(reader, new PrintWriter(new OutputStreamWriter(output, Constants.UTF8)));
      shell.setLogErrorsToConsole();
      if (mock != null) {
        if (shell.config("--fake", "-u", username, "-p", password))
          throw new IOException("mock shell config error");
      } else if (shell.config("-u", username, "-p", password)) {
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.util.shell.Shell$DeleteScanIterCommand

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.