Package org.kiji.schema

Examples of org.kiji.schema.NoSuchColumnException


    final String localityGroupName = Bytes.toString(hbaseColumnName.getFamily());

    final LocalityGroupLayout localityGroup = mLayout.getLocalityGroupMap().get(localityGroupName);
    if (localityGroup == null) {
      throw new NoSuchColumnException(String.format("No locality group %s in table %s.",
          localityGroupName, mLayout.getName()));
    }

    // Parse the HBase qualifier as a byte[] in order to save a String instantiation
    final byte[] hbaseQualifier = hbaseColumnName.getQualifier();
    final int index = ArrayUtils.indexOf(hbaseQualifier, SEPARATOR);
    if (index == -1) {
      throw new NoSuchColumnException(String.format(
          "Missing separator in HBase column %s.", hbaseColumnName));
    }
    final String familyName = Bytes.toString(hbaseQualifier, 0, index);
    final String qualifierName =
        Bytes.toString(hbaseQualifier, index + 1, hbaseQualifier.length - index - 1);

    final FamilyLayout family = mLayout.getFamilyMap().get(familyName);
    if (family == null) {
      throw new NoSuchColumnException(String.format(
          "No family %s in locality group %s of table %s.",
          familyName, localityGroupName, mLayout.getName()));
    }

    if (family.isGroupType()) {
      // Group type family.
      if (!family.getColumnMap().containsKey(qualifierName)) {
        throw new NoSuchColumnException(String.format(
            "No qualifier %s in family %s of table %s.",
            qualifierName, familyName, mLayout.getName()));
      }
      final KijiColumnName kijiColumnName = new KijiColumnName(familyName, qualifierName);
      LOG.debug("Translated to Kiji group type column {}.", kijiColumnName);
View Full Code Here


    final String qualifierName = kijiColumnName.getQualifier();

    // Validate the Kiji family
    final FamilyLayout family = mLayout.getFamilyMap().get(familyName);
    if (family == null) {
      throw new NoSuchColumnException(kijiColumnName.toString());
    }

    // Validate the Kiji qualifier
    if (family.isGroupType() && !family.getColumnMap().containsKey(qualifierName)) {
      throw new NoSuchColumnException(kijiColumnName.toString());
    }

    final byte[] localityGroupBytes = Bytes.toBytes(family.getLocalityGroup().getName());
    final byte[] familyBytes = Bytes.toBytes(familyName);
    final byte[] qualifierBytes = Bytes.toBytes(qualifierName);
View Full Code Here

    final FamilyLayout family = mLayout.getFamilyMap().get(familyName);

    // Validate that the family exists
    if (family == null) {
      throw new NoSuchColumnException(String.format("No family %s in layout for table %s.",
          familyName, mLayout.getName()));
    }

    // Validate that the qualifier exists
    final ColumnLayout qualifier = family.getColumnMap().get(qualifierName);
    if (qualifier == null) {
      throw new NoSuchColumnException(String.format("No qualifier %s in family %s of table %s.",
          qualifierName, familyName, mLayout.getName()));
    }

    final KijiColumnName kijiColumnName = new KijiColumnName(familyName, qualifierName);
View Full Code Here

    final String qualifierName = kijiColumnName.getQualifier();

    // Validate that the family exists
    final FamilyLayout family = mLayout.getFamilyMap().get(familyName);
    if (family == null) {
      throw new NoSuchColumnException(String.format("No family %s in table %s.",
          familyName, mLayout.getName()));
    }

    // Validate that the qualifier exists within the layout
    if (!family.getColumnMap().containsKey(qualifierName)) {
      throw new NoSuchColumnException(String.format(
          "No qualifier %s in family %s of table %s.",
          qualifierName, familyName, mLayout.getName()));
    }

    return new HBaseColumnName(
View Full Code Here

        "Cannot delete family while KijiTableWriter %s is in state %s.", this, state);

    final WriterLayoutCapsule capsule = mWriterLayoutCapsule;
    final FamilyLayout familyLayout = capsule.getLayout().getFamilyMap().get(family);
    if (null == familyLayout) {
      throw new NoSuchColumnException(String.format("Family '%s' not found.", family));
    }

    if (familyLayout.getLocalityGroup().getFamilyMap().size() > 1) {
      // There are multiple families within the locality group, so we need to be clever.
      if (familyLayout.isGroupType()) {
View Full Code Here

TOP

Related Classes of org.kiji.schema.NoSuchColumnException

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.