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

Make embedded Jetty server more configurable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • HCatalog
    • Hide
      A new property 'templeton.jetty.configuration' can be set pointing to an XML file in webhcat configuration file to enable the embedded Jetty configuration from such file.

         <property>
           <name>templeton.jetty.configuration</name>
           <value></value>
           <description>The embedded jetty configuration file.</description>
         </property>

      We can follow https://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty#Configuring_a_File_Server_with_XML to make the xml configuration file to update the settings.

      Here is an example:

      <?xml version="1.0"?>
      <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

      <Configure id="FileServer" class="org.eclipse.jetty.server.Server">
          <Call name="addConnector">
            <Arg>
                <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
                  <Set name="port">9999</Set>
                  <Set name="requestHeaderSize">65535</Set>
                </New>
            </Arg>
          </Call>
      </Configure>
      Show
      A new property 'templeton.jetty.configuration' can be set pointing to an XML file in webhcat configuration file to enable the embedded Jetty configuration from such file.    <property>      <name>templeton.jetty.configuration</name>      <value></value>      <description>The embedded jetty configuration file.</description>    </property> We can follow https://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty#Configuring_a_File_Server_with_XML to make the xml configuration file to update the settings. Here is an example: <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" " http://www.eclipse.org/jetty/configure.dtd "> <Configure id="FileServer" class="org.eclipse.jetty.server.Server">     <Call name="addConnector">       <Arg>           <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">             <Set name="port">9999</Set>             <Set name="requestHeaderSize">65535</Set>           </New>       </Arg>     </Call> </Configure>

    Description

      Currently you can't configure embedded jetty within HCatalog. Propose to support an xml configuration which Jetty already supports. A new Web-hcat property will be added to specify the configure file location. If the file doesn't exist, falls back to old behavior. If it exists, such configuration will be loaded to configure embedded Jetty server.

      Some default parameters for Jetty may not be sufficient for some cases such as request/response buffer size. This improvement allows to make such change.

      Attachments

        1. HIVE-12958.1.patch
          5 kB
          Aihua Xu
        2. HIVE-12958.2.patch
          4 kB
          Aihua Xu
        3. HIVE-12958.3.patch
          4 kB
          Aihua Xu

        Activity

          People

            aihuaxu Aihua Xu
            aihuaxu Aihua Xu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: