Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.InvalidFamilyOperationException


  }

  byte [] hasColumnFamily(final HTableDescriptor htd, final byte [] cf)
  throws InvalidFamilyOperationException {
    if (!htd.hasFamily(cf)) {
      throw new InvalidFamilyOperationException("Column family '" +
        Bytes.toString(cf) + "' does not exist");
    }
    return cf;
  }
View Full Code Here


  public TableAddFamilyHandler(byte[] tableName, HColumnDescriptor familyDesc,
      Server server, final MasterServices masterServices) throws IOException {
    super(EventType.C_M_ADD_FAMILY, tableName, server, masterServices);
    HTableDescriptor htd = getTableDescriptor();
    if (htd.hasFamily(familyDesc.getName())) {
      throw new InvalidFamilyOperationException("Family '" +
        familyDesc.getNameAsString() + "' already exists so cannot be added");
    }
    this.familyDesc = familyDesc;
  }
View Full Code Here

  }

  byte [] hasColumnFamily(final HTableDescriptor htd, final byte [] cf)
  throws InvalidFamilyOperationException {
    if (!htd.hasFamily(cf)) {
      throw new InvalidFamilyOperationException("Column family '" +
        Bytes.toString(cf) + "' does not exist");
    }
    return cf;
  }
View Full Code Here

  @Override
  protected void prepareWithTableLock() throws IOException {
    super.prepareWithTableLock();
    HTableDescriptor htd = getTableDescriptor();
    if (htd.hasFamily(familyDesc.getName())) {
      throw new InvalidFamilyOperationException("Family '" +
        familyDesc.getNameAsString() + "' already exists so cannot be added");
    }
  }
View Full Code Here

        + " HCD = " + hcd.toString());

    HTableDescriptor htd = this.services.getTableDescriptors().get(tableName);
    byte [] familyName = hcd.getName();
    if(!htd.hasFamily(familyName)) {
      throw new InvalidFamilyOperationException("Family '" +
        Bytes.toString(familyName) + "' doesn't exists so cannot be modified");
    }
    htd.addFamily(hcd);
    this.services.getTableDescriptors().add(htd);
    return htd;
View Full Code Here

      throws IOException {
    LOG.info("AddColumn. Table = " + tableName + " HCD = " +
      hcd.toString());
    HTableDescriptor htd = this.services.getTableDescriptors().get(tableName);
    if (htd == null) {
      throw new InvalidFamilyOperationException("Family '" +
        hcd.getNameAsString() + "' cannot be modified as HTD is null");
    }
    htd.addFamily(hcd);
    this.services.getTableDescriptors().add(htd);
    return htd;
View Full Code Here

        + " HCD = " + hcd.toString());

    HTableDescriptor htd = this.services.getTableDescriptors().get(tableName);
    byte [] familyName = hcd.getName();
    if(!htd.hasFamily(familyName)) {
      throw new InvalidFamilyOperationException("Family '" +
        Bytes.toString(familyName) + "' doesn't exists so cannot be modified");
    }
    htd.addFamily(hcd);
    this.services.getTableDescriptors().add(htd);
    return htd;
View Full Code Here

      throws IOException {
    LOG.info("AddColumn. Table = " + tableName + " HCD = " +
      hcd.toString());
    HTableDescriptor htd = this.services.getTableDescriptors().get(tableName);
    if (htd == null) {
      throw new InvalidFamilyOperationException("Family '" +
        hcd.getNameAsString() + "' cannot be modified as HTD is null");
    }
    htd.addFamily(hcd);
    this.services.getTableDescriptors().add(htd);
    return htd;
View Full Code Here

  @Override
  protected void handleTableOperation(List<HRegionInfo> regions) throws IOException {
    HTableDescriptor htd = regions.get(0).getTableDesc();
    byte [] familyName = familyDesc.getName();
    if(!htd.hasFamily(familyName)) {
      throw new InvalidFamilyOperationException("Family '" +
        Bytes.toString(familyName) + "' doesn't exists so cannot be modified");
    }
    for(HRegionInfo hri : regions) {
      // Update the HTD
      hri.getTableDesc().addFamily(familyDesc);
View Full Code Here

  protected void handleTableOperation(List<HRegionInfo> hris)
  throws IOException {
    HTableDescriptor htd = hris.get(0).getTableDesc();
    byte [] familyName = familyDesc.getName();
    if(htd.hasFamily(familyName)) {
      throw new InvalidFamilyOperationException(
          "Family '" + Bytes.toString(familyName) + "' already exists so " +
          "cannot be added");
    }
    for(HRegionInfo hri : hris) {
      // Update the HTD
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.InvalidFamilyOperationException

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.