----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23446/#review47689 -----------------------------------------------------------
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java <https://reviews.apache.org/r/23446/#comment83835> Changes in this file does not contribute to the fix of original issue. exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistry.java <https://reviews.apache.org/r/23446/#comment83834> Change info: ------------ With this patch, we iterate over all registered storage plugin instances and call getPlugin(() on each of the 'enabled' one. This results in following: 0. A plugin instance whose configuration has changed is reloaded. 1. Any new plugin instance is initialized and added to the active plugin set. 2. Any plugin instance that was deleted is removed from the active plugin set. exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistry.java <https://reviews.apache.org/r/23446/#comment83833> Change info: ------------ Before this patch, the registerSchemas() call use to iterate over cached plugin instances and hence would not see any storage plugin change made on a different DrillBit. I reproduced it by directly modifying Zookeeper data and confirmed that DrillBit would not pick up these changes until restart. exec/java-exec/src/main/resources/rest/storage/list.ftl <https://reviews.apache.org/r/23446/#comment83836> Changes in this file does not contribute to the fix of original issue. exec/java-exec/src/main/resources/rest/storage/update.ftl <https://reviews.apache.org/r/23446/#comment83837> Changes in this file does not contribute to the fix of original issue. - Aditya Kishore On July 12, 2014, 9:57 p.m., Aditya Kishore wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/23446/ > ----------------------------------------------------------- > > (Updated July 12, 2014, 9:57 p.m.) > > > Review request for drill. > > > Bugs: DRILL-1112 > https://issues.apache.org/jira/browse/DRILL-1112 > > > Repository: drill-git > > > Description > ------- > > The root cause of this issue is that we do not refresh storage plugin > instance configuration during SQL validation phase. > > Additional changes that are included in this patch are: > > 0. Set execute permission on shell scripts while creating the assembly > tarball. > 1. In the DrillBit web UI, split the plugin instances into "Enabled" and > "Disabled" list for clarity. > > > Diffs > ----- > > distribution/src/assemble/bin.xml bc8fc5f > > exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java > 17ea72c > > exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistry.java > 4e49a1c > exec/java-exec/src/main/resources/rest/storage/list.ftl 3636fbb > exec/java-exec/src/main/resources/rest/storage/update.ftl f4b9e12 > > Diff: https://reviews.apache.org/r/23446/diff/ > > > Testing > ------- > > Started with the 'default' workspace in 'dfs' schema being writable: > > 001 0: jdbc:drill:zk=localhost:2181> use dfs; > 002 +------------+------------+ > 003 | ok | summary | > 004 +------------+------------+ > 005 | true | Default schema changed to 'dfs' | > 006 +------------+------------+ > 007 1 row selected (0.983 seconds) > 010 0: jdbc:drill:zk=localhost:2181> create view myView as select * from > dfs.`timetable.csv`; > 011 +------------+------------+ > 012 | ok | summary | > 013 +------------+------------+ > 014 | true | View 'myView' created successfully in 'dfs.default' > schema | > 015 +------------+------------+ > 016 1 row selected (0.221 seconds) > 017 0: jdbc:drill:zk=localhost:2181> select * from myView; > 018 +------------+ > 019 | columns | > 020 +------------+ > 021 | ["TypicalTime","09:30:12"] | > 022 | ["ZeroTime","00:00:00"] | > 023 | ["TypicalTimeBase24","13:59:23"] | > 024 | ["TypicalTime","11:10:33"] | > 025 +------------+ > 026 4 rows selected (0.582 seconds) > > Now edited the storage plugin configuration data and set "default"'s > "writable" property to false. > > 027 0: jdbc:drill:zk=localhost:2181> create view myView2 as select * from > dfs.`timetable.csv`; > 028 +------------+------------+ > 029 | ok | summary | > 030 +------------+------------+ > 031 | false | Current schema 'dfs.default' is not a mutable schema. > Can't create views in this schema. | > 032 +------------+------------+ > 033 1 row selected (0.129 seconds) > 034 0: jdbc:drill:zk=localhost:2181> > > > Thanks, > > Aditya Kishore > >
