Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-8251

CQLSSTableWriter.builder() throws ex when more than one table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • 2.1.5
    • None
    • None
    • ubuntu x64

    • Normal

    Description

      Tested with latest trunk (from github).

      This is not the same bug in 2.1.1 where you can't use 2 differents table because they weren't added to KSMetaData. But related because it occurs at the same condition (more than one table) at CQLSSTableWriter.java#L360

      static codes in KeySpace call DatabaseDescriptor.createAllDirectories() because StorageService.instance is not in clientMode, throws ex because of NullPointer.

      Reproduce bug:

              Config.setClientMode(true);
              CQLSSTableWriter.builder()
                      .inDirectory("/var/tmp/kspc/t1")
                      .forTable("create table kspc.t1 ( id  int, primary key (id));")
                      .using("INSERT INTO kspc.t1 (id) VALUES ( ? );")
                      .build();
              CQLSSTableWriter.builder()
                      .inDirectory("/var/tmp/kspc/t2")
                      .forTable("create table kspc.t2 ( id  int, primary key (id));")
                      .using("INSERT INTO kspc.t2 (id) VALUES ( ? );")
                      .build();
      

      Attachments

        1. 8251-2.0.txt
          6 kB
          Carl Yeksigian

        Issue Links

          Activity

            People

              carlyeks Carl Yeksigian
              pierz Pierre N.
              Carl Yeksigian
              Benjamin Lerer
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: