Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-1266

LP Bug: 1463215 - Cleanup schema failed to cleanup orphan objects in hbase

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • sql-exe
    • None

    Description

      Tested on 2015-05-28 build, cluster centos-mapr1.hpl.hp.com.

      Testing for "cleanup schema" command failed when the schema has orphan objects in hbase. See two cases in below, first one has orphan table object in hbase, second one has orphan index object in bhase.

      -------------------------------------
      Case 1:

      SQL>create schema sch;

      — SQL operation complete.

      SQL>set schema sch;

      — SQL operation complete.

      SQL>create table t1 (
      char3_4 Varchar(8) no default not null not droppable,
      sdec4_n20 Decimal(4) no default,
      int4_yTOm_uniq Interval year(5) to month no default not null droppable,
      sbin4_n1000 Smallint not null not droppable,
      time4_1000 Time no default not null not droppable,
      primary key (time4_1000) not droppable
      );

      SQL>get user hbase objects;

      TRAFODION.SCH.T1

      — SQL operation complete.

      SQL>set parserflags 131072;

      — SQL operation complete.

      SQL>delete from "MD".objects where schema_name = 'SCH' and object_name = 'T1';

      — 1 row(s) deleted.

      SQL>get tables;

      — SQL operation complete.

      SQL>cleanup schema sch;

      — SQL operation complete.

      SQL>get user hbase objects;

      TRAFODION.SCH.T1

      — SQL operation complete.

      SQL>select schema_name, object_name, object_type from "MD".objects where schema_name = 'SCH';

      SCHEMA_NAME OBJECT_NAME OBJECT_TYPE
      -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- -----------
      SCH T1_966585927_8557 PK

      — 1 row(s) selected.

      -------------------------------------
      Case 2:

      SQL>create schema sch;

      — SQL operation complete.

      SQL>set schema sch;

      — SQL operation complete.

      SQL>create table abc( char_3 char(3),
      pic_x_8 char(8) upshift not null,
      binary_64_s numeric(18, 3) signed,
      var_char_3 varchar(3) upshift,
      small_int smallint signed,
      decimal_3_unsigned decimal(3, 0) unsigned,
      var_char_2 varchar(2),
      medium_int integer unsigned,
      pic_decimal_2 decimal(3,3) not null,
      float_basic float (4),
      float_double_p double precision not null,
      y_to_d date,
      iy_to_mo interval year(4) to month,
      ih_to_s interval hour to second not null,
      PRIMARY KEY (pic_x_8));

      — SQL operation complete.

      SQL>create index idx1 on abc (char_3);

      — SQL operation complete.

      SQL>set parserflags 131072;

      — SQL operation complete.

      SQL>delete from "MD".objects where schema_name = 'SCH' and object_name = 'IDX1';

      — 1 row(s) deleted.

      SQL>get user hbase objects;

      TRAFODION.SCH.ABC
      TRAFODION.SCH.IDX1

      — SQL operation complete.

      SQL>cleanup schema sch;

      — SQL operation complete.

      SQL>get user hbase objects;

      TRAFODION.SCH.IDX1

      — SQL operation complete.

      Attachments

        Activity

          People

            anoopsharma Anoop Sharma
            chong.hsu Chong Hsu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: