private void setupWithHiveConf(HiveConf conf) throws Exception {
    if (null == miniCluster) {
      String testTmpDir = System.getProperty("test.tmp.dir");
      File tmpDir = new File(testTmpDir, "accumulo");

      if (tmpDir.exists()) {
        FileUtils.deleteDirectory(tmpDir);
      }

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

      miniCluster = new MiniAccumuloCluster(cfg);
      appendZooKeeperConf(EXTRA_ZOOKEEPER_CONFIG, tmpDir);
      miniCluster.start();

      createAccumuloTable(miniCluster.getConnector("root", PASSWORD));
    }

    updateConf(conf);
  }
Start and stop an AccumuloMiniCluster for testing purposes
itests/util/src/main/java/org/apache/hadoop/hive/accumulo/AccumuloTestSetup.java