/** * Return the corresponding mutable family descriptor of the provided column family. * The family descriptor comes from a nested record within the mutable table layout descriptor. * Therefore, mutating this family descriptor effectively mutates the table layout descriptor. * * @param family whole family descriptor to extract * @return the family descriptor * @throws NoSuchColumnException when family not found */ private FamilyDesc getFamilyDesc(final FijiColumnName family) throws NoSuchColumnException { // Traverse through the locality groups to locate family. for (LocalityGroupDesc lgd : mDescBuilder.getLocalityGroups()) { for (FamilyDesc fd : lgd.getFamilies()) { if (fd.getName().equals(family.getFamily())) { return fd; } for (String alias : fd.getAliases()) { if (alias.equals(family.getFamily())) { return fd; } } } } throw new NoSuchColumnException(String.format( "Table '%s' has no family '%s'.", mDescBuilder.getName(), family.getFamily())); } /**
for (final FamilyDesc family : localityGroup.getFamilies()) { if (family.getMapSchema() != null) {
mDesc.setFamilies(Lists.newArrayList(mDesc.getFamilies())); final Iterator<FamilyDesc> itFamilyDesc = lgDesc.getFamilies().iterator(); while (itFamilyDesc.hasNext()) { final FamilyDesc familyDesc = itFamilyDesc.next();
/** * Normalizes the table layout descriptor to use schema UIDs only. * * @param descBuilder Builder for the table layout descriptor to normalize. * @param options Options describing the normalization to apply. * @throws IOException on I/O error. */ private void normalizeTableLayoutDesc(TableLayoutDesc.Builder descBuilder, LayoutOptions options) throws IOException { for (LocalityGroupDesc lgdesc : descBuilder.getLocalityGroups()) { for (FamilyDesc fdesc : lgdesc.getFamilies()) { if (fdesc.getMapSchema() != null) { normalizeCellSchema(fdesc.getMapSchema(), options); } else { for (ColumnDesc cdesc : fdesc.getColumns()) { normalizeCellSchema(cdesc.getColumnSchema(), options); } } } } }