Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6869

Drill allows to create views outside workspace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.15.0
    • 1.16.0
    • None
    • None

    Description

      Parameter 'allowAccessOutsideWorkspace' is false for tested workspaces.

      On MaprFS and S3 storages Drill allows to create views outside workspace.

      Example on MapRFS:

      create view dfs.tmp.`/testbugonmfs` as SELECT * FROM cp.`employee.json` LIMIT 20;

      ok summary
      true View '/testbugonmfs' created successfully in 'dfs.tmp' schema

      1 row selected (0.93 seconds)

      The file "testbugonmfs.view.drill" was created in the root "/" folder, but not in used workspace "/tmp" folder.

      Select query works with root "/" folder outside the dfs.tmp workspace:
      select count * from dfs.tmp.`/testbugonmfs`;

      EXPR$0
      20

      1 row selected (1.813 seconds)

       

      Example on S3:

      create view s3.tmp.`/testbugons3` as SELECT * FROM cp.`employee.json` LIMIT 20;

      ok summary
      true View '/testbugons3' created successfully in 's3.tmp' schema

      1 row selected (3.455 seconds)

       

      The file "testbugons3.view.drill" was created in the root "/" bucket folder, but not in used workspace "/tmp" folder.

      Select query also works with root "/" bucket folder outside the s3.tmp workspace:
      select count * from s3.tmp.`/testbugons3`;

      EXPR$0
      20

      1 row selected (3.209 seconds)

       

      Expected result:

      View should be created within workspace

      On FileSystem storage plugin Drill doesn't allow to create views outside workspace.
      Query "create view dfs.tmp.`/testbugonfs` as SELECT * FROM cp.`employee.json` LIMIT 20;"
      Returns an error: "Error: SYSTEM ERROR: FileNotFoundException: /testbugonfs.view.drill (Permission denied)".

      Attachments

        1. MapR_FS_stor_plugin.json
          1 kB
          Denys Ordynskiy
        2. FileSystem_stor_plugin.json
          1 kB
          Denys Ordynskiy
        3. Amazon_S3_FS_stor_plugin.json
          1 kB
          Denys Ordynskiy

        Issue Links

          Activity

            People

              bohdan Bohdan Kazydub
              denysord88 Denys Ordynskiy
              Vitalii Diravka Vitalii Diravka
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: