Examples of importDirectory()


Examples of fr.openwide.maven.artifact.notifier.init.util.SpringContextWrapper.importDirectory()

     
      SpringContextWrapper contextWrapper = context.getBean("springContextWrapper",
          SpringContextWrapper.class);
     
      contextWrapper.openEntityManager();
      contextWrapper.importDirectory(new File("src/main/resources/init/development"));
     
      contextWrapper.reindexAll();
     
      LOGGER.info("Initialization complete");
    } finally {
View Full Code Here

Examples of fr.openwide.maven.artifact.notifier.init.util.SpringContextWrapper.importDirectory()

   
      SpringContextWrapper contextWrapper = context.getBean("springContextWrapper",
          SpringContextWrapper.class);
     
      contextWrapper.openEntityManager();
      contextWrapper.importDirectory(new File("src/main/resources/init/production"));
     
      contextWrapper.reindexAll();
     
      LOGGER.info("Initialization complete");
     
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()

    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()

    Instance instance = new MockInstance("foo");
    Connector connector = instance.getConnector(new AuthInfo("user", ByteBuffer
        .wrap(new byte[0]), "foo"));
    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++) {
View Full Code Here

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

    Instance instance = new MockInstance("foo");
    Connector connector = instance.getConnector(new AuthInfo("user", ByteBuffer
        .wrap(new byte[0]), "foo"));
    TableOperations tableOperations = connector.tableOperations();
    ImportTestFilesAndData testFiles = prepareTestFiles();
    tableOperations.importDirectory("doesnt_exist_table",
        testFiles.importPath.toString(), testFiles.failurePath.toString(),
        false);
  }

  @Test(expected = IOException.class)
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.