Examples of instanceOperations()


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

   
    File jarFile = File.createTempFile("iterator", ".jar");
    FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile);
    jarFile.deleteOnExit();
   
    conn.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1", jarFile.toURI().toString());
    conn.tableOperations().setProperty("table2", Property.TABLE_CLASSPATH.getKey(), "cx1");
    conn.tableOperations().attachIterator("table2", new IteratorSetting(100, "foocensor", "org.apache.accumulo.test.FooFilter"));
   
    BatchWriter bw = conn.createBatchWriter("table2", new BatchWriterConfig());
   
View Full Code Here

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

      count++;
    }
   
    Assert.assertEquals(2, count);
   
    conn.instanceOperations().removeProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1");
    conn.tableOperations().delete("table2");
   
  }
 
  @AfterClass
View Full Code Here

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

  @Test(timeout = 20000)
  public void testMultipleTabletServersRunning() throws AccumuloException, AccumuloSecurityException {
   
    Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", "superSecret".getBytes());
   
    while (conn.instanceOperations().getTabletServers().size() != 2) {
      UtilWaitThread.sleep(500);
    }
  }
 
  @AfterClass
View Full Code Here

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

        throw new IOException("Unable to access table");

      if (!usesLocalIterators(conf)) {
        // validate that any scan-time iterators can be loaded by the the tablet servers
        for (AccumuloIterator iter : getIterators(conf)) {
          if (!c.instanceOperations().testClassLoad(iter.getIteratorClass(), SortedKeyValueIterator.class.getName()))
            throw new AccumuloException("Servers are unable to load " + iter.getIteratorClass() + " as a " + SortedKeyValueIterator.class.getName());
        }
      }

    } catch (AccumuloException e) {
View Full Code Here

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

   
    File jarFile = File.createTempFile("iterator", ".jar");
    FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile);
    jarFile.deleteOnExit();
   
    conn.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1", jarFile.toURI().toString());
    conn.tableOperations().setProperty("table2", Property.TABLE_CLASSPATH.getKey(), "cx1");
    conn.tableOperations().attachIterator("table2", new IteratorSetting(100, "foocensor", "org.apache.accumulo.test.FooFilter"));
   
    BatchWriter bw = conn.createBatchWriter("table2", new BatchWriterConfig());
   
View Full Code Here

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

      count++;
    }
   
    Assert.assertEquals(2, count);
   
    conn.instanceOperations().removeProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1");
    conn.tableOperations().delete("table2");
   
  }
 
  @AfterClass
View Full Code Here

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

    c.tableOperations().setProperty("test_ingest", Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
    c.tableOperations().create("unused");
    TreeSet<Text> splits = TestIngest.getSplitPoints(0, 10000000, 2000);
    log.info("Creating " + splits.size() + " splits");
    c.tableOperations().addSplits("unused", splits);
    List<String> tservers = c.instanceOperations().getTabletServers();
    TestIngest.Opts opts = new TestIngest.Opts();
    opts.rows = 200000;
    TestIngest.ingest(c, opts, new BatchWriterOpts());
    c.tableOperations().flush("test_ingest", null, null, false);
    UtilWaitThread.sleep(45 * 1000);
 
View Full Code Here

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

  public String test(int seconds, boolean expectTserverDied) throws Exception {
    if (!makeDiskFailureLibrary())
      return null;
    Connector c = getConnector();
    assertEquals(1, c.instanceOperations().getTabletServers().size());

    // create our own tablet server with the special test library
    String javaHome = System.getProperty("java.home");
    String javaBin = javaHome + File.separator + "bin" + File.separator + "java";
    String classpath = System.getProperty("java.class.path");
View Full Code Here

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

      UtilWaitThread.sleep(1000);
      // don't need the regular tablet server
      cluster.killProcess(ServerType.TABLET_SERVER, cluster.getProcesses().get(ServerType.TABLET_SERVER).iterator().next());
      UtilWaitThread.sleep(1000);
      c.tableOperations().create("test_ingest");
      assertEquals(1, c.instanceOperations().getTabletServers().size());
      int rows = 100 * 1000;
      ingest = cluster.exec(TestIngest.class, "-u", "root", "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-p", ROOT_PASSWORD, "--rows", rows
          + "");
      UtilWaitThread.sleep(500);

View Full Code Here

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

    Thread thread = new Thread() {
      @Override
      public void run() {
        try {
          // ensure the scan is running: not perfect, the metadata tables could be scanned, too.
          String tserver = conn.instanceOperations().getTabletServers().iterator().next();
          do {
            ArrayList<ActiveScan> scans = new ArrayList<ActiveScan>(conn.instanceOperations().getActiveScans(tserver));
            Iterator<ActiveScan> iter = scans.iterator();
            while (iter.hasNext()) {
              ActiveScan scan = iter.next();
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.