[
https://issues.apache.org/jira/browse/CASSANDRA-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Karl Eklöf updated CASSANDRA-1460:
----------------------------------
Attachment: Debug-session Screenshot.jpg
> Table.load() uses column name instead of column family name to lookup column
> family stores
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-1460
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1460
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.6.4, 0.6.5, 0.7 beta 1
> Environment: Mac OS X 10.6.4, JDK 1.6.0_20
> Reporter: Karl Eklöf
> Attachments: Debug-session Screenshot.jpg
>
>
> Current code:
> void load(RowMutation rowMutation) throws IOException
> {
> DecoratedKey key =
> StorageService.getPartitioner().decorateKey(rowMutation.key());
> for (ColumnFamily columnFamily : rowMutation.getColumnFamilies())
> {
> Collection<IColumn> columns = columnFamily.getSortedColumns();
> for (IColumn column : columns)
> {
> ColumnFamilyStore cfStore =
> columnFamilyStores.get(FBUtilities.byteArrayToInt(column.name()));
> cfStore.applyBinary(key, column.value());
> }
> }
> }
> Should be: (best guess)
> void load(RowMutation rowMutation) throws IOException
> {
> DecoratedKey key =
> StorageService.getPartitioner().decorateKey(rowMutation.key());
> for (ColumnFamily columnFamily : rowMutation.getColumnFamilies())
> {
> Collection<IColumn> columns = columnFamily.getSortedColumns();
> ColumnFamilyStore cfStore =
> columnFamilyStores.get(FBUtilities.byteArrayToInt(columnFamily.name().getBytes("UTF-8")));
>
> for (IColumn column : columns)
> {
> cfStore.applyBinary(key, column.value());
> }
> }
> }
> The code above is from 0.7, but I've have verified the problem in 0.6.4 using
> the bulk loader example from contrib/bmt_example.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.