congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TableOperations.listIterators
Code IndexAdd Tabnine to your IDE (free)

How to use
listIterators
method
in
org.apache.accumulo.core.client.admin.TableOperations

Best Java code snippets using org.apache.accumulo.core.client.admin.TableOperations.listIterators (Showing top 20 results out of 315)

origin: prestodb/presto

public void setIterator(String table, IteratorSetting setting)
{
  try {
    // Remove any existing iterator settings of the same name, if applicable
    Map<String, EnumSet<IteratorScope>> iterators = connector.tableOperations().listIterators(table);
    if (iterators.containsKey(setting.getName())) {
      connector.tableOperations().removeIterator(table, setting.getName(), iterators.get(setting.getName()));
    }
    connector.tableOperations().attachIterator(table, setting);
  }
  catch (AccumuloSecurityException | AccumuloException e) {
    throw new PrestoException(UNEXPECTED_ACCUMULO_ERROR, "Failed to set iterator on table " + table, e);
  }
  catch (TableNotFoundException e) {
    throw new PrestoException(ACCUMULO_TABLE_DNE, "Failed to set iterator, table does not exist", e);
  }
}
origin: apache/accumulo

 .listIterators(OptUtil.getTableOpt(cl, shellState)).containsKey(name)) {
Shell.log.warn("no iterators found that match your criteria");
return 0;
origin: apache/accumulo

} else if (tables) {
 iterators = shellState.getAccumuloClient().tableOperations()
   .listIterators(OptUtil.getTableOpt(cl, shellState));
} else {
 throw new IllegalArgumentException("No table or namespace specified");
origin: apache/accumulo

Map<String,EnumSet<IteratorScope>> iterators = null;
try {
 iterators = tops.listIterators(tableName);
} catch (AccumuloSecurityException | AccumuloException | TableNotFoundException e) {
 throw new RuntimeException(e);
origin: Accla/graphulo

public Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String tableName) throws D4mException
{
  TableOperations tops = this.connector.tableOperations();
  try {
    return tops.listIterators(tableName);
  } catch (AccumuloSecurityException | AccumuloException | TableNotFoundException e) {
    log.warn("",e);
    throw new D4mException(e);
  }
}
origin: NationalSecurityAgency/timely

private void removeAgeOffIterators(Connector con, String tableName) throws Exception {
  Map<String, EnumSet<IteratorScope>> iters = con.tableOperations().listIterators(tableName);
  for (String name : iters.keySet()) {
    if (name.startsWith("ageoff")) {
      con.tableOperations().removeIterator(tableName, name, AGEOFF_SCOPES);
    }
  }
}
origin: org.apache.accumulo/accumulo-proxy

@Override
public Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>> listIterators(
  ByteBuffer login, String tableName) throws org.apache.accumulo.proxy.thrift.AccumuloException,
  org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
  org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
 try {
  Map<String,EnumSet<IteratorScope>> iterMap = getConnector(login).tableOperations()
    .listIterators(tableName);
  Map<String,Set<org.apache.accumulo.proxy.thrift.IteratorScope>> result = new HashMap<>();
  for (Map.Entry<String,EnumSet<IteratorScope>> entry : iterMap.entrySet()) {
   result.put(entry.getKey(), getProxyIteratorScopes(entry.getValue()));
  }
  return result;
 } catch (Exception e) {
  handleExceptionTNF(e);
  return null;
 }
}
origin: org.neolumin.vertexium/vertexium-accumulo

protected static void ensureRowDeletingIteratorIsAttached(Connector connector, String tableName) {
  try {
    synchronized (addIteratorLock) {
      IteratorSetting is = new IteratorSetting(ROW_DELETING_ITERATOR_PRIORITY, ROW_DELETING_ITERATOR_NAME, RowDeletingIterator.class);
      if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
        try {
          connector.tableOperations().attachIterator(tableName, is);
        } catch (Exception ex) {
          // If many processes are starting up at the same time (see YARN). It's possible that there will be a collision.
          final int SLEEP_TIME = 5000;
          LOGGER.warn("Failed to attach RowDeletingIterator. Retrying in " + SLEEP_TIME + "ms.");
          Thread.sleep(SLEEP_TIME);
          if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
            connector.tableOperations().attachIterator(tableName, is);
          }
        }
      }
    }
  } catch (Exception e) {
    throw new VertexiumException("Could not attach RowDeletingIterator", e);
  }
}
origin: org.apache.accumulo/accumulo-test

