Package org.apache.accumulo.core.client.impl.TabletLocator

Examples of org.apache.accumulo.core.client.impl.TabletLocator.TabletLocation


   
  }
 
  public static List<KeyValue> scan(Instance instance, AuthInfo credentials, ScanState scanState, int timeOut, AccumuloConfiguration conf)
      throws ScanTimedOutException, AccumuloException, AccumuloSecurityException, TableNotFoundException {
    TabletLocation loc = null;
   
    long startTime = System.currentTimeMillis();
    String lastError = null;
    String error = null;
    int tooManyFilesCount = 0;
View Full Code Here


   
    if (m.size() == 0)
      throw new IllegalArgumentException("Can not add empty mutations");
   
    while (true) {
      TabletLocation tabLoc = TabletLocator.getInstance(instance, credentials, table).locateTablet(new Text(m.getRow()), false, true);
     
      if (tabLoc == null) {
        log.trace("No tablet location found for row " + new String(m.getRow()));
        UtilWaitThread.sleep(500);
        continue;
View Full Code Here

        if (attempt > 0)
          UtilWaitThread.sleep(100);
       
        attempt++;
       
        TabletLocation tl = tabLocator.locateTablet(split, false, false);
       
        if (tl == null) {
          if (!Tables.exists(instance, tableId))
            throw new TableNotFoundException(tableId, tableName, null);
          else if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
View Full Code Here

  class MockTabletLocator extends TabletLocator {
    int invalidated = 0;
   
    @Override
    public TabletLocation locateTablet(Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
      return new TabletLocation(fakeMetaData.tailSet(new KeyExtent(tableId, row, null)).first(), "localhost");
    }
View Full Code Here

   
    if (m.size() == 0)
      throw new IllegalArgumentException("Can not add empty mutations");
   
    while (true) {
      TabletLocation tabLoc = TabletLocator.getInstance(instance, table).locateTablet(new Text(m.getRow()), false, true, credentials);
     
      if (tabLoc == null) {
        log.trace("No tablet location found for row " + new String(m.getRow()));
        UtilWaitThread.sleep(500);
        continue;
View Full Code Here

   
  }
 
  public static List<KeyValue> scan(Instance instance, TCredentials credentials, ScanState scanState, int timeOut, AccumuloConfiguration conf)
      throws ScanTimedOutException, AccumuloException, AccumuloSecurityException, TableNotFoundException {
    TabletLocation loc = null;
   
    long startTime = System.currentTimeMillis();
    String lastError = null;
    String error = null;
    int tooManyFilesCount = 0;
View Full Code Here

      // System.out.println("results "+results.keySet());
     
      Pair<SortedMap<KeyExtent,Text>,List<KeyExtent>> metadata = MetadataTable.getMetadataLocationEntries(results);
     
      for (Entry<KeyExtent,Text> entry : metadata.getFirst().entrySet()) {
        list.add(new TabletLocation(entry.getKey(), entry.getValue().toString()));
      }
     
      return new TabletLocations(list, metadata.getSecond());
     
    } catch (AccumuloServerException ase) {
View Full Code Here

    }
   
    SortedMap<KeyExtent,Text> metadata = MetadataTable.getMetadataLocationEntries(results).getFirst();
   
    for (Entry<KeyExtent,Text> entry : metadata.entrySet()) {
      list.add(new TabletLocation(entry.getKey(), entry.getValue().toString()));
    }
   
    return list;
  }
View Full Code Here

        if (attempt > 0)
          UtilWaitThread.sleep(100);

        attempt++;

        TabletLocation tl = tabLocator.locateTablet(split, false, false, credentials);

        if (tl == null) {
          if (!Tables.exists(instance, tableId))
            throw new TableNotFoundException(tableId, tableName, null);
          else if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
View Full Code Here

   
    if (m.size() == 0)
      throw new IllegalArgumentException("Can not add empty mutations");
   
    while (true) {
      TabletLocation tabLoc = TabletLocator.getInstance(instance, table).locateTablet(new Text(m.getRow()), false, true, credentials);
     
      if (tabLoc == null) {
        log.trace("No tablet location found for row " + new String(m.getRow(), Constants.UTF8));
        UtilWaitThread.sleep(500);
        continue;
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.impl.TabletLocator.TabletLocation

Copyright © 2018 www.massapicom. 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.