phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4201) Remove usage of SCN from QueryDatabaseMetadataIT
Date Tue, 12 Sep 2017 21:11:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-4201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163663#comment-16163663
] 

James Taylor commented on PHOENIX-4201:
---------------------------------------

[~samarthjain] - it'd be best to clear the client side and server side cache after deleting
the metadata here, as soon we'll rely on the cache sometimes when we service these metadata
API calls.
{code}
+    @Before
+    // We need to clean up phoenix metadata to ensure tests don't step on each other
+    public void deleteMetadata() throws Exception {
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            String delete =
+                    "DELETE FROM SYSTEM.CATALOG WHERE TABLE_SCHEM IS NULL OR TABLE_SCHEM
= '' OR TABLE_SCHEM != 'SYSTEM'";
+            conn.createStatement().executeUpdate(delete);
+            conn.commit();
+            delete = "DELETE FROM \"SYSTEM\".\"SEQUENCE\"";
+            conn.createStatement().executeUpdate(delete);
+            conn.commit();
+        }
+    }
{code}

> Remove usage of SCN from QueryDatabaseMetadataIT
> ------------------------------------------------
>
>                 Key: PHOENIX-4201
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4201
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>         Attachments: PHOENIX-4201.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message