DRILL-8268: Fix Hadoop 2 and Netty lib exclusions, REST mem limiter disabled by default (#2610)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7988390..0c7b24a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -34,6 +34,10 @@
       matrix:
         # Java versions to run unit tests
         java: [ '8', '11', '17' ]
+        profile: ['default-hadoop']
+        include:
+          - java: '8'
+            profile: 'hadoop-2'
       fail-fast: false
     steps:
       - name: Checkout
@@ -51,16 +55,15 @@
         run: |
           MAVEN_OPTS="-XX:+UseG1GC"
           sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches' && \
-          mvn install --batch-mode --no-transfer-progress \
+          mvn -P${{ matrix.profile }} install --batch-mode --no-transfer-progress \
           -DexcludedGroups=org.apache.drill.categories.EasyOutOfMemory \
           -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
       - name: Test Specific Categories # EasyOutOfMemory
         run: |
           sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches' && \
-          mvn test -pl org.apache.drill.exec:drill-java-exec \
+          mvn -P${{ matrix.profile }} test -pl org.apache.drill.exec:drill-java-exec \
           -Dgroups=org.apache.drill.categories.EasyOutOfMemory \
           -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-
   checkstyle_protobuf:
     name: Run checkstyle and generate protobufs
     runs-on: ubuntu-latest
diff --git a/contrib/format-maprdb/pom.xml b/contrib/format-maprdb/pom.xml
index 4ff3b8c..534e9dc 100644
--- a/contrib/format-maprdb/pom.xml
+++ b/contrib/format-maprdb/pom.xml
@@ -55,6 +55,10 @@
             <groupId>org.codehaus.jackson</groupId>
             <artifactId>jackson-core-asl</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-all</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
     </dependencies>
@@ -151,6 +155,10 @@
           <groupId>org.codehaus.jackson</groupId>
           <artifactId>jackson-jaxrs</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
diff --git a/contrib/storage-hbase/pom.xml b/contrib/storage-hbase/pom.xml
index a548490..9346d1f 100644
--- a/contrib/storage-hbase/pom.xml
+++ b/contrib/storage-hbase/pom.xml
@@ -219,6 +219,14 @@
               <groupId>org.codehaus.jackson</groupId>
               <artifactId>jackson-xc</artifactId>
             </exclusion>
+            <exclusion>
+              <groupId>io.netty</groupId>
+              <artifactId>netty</artifactId>
+            </exclusion>
+              <exclusion>
+                <groupId>com.zaxxer</groupId>
+                <artifactId>HikariCP-java7</artifactId>
+              </exclusion>
           </exclusions>
         </dependency>
         <dependency>
diff --git a/contrib/storage-hive/core/pom.xml b/contrib/storage-hive/core/pom.xml
index 0018ff3..2bcaf13 100644
--- a/contrib/storage-hive/core/pom.xml
+++ b/contrib/storage-hive/core/pom.xml
@@ -164,6 +164,10 @@
           <groupId>commons-codec</groupId>
           <artifactId>commons-codec</artifactId>
         </exclusion>
+        <exclusion>
+          <artifactId>reload4j</artifactId>
+          <groupId>ch.qos.reload4j</groupId>
+        </exclusion>
       </exclusions>
     </dependency>
     <!-- Used by complex types tests for loading nested data -->
@@ -214,6 +218,10 @@
           <artifactId>log4j-web</artifactId>
         </exclusion>
         <exclusion>
+          <artifactId>reload4j</artifactId>
+          <groupId>ch.qos.reload4j</groupId>
+        </exclusion>
+        <exclusion>
           <groupId>org.mortbay.jetty</groupId>
           <artifactId>servlet-api-2.5</artifactId>
         </exclusion>
@@ -245,6 +253,18 @@
           <groupId>org.codehaus.jackson</groupId>
           <artifactId>jackson-xc</artifactId>
         </exclusion>
+        <exclusion>
+          <artifactId>netty-all</artifactId>
+          <groupId>io.netty</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>netty</artifactId>
+          <groupId>io.netty</groupId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.zaxxer</groupId>
+          <artifactId>HikariCP-java7</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
 
diff --git a/contrib/storage-phoenix/pom.xml b/contrib/storage-phoenix/pom.xml
index 1068b06..d47b60a 100644
--- a/contrib/storage-phoenix/pom.xml
+++ b/contrib/storage-phoenix/pom.xml
@@ -98,6 +98,16 @@
       <version>6.0.0-drill-r1</version>
       <scope>test</scope>
       <classifier>tests</classifier>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.jackson</groupId>
+          <artifactId>jackson-jaxrs</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.codehaus.jackson</groupId>
+          <artifactId>jackson-xc</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.phoenix</groupId>
@@ -270,6 +280,14 @@
           <groupId>javax.servlet</groupId>
           <artifactId>servlet-api</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.zaxxer</groupId>
+          <artifactId>HikariCP-java7</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 8ed79a0..a3a1bf6 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -173,6 +173,10 @@
           <groupId>org.slf4j</groupId>
           <artifactId>log4j-over-slf4j</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty-all</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
 
diff --git a/docs/dev/Release.md b/docs/dev/Release.md
index f9783fd..a1e1334 100644
--- a/docs/dev/Release.md
+++ b/docs/dev/Release.md
@@ -200,8 +200,20 @@
     The release script will push the maven artifacts to the Maven staging repo.
 
 5. ## Multiple builds
-    For each additional build of Drill beyond the default, e.g. an Hadoop 2 build, create only the signed archives of the source and binaries and upload these to the Apache distribution network using svn. Do not run the full release process again using the Maven release plugin since that will result in the unwanted creation of a new Drill version number. This has the consequence that for additional builds we do not publish code artifacts to the Apache Maven repo. Users of these builds who require these artifacts must therefore build them by compiling Drill under the appropriate profile themselves.
+    For each additional build of Drill beyond the default create only the signed binary archives and upload these to the Apache distribution network using svn. Do not run the full release process again using the Maven release plugin since that will result in the unwanted creation of a new Drill version number. This has the consequence that for additional builds we do not publish code artifacts to the Apache Maven repo. Users of these builds who require these artifacts must therefore build them by compiling Drill under the appropriate profile themselves.
 
+    An example command sequence for RC0 of the Hadoop 2 build follows.
+    ```sh
+    git checkout drill-1.17.0 # check out the tag created for this release
+    git status # ensure that you working copy is completely clean
+    mvn -T1C -Phadoop-2 install -DskipTests # build Drill for Hadoop 2
+    cp distribution/target/apache-drill-1.17.0.tar.gz ~/src/release/drill-dist-dev/1.17.0-rc0/apache-drill-1.17.0-hadoop2.tar.gz
+    cd ~/src/release/drill-dist-dev
+    gpg --clearsign --output apache-drill-1.17.0-hadoop2.tar.gz.asc --detach-sign apache-drill-1.17.0-hadoop2.tar.gz
+    sha512sum apache-drill-1.17.0-hadoop2.tar.gz > apache-drill-1.17.0-hadoop2.tar.gz.sha512
+    svn add apache-drill-*-hadoop2.*
+    svn commit
+    ```
 6. ## Publish release candidate and vote
     1. Go to the [Apache Maven staging repo](https://repository.apache.org/) and close the new jar release.
         This step is done in the Maven GUI. For detailed instructions on sonatype GUI please refer to
@@ -214,13 +226,13 @@
 
         Subject:
         ```
-        [VOTE] Release Apache Drill 1.12.0 - RC0
+        [VOTE] Release Apache Drill 1.17.0 - RC0
         ```
         Body:
         ```
         Hi all,
 
-        I'd like to propose the first release candidate (RC0) of Apache Drill, version 1.12.0.
+        I'd like to propose the first release candidate (RC0) of Apache Drill, version 1.17.0.
 
         The release candidate covers a total of 100500 resolved JIRAs [1]. Thanks to everyone who contributed to this release.
 
@@ -276,7 +288,7 @@
 
             Subject:
             ```
-            [RESULT] [VOTE] Release Apache Drill 1.12.0 RC1
+            [RESULT] [VOTE] Release Apache Drill 1.17.0 RC1
             ```
             Body:
             ```
diff --git a/exec/java-exec/pom.xml b/exec/java-exec/pom.xml
index e7a3685..d9821fc 100644
--- a/exec/java-exec/pom.xml
+++ b/exec/java-exec/pom.xml
@@ -651,6 +651,28 @@
       </dependencies>
     </profile>
     <profile>
+      <id>hadoop-2</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+              <configuration>
+                <excludes>
+                  <!-- The following tests are flaky when run in the full Hadoop 2 CI. -->
+                  <exclude>**/TestBitBitKerberos.java</exclude>
+                  <exclude>**/TestUserBitKerberos.java</exclude>
+                  <exclude>**/TestUserBitKerberosEncryption.java</exclude>
+                  <exclude>**/TestDrillSpnegoAuthenticator.java</exclude>
+                  <exclude>**/TestSpnegoAuthentication.java</exclude>
+                  <exclude>**/TestSpnegoConfig.java</exclude>
+                </excludes>
+              </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
       <id>mapr</id>
       <build>
         <plugins>
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileBatchReader.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileBatchReader.java
index d7510c6..e00e735 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileBatchReader.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileBatchReader.java
@@ -21,7 +21,6 @@
 import java.security.PrivilegedExceptionAction;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.drill.common.AutoCloseables;
 import org.apache.drill.common.exceptions.CustomErrorContext;
 import org.apache.drill.common.exceptions.ExecutionSetupException;
 import org.apache.drill.common.exceptions.UserException;
@@ -154,6 +153,19 @@
 
   @Override
   public void close() {
-    AutoCloseables.closeSilently(reader);
+    try {
+      // Hadoop 2 compat: {@link org.apache.hadoop.mapred.RecordReader} does not
+      // support AutoCloseable and must be closed manually.
+      if (reader != null) {
+        reader.close();
+        reader = null;
+      }
+    } catch (IOException e) {
+      throw UserException
+        .dataReadError(e)
+        .message("Error closing sequencefile reader: " + e.getMessage())
+        .addContext(errorContext)
+        .build(logger);
+    }
   }
 }
diff --git a/exec/java-exec/src/main/resources/drill-module.conf b/exec/java-exec/src/main/resources/drill-module.conf
index e36b4ff..765b8d2 100644
--- a/exec/java-exec/src/main/resources/drill-module.conf
+++ b/exec/java-exec/src/main/resources/drill-module.conf
@@ -190,7 +190,9 @@
             maximum: 9223372036854775807
         }
     },
