/** * On set sub comparator. * * @param cfDef * the cf def * @param cfProperties * the cf properties * @param builder * the builder */ private void onSetSubComparator(CfDef cfDef, Properties cfProperties, StringBuilder builder) { String subComparatorType = cfProperties.getProperty(CassandraConstants.SUBCOMPARATOR_TYPE); if (subComparatorType != null && ColumnFamilyType.valueOf(cfDef.getColumn_type()) == ColumnFamilyType.Super) { if (builder != null) { // super column are not supported for composite key as of // now, leaving blank place holder.. } else { cfDef.setSubcomparator_type(subComparatorType); } } }
&& cfDef.getColumn_type().equals(ColumnFamilyType.getInstanceOf(tableInfo.getType()).name())) if (cfDef.getColumn_type().equals(STANDARDCOLUMNFAMILY))
if (cfDef.getColumn_type().equals(ColumnFamilyType.Standard.name())) break; else if (cfDef.getColumn_type().equals(ColumnFamilyType.Super.name()))
Assert.assertEquals("Standard", cfDef.getColumn_type());
Assert.assertTrue(cfDef.getColumn_type().equals("Standard")); Assert.assertTrue(cfDef.getDefault_validation_class().equals(CounterColumnType.class.getName())); count++; Assert.assertTrue(cfDef.getColumn_type().equals("Standard")); Assert.assertTrue(cfDef.getDefault_validation_class().equals(CounterColumnType.class.getName())); count++; Assert.assertTrue(cfDef.getColumn_type().equals("Standard")); List<ColumnDef> columnDefs = cfDef.getColumn_metadata(); Assert.assertEquals(1, columnDefs.size());
Assert.assertEquals("Standard", cfDef.getColumn_type());
Assert.assertEquals("Standard", cfDef.getColumn_type());
private void onSetSubComparator(CfDef cfDef, Properties cFProperties, StringBuilder builder) { String subComparatorType = cFProperties.getProperty(CassandraConstants.SUBCOMPARATOR_TYPE); if (subComparatorType != null && ColumnFamilyType.valueOf(cfDef.getColumn_type()) == ColumnFamilyType.Super) { if (builder != null) { // super column are not supported for composite key as of // now, leaving blank place holder.. } else { cfDef.setSubcomparator_type(subComparatorType); } } }
private void onValidateTable(KsDef ksDef, TableInfo tableInfo) throws Exception { boolean tablefound = false; for (CfDef cfDef : ksDef.getCf_defs()) { if (cfDef.getName().equals(tableInfo.getTableName()) && (cfDef.getColumn_type().equals(ColumnFamilyType.getInstanceOf(tableInfo.getType()).name()))) { if (cfDef.getColumn_type().equals(ColumnFamilyType.Standard.name())) { for (ColumnInfo columnInfo : tableInfo.getColumnMetadatas()) { onValidateColumn(tableInfo, cfDef, columnInfo); } tablefound = true; break; } else if (cfDef.getColumn_type().equals(ColumnFamilyType.Super.name())) { tablefound = true; } } } if (!tablefound) { throw new SchemaGenerationException("Column family " + tableInfo.getTableName() + " does not exist in keyspace " + databaseName + "", "Cassandra", databaseName, tableInfo.getTableName()); } }
&& cfDef.getColumn_type().equals(ColumnFamilyType.getInstanceOf(tableInfo.getType()).name())) if (cfDef.getColumn_type().equals(STANDARDCOLUMNFAMILY))