You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Cristian Armaselu (JIRA)" <ji...@apache.org> on 2014/05/01 20:45:15 UTC

[jira] [Created] (PHOENIX-964) QueryServices.DROP_METADATA_ATTRIB set to false is ignored and HBase table is dropped

Cristian Armaselu created PHOENIX-964:
-----------------------------------------

             Summary: QueryServices.DROP_METADATA_ATTRIB set to false is ignored and HBase table is dropped
                 Key: PHOENIX-964
                 URL: https://issues.apache.org/jira/browse/PHOENIX-964
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.0.0
            Reporter: Cristian Armaselu


Executed the below code:
            Properties connectionProperties = new Properties();
            connection = DriverManager.getConnection("jdbc:phoenix:localhost:2181", connectionProperties);
            statement = connection.createStatement();
            statement.execute("create table to_be_dropped(pk_col varchar(128) primary key,c1 varchar(12),c2 varchar(12))");
            statement.execute("upsert into to_be_dropped(pk_col,c1,c2) values('AAA','bbbb','cccc')");
            statement.execute("upsert into to_be_dropped(pk_col,c1,c2) values('AAA1','bbbb','cccc')");
            connection.commit();
            JdbcUtils.closeStatement(statement);
            JdbcUtils.closeConnection(connection);
            connectionProperties = new Properties();
            connectionProperties.setProperty(QueryServices.DROP_METADATA_ATTRIB,"false");
            connection = DriverManager.getConnection("jdbc:phoenix:localhost:2181", connectionProperties);
            statement = connection.createStatement();
            statement.execute("drop table to_be_dropped");

Behavior:
Table is dropped

Expected:
Table and data be retained




--
This message was sent by Atlassian JIRA
(v6.2#6252)