Tabnine Logo
Scanner.setTimeout
Code IndexAdd Tabnine to your IDE (free)

How to use
setTimeout
method
in
org.apache.accumulo.core.client.Scanner

Best Java code snippets using org.apache.accumulo.core.client.Scanner.setTimeout (Showing top 11 results out of 315)

origin: apache/accumulo

private Iterator<Entry<Key,Value>> getIter2() {
 if (iter2 == null) {
  try {
   if ((table == null || !isMeta(table)) && iter1Count == 0) {
    Scanner scanner = context.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
    scanner.setTimeout(3, TimeUnit.SECONDS);
    if (table == null) {
     scanner.setRange(new Range(new Text("~err_"), false, new Text("~err`"), false));
    } else {
     scanner.setRange(new Range(new Text("~err_" + table)));
    }
    iter2 = scanner.iterator();
   } else {
    Map<Key,Value> m = Collections.emptyMap();
    iter2 = m.entrySet().iterator();
   }
  } catch (Exception e) {
   throw new RuntimeException(e);
  }
 }
 return iter2;
}
origin: apache/accumulo

private Iterator<Entry<Key,Value>> newIterator(Range r) {
 synchronized (scanner) {
  scanner.enableIsolation();
  scanner.setBatchSize(batchSize);
  scanner.setTimeout(timeout, TimeUnit.MILLISECONDS);
  scanner.setRange(r);
  scanner.setReadaheadThreshold(readaheadThreshold);
  setOptions((ScannerOptions) scanner, opts);
  return scanner.iterator();
  // return new FaultyIterator(scanner.iterator());
 }
}
origin: apache/accumulo

@Override
public Iterator<Entry<Key,Value>> iterator() {
 smi.scanner.setBatchSize(size);
 smi.scanner.setTimeout(timeOut, TimeUnit.MILLISECONDS);
 smi.scanner.setBatchTimeout(batchTimeOut, TimeUnit.MILLISECONDS);
 smi.scanner.setReadaheadThreshold(readaheadThreshold);
origin: apache/accumulo

scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS);
origin: apache/accumulo

@Override
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState)
  throws Exception {
 final String tableName = OptUtil.getTableOpt(cl, shellState);
 final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
 // handle first argument, if present, the authorizations list to
 // scan with
 final Authorizations auths = getAuths(cl, shellState);
 final Scanner scanner = shellState.getAccumuloClient().createScanner(tableName, auths);
 scanner.addScanIterator(
   new IteratorSetting(Integer.MAX_VALUE, "NOVALUE", SortedKeyIterator.class));
 // handle session-specific scan iterators
 addScanIterators(shellState, cl, scanner, tableName);
 // handle remaining optional arguments
 scanner.setRange(getRange(cl, interpeter));
 scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS);
 // handle columns
 fetchColumns(cl, scanner, interpeter);
 // output / delete the records
 final BatchWriter writer = shellState.getAccumuloClient().createBatchWriter(tableName,
   new BatchWriterConfig().setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS));
 FormatterConfig config = new FormatterConfig();
 config.setPrintTimestamps(cl.hasOption(timestampOpt.getOpt()));
 shellState.printLines(
   new DeleterFormatter(writer, scanner, config, shellState, cl.hasOption(forceOpt.getOpt())),
   false);
 return 0;
}
origin: org.apache.accumulo/accumulo-server-base

private Iterator<Entry<Key,Value>> getIter2() {
 if (iter2 == null) {
  try {
   if ((table == null || !isMeta(table)) && iter1Count == 0) {
    Connector connector = context.getConnector();
    Scanner scanner = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
    scanner.setTimeout(3, TimeUnit.SECONDS);
    if (table == null) {
     scanner.setRange(new Range(new Text("~err_"), false, new Text("~err`"), false));
    } else {
     scanner.setRange(new Range(new Text("~err_" + table)));
    }
    iter2 = scanner.iterator();
   } else {
    Map<Key,Value> m = Collections.emptyMap();
    iter2 = m.entrySet().iterator();
   }
  } catch (Exception e) {
   throw new RuntimeException(e);
  }
 }
 return iter2;
}
origin: org.apache.accumulo/accumulo-server

