[
https://issues.apache.org/jira/browse/DRILL-1833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365644#comment-14365644
]
Venki Korukanti edited comment on DRILL-1833 at 3/17/15 5:50 PM:
-----------------------------------------------------------------
We currently store Map<ViewName, ViewLocation> in ZK. When listing views (as
part of SHOW TABLES), we take view list from ZK store and for each entry we
check if the view definition exists in given location. As the view list is
empty in ZK, we don't list any views in SHOW TABLES. When creating view, we
create it by default in workspace schema location. Also when querying we refer
directly to FileSystem for view definition. Info in ZK is redundant as we are
always trusting the information in FileSystem. We can remove store view
persistent info in ZK.
One thing I must point out is: In future if we support create view with custom
view location, then it won't be visible in SHOW TABLES as SHOW TABLES only
searches for .view.drill files in workspace root directory. This should be ok
as the view created with custom location is considered external to schema.
was (Author: vkorukanti):
We currently store Map<ViewName, ViewLocation> in ZK. When listing views (as
part of SHOW TABLES), we take view list from ZK store and for each entry we
check if the view definition exists in given location. As the view list is
empty in ZK, we don't list any views in SHOW TABLES. When creating view, we
create it by default in workspace schema location. Also when querying we refer
directly to FileSystem for view definition. Info in ZK is redundant as we are
always trusting the information in FileSystem. We can remove store view
persistent info in ZK.
One thing I must point is: In future if we support create view with custom view
location, then it won't be visible in SHOW TABLES as SHOW TABLES only searches
for .view.drill files in workspace root directory. This should be ok as the
view created with custom location is considered external to schema.
> Views cannot be registered into the INFROMATION_SCHEMA.`TABLES` after wiping
> out ZooKeeper data
> -----------------------------------------------------------------------------------------------
>
> Key: DRILL-1833
> URL: https://issues.apache.org/jira/browse/DRILL-1833
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - Information Schema
> Environment: git.commit.id.abbrev=2396670
> Reporter: Xiao Meng
> Assignee: Venki Korukanti
> Fix For: 0.9.0
>
> Attachments: DRILL-1833-1.patch
>
>
> After wiping out the ZooKeeper data, the drillbit cannot automatically
> register the view into INFORMATION_SCHEMA.`TABLES` even after we query the
> view.
> For example, for a workspace dfs.tmp, there is a view file
> `varchar_view.view.drill` under the corresponding directory '/tmp'.
> We can query:
> {code}
> select * from dfs.test.`varchar_view`
> {code}
>
> But this view still won't show up in INFORMATION_SCHEMA.`TABLES`.
> After I recreate the view based on the contents of `varchar_view.view.drill`,
> the view shows in the INFORMATION_SCHEMA.`TABLES`.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)