Examples of tableOperations()


Examples of org.apache.accumulo.core.client.Connector.tableOperations()

    }
   
    final boolean flush = true, wait = true;
   
    // Compact the tables to get some rfiles which we can gc
    c.tableOperations().compact(table, null, null, flush, wait);
    c.tableOperations().compact("!METADATA", null, null, flush, wait);
   
    File accumuloDir = new File(tmpDir.getRoot().getAbsolutePath(), "accumulo");
    File tables = new File(accumuloDir.getAbsolutePath(), "tables");
   
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

   
    final boolean flush = true, wait = true;
   
    // Compact the tables to get some rfiles which we can gc
    c.tableOperations().compact(table, null, null, flush, wait);
    c.tableOperations().compact("!METADATA", null, null, flush, wait);
   
    File accumuloDir = new File(tmpDir.getRoot().getAbsolutePath(), "accumulo");
    File tables = new File(accumuloDir.getAbsolutePath(), "tables");
   
    int fileCountAfterCompaction = FileUtils.listFiles(tables, new SuffixFileFilter(".rf"), TrueFileFilter.TRUE).size();
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

 
  @Test
  public void testMap() throws Exception {
    MockInstance mockInstance = new MockInstance(INSTANCE_NAME);
    Connector c = mockInstance.getConnector("root", new PasswordToken(""));
    c.tableOperations().create(TEST_TABLE_1);
    BatchWriter bw = c.createBatchWriter(TEST_TABLE_1, new BatchWriterConfig());
    for (int i = 0; i < 100; i++) {
      Mutation m = new Mutation(new Text(String.format("%09x", i + 1)));
      m.put(new Text(), new Text(), new Value(String.format("%09x", i).getBytes()));
      bw.addMutation(m);
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

      gcSpan.stop();
     
      // we just made a lot of changes to the !METADATA table: flush them out
      try {
        Connector connector = instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials));
        connector.tableOperations().compact(Constants.METADATA_TABLE_NAME, null, null, true, true);
      } catch (Exception e) {
        log.warn(e, e);
      }
     
      Trace.offNoFlush();
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

    boolean isolated = true, localIters = true;
    Level level = Level.WARN;

    Instance inst = new MockInstance(instance);
    Connector connector = inst.getConnector(username, password);
    connector.tableOperations().create(table);

    AccumuloInputFormat.setConnectorInfo(job, username, password);
    AccumuloInputFormat.setInputTableName(job, table);
    AccumuloInputFormat.setScanAuthorizations(job, auths);
    AccumuloInputFormat.setMockInstance(job, instance);
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

    Instance instance = new MockInstance("topstest");
    Connector conn = instance.getConnector("user", new PasswordToken("pass"));
    String t = "tableName1";
   
    {
      conn.tableOperations().create(t, false, TimeType.LOGICAL);
     
      writeVersionable(conn, t, 3);
      assertVersionable(conn, t, 3);
     
      IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

     
      writeVersionable(conn, t, 3);
      assertVersionable(conn, t, 3);
     
      IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
      conn.tableOperations().attachIterator(t, settings);
     
      assertVersionable(conn, t, 1);
     
      conn.tableOperations().delete(t);
    }
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

      IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
      conn.tableOperations().attachIterator(t, settings);
     
      assertVersionable(conn, t, 1);
     
      conn.tableOperations().delete(t);
    }
   
    {
      conn.tableOperations().create(t, true, TimeType.MILLIS);
     
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

     
      conn.tableOperations().delete(t);
    }
   
    {
      conn.tableOperations().create(t, true, TimeType.MILLIS);
     
      try {
        IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
        conn.tableOperations().attachIterator(t, settings);
        Assert.fail();
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.tableOperations()

    {
      conn.tableOperations().create(t, true, TimeType.MILLIS);
     
      try {
        IteratorSetting settings = new IteratorSetting(20, VersioningIterator.class);
        conn.tableOperations().attachIterator(t, settings);
        Assert.fail();
      } catch (AccumuloException ex) {}
     
      writeVersionable(conn, t, 3);
      assertVersionable(conn, t, 1);
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.