cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Eklöf (JIRA) <j...@apache.org>
Subject [jira] Created: (CASSANDRA-1460) Table.load() uses column name instead of column family name to lookup column family stores
Date Fri, 03 Sep 2010 08:21:35 GMT
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.7 beta 1, 0.6.5, 0.6.4
         Environment: Mac OS X 10.6.4, JDK 1.6.0_20
            Reporter: Karl Eklöf


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.


Mime
View raw message