Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-452

Uri tests failing on real cluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.0
    • 1.5.0
    • None
    • None

    Description

      Parsing command: ALTER TABLE tab1 ADD IF NOT EXISTS PARTITION (dt = '21-Dec-2012')  LOCATION 'hdfs:///user/hive/warehouse/tab1/foo'
      context.getInputs() = [hdfs:/user/hive/warehouse/tab1/foo]
      context.getOutputs() = [db_1@tab1]
      FAILED: SemanticException No valid privileges
      org.apache.hadoop.hive.ql.parse.SemanticException: No valid privileges
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.postAnalyze(HiveAuthzBindingHook.java:316)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:437)
      	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:332)
      	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:987)
      	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:980)
      	at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:100)
      	at org.apache.hive.service.cli.operation.SQLOperation.run(SQLOperation.java:173)
      	at org.apache.hive.service.cli.session.HiveSessionImpl.runOperationWithLogCapture(HiveSessionImpl.java:700)
      	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:365)
      	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:352)
      	at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:240)
      	at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:378)
      	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1373)
      	at org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1358)
      	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
      	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
      	at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge20S.java:677)
      	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:244)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.hadoop.hive.ql.metadata.AuthorizationException: Failed to get File URI
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.getAuthzHierarchyFromEntity(HiveAuthzBindingHook.java:558)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.authorizeWithHiveBindings(HiveAuthzBindingHook.java:434)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.postAnalyze(HiveAuthzBindingHook.java:308)
      	... 20 more
      Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Error parsing URI hdfs:/user/hive/warehouse/tab1/foo: URI 'hdfs:/user/hive/warehouse/tab1/foo' in invalid. Must start with file:// or hdfs://
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.parseURI(HiveAuthzBindingHook.java:271)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.parseURI(HiveAuthzBindingHook.java:260)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.getAuthzHierarchyFromEntity(HiveAuthzBindingHook.java:556)
      	... 22 more
      Caused by: java.lang.IllegalArgumentException: URI 'hdfs:/user/hive/warehouse/tab1/foo' in invalid. Must start with file:// or hdfs://
      	at org.apache.sentry.core.model.db.AccessURI.<init>(AccessURI.java:33)
      	at org.apache.sentry.binding.hive.HiveAuthzBindingHook.parseURI(HiveAuthzBindingHook.java:269)
      	... 24 more
      

      Attachments

        1. SENTRY-452.1.patch
          0.8 kB
          Sravya Tirukkovalur

        Activity

          People

            sravya Sravya Tirukkovalur
            sravya Sravya Tirukkovalur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: