MariaDB ColumnStore Bulk Write SDK 需要永远

MariaDB ColumnStore Bulk Write SDK takes forever

我正在尝试在 Java 中使用 MariaDB ColumnStore Bulk Write SDK 在具有 50 列(数据类型 int)的 table 中批量插入 10 行,但它从未完成不得不终止进程在 10 -15 中尝试了几次但结果相同。

这是他们文档中的代码示例 https://mariadb.com/kb/en/library/columnstore-bulk-write-sdk/#rhel-centos-7

import com.mariadb.columnstore.api.*;

public class MCSAPITest {

        public static void main(String[] args) {
        ColumnStoreDriver d = new ColumnStoreDriver();
        ColumnStoreBulkInsert b = d.createBulkInsert("test", "t1", (short)0, 0);
        try {
           int rows = 10;
           int columns = 50;
           for (int i = 0; i < rows; ++i) {
            for (int c = 0; c < columns; ++c) {
                b.setColumn(c, 0);
            }
            System.out.println("Writing row: " + i);
            b.writeRow();
        }
        System.out.println("Commiting Now");
        b.commit();
        }
        catch (ColumnStoreException e) {
            b.rollback();
            e.printStackTrace();
        }
    }
}

尝试将列减少到 20 并且工作正常。 有人注意到了吗?

如果您按照教程将 table 创建为:

create table t1(i int, c char(3)) engine=columnstore;

您只能将数据插入两列。 Double-checking table 中的列数与您插入的列数相匹配是明智的。

无论 table 中有多少列,插入比 table 中更多的列都应该引发异常。通常的建议是在 the MariaDB Jira under the ColumnStore project.

上针对此意外行为打开错误报告

运行 调试器下的代码可以让您发现代码似乎挂起的位置。这是有价值的信息,开发人员可以使用这些信息来弄清楚为什么它没有按预期运行。

我已向开发团队提出问题,该问题已在 1.1.4 中得到解决 version.More 详情请见此处。 https://jira.mariadb.org/browse/MCOL-1245