0
$column_family->insert('row_key1', array('col_name1' => 'col_val1'));
$column_family->insert('row_key2', array('col_name2' => 'col_val2'));
$column_family->insert('row_key3', array('col_name3' => 'col_val3'));
$column_family->insert('row_key4', array('col_name4' => 'col_val4'));

The problem is mystery when the insert function does not insert value in sequence, instead it would appear in jumpping order: col_val2,col_val3,col_val1,col_val4

It bad when I could do a properly get_range() value as some have appear to insert into other partition.

How do I make the code insert orderly?

sdolgy
  • 6,963
  • 3
  • 41
  • 61
  • I don't understand the problem you are trying to solve. The row is the atom of partitioning, so yes, it's expected (and desired) that row1..row4 could be in different ones. – jbellis Jun 23 '11 at 13:22

1 Answers1

0

Have you tried using the batch_insert functionality?

$column_family->batch_insert(array(
    'row_key1' => array('col_name1' => 'col_val1'),
    'row_key2' => array('col_name2' => 'col_val2'),
    'row_key3' => array('col_name3' => 'col_val3'),
    'row_key4' => array('col_name4' => 'col_val4')
));
sdolgy
  • 6,963
  • 3
  • 41
  • 61