Examples of importDirectory()


Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

        .wrap(new byte[0]), "foo"));
    TableOperations tableOperations = connector.tableOperations();
    ImportTestFilesAndData testFiles = prepareTestFiles();
    FileSystem fs = testFiles.failurePath.getFileSystem(new Configuration());
    fs.open(testFiles.failurePath.suffix("/something")).close();
    tableOperations.importDirectory("doesnt_exist_table",
        testFiles.importPath.toString(), testFiles.failurePath.toString(),
        false);
  }
 
}
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

    ImportTestFilesAndData dataAndFiles = prepareTestFiles();
    Instance instance = new MockInstance("foo");
    Connector connector = instance.getConnector("user", new PasswordToken(new byte[0]));
    TableOperations tableOperations = connector.tableOperations();
    tableOperations.create("a_table");
    tableOperations.importDirectory("a_table", dataAndFiles.importPath.toString(), dataAndFiles.failurePath.toString(), false);
    Scanner scanner = connector.createScanner("a_table", new Authorizations());
    Iterator<Entry<Key,Value>> iterator = scanner.iterator();
    for (int i = 0; i < 5; i++) {
      Assert.assertTrue(iterator.hasNext());
      Entry<Key,Value> kv = iterator.next();
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

  public void testFailsWithNoTable() throws Throwable {
    Instance instance = new MockInstance("foo");
    Connector connector = instance.getConnector("user", new PasswordToken(new byte[0]));
    TableOperations tableOperations = connector.tableOperations();
    ImportTestFilesAndData testFiles = prepareTestFiles();
    tableOperations.importDirectory("doesnt_exist_table", testFiles.importPath.toString(), testFiles.failurePath.toString(), false);
  }
 
  @Test(expected = IOException.class)
  public void testFailsWithNonEmptyFailureDirectory() throws Throwable {
    Instance instance = new MockInstance("foo");
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

    Connector connector = instance.getConnector("user", new PasswordToken(new byte[0]));
    TableOperations tableOperations = connector.tableOperations();
    ImportTestFilesAndData testFiles = prepareTestFiles();
    FileSystem fs = testFiles.failurePath.getFileSystem(new Configuration());
    fs.open(testFiles.failurePath.suffix("/something")).close();
    tableOperations.importDirectory("doesnt_exist_table", testFiles.importPath.toString(), testFiles.failurePath.toString(), false);
  }
 
  @Test
  public void testDeleteRows() throws Exception {
    Instance instance = new MockInstance("rows");
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

    assertTrue(bulk.mkdirs());
    File err = new File(rootPath() + "/err");
    assertTrue(err.mkdirs());
    File bogus = new File(bulk + "/bogus.rf");
    assertTrue(bogus.createNewFile());
    to.importDirectory(tableName, bulk.toString(), err.toString(), false);
    assertEquals(1, err.list().length);
  }
 

}
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

            fail();
          case 17:
            ops.getProperties(tableName);
            fail();
          case 18:
            ops.importDirectory(tableName, "", "", false);
            fail();
          case 19:
            ops.testClassLoad(tableName, VersioningIterator.class.getName(), SortedKeyValueIterator.class.getName());
            fail();
          case 20:
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

    ImportTestFilesAndData dataAndFiles = prepareTestFiles();
    Instance instance = new MockInstance("foo");
    Connector connector = instance.getConnector("user", new PasswordToken(new byte[0]));
    TableOperations tableOperations = connector.tableOperations();
    tableOperations.create("a_table");
    tableOperations.importDirectory("a_table", dataAndFiles.importPath.toString(), dataAndFiles.failurePath.toString(), false);
    Scanner scanner = connector.createScanner("a_table", new Authorizations());
    Iterator<Entry<Key,Value>> iterator = scanner.iterator();
    for (int i = 0; i < 5; i++) {
      Assert.assertTrue(iterator.hasNext());
      Entry<Key,Value> kv = iterator.next();
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

  public void testFailsWithNoTable() throws Throwable {
    Instance instance = new MockInstance("foo");
    Connector connector = instance.getConnector("user", new PasswordToken(new byte[0]));
    TableOperations tableOperations = connector.tableOperations();
    ImportTestFilesAndData testFiles = prepareTestFiles();
    tableOperations.importDirectory("doesnt_exist_table", testFiles.importPath.toString(), testFiles.failurePath.toString(), false);
  }

  @Test(expected = IOException.class)
  public void testFailsWithNonEmptyFailureDirectory() throws Throwable {
    Instance instance = new MockInstance("foo");
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.importDirectory()

    Connector connector = instance.getConnector("user", new PasswordToken(new byte[0]));
    TableOperations tableOperations = connector.tableOperations();
    ImportTestFilesAndData testFiles = prepareTestFiles();
    FileSystem fs = testFiles.failurePath.getFileSystem(new Configuration());
    fs.open(testFiles.failurePath.suffix("/something")).close();
    tableOperations.importDirectory("doesnt_exist_table", testFiles.importPath.toString(), testFiles.failurePath.toString(), false);
  }

  @Test
  public void testDeleteRows() throws Exception {
    Instance instance = new MockInstance("rows");
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.