Package org.apache.accumulo.core.client

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


    Class<? extends Formatter> formatter = null;
   
    if (cl.hasOption(tableOpt.getOpt())) {
      tableName = cl.getOptionValue(tableOpt.getOpt());
      if (!shellState.getConnector().tableOperations().exists(tableName))
        throw new TableNotFoundException(null, tableName, null);
     
      // Use the configured formatter unless one was provided
      if (!cl.hasOption(formatterOpt.getOpt())) {
        formatter = FormatterCommand.getCurrentFormatter(tableName, shellState);
      }
View Full Code Here


    Shell.log.warn("select is deprecated, use scan -r <row> -c <columnfamily>[:<columnqualifier>]'");
   
    if (cl.hasOption(tableOpt.getOpt())) {
      tableName = cl.getOptionValue(tableOpt.getOpt());
      if (!shellState.getConnector().tableOperations().exists(tableName))
        throw new TableNotFoundException(null, tableName, null);
    }
   
    else {
      shellState.checkTableState();
      tableName = shellState.getTableName();
View Full Code Here

    String tableName;
   
    if (cl.hasOption(Shell.tableOption)) {
      tableName = cl.getOptionValue(Shell.tableOption);
      if (!shellState.getConnector().tableOperations().exists(tableName)) {
        throw new TableNotFoundException(tableName, tableName, "specified table that doesn't exist");
      }
    } else {
      shellState.checkTableState();
      tableName = shellState.getTableName();
    }
View Full Code Here

        splits.add(new Text(s.getBytes(Shell.CHARSET)));
      }
    }
   
    if (!shellState.getConnector().tableOperations().exists(tableName)) {
      throw new TableNotFoundException(null, tableName, null);
    }
    shellState.getConnector().tableOperations().addSplits(tableName, splits);
   
    return 0;
  }
View Full Code Here

      TableNotFoundException, IOException, ClassNotFoundException {
    reader = shellState.getReader();
   
    final String tableName = cl.getOptionValue(tableOpt.getOpt());
    if (tableName != null && !shellState.getConnector().tableOperations().exists(tableName)) {
      throw new TableNotFoundException(null, tableName, null);
    }
    if (cl.hasOption(deleteOpt.getOpt())) {
      // delete property from table
      String property = cl.getOptionValue(deleteOpt.getOpt());
      if (property.contains("=")) {
View Full Code Here

  @Override
  public synchronized BatchWriter getBatchWriter(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
    ArgumentChecker.notNull(tableName);
    String tableId = Tables.getNameToIdMap(instance).get(tableName);
    if (tableId == null)
      throw new TableNotFoundException(tableId, tableName, null);
   
    if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
      throw new TableOfflineException(instance, tableId);
   
    BatchWriter tbw = tableWriters.get(tableId);
View Full Code Here

    for (String tableName : tableSet) {
      if (!more) {
        break;
      }
      if (!shellState.getConnector().tableOperations().exists(tableName)) {
        throw new TableNotFoundException(null, tableName, null);
      }
      boolean operate = true;
      if (!force) {
        shellState.getReader().flushConsole();
        String line = shellState.getReader().readLine(getName() + " { " + tableName + " } (yes|no)? ");
View Full Code Here

    } catch (ThriftTableOperationException e) {
      switch (e.getType()) {
        case EXISTS:
          throw new TableExistsException(e);
        case NOTFOUND:
          throw new TableNotFoundException(e);
        case OFFLINE:
          throw new TableOfflineException(instance, null);
        case OTHER:
        default:
          throw new AccumuloException(e.description, e);
View Full Code Here

       
        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)
            throw new TableOfflineException(instance, tableId);
          continue;
        }
       
        try {
          TabletClientService.Client client = ThriftUtil.getTServerClient(tl.tablet_location, instance.getConfiguration());
          try {
            OpTimer opTimer = null;
            if (log.isTraceEnabled())
              opTimer = new OpTimer(log, Level.TRACE).start("Splitting tablet " + tl.tablet_extent + " on " + tl.tablet_location + " at " + split);
           
            client.splitTablet(Tracer.traceInfo(), 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(client);
          }
         
        } 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);
          throw new AccumuloSecurityException(e.user, e.code, e);
        } catch (NotServingTabletException e) {
          tabLocator.invalidateCache(tl.tablet_extent);
          continue;
        } catch (TException e) {
View Full Code Here

        break;
      } catch (AccumuloSecurityException ase) {
        throw ase;
      } catch (Throwable t) {
        if (!Tables.exists(instance, tableId)) {
          throw new TableNotFoundException(tableId, tableName, null);
        }

        if (t instanceof RuntimeException && t.getCause() instanceof AccumuloSecurityException) {
          throw (AccumuloSecurityException) t.getCause();
        }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.TableNotFoundException

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.