return cd.getColumnSchema(); } else { for (String alias : cd.getAliases()) { if (alias.equals(columnName.getQualifier())) { return cd.getColumnSchema();
(null != reference) ? reference.getDesc().getColumnSchema() : null; validateCellSchema(mLayoutVersion, mDesc.getColumnSchema(), referenceSchema);
/** * Reports the raw specification record for the specified column. * * <p> Note: in most cases, you should use {@link #getCellSpec(FijiColumnName)}. </p> * * @param columnName Column to reports the raw specification record of. * @return the raw specification record for the specified column. * @throws NoSuchColumnException if the column does not exist. */ public CellSchema getCellSchema(FijiColumnName columnName) throws NoSuchColumnException { final FamilyLayout fLayout = mFamilyMap.get(columnName.getFamily()); if (fLayout == null) { throw new NoSuchColumnException(String.format( "Table '%s' has no family '%s'.", getName(), columnName.getFamily())); } if (fLayout.isMapType()) { return CellSchema.newBuilder(fLayout.getDesc().getMapSchema()).build(); } // Group-type family: Preconditions.checkArgument(columnName.isFullyQualified(), String.format("Cannot get CellFormat for entire group-type family: '%s'.", columnName)); final FamilyLayout.ColumnLayout cLayout = fLayout.getColumnMap().get(columnName.getQualifier()); if (cLayout == null) { throw new NoSuchColumnException(String.format( "Table '%s' has no column '%s'.", getName(), columnName)); } return CellSchema.newBuilder(cLayout.getDesc().getColumnSchema()).build(); }
if (column.getColumnSchema().getType() == SchemaType.COUNTER) { throw new IllegalArgumentException(String.format( "Fiji Cassandra does not support counter columns."
/** * 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); } } } } }
for (ColumnLayout column : entry.getValue()) { final FijiColumnName colName = FijiColumnName.create(familyName, column.getName()); if (column.getDesc().getColumnSchema().getType() == SchemaType.COUNTER) { final FijiCell<Long> counter = row.getMostRecentCell(colName.getFamily(), colName.getQualifier());
final CellSchema cellSchema = columnLayout.getDesc().getColumnSchema(); (refColumnLayout == null) ? null : refColumnLayout.getDesc().getColumnSchema(); final CellSchema cellSchema = columnLayout.getDesc().getColumnSchema(); incompatabilityMessages.addAll(addColumnNamestoIncompatibilityMessages( flayout.getName(), columnLayout.getName(), validateCellSchema(null, cellSchema)));