Examples of instanceOperations()


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

      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();
              // Remove scans not against our table and not owned by us
              if (!"root".equals(scan.getUser()) || !tableName.equals(scan.getTable())) {
View Full Code Here

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

  protected static void fetchScans() throws Exception {
    if (instance == null)
      return;
    Connector c = instance.getConnector(SystemCredentials.get().getPrincipal(), SystemCredentials.get().getToken());
    for (String server : c.instanceOperations().getTabletServers()) {
      Client tserver = ThriftUtil.getTServerClient(server, Monitor.getSystemConfiguration());
      try {
        List<ActiveScan> scans = tserver.getActiveScans(null, SystemCredentials.get().toThrift(instance));
        synchronized (allScans) {
          allScans.put(server, new ScanStats(scans));
View Full Code Here

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

    conn.tableOperations().create("table2");

    File jarFile = folder.newFile("iterator.jar");
    FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile);

    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");
  }

  @Test(timeout = 10000)
  public void testDebugPorts() {
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()

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

        throw new IllegalArgumentException(opts.directory + " is not writable");
      }
    }
    Connector connector = instance.getConnector(principal, token);
    defaultConfig = AccumuloConfiguration.getDefaultConfiguration();
    siteConfig = connector.instanceOperations().getSiteConfiguration();
    systemConfig = connector.instanceOperations().getSystemConfiguration();
    if (opts.userPermissions) {
      localUsers = Lists.newArrayList(connector.securityOperations().listLocalUsers());
      Collections.sort(localUsers);
    }
View Full Code Here

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

      }
    }
    Connector connector = instance.getConnector(principal, token);
    defaultConfig = AccumuloConfiguration.getDefaultConfiguration();
    siteConfig = connector.instanceOperations().getSiteConfiguration();
    systemConfig = connector.instanceOperations().getSystemConfiguration();
    if (opts.userPermissions) {
      localUsers = Lists.newArrayList(connector.securityOperations().listLocalUsers());
      Collections.sort(localUsers);
    }
    if (opts.allConfiguration) {
View Full Code Here

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

    Connector c = getConnector();
    c.tableOperations().create("test_ingest");
    c.tableOperations().setProperty("test_ingest", Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
    c.tableOperations().create("unused");
    c.tableOperations().addSplits("unused", TestIngest.getSplitPoints(0, 10000000, 2000));
    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(15 * 1000);
 
View Full Code Here

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

  @Test
  public void test() throws Exception {
    final int TABLES = 15;
    Connector c = getConnector();
    c.instanceOperations().setProperty(Property.TSERV_MAJC_MAXCONCURRENT.getKey(), "5");
    TestIngest.Opts opts = new TestIngest.Opts();
    opts.rows = 500 * 1000;
    opts.createTable = true;
    TestIngest.ingest(c, opts, BWOPTS);
    c.tableOperations().flush("test_ingest", null, null, true);
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.