Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12033

SecurityUtil#doAsLoginUser is absent in hadoop-1, making AccessController#postCreateTableHandler() ineffective

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.98.6.1
    • Fix Version/s: 0.98.7
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This affects build against hadoop-1 only.

      From https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/497/testReport/junit/org.apache.hadoop.hbase.security.access/TestAccessController/testSplit/ :

      2014-09-16 22:47:05,526 ERROR [MASTER_TABLE_OPERATIONS-asf911:60077-0] handler.CreateTableHandler(180): Error trying to create the table testSplit
      java.io.IOException: java.lang.IllegalArgumentException: Can't find method doAsLoginUser in org.apache.hadoop.security.SecurityUtil!
      	at org.apache.hadoop.hbase.security.User.runAsLoginUser(User.java:182)
      	at org.apache.hadoop.hbase.security.access.AccessController.postCreateTableHandler(AccessController.java:917)
      	at org.apache.hadoop.hbase.master.MasterCoprocessorHost$10.call(MasterCoprocessorHost.java:183)
      	at org.apache.hadoop.hbase.master.MasterCoprocessorHost.execOperation(MasterCoprocessorHost.java:801)
      	at org.apache.hadoop.hbase.master.MasterCoprocessorHost.postCreateTableHandler(MasterCoprocessorHost.java:179)
      	at org.apache.hadoop.hbase.master.handler.CreateTableHandler$1.run(CreateTableHandler.java:174)
      	at org.apache.hadoop.hbase.master.handler.CreateTableHandler$1.run(CreateTableHandler.java:171)
      	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:1190)
      	at org.apache.hadoop.hbase.security.User$SecureHadoopUser.runAs(User.java:287)
      	at org.apache.hadoop.hbase.master.handler.CreateTableHandler.process(CreateTableHandler.java:171)
      	at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:128)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.IllegalArgumentException: Can't find method doAsLoginUser in org.apache.hadoop.security.SecurityUtil!
      	at org.apache.hadoop.hbase.util.Methods.call(Methods.java:45)
      	at org.apache.hadoop.hbase.security.User.runAsLoginUser(User.java:180)
      	... 15 more
      Caused by: java.lang.NoSuchMethodException: org.apache.hadoop.security.SecurityUtil.doAsLoginUser(java.security.PrivilegedExceptionAction)
      	at java.lang.Class.getMethod(Class.java:1607)
      	at org.apache.hadoop.hbase.util.Methods.call(Methods.java:38)
      	... 16 more
      

      We can bring the code from SecurityUtil#doAsLoginUser into hbase codebase.

        Attachments

        1. 12033-0.98.txt
          1 kB
          Ted Yu

          Activity

            People

            • Assignee:
              yuzhihong@gmail.com Ted Yu
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: