Package org.kiji.schema.avro

Examples of org.kiji.schema.avro.ColumnDesc


        /** Columns with no ID assigned yet. */
        final List<ColumnLayout> unassigned = Lists.newArrayList();

        final Iterator<ColumnDesc> itColumnDesc = familyDesc.getColumns().iterator();
        while (itColumnDesc.hasNext()) {
          final ColumnDesc columnDesc = itColumnDesc.next();
          final boolean isRename = (columnDesc.getRenamedFrom() != null);
          final String refCName = isRename ? columnDesc.getRenamedFrom() : columnDesc.getName();
          columnDesc.setRenamedFrom(null);
          if (isRename && (reference == null)) {
            throw new InvalidLayoutException(String.format(
                "Invalid renaming: cannot find reference family for column '%s:%s'.",
                getName(), refCName));
          }
          final ColumnLayout refCLayout =
              (reference != null) ? reference.getColumnMap().get(refCName) : null;
          if (isRename && (refCLayout == null)) {
            throw new InvalidLayoutException(String.format(
                "Invalid renaming: cannot find column '%s:%s' in reference family.",
                getName(), refCName));
          }

          final ColumnId refCId = refCIdMap.remove(refCName);

          if (columnDesc.getDelete()) {
            if (refCId == null) {
              throw new InvalidLayoutException(String.format(
                  "Deleted column '%s:%s' does not exist in reference layout.",
                  mDesc.getName(), refCName));
            }
View Full Code Here

TOP

Related Classes of org.kiji.schema.avro.ColumnDesc

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.