Package org.apache.accumulo.core.client

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


  }
 
  private void checkTableExists(Connector connector, String tableName) throws TableNotFoundException {
   
    if (!connector.tableOperations().exists(tableName)) {
      throw new TableNotFoundException(null, tableName, "Not found");
    }
  }
View Full Code Here


  @Deprecated
  @Override
  public void addAggregators(String tableName, List<? extends PerColumnIteratorConfig> aggregators) throws AccumuloSecurityException, TableNotFoundException,
      AccumuloException {
    if (!exists(tableName))
      throw new TableNotFoundException(tableName, tableName, "");
    acu.addAggregators(tableName, aggregators);
  }
View Full Code Here

  }
 
  @Override
  public Collection<Text> getSplits(String tableName) throws TableNotFoundException {
    if (!exists(tableName))
      throw new TableNotFoundException(tableName, tableName, "");
    return Collections.emptyList();
  }
View Full Code Here

  }
 
  @Override
  public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
    if (!exists(tableName))
      throw new TableNotFoundException(tableName, tableName, "");
    acu.tables.remove(tableName);
  }
View Full Code Here

 
  @Override
  public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
      TableExistsException {
    if (!exists(oldTableName))
      throw new TableNotFoundException(oldTableName, oldTableName, "");
    if (exists(newTableName))
      throw new TableExistsException(newTableName, newTableName, "");
    MockTable t = acu.tables.remove(oldTableName);
    acu.tables.put(newTableName, t);
  }
View Full Code Here

  }
 
  @Override
  public Iterable<Entry<String,String>> getProperties(String tableName) throws TableNotFoundException {
    if (!exists(tableName))
      throw new TableNotFoundException(tableName, tableName, "");
    return acu.tables.get(tableName).settings.entrySet();
  }
View Full Code Here

  public void importDirectory(String tableName, String dir, String failureDir, boolean setTime) throws IOException, AccumuloException,
      AccumuloSecurityException, TableNotFoundException {
    long time = System.currentTimeMillis();
    MockTable table = acu.tables.get(tableName);
    if (table == null) {
      throw new TableNotFoundException(null, tableName,
          "The table was not found");
    }
    Path importPath = new Path(dir);
    Path failurePath = new Path(failureDir);
View Full Code Here

  @Override
  public Text getMaxRow(String tableName, Authorizations auths, Text startRow, boolean startInclusive, Text endRow, boolean endInclusive)
      throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
    MockTable table = acu.tables.get(tableName);
    if (table == null)
      throw new TableNotFoundException(tableName, tableName, "no such table");
   
    return FindMax.findMax(new MockScanner(table, auths), startRow, startInclusive, endRow, endInclusive);
  }
View Full Code Here

   * @throws TableNotFoundException
   *           If the table does not exist
   */
  static Scanner createScanner(Connector connector, String table, Authorizations auths) throws TableNotFoundException {
    if (!connector.tableOperations().exists(table)) {
      throw new TableNotFoundException(null, table, "Consult the README and create the table before starting test processes.");
    }
    return connector.createScanner(table, auths);
  }
View Full Code Here

  }

  @Override
  public void addSplits(String tableName, SortedSet<Text> partitionKeys) throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
    if (!exists(tableName))
      throw new TableNotFoundException(tableName, tableName, "");
    acu.addSplits(tableName, partitionKeys);
  }
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.