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

hive thrift server may be blocked by session level waiting,caused by udf!

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.2.2, 3.1.3
    • None
    • HiveServer2
    • None
    • hdp ambari 26

      hive1.2.0

    Description

      1. caused by an error UDF function!time_waiting(Long sleepSeconds)
        public class UDFTimeWaiting extends UDF throws Exception{
          public String evaluate(String sleepSeconds){
             ...
             Thread.sleep(Long.parseLong(sleepSeconds) * 1000);
             return "ok";
         }
        }
        

      1. in session_1:
        select time_waiting(100);
      2. in session_2:
        select 1;  or show tables;
      3. session_2 will not have any response from thrift server until session_1 waiting 100 seconds!

      this bug may cause hiveserver come into an unavailable status!


      1. session_1 run waiting 200s,
      2. session_2 run at the same time ,but blocked by session_1 , see the pic,waiting 197s after session_1 returned then returned

      1. if someone want to attack or do sth ,hiveserver will not be down,but not available again!

      Attachments

        1. session_2.jpg
          62 kB
          kongxianghe
        2. session_1.jpg
          54 kB
          kongxianghe

        Activity

          People

            Unassigned Unassigned
            kongxianghe kongxianghe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: