Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-1162

HStores fail to Snapshot properly

    XMLWordPrintable

Details

    • Hide
      1. create table containing hstore column
        • create table test_hstore (id uuid default uuid_generate_v4() NOT NULL primary key, fields hstore default ''::hstore not null);
      2. insert some values
        • insert into test_hstore default values;
      3. create basic connector to stream test_hstore to kafka and POST it
        • {
            "name": "test-hstore",
            "config": {
              "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
              "tasks.max": "1",
              "database.hostname": "localhost",
              "database.port": "5432",
              "database.user": "postgres",
              "database.password": "postgres",
              "database.dbname": "postgres",
              "database.server.name": "hstoretest"
            }
          }
          
      4. tail the log (I used confluent log -f), wait for error
        • error encountered: java.lang.IllegalArgumentException: Unexpected value for JDBC type 1111 and column fields hstore(2147483647, 0) NOT NULL: class=class java.util.HashMap
      Show
      create table containing hstore column create table test_hstore (id uuid default uuid_generate_v4() NOT NULL primary key, fields hstore default ''::hstore not null); insert some values insert into test_hstore default values; create basic connector to stream test_hstore to kafka and POST it { "name" : "test-hstore" , "config" : { "connector.class" : "io.debezium.connector.postgresql.PostgresConnector" , "tasks.max" : "1" , "database.hostname" : "localhost" , "database.port" : "5432" , "database.user" : "postgres" , "database.password" : "postgres" , "database.dbname" : "postgres" , "database.server.name" : "hstoretest" } } tail the log (I used confluent log -f), wait for error error encountered: java.lang.IllegalArgumentException: Unexpected value for JDBC type 1111 and column fields hstore(2147483647, 0) NOT NULL: class=class java.util.HashMap

    Description

      While testing out Debezium, I received an IllegalArgumentException while running the initial snapshot for a table containing a hstore column (and data within that column).

      Seems like the issue - as best I can tell - is that the "data" object within PostgresValueConverter.java is a HashMap during the Snapshot. During Streams, the data object appears to be a String (as anticipated by existing code).

      Attachments

        Activity

          People

            Unassigned Unassigned
            p5k6@yahoo.com josh stanfield (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: