Package org.apache.accumulo.minicluster

Examples of org.apache.accumulo.minicluster.MiniAccumuloCluster


      File tmpDir = new File(testTmpDir, "accumulo");

      MiniAccumuloConfig cfg = new MiniAccumuloConfig(tmpDir, PASSWORD);
      cfg.setNumTservers(1);

      miniCluster = new MiniAccumuloCluster(cfg);

      miniCluster.start();

      createAccumuloTable(miniCluster.getConnector("root", PASSWORD));
    }
View Full Code Here


  @BeforeClass
  public static void startUp() throws IOException, AccumuloException, AccumuloSecurityException, TTransportException, InterruptedException {
    tableCounter = new AtomicInteger(0);
    tempFolder.create();
    accumuloCluster = new MiniAccumuloCluster(tempFolder.getRoot(), ROOT_PASS);

    accumuloCluster.start();

    connector = accumuloCluster.getConnector(ROOT, ROOT_PASS);
  }
View Full Code Here

    }
   
    if (useMini) {
      log.info("Creating mini cluster");
      final File folder = Files.createTempDir();
      final MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder, "secret");
      accumulo.start();
      opts.prop.setProperty("instance", accumulo.getConfig().getInstanceName());
      opts.prop.setProperty("zookeepers", accumulo.getZooKeepers());
      Runtime.getRuntime().addShutdownHook(new Thread() {
        public void start() {
          try {
            accumulo.stop();
          } catch (Exception e) {
            throw new RuntimeException();
          } finally {
            if (!folder.delete())
              log.warn("Unexpected error removing " + folder);
View Full Code Here

  public static AccumuloCluster create(AccumuloConfig cfg) throws IOException {
    return cfg.build();
  }

  public static MiniAccumuloCluster createMiniCluster(MiniAccumuloConfig cfg) throws IOException {
    return new MiniAccumuloCluster(cfg);
  }
View Full Code Here

  @BeforeClass
  public static void setupMiniCluster() throws Exception {
    FileUtils.deleteQuietly(macTestFolder);
    macTestFolder.mkdirs();
    MiniAccumuloConfig config = new MiniAccumuloConfig(macTestFolder, secret).setNumTservers(1);
    accumulo = new MiniAccumuloCluster(config);
    accumulo.start();
    // wait for accumulo to be up and functional
    ZooKeeperInstance zoo = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers());
    Connector c = zoo.getConnector("root", new PasswordToken(secret.getBytes()));
    for (@SuppressWarnings("unused") Entry<org.apache.accumulo.core.data.Key,Value> entry : c.createScanner(MetadataTable.NAME, Authorizations.EMPTY))
View Full Code Here

    folder.create();

    Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);

    accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");

    accumulo.start();

  }
View Full Code Here

        tempDir.deleteOnExit();
        final MiniAccumuloConfig config = new MiniAccumuloConfig(
            tempDir,
            DEFAULT_MINI_ACCUMULO_PASSWORD);
        config.setNumTservers(2);
        miniAccumulo = new MiniAccumuloCluster(
            config);
        if (SystemUtils.IS_OS_WINDOWS && isYarn()) {
          // this must happen after instantiating Mini Accumulo
          // Cluster because it ensures the accumulo directory is
          // empty or it will fail, but must happen before the cluster
View Full Code Here

TOP

Related Classes of org.apache.accumulo.minicluster.MiniAccumuloCluster

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.