public AnnotatedCompositeSerializer<T> clone() { AnnotatedCompositeSerializer<T> clone = new AnnotatedCompositeSerializer<T>(this.clazz, this.bufferSize, false); return clone; }
serializer = new AnnotatedCompositeSerializer(valueClass); } else { serializer = ObjectSerializer.get();
AnnotatedCompositeSerializer<Population> compSerializer = new AnnotatedCompositeSerializer<Population>(Population.class); ColumnFamily<String, Population> CF_POPULATION = new ColumnFamily<String, Population>("population", StringSerializer.get(), compSerializer);
@Override public Placement newPlacement(String placement) throws ConnectionException { String[] parsed = PlacementUtil.parsePlacement(placement); String keyspaceName = parsed[0]; String cfPrefix = parsed[1]; CassandraKeyspace keyspace = _keyspaceMap.get(keyspaceName); if (keyspace == null) { throw new UnknownPlacementException(format( "Placement string refers to unknown or non-local Cassandra keyspace: %s", keyspaceName), placement); } KeyspaceDefinition keyspaceDef = keyspace.getAstyanaxKeyspace().describeKeyspace(); AnnotatedCompositeSerializer<DeltaKey> deltaKeySerializer = new AnnotatedCompositeSerializer<DeltaKey>(DeltaKey.class); // DDL's are not actually configurable due to the way we abstract the names from the placements here. // In the future, we should either phase out the DDL config or change the implementation here to conform to it. ColumnFamily<ByteBuffer, UUID> deltaCf = getColumnFamily(keyspaceDef, cfPrefix, "delta", placement, TimeUUIDSerializer.get()); ColumnFamily<ByteBuffer, DeltaKey> blockedDeltaCf = getColumnFamily(keyspaceDef, cfPrefix, "delta_v2", placement, deltaKeySerializer); ColumnFamily<ByteBuffer, UUID> deltaHistoryCf = getColumnFamily(keyspaceDef, cfPrefix, "history", placement, TimeUUIDSerializer.get()); // Calculate the data centers on demand since they may change in a live system. return new DeltaPlacement(placement, keyspace, deltaCf, blockedDeltaCf, deltaHistoryCf); }
@Override public Placement newPlacement(String placement) throws ConnectionException { String[] parsed = PlacementUtil.parsePlacement(placement); String keyspaceName = parsed[0]; String cfPrefix = parsed[1]; CassandraKeyspace keyspace = _keyspaceMap.get(keyspaceName); if (keyspace == null) { throw new UnknownPlacementException(format( "Placement string refers to unknown or non-local Cassandra keyspace: %s", keyspaceName), placement); } KeyspaceDefinition keyspaceDef = keyspace.getAstyanaxKeyspace().describeKeyspace(); AnnotatedCompositeSerializer<DeltaKey> deltaKeySerializer = new AnnotatedCompositeSerializer<DeltaKey>(DeltaKey.class); // DDL's are not actually configurable due to the way we abstract the names from the placements here. // In the future, we should either phase out the DDL config or change the implementation here to conform to it. ColumnFamily<ByteBuffer, UUID> deltaCf = getColumnFamily(keyspaceDef, cfPrefix, "delta", placement, TimeUUIDSerializer.get()); ColumnFamily<ByteBuffer, DeltaKey> blockedDeltaCf = getColumnFamily(keyspaceDef, cfPrefix, "delta_v2", placement, deltaKeySerializer); ColumnFamily<ByteBuffer, UUID> deltaHistoryCf = getColumnFamily(keyspaceDef, cfPrefix, "history", placement, TimeUUIDSerializer.get()); // Calculate the data centers on demand since they may change in a live system. return new DeltaPlacement(placement, keyspace, deltaCf, blockedDeltaCf, deltaHistoryCf); }
private void testReadSingleRowColumnRange(boolean rowDeleted) throws Exception { AnnotatedCompositeSerializer<Population> compSerializer = new AnnotatedCompositeSerializer<Population>(Population.class);