Examples of TableDeletedException


Examples of org.apache.accumulo.core.client.TableDeletedException

     
      tl.invalidateCache();
      while (tl.binRanges(Collections.singletonList(createRange(query)), binnedRanges).size() > 0) {
        // TODO log?
        if (!Tables.exists(conn.getInstance(), Tables.getTableId(conn.getInstance(), mapping.tableName)))
          throw new TableDeletedException(Tables.getTableId(conn.getInstance(), mapping.tableName));
        else if (Tables.getTableState(conn.getInstance(), Tables.getTableId(conn.getInstance(), mapping.tableName)) == TableState.OFFLINE)
          throw new TableOfflineException(conn.getInstance(), Tables.getTableId(conn.getInstance(), mapping.tableName));
        UtilWaitThread.sleep(100);
        tl.invalidateCache();
      }
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

            if (tableFailures.size() > 0) {
              failedMutations.add(table, tableFailures);
             
              if (tableFailures.size() == tableMutations.size())
                if (!Tables.exists(instance, entry.getKey()))
                  throw new TableDeletedException(entry.getKey());
                else if (Tables.getTableState(instance, table) == TableState.OFFLINE)
                  throw new TableOfflineException(instance, entry.getKey());
            }
          }
         
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

        tableIds.add(ke.getTableId().toString());
     
      Tables.clearCache(instance);
      for (String tableId : tableIds)
        if (!Tables.exists(instance, tableId))
          throw new TableDeletedException(tableId);
     
      synchronized (this) {
        somethingFailed = true;
        mergeAuthorizationFailures(this.authorizationFailures, authorizationFailures);
        this.notifyAll();
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

        // not work because nothing ever invalidated entries in the tabletLocator cache... so even though
        // the table was deleted the tablet locator entries for the deleted table were not cleared... so
        // need to always do the check when failures occur
        if (failures.size() >= lastFailureSize)
          if (!Tables.exists(instance, table))
            throw new TableDeletedException(table);
          else if (Tables.getTableState(instance, table) == TableState.OFFLINE)
            throw new TableOfflineException(instance, table);
       
        lastFailureSize = failures.size();
       
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

      } catch (AccumuloSecurityException e) {
        log.debug(e.getMessage(), e);
       
        Tables.clearCache(instance);
        if (!Tables.exists(instance, table))
          fatalException = new TableDeletedException(table);
        else
          fatalException = e;
      } catch (Throwable t) {
        if (queryThreadPool.isShutdown())
          log.debug(t.getMessage(), t);
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

    TabletLocator tl = TabletLocator.getInstance(instance, new Text(tableId));
    // its possible that the cache could contain complete, but old information about a tables tablets... so clear it
    tl.invalidateCache();
    while (!tl.binRanges(Collections.singletonList(range), binnedRanges, credentials).isEmpty()) {
      if (!Tables.exists(instance, tableId))
        throw new TableDeletedException(tableId);
      if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
        throw new TableOfflineException(instance, tableId);

      log.warn("Unable to locate bins for specified range. Retrying.");
      // sleep randomly between 100 and 200ms
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

        while (!tl.binRanges(ranges, binnedRanges, new TCredentials(principal, tokenClass, ByteBuffer.wrap(tokenBytes), instance.getInstanceID())).isEmpty()) {
          if (!(instance instanceof MockInstance)) {
            if (tableId == null)
              tableId = Tables.getTableId(instance, tableName);
            if (!Tables.exists(instance, tableId))
              throw new TableDeletedException(tableId);
            if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
              throw new TableOfflineException(instance, tableId);
          }
          binnedRanges.clear();
          log.warn("Unable to locate bins for specified ranges. Retrying.");
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

          Span locateSpan = Trace.start("scan:locateTablet");
          try {
            loc = TabletLocator.getInstance(instance, scanState.tableName).locateTablet(scanState.startRow, scanState.skipStartRow, false, credentials);
            if (loc == null) {
              if (!Tables.exists(instance, scanState.tableName.toString()))
                throw new TableDeletedException(scanState.tableName.toString());
              else if (Tables.getTableState(instance, scanState.tableName.toString()) == TableState.OFFLINE)
                throw new TableOfflineException(instance, scanState.tableName.toString());
             
              error = "Failed to locate tablet for table : " + scanState.tableName + " row : " + scanState.startRow;
              if (!error.equals(lastError))
                log.debug(error);
              else if (log.isTraceEnabled())
                log.trace(error);
              lastError = error;
              UtilWaitThread.sleep(100);
            } else {
              // when a tablet splits we do want to continue scanning the low child
              // of the split if we are already passed it
              Range dataRange = loc.tablet_extent.toDataRange();
             
              if (scanState.range.getStartKey() != null && dataRange.afterEndKey(scanState.range.getStartKey())) {
                // go to the next tablet
                scanState.startRow = loc.tablet_extent.getEndRow();
                scanState.skipStartRow = true;
                loc = null;
              } else if (scanState.range.getEndKey() != null && dataRange.beforeStartKey(scanState.range.getEndKey())) {
                // should not happen
                throw new RuntimeException("Unexpected tablet, extent : " + loc.tablet_extent + "  range : " + scanState.range + " startRow : "
                    + scanState.startRow);
              }
            }
          } catch (AccumuloServerException e) {
            log.debug("Scan failed, server side exception : " + e.getMessage());
            throw e;
          } catch (AccumuloException e) {
            error = "exception from tablet loc " + e.getMessage();
            if (!error.equals(lastError))
              log.debug(error);
            else if (log.isTraceEnabled())
              log.trace(error);
           
            lastError = error;
            UtilWaitThread.sleep(100);
          } finally {
            locateSpan.stop();
          }
        }
       
        Span scanLocation = Trace.start("scan:location");
        scanLocation.data("tserver", loc.tablet_location);
        try {
          results = scan(loc, scanState, conf);
        } catch (AccumuloSecurityException e) {
          Tables.clearCache(instance);
          if (!Tables.exists(instance, scanState.tableName.toString()))
            throw new TableDeletedException(scanState.tableName.toString());
          throw e;
        } catch (TApplicationException tae) {
          throw new AccumuloServerException(loc.tablet_location, tae);
        } catch (NotServingTabletException e) {
          error = "Scan failed, not serving tablet " + loc;
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

        while (!tl.binRanges(ranges, binnedRanges, new TCredentials(principal, tokenClass, ByteBuffer.wrap(tokenBytes), instance.getInstanceID())).isEmpty()) {
          if (!(instance instanceof MockInstance)) {
            if (tableId == null)
              tableId = Tables.getTableId(instance, tableName);
            if (!Tables.exists(instance, tableId))
              throw new TableDeletedException(tableId);
            if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
              throw new TableOfflineException(instance, tableId);
          }
          binnedRanges.clear();
          log.warn("Unable to locate bins for specified ranges. Retrying.");
View Full Code Here

Examples of org.apache.accumulo.core.client.TableDeletedException

        // not work because nothing ever invalidated entries in the tabletLocator cache... so even though
        // the table was deleted the tablet locator entries for the deleted table were not cleared... so
        // need to always do the check when failures occur
        if (failures.size() >= lastFailureSize)
          if (!Tables.exists(instance, table))
            throw new TableDeletedException(table);
          else if (Tables.getTableState(instance, table) == TableState.OFFLINE)
            throw new TableOfflineException(instance, table);
       
        lastFailureSize = failures.size();
       
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.