@Test
public void testCombinerSetOnMetadata() throws Exception {
 TableOperations tops = getConnector().tableOperations();
 Map<String,EnumSet<IteratorScope>> iterators = tops.listIterators(MetadataTable.NAME);
 Assert.assertTrue(iterators.containsKey(ReplicationTableUtil.COMBINER_NAME));
 EnumSet<IteratorScope> scopes = iterators.get(ReplicationTableUtil.COMBINER_NAME);
 Assert.assertEquals(3, scopes.size());
 Assert.assertTrue(scopes.contains(IteratorScope.scan));
 Assert.assertTrue(scopes.contains(IteratorScope.minc));
 Assert.assertTrue(scopes.contains(IteratorScope.majc));
 Iterable<Entry<String,String>> propIter = tops.getProperties(MetadataTable.NAME);
 HashMap<String,String> properties = new HashMap<>();
 for (Entry<String,String> entry : propIter) {
  properties.put(entry.getKey(), entry.getValue());
 }
 for (IteratorScope scope : scopes) {
  String key = Property.TABLE_ITERATOR_PREFIX.getKey() + scope.name() + "."
    + ReplicationTableUtil.COMBINER_NAME + ".opt.columns";
  Assert.assertTrue("Properties did not contain key : " + key, properties.containsKey(key));
  Assert.assertEquals(MetadataSchema.ReplicationSection.COLF.toString(), properties.get(key));
 }
}
origin: lumifyio/securegraph

private static void ensureRowDeletingIteratorIsAttached(Connector connector, String tableName) {
  try {
    synchronized (addIteratorLock) {
      IteratorSetting is = new IteratorSetting(ROW_DELETING_ITERATOR_PRIORITY, ROW_DELETING_ITERATOR_NAME, RowDeletingIterator.class);
      if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
        try {
          connector.tableOperations().attachIterator(tableName, is);
        } catch (Exception ex) {
          // If many processes are starting up at the same time (see YARN). It's possible that there will be a collision.
          final int SLEEP_TIME = 5000;
          LOGGER.warn("Failed to attach RowDeletingIterator. Retrying in " + SLEEP_TIME + "ms.");
          Thread.sleep(SLEEP_TIME);
          if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
            connector.tableOperations().attachIterator(tableName, is);
          }
        }
      }
    }
  } catch (Exception e) {
    throw new SecureGraphException("Could not attach RowDeletingIterator", e);
  }
}
origin: org.apache.accumulo/accumulo-shell

 .listIterators(OptUtil.getTableOpt(cl, shellState)).containsKey(name)) {
Shell.log.warn("no iterators found that match your criteria");
return 0;
origin: org.apache.accumulo/accumulo-shell

} else if (tables) {
 iterators = shellState.getConnector().tableOperations()
   .listIterators(OptUtil.getTableOpt(cl, shellState));
} else {
 throw new IllegalArgumentException("No table or namespace specified");
origin: org.vertexium/vertexium-accumulo

protected static void ensureRowDeletingIteratorIsAttached(Connector connector, String tableName) {
  try {
    synchronized (addIteratorLock) {
      IteratorSetting is = new IteratorSetting(ROW_DELETING_ITERATOR_PRIORITY, ROW_DELETING_ITERATOR_NAME, RowDeletingIterator.class);
      if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
        try {
          connector.tableOperations().attachIterator(tableName, is);
        } catch (Exception ex) {
          // If many processes are starting up at the same time (see YARN). It's possible that there will be a collision.
          final int SLEEP_TIME = 5000;
          LOGGER.warn("Failed to attach RowDeletingIterator. Retrying in %dms.", SLEEP_TIME);
          Thread.sleep(SLEEP_TIME);
          if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
            connector.tableOperations().attachIterator(tableName, is);
          }
        }
      }
    }
  } catch (Exception e) {
    throw new VertexiumException("Could not attach RowDeletingIterator", e);
  }
}
origin: visallo/vertexium

protected static void ensureRowDeletingIteratorIsAttached(Connector connector, String tableName) {
  try {
    synchronized (addIteratorLock) {
      IteratorSetting is = new IteratorSetting(ROW_DELETING_ITERATOR_PRIORITY, ROW_DELETING_ITERATOR_NAME, RowDeletingIterator.class);
      if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
        try {
          connector.tableOperations().attachIterator(tableName, is);
        } catch (Exception ex) {
          // If many processes are starting up at the same time (see YARN). It's possible that there will be a collision.
          final int SLEEP_TIME = 5000;
          LOGGER.warn("Failed to attach RowDeletingIterator. Retrying in %dms.", SLEEP_TIME);
          Thread.sleep(SLEEP_TIME);
          if (!connector.tableOperations().listIterators(tableName).containsKey(ROW_DELETING_ITERATOR_NAME)) {
            connector.tableOperations().attachIterator(tableName, is);
          }
        }
      }
    }
  } catch (Exception e) {
    throw new VertexiumException("Could not attach RowDeletingIterator", e);
  }
}
origin: org.apache.accumulo/accumulo-server-base

