Apache Drill
  1. Apache Drill
  2. DRILL-1082

Problems with creating views using a path

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: Metadata
    • Labels:
      None

      Description

      git.commit.id.abbrev=33c28f6

      I tried to create a view with a path relative to dfs.default schema:

      0: jdbc:drill:schema=dfs> create view `dfs.default`.`views/votertsv.v2` as select columns[0] voter_id, columns[1] name, columns[2] age, columns[3] registration,columns[4] contributions,columns[5] voterzone,columns[6] create_time from `dfs`.`root`.`./drill/testdata/tsv/voter.tsv`;

      I got the following error message:
      ----------------------+

      ok summary

      ----------------------+

      false Error: Failure while accessing Zookeeper

      ----------------------+
      1 row selected (0.595 seconds)

      However, the view is actually created:

      [root@qa-node56 ~]# hadoop fs -ls /drill/testdata/p1tests/views
      Found 1 items
      -rwxr-xr-x 3 mapr mapr 683 2014-06-26 09:27 /drill/testdata/p1tests/views/votertsv.v2.view.drill

      I cannot query from the view:

      0: jdbc:drill:schema=dfs> select * from `dfs.default`.`views/votertsv.v2`;

      "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException: From line 1, column 15 to line 1, column 27 ] < EigenbaseContextException:[ From line 1, column 15 to line 1, column 27 ] < SqlValidatorException:[ Table 'dfs.default.views/votertsv.v2' not found ]"

        Activity

        Hide
        Jacques Nadeau added a comment -

        I believe the issue has to do with zk rejecting a path that has a / in it. The zk pstore implementation should probably escape characters that zk considers illegal in a path name.

        Show
        Jacques Nadeau added a comment - I believe the issue has to do with zk rejecting a path that has a / in it. The zk pstore implementation should probably escape characters that zk considers illegal in a path name.
        Hide
        Krystal added a comment -

        Server log error:

        java.lang.RuntimeException: Failure while accessing Zookeeper
        org.apache.drill.exec.store.sys.zk.ZkPStore.put(ZkPStore.java:96) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.createView(WorkspaceSchemaFactory.java:173) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.planner.sql.handlers.ViewHandler$CreateView.getPlan(ViewHandler.java:104) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:129) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:400) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:216) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:242) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
        java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
        Caused by: java.lang.IllegalArgumentException: You cannot use keys that have slashes in them when using the Zookeeper SystemTable storage interface.
        com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) ~[guava-14.0.1.jar:na]
        org.apache.drill.exec.store.sys.zk.ZkPStore.p(ZkPStore.java:68) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        org.apache.drill.exec.store.sys.zk.ZkPStore.put(ZkPStore.java:89) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
        ... 9 more

        Show
        Krystal added a comment - Server log error: java.lang.RuntimeException: Failure while accessing Zookeeper org.apache.drill.exec.store.sys.zk.ZkPStore.put(ZkPStore.java:96) ~ [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.createView(WorkspaceSchemaFactory.java:173) ~ [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.planner.sql.handlers.ViewHandler$CreateView.getPlan(ViewHandler.java:104) ~ [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:129) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:400) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:216) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:242) [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45] java.lang.Thread.run(Thread.java:744) [na:1.7.0_45] Caused by: java.lang.IllegalArgumentException: You cannot use keys that have slashes in them when using the Zookeeper SystemTable storage interface. com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) ~ [guava-14.0.1.jar:na] org.apache.drill.exec.store.sys.zk.ZkPStore.p(ZkPStore.java:68) ~ [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] org.apache.drill.exec.store.sys.zk.ZkPStore.put(ZkPStore.java:89) ~ [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT] ... 9 more

          People

          • Assignee:
            Jason Altekruse
            Reporter:
            Krystal
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development