private Iterator<Entry<Key,Value>> getIter2() {
 if (iter2 == null) {
  try {
   if ((table == null || !table.equals(Constants.METADATA_TABLE_ID)) && iter1Count == 0) {
    Connector connector = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemPrincipal(), SecurityConstants.getSystemToken());
    Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
    scanner.setTimeout(3, TimeUnit.SECONDS);
    if (table == null) {
     scanner.setRange(new Range(new Text("~err_"), false, new Text("~err`"), false));
    } else {
     scanner.setRange(new Range(new Text("~err_" + table)));
    }
    iter2 = scanner.iterator();
   } else {
    Map<Key,Value> m = Collections.emptyMap();
    iter2 = m.entrySet().iterator();
   }
  } catch (Exception e) {
   throw new RuntimeException(e);
  }
 }
 return iter2;
}
origin: org.apache.accumulo/accumulo-core

private Iterator<Entry<Key,Value>> newIterator(Range r) {
 synchronized (scanner) {
  scanner.enableIsolation();
  scanner.setBatchSize(batchSize);
  scanner.setTimeout(timeout, TimeUnit.MILLISECONDS);
  scanner.setRange(r);
  scanner.setReadaheadThreshold(readaheadThreshold);
  setOptions((ScannerOptions) scanner, opts);
  return scanner.iterator();
  // return new FaultyIterator(scanner.iterator());
 }
}
origin: org.apache.accumulo/accumulo-core

@Override
public Iterator<Entry<Key,Value>> iterator() {
 smi.scanner.setBatchSize(size);
 smi.scanner.setTimeout(timeOut, TimeUnit.MILLISECONDS);
 smi.scanner.setBatchTimeout(batchTimeOut, TimeUnit.MILLISECONDS);
 smi.scanner.setReadaheadThreshold(readaheadThreshold);
origin: org.apache.accumulo/accumulo-shell

scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS);
origin: org.apache.accumulo/accumulo-shell

@Override
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState)
  throws Exception {
 final String tableName = OptUtil.getTableOpt(cl, shellState);
 final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
 // handle first argument, if present, the authorizations list to
 // scan with
 final Authorizations auths = getAuths(cl, shellState);
 final Scanner scanner = shellState.getConnector().createScanner(tableName, auths);
 scanner.addScanIterator(
   new IteratorSetting(Integer.MAX_VALUE, "NOVALUE", SortedKeyIterator.class));
 // handle session-specific scan iterators
 addScanIterators(shellState, cl, scanner, tableName);
 // handle remaining optional arguments
 scanner.setRange(getRange(cl, interpeter));
 scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS);
 // handle columns
 fetchColumns(cl, scanner, interpeter);
 // output / delete the records
 final BatchWriter writer = shellState.getConnector().createBatchWriter(tableName,
   new BatchWriterConfig().setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS));
 FormatterConfig config = new FormatterConfig();
 config.setPrintTimestamps(cl.hasOption(timestampOpt.getOpt()));
 shellState.printLines(
   new DeleterFormatter(writer, scanner, config, shellState, cl.hasOption(forceOpt.getOpt())),
   false);
 return 0;
}
org.apache.accumulo.core.clientScannersetTimeout

Popular methods of Scanner

  • setRange
    Sets the range of keys to scan over.
  • iterator
  • fetchColumnFamily
  • addScanIterator
  • close
  • fetchColumn
  • clearColumns
  • setBatchSize
    Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.
  • clearScanIterators
  • setReadaheadThreshold
    Sets the number of batches of Key/Value pairs returned before the Scanner will begin to prefetch the
  • getRange
    Returns the range of keys to scan over.
  • enableIsolation
    Enables row isolation. Writes that occur to a row after a scan of that row has begun will not be see
  • getRange,
  • enableIsolation,
  • getBatchSize,
  • setBatchTimeout,
  • setClassLoaderContext,
  • setSamplerConfiguration,
  • clearClassLoaderContext,
  • clearSamplerConfiguration,
  • disableIsolation

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • compareTo (BigDecimal)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Option (scala)
  • CodeWhisperer alternatives
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