Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-720

Knox DSL - Ensure that HTTP client is closed on shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 1.2.0
    • ClientDSL
    • None

    Description

      The class org.apache.hadoop.gateway.shell.Hadoop used to connect to knox doesn't close opened socket.
      The "shutdown" method of org...shell.Hadoop doesn't call client.close() and this produces too much permanent CLOSE_WAIT sockest.

      Suggestion:

      public void shutdown() throws InterruptedException

      { - executor.shutdown(); + closeClient(); }

      public boolean shutdown( long timeout, TimeUnit unit ) throws InterruptedException

      { - executor.shutdown(); + closeClient(); return executor.awaitTermination( timeout, unit ); }

      +
      + private void closeClient(){
      + executor.shutdownNow();
      + if(client!=null)

      { + client.close(); + }

      + }

      Attachments

        1. KNOX-720.patch
          2 kB
          Kevin Risden

        Activity

          People

            krisden Kevin Risden
            marco.battaglia@technicaleader.it Marco Battaglia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: