Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-5216

ZSession createFromExistingSession method not for safety certification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.0
    • None
    • zeppelin-client
    • None
    • 0.9.0

    Description

      Zeppelin open safety certification, the execution ZSession.createFromExistingSession(clientConfig, interpreter, sessionId) method, return an error message'Unable to call rest api, status: 405, statusText: Method Not Allowed, message: Method Not Allowed‘

      The cause of the problem:

      ZSession createFromExistingSession direct call zeppelinClient.getSession(this.getSessionId()) method, not for safety certification

      *Modify*

      The new method:

      
      public static ZSession createFromExistingSession(ZeppelinClient zeppelinClient, String interpreter, String sessionId) throws Exception
      { return createFromExistingSession(zeppelinClient, interpreter, sessionId, (MessageHandler)null); }
      
      public static ZSession createFromExistingSession(ZeppelinClient zeppelinClient, String interpreter, String sessionId, MessageHandler messageHandler) throws Exception {
       ZSession session = new ZSession(zeppelinClient, interpreter, sessionId);
       session.reconnect(messageHandler);
       return session;
       }
      private ZSession(ZeppelinClient zeppelinClient, String interpreter, String sessionId) throws Exception {
       this.zeppelinClient = zeppelinClient;
       this.interpreter = interpreter;
       this.sessionInfo = new SessionInfo(sessionId);
       }
      
      

       

      *Call*

      1.enable security authentication

      //
      ZeppelinClient zeppelinClient = new ZeppelinClient(clientConfig);
      zeppelinClient.login(userName,password);
      ZSession.createFromExistingSession(zeppelinClient,interpreter, sessionId);
      
      

      2.close security authentication

      //
      ZeppelinClient zeppelinClient = new ZeppelinClient(clientConfig);
      ZSession.createFromExistingSession(zeppelinClient,interpreter, sessionId);
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhuangchong zhuangchong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified