Announcement

Collapse
No announcement yet.

A serious problem about VoltBulkLoader flush and drain

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • A serious problem about VoltBulkLoader flush and drain

    My test code is as folow, when I use flush in my case, I data cannot be flush to voltdb table, but when I use drain it works. I see the API doc, it's said that flush is async while drain is sync, so what's the problem of my code ? is it right to use flush like below ?
    VoltBulkLoader loader = client.getNewBulkLoader("test", 100, false, null);
    int i = 0;
    String[] data = new String[10];
    while(i < 10) {
    data[i] = String.valueOf(i);
    i++;
    }
    for(String dt: data)
    {
    loader.insertRow(rwmd, dt);
    loader.drain(); // work !
    loader.flush(); // not work !!, can't get any data in volt table by "select * from test"
    }
    Last edited by simon0806; 05-14-2017, 08:08 AM.
Working...
X