Uploaded image for project: 'Livy'
  1. Livy
  2. LIVY-589

get operation log from interactive session

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0, 0.6.0
    • Fix Version/s: None
    • Component/s: REPL, RSC
    • Labels:
    • Flags:
      Patch

      Description

      in some case , i  want get some log from InteractiveSession when the statement has been submitted.

      like that

      //代码占位符
      > curl -d '{"code" : "select * from tmp.ttt " ,"kind" : "sql"}' \
        -H 'Content-Type: application/json' \
        http://$livyhost:$port/sessions/0/statements
      >response
      {"id":1,"code":"select * from tmp.ttt ","state":"waiting","output":null,"progress":0.0}
      
      // then i can get log like this
      > curl http://namenode40:8998/sessions/0/statements/1/log?size=10
      
      response 
      {
      "statements": {
      "id": 1,
      "code": "select * from tmp.ttt ",
      "state": "available",
      "output": "19/04/13 12:40:01 DEBUG org.apache.spark.sql.hive.HiveSessionStateBuilder$$anon$1: \n=== Result of Batch Resolution ===\n!'Project [*] Project [name#5, age#6]\n!+- 'UnresolvedRelation `tmp`.`ttt` +- SubqueryAlias `tmp`.`ttt`\n! +- HiveTableRelation `tmp`.`ttt`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [name#5, age#6]\n \n19/04/13 12:40:01 DEBUG org.apache.spark.sql.internal.BaseSessionStateBuilder$$anon$2: \n=== Result of Batch Finish Analysis ===\n GlobalLimit 1000 GlobalLimit 1000\n +- LocalLimit 1000 +- LocalLimit 1000 ",
      "progress": 1
      }
      }

       

        Attachments

        1. operation_log.patch
          30 kB
          james.xu

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                james.xu james.xu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 96h
                  96h
                  Remaining:
                  Remaining Estimate - 95h 40m
                  95h 40m
                  Logged:
                  Remaining Estimate - 95h 40m
                  20m