-    memory.heap.failure.threshold: 0.85,
+    # Default to failing queries only at 100% heap usage, i.e. the heap usage
+    # limiting logic in the REST API is disabled by default.
+    memory.heap.failure.threshold: 1.0,
     web.client.resultset: {
         autolimit {
             checked: false,
diff --git a/exec/jdbc-all/pom.xml b/exec/jdbc-all/pom.xml
index e29dc5e..78b1426 100644
--- a/exec/jdbc-all/pom.xml
+++ b/exec/jdbc-all/pom.xml
@@ -34,10 +34,27 @@
        "package.namespace.prefix" equals to "oadd.". It can be overridden if necessary within any profile -->
   <properties>
     <package.namespace.prefix>oadd.</package.namespace.prefix>
-    <jdbc-all-jar.maxsize>50000000</jdbc-all-jar.maxsize>
+    <jdbc-all-jar.maxsize>46000000</jdbc-all-jar.maxsize>
   </properties>
 
   <dependencies>
+    <!--
+      Notes for excluding unwanted code from the JDBC driver to keep its
+      size down.
+
+      First use conventional Maven exclusions, most commonly required under
+      drill-java-exec, to try to exclude the dependency. If you cannot see
+      the code you want exclude in this module's mvn:dependency-tree under
+      a dependency where you could add an exclusion then you will need to
+      use exclusion rules in the maven-shade-plugin instead.
+
+      Once you've excluded something that was previously present in the JDBC
+      driver you need to test it. Note that neither the JDBC unit tests nor
+      drill-embedded exercise the JDBC driver JAR produced by *this module*,
+      even though they both connect to Drill using JDBC. So to test you need
+      to launch a JDBC client like DBeaver or a short Java CLI program that
+      loads the driver JAR created by this module.
+    -->
 
     <dependency>
       <groupId>org.slf4j</groupId>
@@ -54,6 +71,10 @@
           <artifactId>javassist</artifactId>
           <groupId>javassist</groupId>
         </exclusion>
+        <exclusion>
+          <groupId>io.dropwizard.metrics</groupId>
+          <artifactId>metrics-servlets</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
 
@@ -131,6 +152,10 @@
           <groupId>org.apache.parquet</groupId>
         </exclusion>
         <exclusion>
+          <artifactId>parquet-common</artifactId>
+          <groupId>org.apache.parquet</groupId>
+        </exclusion>
+        <exclusion>
           <artifactId>infinispan-core</artifactId>
           <groupId>org.infinispan</groupId>
         </exclusion>
@@ -196,7 +221,7 @@
         </exclusion>
         <exclusion>
           <groupId>io.airlift</groupId>
-          <artifactId>aircompresssor</artifactId>
+          <artifactId>aircompressor</artifactId>
         </exclusion>
         <exclusion>
           <groupId>io.swagger.core.v3</groupId>
@@ -206,6 +231,38 @@
           <groupId>io.swagger.core.v3</groupId>
           <artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>com.squareup.okhttp3</groupId>
+          <artifactId>okhttp</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.tdunning</groupId>
+          <artifactId>t-digest</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.bettercloud</groupId>
+          <artifactId>vault-java-driver</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.esri.geometry</groupId>
+          <artifactId>esri-geometry-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.yahoo.datasketches</groupId>
+          <artifactId>sketches-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>${calcite.groupId}</groupId>
+          <artifactId>calcite-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>${calcite.groupId}</groupId>
+          <artifactId>calcite-linq4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>net.sf.jpam</groupId>
+          <artifactId>jpam</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
@@ -329,8 +386,6 @@
             </includes>
             <excludes>
               <exclude>io.protostuff:*</exclude>
-              <exclude>${calcite.groupId}:calcite-core</exclude>
-              <exclude>${calcite.groupId}:calcite-linq4j</exclude>
               <exclude>org.pentaho:*</exclude>
               <exclude>org.msgpack:*</exclude>
               <exclude>xerces:*</exclude>
@@ -345,7 +400,6 @@
               <exclude>com.github.stefanbirkner</exclude>
               <exclude>org.ow2.asm:*</exclude>
               <exclude>com.univocity:*</exclude>
-              <exclude>net.sf.jpam:*</exclude>
               <exclude>com.twitter:*</exclude>
               <exclude>org.apache.parquet:*</exclude>
               <exclude>javax.inject:*</exclude>
@@ -358,7 +412,6 @@
               <exclude>net.hydromatic:linq4j</exclude>
               <exclude>org.mortbay.jetty:*</exclude>
               <exclude>org.slf4j:jul-to-slf4j</exclude>
-              <exclude>org.slf4j:log4j-over-slf4j</exclude>
               <exclude>org.hamcrest:hamcrest-core</exclude>
               <exclude>org.mockito:mockito-core</exclude>
               <exclude>org.objenesis:objenesis</exclude>
@@ -372,14 +425,11 @@
               <exclude>commons-beanutils:commons-beanutils-core:jar:*</exclude>
               <exclude>commons-beanutils:commons-beanutils:jar:*</exclude>
               <exclude>com.google.code.findbugs:jsr305:*</exclude>
-              <exclude>com.esri.geometry:esri-geometry-api:*</exclude>
               <exclude>dnsjava:dnsjava:jar:*</exclude>
               <exclude>io.netty:netty-tcnative:jar:*</exclude>
               <exclude>io.netty:netty-tcnative-classes:jar:*</exclude>
-              <exclude>com.bettercloud:vault-java-driver:jar:*</exclude>
-              <exclude>com.tdunning:t-digest:jar:*</exclude>
-              <exclude>io.airlift:aircompressor:jar:*</exclude>
-              <exclude>com.rdblue:brotli-codec:jar:*</exclude>
+              <exclude>com.nimbusds:*</exclude>
+              <exclude>org.apache.yetus:*</exclude>
             </excludes>
           </artifactSet>
           <relocations>
@@ -1230,7 +1280,7 @@
     <profile>
       <id>hadoop-2</id>
       <properties>
-        <jdbc-all-jar.maxsize>50400000</jdbc-all-jar.maxsize>
+        <jdbc-all-jar.maxsize>49000000</jdbc-all-jar.maxsize>
       </properties>
     </profile>
   </profiles>
diff --git a/pom.xml b/pom.xml
index 36b7cb2..320e8cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2175,6 +2175,10 @@
                 <groupId>org.codehaus.jackson</groupId>
                 <artifactId>jackson-jaxrs</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>commons-httpclient</groupId>
+                <artifactId>commons-httpclient</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -2200,11 +2204,23 @@
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
             <version>${hadoop.version}</version>
+            <exclusions>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+              </exclusion>
+            </exclusions>
           </dependency>
           <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-mapreduce-client-core</artifactId>
             <version>${hadoop.version}</version>
+            <exclusions>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+              </exclusion>
+            </exclusions>
           </dependency>
           <dependency>
             <groupId>org.apache.hadoop</groupId>
@@ -2332,7 +2348,6 @@
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-hdfs</artifactId>
             <version>${hadoop.version}</version>
-            <scope>test</scope>
             <exclusions>
               <exclusion>
                 <groupId>commons-logging</groupId>
@@ -2350,6 +2365,14 @@
                 <groupId>log4j</groupId>
                 <artifactId>log4j</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty-all</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
 
@@ -2390,6 +2413,14 @@
                 <groupId>org.codehaus.jackson</groupId>
                 <artifactId>jackson-mapper-asl</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty-all</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
 
@@ -2478,6 +2509,10 @@
                 <groupId>org.codehaus.jackson</groupId>
                 <artifactId>jackson-jaxrs</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>com.zaxxer</groupId>
+                <artifactId>HikariCP-java7</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -3857,6 +3892,14 @@
                 <groupId>org.slf4j</groupId>
               </exclusion>
               <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
+              <exclusion>
+                <artifactId>slf4j-reload4j</artifactId>
+                <groupId>org.slf4j</groupId>
+              </exclusion>
+              <exclusion>
                 <artifactId>mockito-all</artifactId>
                 <groupId>org.mockito</groupId>
               </exclusion>
@@ -3916,6 +3959,10 @@
                 <groupId>org.slf4j</groupId>
               </exclusion>
               <exclusion>
+                <artifactId>slf4j-reload4j</artifactId>
+                <groupId>org.slf4j</groupId>
+              </exclusion>
+              <exclusion>
                 <artifactId>mockito-all</artifactId>
                 <groupId>org.mockito</groupId>
               </exclusion>
@@ -3963,6 +4010,62 @@
                 <groupId>org.apache.hadoop</groupId>
                 <artifactId>hadoop-core</artifactId>
               </exclusion>
+              <exclusion>
+                <groupId>com.zaxxer</groupId>
+                <artifactId>HikariCP-java7</artifactId>
+              </exclusion>
+            </exclusions>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-mapreduce-client-core</artifactId>
+            <version>${hadoop.version}</version>
+            <scope>compile</scope>
+            <exclusions>
+              <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-reload4j</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+              </exclusion>
+            </exclusions>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-auth</artifactId>
+            <version>${hadoop.version}</version>
+            <scope>compile</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-reload4j</artifactId>
+              </exclusion>
+              <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.ow2.asm</groupId>
+                <artifactId>asm</artifactId>
+              </exclusion>
+            </exclusions>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-yarn-common</artifactId>
+            <version>${hadoop.version}</version>
+            <scope>compile</scope>
+            <exclusions>
+              <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -4019,6 +4122,10 @@
                 <groupId>commons-logging</groupId>
                 <artifactId>commons-logging</artifactId>
               </exclusion>
+              <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -4040,6 +4147,31 @@
           <!-- Test Dependencies -->
           <dependency>
             <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+            <version>${hadoop.version}</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+            <exclusions>
+              <exclusion>
+                <groupId>commons-logging</groupId>
+                <artifactId>commons-logging</artifactId>
+              </exclusion>
+              <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-reload4j</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>javax.servlet</groupId>
+                <artifactId>servlet-api</artifactId>
+              </exclusion>
+            </exclusions>
+          </dependency>
+          <dependency>
+            <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-hdfs</artifactId>
             <version>${hadoop.version}</version>
             <scope>test</scope>
@@ -4064,6 +4196,22 @@
                 <groupId>log4j</groupId>
                 <artifactId>log4j</artifactId>
               </exclusion>
+              <exclusion>
+                <artifactId>reload4j</artifactId>
+                <groupId>ch.qos.reload4j</groupId>
+              </exclusion>
+              <exclusion>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-reload4j</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty-all</artifactId>
+              </exclusion>
+              <exclusion>
+                <groupId>io.netty</groupId>
+                <artifactId>netty</artifactId>
+              </exclusion>
             </exclusions>
           </dependency>
           <dependency>
@@ -4112,6 +4260,10 @@
                 <groupId>org.slf4j</groupId>
               </exclusion>
               <exclusion>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-reload4j</artifactId>
+              </exclusion>
+              <exclusion>
                 <artifactId>log4j</artifactId>
                 <groupId>log4j</groupId>
               </exclusion>
@@ -4187,6 +4339,10 @@
                 <groupId>org.slf4j</groupId>
               </exclusion>
               <exclusion>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-reload4j</artifactId>
+              </exclusion>
+              <exclusion>
                 <artifactId>log4j</artifactId>
                 <groupId>log4j</groupId>
               </exclusion>
@@ -4232,6 +4388,10 @@
                 <groupId>org.slf4j</groupId>
               </exclusion>
               <exclusion>
+                <artifactId>slf4j-reload4j</artifactId>
+                <groupId>org.slf4j</groupId>
+              </exclusion>
+              <exclusion>
                 <artifactId>asm</artifactId>
                 <groupId>asm</groupId>
               </exclusion>
diff --git a/tools/release-scripts/release.sh b/tools/release-scripts/release.sh
index 15b0508..06dd058 100755
--- a/tools/release-scripts/release.sh
+++ b/tools/release-scripts/release.sh
@@ -77,9 +77,7 @@
     read -p "Drill Working Directory : " WORK_DIR
     createDirectoryIfAbsent "${WORK_DIR}"
 
-    read -p "Build profile (e.g. hadoop-2, blank for default) : " BUILD_PROFILE
-
-    read -p "Drill Release Version (e.g. 1.4.0, 1.20.0-hadoop2) : " DRILL_RELEASE_VERSION
+    read -p "Drill Release Version (e.g. 1.4.0) : " DRILL_RELEASE_VERSION
 
     read -p "Drill Development Version (e.g. 1.5.0-SNAPSHOT) : " DRILL_DEV_VERSION
 
@@ -100,14 +98,12 @@
 
     DRILL_RELEASE_OUTFILE="${DRILL_RELEASE_OUTDIR}/drill_release.out.txt"
     DRILL_SRC=${WORK_DIR}/drill-release
-    [ -z "$BUILD_PROFILE" ] || BUILD_PROFILE="-P$BUILD_PROFILE"
 
     echo ""
     echo "-----------------"
     echo "JAVA_HOME : " ${JAVA_HOME}
     echo "Drill Working Directory : " ${WORK_DIR}
     echo "Drill Src Directory : " ${DRILL_SRC}
-    echo "Build profile mvn arg: " ${BUILD_PROFILE}
     echo "Drill Release Version : " ${DRILL_RELEASE_VERSION}
     echo "Drill Development Version : " ${DRILL_DEV_VERSION}
     echo "Release Commit SHA : " ${RELEASE_COMMIT_SHA}
@@ -163,14 +159,14 @@
   -DdevelopmentVersion=${DRILL_DEV_VERSION} \
   -DreleaseVersion=${DRILL_RELEASE_VERSION} \
   -Dtag=drill-${DRILL_RELEASE_VERSION} \
-  -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests -Dmaven.javadoc.skip=false ${BUILD_PROFILE}"
+  -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests -Dmaven.javadoc.skip=false"
 
 runCmd "Pushing to private repo ${MY_REPO}" git push ${MY_REPO} drill-${DRILL_RELEASE_VERSION}
 
 runCmd "Performing the release to ${MY_REPO}" mvn release:perform \
   -DconnectionUrl=scm:git:${MY_REPO} \
   -DlocalCheckout=true \
-  -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests ${BUILD_PROFILE}"
+  -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests"
 
 runCmd "Checking out release commit" git checkout drill-${DRILL_RELEASE_VERSION}