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

Examples of org.apache.accumulo.core.client.impl.TabletLocator.invalidateCache()


              opTimer = new OpTimer(log, Level.TRACE).start("Splitting tablet " + tl.tablet_extent + " on " + tl.tablet_location + " at " + split);
           
            client.splitTablet(null, credentials, tl.tablet_extent.toThrift(), TextUtil.getByteBuffer(split));
           
            // just split it, might as well invalidate it in the cache
            tabLocator.invalidateCache(tl.tablet_extent);
           
            if (opTimer != null)
              opTimer.stop("Split tablet in %DURATION%");
          } finally {
            ThriftUtil.returnClient((TServiceClient) client);
View Full Code Here


          }
         
        } catch (TApplicationException tae) {
          throw new AccumuloServerException(tl.tablet_location, tae);
        } catch (TTransportException e) {
          tabLocator.invalidateCache(tl.tablet_location);
          continue;
        } catch (ThriftSecurityException e) {
          Tables.clearCache(instance);
          if (!Tables.exists(instance, tableId))
            throw new TableNotFoundException(tableId, tableName, null);
View Full Code Here

          Tables.clearCache(instance);
          if (!Tables.exists(instance, tableId))
            throw new TableNotFoundException(tableId, tableName, null);
          throw new AccumuloSecurityException(e.user, e.code, e);
        } catch (NotServingTabletException e) {
          tabLocator.invalidateCache(tl.tablet_extent);
          continue;
        } catch (TException e) {
          tabLocator.invalidateCache(tl.tablet_location);
          continue;
        }
View Full Code Here

          throw new AccumuloSecurityException(e.user, e.code, e);
        } catch (NotServingTabletException e) {
          tabLocator.invalidateCache(tl.tablet_extent);
          continue;
        } catch (TException e) {
          tabLocator.invalidateCache(tl.tablet_location);
          continue;
        }
       
        successful = true;
      }
View Full Code Here

   *           if table does not exist
   */
  public void clearLocatorCache(String tableName) throws TableNotFoundException {
    ArgumentChecker.notNull(tableName);
    TabletLocator tabLocator = TabletLocator.getInstance(instance, credentials, new Text(Tables.getTableId(instance, tableName)));
    tabLocator.invalidateCache();
  }
 
  /**
   * Get a mapping of table name to internal table id.
   *
 
View Full Code Here

     
      for (Entry<Path,List<KeyExtent>> entry : assignmentFailures.entrySet())
        failureCount.put(entry.getKey(), 1);
     
      while (assignmentFailures.size() > 0) {
        locator.invalidateCache();
        // assumption about assignment failures is that it caused by a split
        // happening or a missing location
        //
        // for splits we need to find children key extents that cover the
        // same key range and are contiguous (no holes, no overlap)
View Full Code Here

      printReport();
      return assignmentStats;
    } finally {
      if (client != null)
        ServerClient.close(client);
      locator.invalidateCache();
    }
  }
 
  private void printReport() {
    long totalTime = 0;
View Full Code Here

            instance,
            tableName,
            tableId);
        // its possible that the cache could contain complete, but
        // old information about a tables tablets... so clear it
        tl.invalidateCache();
        final String instanceId = instance.getInstanceID();
        final List<Range> rangeList = new ArrayList<Range>(
            ranges);
        int count = 0;
        while (!binRanges(
View Full Code Here

          count++;
          tserverBinnedRanges.clear();
          LOGGER.warn("Unable to locate bins for specified ranges. Retrying.");
          UtilWaitThread.sleep(100 + (int) (Math.random() * 100));
          // sleep randomly between 100 and 200 ms
          tl.invalidateCache();
        }
      }
      catch (final Exception e) {
        throw new IOException(
            e);
View Full Code Here

              opTimer = new OpTimer(log, Level.TRACE).start("Splitting tablet " + tl.tablet_extent + " on " + tl.tablet_location + " at " + split);
           
            client.splitTablet(null, credentials, tl.tablet_extent.toThrift(), TextUtil.getByteBuffer(split));
           
            // just split it, might as well invalidate it in the cache
            tabLocator.invalidateCache(tl.tablet_extent);
           
            if (opTimer != null)
              opTimer.stop("Split tablet in %DURATION%");
          } finally {
            ThriftUtil.returnClient((TServiceClient) client);
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.