/** * * @param dir * An empty or nonexistant temp directoy that Accumulo and Zookeeper can store data in. * Creating the directory is left to the user. Java 7, Guava, and Junit provide methods * for creating temporary directories. * @param rootPassword * Initial root password for instance. */ public MiniAccumuloClusterImpl(File dir, String rootPassword) throws IOException { this(new MiniAccumuloConfigImpl(dir, rootPassword)); }
/** * * @param dir * An empty or nonexistant temp directoy that Accumulo and Zookeeper can store data in. * Creating the directory is left to the user. Java 7, Guava, and Junit provide methods * for creating temporary directories. * @param rootPassword * Initial root password for instance. */ public MiniAccumuloCluster(File dir, String rootPassword) throws IOException { this(new MiniAccumuloConfigImpl(dir, rootPassword)); }
/** * @param dir * An empty or nonexistant directory that Accumulo and Zookeeper can store data in. * Creating the directory is left to the user. Java 7, Guava, and Junit provide methods * for creating temporary directories. * @param rootPassword * The initial password for the Accumulo root user */ public MiniAccumuloConfig(File dir, String rootPassword) { this.impl = new MiniAccumuloConfigImpl(dir, rootPassword); }
private void createMiniAccumulo() throws Exception { // createTestDir will give us a empty directory, we don't need to clean it up ourselves File baseDir = createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName()); MiniAccumuloConfigImpl cfg = new MiniAccumuloConfigImpl(baseDir, ROOT_PASSWORD); String nativePathInDevTree = NativeMapIT.nativeMapLocation().getAbsolutePath(); String nativePathInMapReduce = new File(System.getProperty("user.dir")).toString(); cfg.setNativeLibPaths(nativePathInDevTree, nativePathInMapReduce); cfg.setProperty(Property.GC_FILE_ARCHIVE, Boolean.TRUE.toString()); Configuration coreSite = new Configuration(false); configure(cfg, coreSite); cfg.setProperty(Property.TSERV_NATIVEMAP_ENABLED, Boolean.TRUE.toString()); configureForEnvironment(cfg, getClass(), getSslDir(baseDir)); cluster = new MiniAccumuloClusterImpl(cfg); if (coreSite.size() > 0) { File csFile = new File(cluster.getConfig().getConfDir(), "core-site.xml"); if (csFile.exists()) { coreSite.addResource(new Path(csFile.getAbsolutePath())); } File tmp = new File(csFile.getAbsolutePath() + ".tmp"); OutputStream out = new BufferedOutputStream(new FileOutputStream(tmp)); coreSite.writeXml(out); out.close(); assertTrue(tmp.renameTo(csFile)); } beforeClusterStart(cfg); }
MiniAccumuloConfigImpl cfg = new MiniAccumuloConfigImpl(baseDir, rootPasswd);
new MiniAccumuloConfigImpl(TEMP_DIR, DEFAULT_MINI_ACCUMULO_PASSWORD); config.setZooKeeperPort(Integer.parseInt(zookeeper.split(":")[1])); config.setNumTservers(NUM_TABLET_SERVERS);
FileUtils.deleteQuietly(testDir2); MiniAccumuloConfigImpl macConfig2 = new MiniAccumuloConfigImpl(testDir2, "notused"); macConfig2.useExistingInstance( new File(getCluster().getConfig().getConfDir(), "accumulo-site.xml"), hadoopConfDir);
@Test(timeout = 10 * 60 * 1000) public void dataWasReplicatedToThePeer() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
@Test public void dataWasReplicatedToThePeer() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
FileUtils.deleteQuietly(testDir2); MiniAccumuloConfigImpl macConfig2 = new MiniAccumuloConfigImpl(testDir2, "notused"); macConfig2.useExistingInstance( new File(getCluster().getConfig().getConfDir(), "accumulo-site.xml"), hadoopConfDir);
@Test public void dataWasReplicatedToThePeerWithoutDrain() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
@Test public void dataWasReplicatedToThePeerWithoutDrain() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
@Test public void dataReplicatedToCorrectTable() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
@Test public void dataReplicatedToCorrectTable() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
@Test public void dataReplicatedToCorrectTableWithoutDrain() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
@Test public void dataReplicatedToCorrectTableWithoutDrain() throws Exception { MiniAccumuloConfigImpl peerCfg = new MiniAccumuloConfigImpl( createTestDir(this.getClass().getName() + "_" + this.testName.getMethodName() + "_peer"), ROOT_PASSWORD);
MiniAccumuloClusterImpl master1Cluster; while (true) { master1Cfg = new MiniAccumuloConfigImpl(master1Dir, password); master1Cfg.setNumTservers(1); master1Cfg.setInstanceName("master1"); MiniAccumuloClusterImpl master2Cluster; while (true) { master2Cfg = new MiniAccumuloConfigImpl(master2Dir, password); master2Cfg.setNumTservers(1); master2Cfg.setInstanceName("master2");