Map<String,EnumSet<IteratorScope>> iterators = null;
try {
 iterators = tops.listIterators(tableName);
} catch (AccumuloSecurityException | AccumuloException | TableNotFoundException e) {
 throw new RuntimeException(e);
origin: uk.gov.gchq.gaffer/accumulo-store

/**
 * This method takes a store and the name of an iterator to be
 * removed.
 *
 * @param store        the accumulo store
 * @param iteratorName the name of the iterator update
 * @throws StoreException if any issues occur when updating the iterator
 */
public static void removeIterator(final AccumuloStore store, final String iteratorName) throws StoreException {
  try {
    if (store.getConnection().tableOperations().listIterators(store.getTableName()).containsKey(iteratorName)) {
      store.getConnection()
          .tableOperations()
          .removeIterator(store.getTableName(), iteratorName,
              EnumSet.of(IteratorScope.majc, IteratorScope.minc, IteratorScope.scan));
    }
  } catch (final AccumuloSecurityException | AccumuloException | TableNotFoundException | StoreException e) {
    throw new StoreException("Unable remove iterator with Name: " + iteratorName, e);
  }
}
origin: org.apache.accumulo/accumulo-test

 throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
TableOperations tops = getConnector().tableOperations();
Map<String,EnumSet<IteratorScope>> iterators = tops.listIterators(ReplicationTable.NAME);
origin: NationalSecurityAgency/datawave

try {
  if ((iterators != null) && (iterators.length > 0)) {
    final Map<String,EnumSet<IteratorUtil.IteratorScope>> iteratorScopes = tops.listIterators(tableName);
    for (final IteratorConfig iteratorConfig : iterators) {
      boolean mustDelete = false;
origin: org.apache.accumulo/accumulo-test

assertTrue(s.iterator().hasNext());
assertFalse(c.namespaceOperations().listIterators(namespace).containsKey(iterName));
assertFalse(c.tableOperations().listIterators(t1).containsKey(iterName));
assertEquals(setting, setting2);
assertTrue(c.namespaceOperations().listIterators(namespace).containsKey(iterName));
assertTrue(c.tableOperations().listIterators(t1).containsKey(iterName));
s = c.createScanner(t1, Authorizations.EMPTY);
assertFalse(s.iterator().hasNext());
sleepUninterruptibly(2, TimeUnit.SECONDS);
assertFalse(c.namespaceOperations().listIterators(namespace).containsKey(iterName));
assertFalse(c.tableOperations().listIterators(t1).containsKey(iterName));
s = c.createScanner(t1, Authorizations.EMPTY);
assertTrue(s.iterator().hasNext());
origin: org.apache.accumulo/accumulo-test

for (int i = 0; i < 10 && !conn.tableOperations().listIterators(ReplicationTable.NAME).keySet()
  .contains(ReplicationTable.COMBINER_NAME); i++) {
 sleepUninterruptibly(2, TimeUnit.SECONDS);
  .listIterators(ReplicationTable.NAME).keySet().contains(ReplicationTable.COMBINER_NAME));
org.apache.accumulo.core.client.adminTableOperationslistIterators

Javadoc

Get a list of iterators for this table.

Popular methods of TableOperations

  • create
  • exists
    A method to check if a table exists in Accumulo.
  • delete
    Delete a table
  • attachIterator
    Add an iterator to a table on the given scopes.
  • setProperty
    Sets a property on a table. This operation is asynchronous and eventually consistent. Not all tablet
  • addSplits
    Ensures that tablets are split along a set of keys. Note that while the documentation for Text speci
  • list
    Retrieve a list of tables in Accumulo.
  • tableIdMap
    Get a mapping of table name to internal table id.
  • listSplits
  • compact
    Starts a full major compaction of the tablets in the range (start, end]. The compaction is preformed
  • flush
    Flush a table's data that is currently in memory.
  • getProperties
    Gets properties of a table. This operation is asynchronous and eventually consistent. It is not guar
  • flush,
  • getProperties,
  • setLocalityGroups,
  • deleteRows,
  • removeIterator,
  • getIteratorSetting,
  • importDirectory,
  • testClassLoad,
  • getLocalityGroups

Popular in Java

  • Making http post requests using okhttp
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • JButton (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now