Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5618

Hive local task fails to run when run from oozie in a secure cluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 0.13.0
    • None
    • None
    • Hadoop 2.2.0

    Description

      When a hive query like the one below

      ==

      INSERT OVERWRITE DIRECTORY '<outdir>' SELECT table1., table2. FROM table1 JOIN table2 ON (table1.col = table2.col);
      ==

      is run from a hive action in Oozie in a secure cluster, the hive action fails with the following stack trace

      ===

      org.apache.hadoop.ipc.RemoteException(java.io.IOException): Delegation Token can be issued only with kerberos or web authentication
      	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getDelegationToken(FSNamesystem.java:5886)
      	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getDelegationToken(NameNodeRpcServer.java:447)
      	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getDelegationToken(ClientNamenodeProtocolServerSideTranslatorPB.java:833)
      	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java:59648)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
      	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)
      	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2053)
      	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:396)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
      	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2047)
      
      	at org.apache.hadoop.ipc.Client.call(Client.java:1347)
      	at org.apache.hadoop.ipc.Client.call(Client.java:1300)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
      	at $Proxy10.getDelegationToken(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
      	at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
      	at $Proxy10.getDelegationToken(Unknown Source)
      	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getDelegationToken(ClientNamenodeProtocolTranslatorPB.java:805)
      	at org.apache.hadoop.hdfs.DFSClient.getDelegationToken(DFSClient.java:847)
      	at org.apache.hadoop.hdfs.DistributedFileSystem.getDelegationToken(DistributedFileSystem.java:1318)
      	at org.apache.hadoop.hive.shims.HadoopShimsSecure.createDelegationTokenFile(HadoopShimsSecure.java:535)
      	at org.apache.hadoop.hive.ql.exec.SecureCmdDoAs.<init>(SecureCmdDoAs.java:38)
      	at org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask.execute(MapredLocalTask.java:238)
      	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
      	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
      	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1437)
      	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1215)
      	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1043)
      	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:911)
      	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
      	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
      	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
      	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:348)
      	at org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:446)
      	at org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:456)
      	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:737)
      	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
      	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
      	at org.apache.oozie.action.hadoop.HiveMain.runHive(HiveMain.java:312)
      	at org.apache.oozie.action.hadoop.HiveMain.run(HiveMain.java:270)
      	at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37)
      	at org.apache.oozie.action.hadoop.HiveMain.main(HiveMain.java:66)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226)
      	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
      	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:429)
      	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
      	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:396)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
      	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157)
      

      Attachments

        1. HIVE-5618.2.patch
          3 kB
          Prasad Suresh Mujumdar

        Issue Links

          Activity

            People

              prasadm Prasad Suresh Mujumdar
              venkatnrangan Venkat Ranganathan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: