PHOENIX-6937 Remove the connectors for Phoenix 4.x (#101)

diff --git a/phoenix-connectors-phoenix4-compat/pom.xml b/phoenix-connectors-phoenix4-compat/pom.xml
deleted file mode 100644
index da71a15..0000000
--- a/phoenix-connectors-phoenix4-compat/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-connectors</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix-connectors-phoenix4-compat</artifactId>
-  <name>Compatibility util for Phoenix 4</name>
-
-  <properties>
-    <phoenix.version>${phoenix-four.version}</phoenix.version>
-    <hbase.version>${hbase-one.version}</hbase.version>
-  </properties>
-
-  <dependencies>
-    <!-- HBase dependencies -->
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-client</artifactId>
-      <version>${hbase.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-server</artifactId>
-      <version>${hbase.version}</version>
-    </dependency>
-  </dependencies>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-connectors-phoenix4-compat/src/main/java/org/apache/phoenix/compat/CompatUtil.java b/phoenix-connectors-phoenix4-compat/src/main/java/org/apache/phoenix/compat/CompatUtil.java
deleted file mode 100644
index ad841f6..0000000
--- a/phoenix-connectors-phoenix4-compat/src/main/java/org/apache/phoenix/compat/CompatUtil.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat;
-
-import org.apache.hadoop.hbase.HRegionLocation;
-import org.apache.hadoop.hbase.client.Admin;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
-import org.apache.hadoop.hbase.client.RegionLocator;
-import org.apache.hadoop.hbase.util.RegionSizeCalculator;
-
-import java.io.IOException;
-
-public class CompatUtil {
-
-    private CompatUtil() {
-        // Not to be instantiated
-    }
-
-    public static boolean tableExists(HBaseAdmin admin, String fullTableName)
-            throws IOException {
-        try {
-            return admin.tableExists(fullTableName);
-        } finally {
-            admin.close();
-        }
-    }
-
-    public static long getSize(RegionLocator regionLocator, Admin admin,
-                               HRegionLocation location) throws IOException {
-        RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(regionLocator, admin);
-        return sizeCalculator.getRegionSize(location.getRegionInfo().getRegionName());
-    }
-
-    public static byte[] getTableName(byte[] tableNameBytes) {
-        return tableNameBytes;
-    }
-
-    public static boolean isPhoenix4() {
-        return true;
-    }
-
-    public static boolean isPhoenix5() {
-        return false;
-    }
-}
diff --git a/phoenix-connectors-phoenix5-compat/pom.xml b/phoenix-connectors-phoenix5-compat/pom.xml
deleted file mode 100644
index e63a4f5..0000000
--- a/phoenix-connectors-phoenix5-compat/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-connectors</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-  <name>Compatibility util for Phoenix 5</name>
-
-  <properties>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-  </properties>
-
-  <dependencies>
-    <!-- HBase dependencies -->
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-client</artifactId>
-      <version>${hbase.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-common</artifactId>
-      <version>${hbase.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-mapreduce</artifactId>
-      <version>${hbase.version}</version>
-    </dependency>
-
-  </dependencies>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-connectors-phoenix5-compat/src/main/java/org/apache/phoenix/compat/CompatUtil.java b/phoenix-connectors-phoenix5-compat/src/main/java/org/apache/phoenix/compat/CompatUtil.java
deleted file mode 100644
index 1a3fb51..0000000
--- a/phoenix-connectors-phoenix5-compat/src/main/java/org/apache/phoenix/compat/CompatUtil.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat;
-
-import org.apache.hadoop.hbase.HRegionLocation;
-import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.Admin;
-import org.apache.hadoop.hbase.client.RegionLocator;
-import org.apache.hadoop.hbase.mapreduce.RegionSizeCalculator;
-
-import java.io.IOException;
-
-public class CompatUtil {
-
-    private CompatUtil() {
-        // Not to be instantiated
-    }
-
-    public static boolean tableExists(Admin admin, String fullTableName)
-            throws IOException {
-        try {
-            return admin.tableExists(TableName.valueOf(fullTableName));
-        } finally {
-            admin.close();
-        }
-    }
-
-    public static long getSize(RegionLocator regionLocator, Admin admin,
-                               HRegionLocation location) throws IOException {
-        RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(regionLocator, admin);
-        return sizeCalculator.getRegionSize(location.getRegionInfo().getRegionName());
-    }
-
-    public static TableName getTableName(byte[] tableNameBytes) {
-        return TableName.valueOf(tableNameBytes);
-    }
-
-    public static boolean isPhoenix4() {
-        return false;
-    }
-
-    public static boolean isPhoenix5() {
-        return true;
-    }
-}
diff --git a/phoenix-flume-base/phoenix4-flume/pom.xml b/phoenix-flume-base/phoenix4-flume/pom.xml
deleted file mode 100644
index 623ed32..0000000
--- a/phoenix-flume-base/phoenix4-flume/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-flume-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix4-flume</artifactId>
-  <name>Phoenix Flume Connector for Phoenix 4</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix4-compat</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-flume-base/phoenix5-flume/pom.xml b/phoenix-flume-base/phoenix5-flume/pom.xml
deleted file mode 100644
index eef8e22..0000000
--- a/phoenix-flume-base/phoenix5-flume/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-flume-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix5-flume</artifactId>
-  <name>Phoenix Flume Connector for Phoenix 5</name>
-
-  <properties>
-    <top.dir>${project.basedir}/..</top.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-hive-base/phoenix4-hive-shaded/pom.xml b/phoenix-hive-base/phoenix4-hive-shaded/pom.xml
deleted file mode 100644
index 1e301a5..0000000
--- a/phoenix-hive-base/phoenix4-hive-shaded/pom.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-hive-base</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix4-hive-shaded</artifactId>
-  <name>Shaded Phoenix Hive Connector for Phoenix 4</name>
-
-  <properties>
-    <hive.version>${hive2.version}</hive.version>
-    <hive-storage.version>${hive2-storage.version}</hive-storage.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-hive</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <!-- maven-shade-plugin doesn't inherit dependency settings, we must duplicate them to avoid
-adding the provided dependencies -->
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-cli</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-exec</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These three dependencies are falsely flagged by dependency plugin -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-serde</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-storage-api</artifactId>
-      <version>${hive-storage.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These are actually different between phoenix 5 and phoenix 4 -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-metastore</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-server</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper</artifactId>
-      <version>${zookeeper.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- We want to take the implementation from Hive -->
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-      </plugin>
-      <!-- TODO consider not enabling these globally instead -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <executions>
-          <execution>
-             <id>default-compile</id>
-             <phase>none</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-hive-base/phoenix4-hive/pom.xml b/phoenix-hive-base/phoenix4-hive/pom.xml
deleted file mode 100644
index d2fd374..0000000
--- a/phoenix-hive-base/phoenix4-hive/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-hive-base</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix4-hive</artifactId>
-  <name>Phoenix Hive Connector for Phoenix 4</name>
-
-  <properties>
-    <hive.version>${hive2.version}</hive.version>
-    <hive-storage.version>${hive2-storage.version}</hive-storage.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix4-compat</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-      <optional>true</optional>
-    </dependency>
-    <!-- Hive dependencies cannot be specified in the phoenix-hive-common, because of
-    hbase transitive dependency version conflicts -->
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-cli</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-exec</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These three dependencies are falsely flagged by dependency plugin -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-serde</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-storage-api</artifactId>
-      <version>${hive-storage.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These are actually different between phoenix 5 and phoenix 4 -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-metastore</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-server</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper</artifactId>
-      <version>${zookeeper.version}</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java b/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java
deleted file mode 100644
index c5b5052..0000000
--- a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat;
-
-import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.ql.QueryState;
-import org.apache.hadoop.hive.ql.io.AcidOutputFormat;
-import org.apache.hadoop.hive.ql.metadata.Hive;
-import org.apache.hadoop.hive.ql.metadata.HiveMaterializedViewsRegistry;
-import org.apache.hadoop.hive.ql.parse.ParseDriver;
-import org.apache.hadoop.hive.ql.parse.SemanticAnalyzer;
-import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
-import org.apache.hadoop.hive.ql.session.SessionState;
-import org.slf4j.Logger;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.concurrent.atomic.AtomicReference;
-
-public class HiveCompatUtil {
-
-    private HiveCompatUtil() {
-        // Not to be instantiated
-    }
-
-    public static ExprNodeGenericFuncDesc getComparisonExpr(ExprNodeGenericFuncDesc comparisonExpr, boolean isNot) {
-        return comparisonExpr;
-    }
-
-    public static String getOptionsValue(AcidOutputFormat.Options options, AtomicReference<Method> GET_BUCKET_METHOD_REF, AtomicReference<Method> GET_BUCKET_ID_METHOD_REF, Logger LOG) {
-        StringBuilder content = new StringBuilder();
-
-        int bucket = options.getBucket();
-        String inspectorInfo = options.getInspector().getCategory() + ":" + options.getInspector()
-                .getTypeName();
-        long maxTxnId = options.getMaximumTransactionId();
-        long minTxnId = options.getMinimumTransactionId();
-        int recordIdColumn = options.getRecordIdColumn();
-        boolean isCompresses = options.isCompressed();
-        boolean isWritingBase = options.isWritingBase();
-
-        content.append("bucket : ").append(bucket).append(", inspectorInfo : ").append
-                (inspectorInfo).append(", minTxnId : ").append(minTxnId).append(", maxTxnId : ")
-                .append(maxTxnId).append(", recordIdColumn : ").append(recordIdColumn);
-        content.append(", isCompressed : ").append(isCompresses).append(", isWritingBase : ")
-                .append(isWritingBase);
-
-        return content.toString();
-    }
-
-    public static Object getDateOrTimestampValue(Object value){
-        return null;
-    }
-
-    public static String getDefaultDatabaseName(){
-        return org.apache.hadoop.hive.metastore.MetaStoreUtils.DEFAULT_DATABASE_NAME;
-    }
-
-    public static MyResult doSetup(String confDir) throws MalformedURLException {
-        // HIVE-14443 move this fall-back logic to CliConfigs
-        if (confDir != null && !confDir.isEmpty()) {
-            HiveConf.setHiveSiteLocation(new URL("file://"+ new File(confDir).toURI().getPath() + "/hive-site.xml"));
-            System.out.println("Setting hive-site: "+ HiveConf.getHiveSiteLocation());
-        }
-        HiveConf conf = new HiveConf();
-        String tmpBaseDir = System.getProperty("test.tmp.dir");
-        if (tmpBaseDir == null || tmpBaseDir == "") {
-            tmpBaseDir = System.getProperty("java.io.tmpdir");
-        }
-        String metaStoreURL = "jdbc:derby:" + tmpBaseDir + File.separator + "metastore_dbtest;" +
-                "create=true";
-        conf.set(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname, metaStoreURL);
-        System.setProperty(HiveConf.ConfVars.METASTORECONNECTURLKEY.varname, metaStoreURL);
-        return new MyResult(conf, new QueryState(conf));
-    }
-
-    public static void destroyTEZSession(SessionState sessionState){
-    }
-
-    public static Object getDriver(HiveConf conf){
-        return null;
-    }
-
-    public static void cleanupQueryResultCache() { }
-
-    public static HiveConf getHiveConf(){
-        return new HiveConf();
-    }
-
-    public static int getDriverResponseCode(Object drv, String createTableCmd){
-        return -1; // There is no driver in Phoenix4Hive2
-    }
-
-    public static void closeDriver(Object drv) { }
-
-    public static QueryState getQueryState(HiveConf conf){
-        return new QueryState(conf);
-    }
-
-    public static void initHiveMaterializedViewsRegistry() {}
-
-    public static void initHiveMaterializedViewsRegistry(Hive db)
-    {
-        HiveMaterializedViewsRegistry.get().init(db);
-    }
-}
diff --git a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/compat/MyResult.java b/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/compat/MyResult.java
deleted file mode 100644
index 1da4615..0000000
--- a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/compat/MyResult.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.compat;
-
-import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.ql.QueryState;
-
-public class MyResult {
-    private final HiveConf conf;
-    private final QueryState queryState;
-
-    public MyResult(HiveConf conf, QueryState queryState) {
-        this.conf = conf;
-        this.queryState = queryState;
-    }
-
-    public HiveConf getFirst() {
-        return conf;
-    }
-
-    public QueryState getSecond() {
-        return queryState;
-    }
-}
\ No newline at end of file
diff --git a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java b/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java
deleted file mode 100644
index 1a0e2e9..0000000
--- a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.hive.objectinspector;
-
-import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.AbstractPrimitiveLazyObjectInspector;
-import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
-import org.apache.hadoop.io.Writable;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * AbstractPhoenixObjectInspector for a LazyPrimitive object
- */
-public abstract class AbstractPhoenixObjectInspector<T extends Writable>
-        extends AbstractPrimitiveLazyObjectInspector<T> {
-
-    private Logger log;
-
-    public AbstractPhoenixObjectInspector() {
-        super();
-
-        log = LoggerFactory.getLogger(getClass());
-    }
-
-    protected AbstractPhoenixObjectInspector(PrimitiveTypeInfo typeInfo) {
-        super(typeInfo);
-
-        log = LoggerFactory.getLogger(getClass());
-    }
-
-    @Override
-    public Object getPrimitiveJavaObject(Object o) {
-        return o == null ? null : o;
-    }
-
-    public void logExceptionMessage(Object value, String dataType) {
-        if (log.isDebugEnabled()) {
-            log.debug("Data not in the " + dataType + " data type range so converted to null. " +
-                    "Given data is :"
-                    + value.toString(), new Exception("For debugging purposes"));
-        }
-    }
-}
\ No newline at end of file
diff --git a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java b/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java
deleted file mode 100644
index ca3f5f6..0000000
--- a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.hive.objectinspector;
-
-import org.apache.hadoop.hive.serde2.io.DateWritable;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DateObjectInspector;
-import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
-
-import java.sql.Date;
-
-/**
- * ObjectInspector for date type
- */
-
-
-public class PhoenixDateObjectInspectorBase extends AbstractPhoenixObjectInspector<DateWritable>
-        implements DateObjectInspector {
-
-    public PhoenixDateObjectInspectorBase()
-    {
-        super(TypeInfoFactory.dateTypeInfo);
-    }
-
-    @Override
-    public Object copyObject(Object o) {
-        return o == null ? null : new Date(((Date) o).getTime());
-    }
-
-    @Override
-    public DateWritable getPrimitiveWritableObject(Object o) {
-        DateWritable value = null;
-
-        if (o != null) {
-            try {
-                value = new DateWritable((Date) o);
-            } catch (Exception e) {
-                logExceptionMessage(o, "DATE");
-                value = new DateWritable();
-            }
-        }
-
-        return value;
-    }
-
-    @Override
-    public Date getPrimitiveJavaObject(Object o) {
-        return (Date) o;
-    }
-
-}
diff --git a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java b/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java
deleted file mode 100644
index d6c05fd..0000000
--- a/phoenix-hive-base/phoenix4-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.hive.objectinspector;
-
-import org.apache.hadoop.hive.serde2.io.TimestampWritable;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.TimestampObjectInspector;
-import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
-
-import java.sql.Timestamp;
-
-/**
- * ObjectInspector for timestamp type
- */
-public class PhoenixTimestampObjectInspectorBase extends
-        AbstractPhoenixObjectInspector<TimestampWritable>
-        implements TimestampObjectInspector {
-
-    public PhoenixTimestampObjectInspectorBase()
-    {
-        super(TypeInfoFactory.timestampTypeInfo);
-    }
-
-    @Override
-    public Timestamp getPrimitiveJavaObject(Object o) {
-        return (Timestamp) o;
-    }
-
-    @Override
-    public Object copyObject(Object o) {
-        return o == null ? null : new Timestamp(((Timestamp) o).getTime());
-    }
-
-    @Override
-    public TimestampWritable getPrimitiveWritableObject(Object o) {
-        TimestampWritable value = null;
-
-        if (o != null) {
-            try {
-                value = new TimestampWritable((Timestamp) o);
-            } catch (Exception e) {
-                logExceptionMessage(o, "TIMESTAMP");
-            }
-        }
-
-        return value;
-    }
-}
diff --git a/phoenix-hive-base/phoenix5-hive-shaded/pom.xml b/phoenix-hive-base/phoenix5-hive-shaded/pom.xml
deleted file mode 100644
index 67211e9..0000000
--- a/phoenix-hive-base/phoenix5-hive-shaded/pom.xml
+++ /dev/null
@@ -1,209 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-hive-base</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix5-hive-shaded</artifactId>
-  <name>Shaded Phoenix Hive Connector for Phoenix 5</name>
-
-  <properties>
-    <test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <zookeeper.version>${hbase-two.zookeeper.version}</zookeeper.version>
-    <hive.version>${hive3.version}</hive.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix5-hive</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper-jute</artifactId>
-      <version>${zookeeper.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- maven-shade-plugin doesn't inherit dependency settings, we must duplicate them to avoid
-    adding the provided dependencies -->
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-      <optional>true</optional>
-    </dependency>
-    <!-- Hive dependencies cannot be specified in the phoenix-hive-common, because of
-    hbase transitive dependency version conflicts -->
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-cli</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-exec</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These three dependencies are falsely flagged by dependency plugin -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-serde</artifactId>
-      <version>${hive.version}</version>
-      <exclusions>
-        <!-- Fix conflict with Minicluster -->
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>*</artifactId>
-        </exclusion>
-      </exclusions>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-storage-api</artifactId>
-      <version>${hive-storage.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These are actually different between phoenix 5 and phoenix 4 -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-standalone-metastore</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>com.google.guava</groupId>
-          <artifactId>guava</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-mapreduce</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-zookeeper</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-core</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-protocol-shaded</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-endpoint</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdfs-client</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-minicluster</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper</artifactId>
-      <version>${zookeeper.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- We want to take the implementation from Hive -->
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-      </plugin>
-      <!-- TODO consider not enabling these globally instead -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <executions>
-          <execution>
-             <id>default-compile</id>
-             <phase>none</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
\ No newline at end of file
diff --git a/phoenix-hive-base/phoenix5-hive/pom.xml b/phoenix-hive-base/phoenix5-hive/pom.xml
deleted file mode 100644
index 7e91939..0000000
--- a/phoenix-hive-base/phoenix5-hive/pom.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-hive-base</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix5-hive</artifactId>
-  <name>Phoenix Hive Connector for Phoenix 5</name>
-
-  <properties>
-    <test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <zookeeper.version>${hbase-two.zookeeper.version}</zookeeper.version>
-    <hive.version>${hive3.version}</hive.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
-    <calcite.version>${hive5.calcite.version}</calcite.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-      <optional>true</optional>
-    </dependency>
-    <!-- Hive dependencies cannot be specified in the phoenix-hive-common, because of
-    hbase transitive dependency version conflicts -->
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-cli</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hive</groupId>
-      <artifactId>hive-exec</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These three dependencies are falsely flagged by dependency plugin -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-serde</artifactId>
-      <version>${hive.version}</version>
-      <exclusions>
-        <!-- Fix conflict with Minicluster -->
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>*</artifactId>
-        </exclusion>
-      </exclusions>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-storage-api</artifactId>
-      <version>${hive-storage.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId> org.apache.hive.shims</groupId>
-      <artifactId>hive-shims-common</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <!-- These are actually different between phoenix 5 and phoenix 4 -->
-    <dependency>
-      <groupId> org.apache.hive</groupId>
-      <artifactId>hive-standalone-metastore</artifactId>
-      <version>${hive.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-mapreduce</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-zookeeper</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-core</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-protocol-shaded</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-endpoint</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdfs-client</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-minicluster</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.zookeeper</groupId>
-      <artifactId>zookeeper</artifactId>
-      <version>${zookeeper.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-testing-util</artifactId>
-      <version>${hbase.version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-</project>
\ No newline at end of file
diff --git a/phoenix-hive-base/pom.xml b/phoenix-hive-base/pom.xml
deleted file mode 100644
index 8903e7e..0000000
--- a/phoenix-hive-base/pom.xml
+++ /dev/null
@@ -1,615 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
-
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-connectors</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <artifactId>phoenix-hive-base</artifactId>
-  <name>Phoenix Hive Connector - Base</name>
-
-  <packaging>pom</packaging>
-
-  <modules>
-    <module>phoenix4-hive</module>
-    <module>phoenix4-hive-shaded</module>
-    <module>phoenix5-hive</module>
-    <module>phoenix5-hive-shaded</module>
-  </modules>
-
-  <properties>
-    <test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir>
-    <tez.version>0.9.1</tez.version>
-    <jdk.version>1.8</jdk.version>
-    <commons-lang3.version>3.9</commons-lang3.version>
-    <hive4.calcite.version>1.10.0</hive4.calcite.version>
-    <hive5.calcite.version>1.16.0</hive5.calcite.version>
-    <calcite.version>${hive4.calcite.version}</calcite.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix.thirdparty</groupId>
-      <artifactId>phoenix-shaded-guava</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-      <version>${commons-lang3.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-protocol</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-client</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-core</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-compress</artifactId>
-      <version>${commons-compress.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>${commons-io.version}</version>
-    </dependency>
-
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-server</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-it</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdfs</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-      </exclusions>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tez</groupId>
-      <artifactId>tez-tests</artifactId>
-      <scope>test</scope>
-      <version>${tez.version}</version>
-      <type>test-jar</type>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-yarn-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tez</groupId>
-      <artifactId>tez-dag</artifactId>
-      <scope>test</scope>
-      <version>${tez.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.hadoop</groupId>
-          <artifactId>hadoop-yarn-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-      <scope>provided</scope>
-      <version>${log4j2.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-      <scope>provided</scope>
-      <version>${log4j2.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
-      <scope>provided</scope>
-      <version>${log4j2.version}</version>
-    </dependency>
-
-
-<!-- Mark every HBase and Hadoop jar as provided -->
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-annotations</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-metrics-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-metrics</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-server</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-hadoop-compat</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-hadoop2-compat</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase.thirdparty</groupId>
-      <artifactId>hbase-shaded-miscellaneous</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hbase.thirdparty</groupId>
-      <artifactId>hbase-shaded-protobuf</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-annotations</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-auth</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-yarn-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <artifactId>maven-dependency-plugin</artifactId>
-          <configuration>
-            <ignoreNonCompile>true</ignoreNonCompile>
-            <ignoredUnusedDeclaredDependencies>
-              <ignoredUnusedDeclaredDependency>
-                 org.slf4j:slf4j-api
-              </ignoredUnusedDeclaredDependency>
-              <ignoredUnusedDeclaredDependency>
-                org.apache.commons:commons-lang3
-              </ignoredUnusedDeclaredDependency>
-            </ignoredUnusedDeclaredDependencies>
-            <ignoredUsedUndeclaredDependencies>
-              <!-- I couldn't find it referenced anywhere in the phoenix-hive codebase -->
-              <ignoredUsedUndeclaredDependency>
-                com.google.code.findbugs:jsr305
-              </ignoredUsedUndeclaredDependency>
-              <ignoredUsedUndeclaredDependency>
-                org.apache.calcite.avatica:avatica
-              </ignoredUsedUndeclaredDependency>
-            </ignoredUsedUndeclaredDependencies>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>build-helper-maven-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>add-parent-source</id>
-              <phase>generate-sources</phase>
-              <goals>
-                <goal>add-source</goal>
-              </goals>
-              <configuration>
-                <sources>
-                  <source>${project.parent.basedir}/src/main/java</source>
-                </sources>
-              </configuration>
-            </execution>
-            <execution>
-              <id>add-parent-test-source</id>
-              <phase>generate-sources</phase>
-              <goals>
-                <goal>add-test-source</goal>
-              </goals>
-              <configuration>
-                <sources>
-                  <source>${project.parent.basedir}/src/it/java</source>
-                  <source>${project.parent.basedir}/src/test/java</source>
-                </sources>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <artifactId>maven-failsafe-plugin</artifactId>
-          <configuration>
-            <!-- The Hbase + Hive minicluster setup seems very fragile, so
-            we make sure to run everything as serially as possible -->
-            <forkCount>1</forkCount>
-            <reuseForks>false</reuseForks>
-          </configuration>
-          <executions>
-            <execution>
-              <id>ParallelStatsDisabledTest</id>
-              <configuration>
-                <forkCount>1</forkCount>
-                <reuseForks>false</reuseForks>
-                <argLine>-Xmx3000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine>
-                <groups>org.apache.phoenix.end2end.ParallelStatsDisabledTest</groups>
-              </configuration>
-              <goals>
-                <goal>integration-test</goal>
-                <goal>verify</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <artifactId>maven-resources-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>copy-resources</id>
-              <phase>generate-resources</phase>
-              <goals>
-                <goal>copy-resources</goal>
-              </goals>
-              <configuration>
-                <outputDirectory>${project.build.directory}/test-classes
-                </outputDirectory>
-                <overwrite>true</overwrite>
-                <resources>
-                  <resource>
-                    <directory>${project.parent.basedir}/src/test/resources</directory>
-                  </resource>
-                </resources>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-compiler-plugin</artifactId>
-          <configuration>
-            <source>8</source>
-            <target>8</target>
-          </configuration>
-        </plugin>
-        <!-- Taken from phoenix-client-parent
-        this should be kept in sync with Phoenix as much as possible -->
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-shade-plugin</artifactId>
-          <configuration>
-            <shadedArtifactAttached>false</shadedArtifactAttached>
-            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-            <filters>
-              <filter>
-                <artifact>*:*</artifact>
-                <excludes>
-                  <exclude>META-INF/*.SF</exclude>
-                  <exclude>META-INF/*.DSA</exclude>
-                  <exclude>META-INF/*.RSA</exclude>
-                  <exclude>META-INF/license/*</exclude>
-                  <exclude>META-INF/NOTICE</exclude>
-                  <exclude>LICENSE.*</exclude>
-                  <exclude>NOTICE.*</exclude>
-                  <exclude>NOTICE</exclude>
-                  <exclude>README*</exclude>
-                  <!-- Coming from Omid, should be fixed there -->
-                  <exclude>log4j.properties</exclude>
-                </excludes>
-              </filter>
-             <filter>
-                <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
-                <excludes>
-                  <exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
-                  <exclude>webapps/**</exclude>
-                </excludes>
-              </filter>
-              <!-- Phoenix specific -->
-              <filter>
-                <artifact>org.apache.commons:commons-math3</artifact>
-                <excludes>
-                  <exclude>assets/**</exclude>
-                </excludes>
-              </filter>
-              <filter>
-                <artifact>org.apache.hbase:hbase-server</artifact>
-                <excludes>
-                  <exclude>hbase-webapps/**</exclude>
-                </excludes>
-              </filter>
-              <!-- Phoenix specific -->
-            </filters>
-            <transformers>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>csv-bulk-load-config.properties</resource>
-                <file>
-                  ${project.basedir}/../config/csv-bulk-load-config.properties
-                </file>
-              </transformer>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>README.md</resource>
-                <file>${project.basedir}/../README.md</file>
-              </transformer>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>LICENSE.txt</resource>
-                <file>${project.basedir}/../LICENSE</file>
-              </transformer>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>NOTICE</resource>
-                <file>${project.basedir}/../NOTICE</file>
-              </transformer>
-            </transformers>
-            <relocations>
-              <relocation>
-                <pattern>org/</pattern>
-                <shadedPattern>${shaded.package}.org.</shadedPattern>
-                <excludes>
-                  <exclude>org/apache/hadoop/**</exclude>
-                  <!-- Our non-shaded htrace and logging libraries -->
-                  <exclude>org/apache/htrace/**</exclude>
-                  <exclude>org/slf4j/**</exclude>
-                  <exclude>org/apache/commons/logging/**</exclude>
-                  <exclude>org/apache/log4j/**</exclude>
-                  <!-- Not the org/ packages that are a part of the jdk -->
-                  <exclude>org/ietf/jgss/**</exclude>
-                  <exclude>org/omg/**</exclude>
-                  <exclude>org/w3c/dom/**</exclude>
-                  <exclude>org/xml/sax/**</exclude>
-                  <!-- Extras compared to Hadoop -->
-                  <!-- Hbase classes - Maybe these could be shaded as well ? -->
-                  <exclude>org/apache/hbase/**</exclude>
-                  <!-- Phoenix classes -->
-                  <exclude>org/apache/phoenix/**</exclude>
-                  <exclude>org/apache/omid/**</exclude>
-                  <!-- Do want/need to expose Tephra as well ? -->
-                </excludes>
-              </relocation>
-              <relocation>
-                <pattern>com/</pattern>
-                <shadedPattern>${shaded.package}.com.</shadedPattern>
-                <excludes>
-                  <!-- Not the com/ packages that are a part of particular jdk implementations -->
-                  <exclude>com/sun/tools/**</exclude>
-                  <exclude>com/sun/javadoc/**</exclude>
-                  <exclude>com/sun/security/**</exclude>
-                  <exclude>com/sun/jndi/**</exclude>
-                  <exclude>com/sun/management/**</exclude>
-                  <!-- We are getting unshaded HBase from Hive, we must leave protobuf generated
-                  classes alone -->
-                  <exclude>com/google/protobuf/**</exclude>
-                </excludes>
-              </relocation>
-              <relocation>
-                <pattern>io/</pattern>
-                <shadedPattern>${shaded.package}.io.</shadedPattern>
-                <excludes>
-                  <!-- Exclude config keys for Hadoop that look like package names -->
-                  <exclude>io/compression/**</exclude>
-                  <exclude>io/mapfile/**</exclude>
-                  <exclude>io/map/index/*</exclude>
-                  <exclude>io/seqfile/**</exclude>
-                  <exclude>io/file/buffer/size</exclude>
-                  <exclude>io/skip/checksum/errors</exclude>
-                  <exclude>io/sort/*</exclude>
-                  <exclude>io/serializations</exclude>
-                </excludes>
-              </relocation>
-              <!-- JSRs that haven't made it to inclusion in J2SE -->
-              <relocation>
-                <pattern>javax/el/</pattern>
-                <shadedPattern>${shaded.package}.javax.el.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/cache/</pattern>
-                <shadedPattern>${shaded.package}.javax.cache.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/servlet/</pattern>
-                <shadedPattern>${shaded.package}.javax.servlet.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/ws/</pattern>
-                <shadedPattern>${shaded.package}.javax.ws.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/annotation/</pattern>
-                <shadedPattern>${shaded.package}.javax.annotation.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/inject/</pattern>
-                <shadedPattern>${shaded.package}.javax.inject.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/validation/</pattern>
-                <shadedPattern>${shaded.package}.javax.validation.</shadedPattern>
-            </relocation>
-              <relocation>
-                <pattern>net/</pattern>
-                <shadedPattern>${shaded.package}.net.</shadedPattern>
-                <excludes>
-                  <!-- Exclude config keys for Hadoop that look like package names -->
-                  <exclude>net/topology/**</exclude>
-                </excludes>
-              </relocation>
-              <!-- okio declares a top level package instead of nested -->
-              <relocation>
-                <pattern>okio/</pattern>
-                <shadedPattern>${shaded.package}.okio.</shadedPattern>
-              </relocation>
-              <!-- Phoenix specific relocations -->
-              <relocation>
-                <!-- Tephra -->
-                <pattern>co/</pattern>
-                <shadedPattern>${shaded.package}.co.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>it/</pattern>
-                <shadedPattern>${shaded.package}.it.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javassist/</pattern>
-                <shadedPattern>${shaded.package}.javassist.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>jersey/</pattern>
-                <shadedPattern>${shaded.package}.jersey.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>jline/</pattern>
-                <shadedPattern>${shaded.package}.jline.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>mozilla/</pattern>
-                <shadedPattern>${shaded.package}.mozilla.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>tables/</pattern>
-                <shadedPattern>${shaded.package}.tables.</shadedPattern>
-              </relocation>
-              <!-- Phoenix specific relocations end -->
-            </relocations>
-          </configuration>
-          <executions>
-            <execution>
-              <phase>package</phase>
-              <goals>
-                <goal>shade</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-
-   <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.apache.calcite</groupId>
-        <artifactId>calcite-core</artifactId>
-        <version>${calcite.version}</version>
-        <exclusions>
-          <exclusion>
-            <!-- PHOENIX-6478: exclude a dependency that is not required and not available at Maven Central -->
-            <groupId>org.pentaho</groupId>
-            <artifactId>pentaho-aggdesigner-algorithm</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-</project>
diff --git a/phoenix-kafka-base/phoenix4-kafka/pom.xml b/phoenix-kafka-base/phoenix4-kafka/pom.xml
deleted file mode 100644
index 6916617..0000000
--- a/phoenix-kafka-base/phoenix4-kafka/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-kafka-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix4-kafka</artifactId>
-  <name>Phoenix Kafka Connector for Phoenix 4</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-flume</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-site-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-kafka-base/phoenix5-kafka/pom.xml b/phoenix-kafka-base/phoenix5-kafka/pom.xml
deleted file mode 100644
index 8b2323e..0000000
--- a/phoenix-kafka-base/phoenix5-kafka/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-kafka-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix5-kafka</artifactId>
-  <name>Phoenix Kafka Connector for Phoenix 5</name>
-
-  <properties>
-    <top.dir>${project.basedir}/..</top.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
-  </properties>
-
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix5-flume</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-site-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-spark-base/phoenix4-spark-shaded/pom.xml b/phoenix-spark-base/phoenix4-spark-shaded/pom.xml
deleted file mode 100644
index 3bae294..0000000
--- a/phoenix-spark-base/phoenix4-spark-shaded/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-spark-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix4-spark-shaded</artifactId>
-  <name>Shaded Phoenix Spark Connector for Phoenix 4</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-spark</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <!-- We want to take the implementation from Spark -->
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-      </plugin>
-      <!-- TODO consider not enabling these globally instead -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <executions>
-          <execution>
-             <id>default-compile</id>
-             <phase>none</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-spark-base/phoenix4-spark/pom.xml b/phoenix-spark-base/phoenix4-spark/pom.xml
deleted file mode 100644
index 53bbfde..0000000
--- a/phoenix-spark-base/phoenix4-spark/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-spark-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix4-spark</artifactId>
-  <name>Phoenix Spark Connector for Phoenix 4</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix4-compat</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.scalatest</groupId>
-        <artifactId>scalatest-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-spark-base/phoenix5-spark-shaded/pom.xml b/phoenix-spark-base/phoenix5-spark-shaded/pom.xml
deleted file mode 100644
index 5beddc0..0000000
--- a/phoenix-spark-base/phoenix5-spark-shaded/pom.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-spark-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix5-spark-shaded</artifactId>
-  <name>Shaded Phoenix Spark Connector for Phoenix 5</name>
-
-  <properties>
-    <top.dir>${project.basedir}/..</top.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix5-spark</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <!-- We want to take the implementation from Spark -->
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-      </plugin>
-      <!-- TODO consider not enabling these globally instead -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <executions>
-          <execution>
-             <id>default-compile</id>
-             <phase>none</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-spark-base/phoenix5-spark/pom.xml b/phoenix-spark-base/phoenix5-spark/pom.xml
deleted file mode 100644
index f33ff88..0000000
--- a/phoenix-spark-base/phoenix5-spark/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <artifactId>phoenix-spark-base</artifactId>
-    <groupId>org.apache.phoenix</groupId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-
-  <artifactId>phoenix5-spark</artifactId>
-  <name>Phoenix Spark Connector for Phoenix 5</name>
-
-  <properties>
-    <top.dir>${project.basedir}/..</top.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
-  </properties>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>net.alchim31.maven</groupId>
-        <artifactId>scala-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.scalatest</groupId>
-        <artifactId>scalatest-maven-plugin</artifactId>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
\ No newline at end of file
diff --git a/phoenix-spark-base/pom.xml b/phoenix-spark-base/pom.xml
deleted file mode 100644
index 6b64570..0000000
--- a/phoenix-spark-base/pom.xml
+++ /dev/null
@@ -1,862 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-connectors</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-  <artifactId>phoenix-spark-base</artifactId>
-  <name>Phoenix Spark Connector - Base</name>
-
-  <properties>
-    <top.dir>${project.basedir}/..</top.dir>
-    <skip-scala-tests>true</skip-scala-tests>
-  </properties>
-
-  <packaging>pom</packaging>
-  <modules>
-    <module>phoenix4-spark</module>
-    <module>phoenix4-spark-shaded</module>
-    <module>phoenix5-spark</module>
-    <module>phoenix5-spark-shaded</module>
-  </modules>
-
-  <dependencies>
-
-    <!-- Spark dependencies first to avoid jackson compatibility problems -->
-    <!-- Mark Spark / Scala as provided -->
-    <dependency>
-      <groupId>org.scala-lang</groupId>
-      <artifactId>scala-library</artifactId>
-      <version>${scala.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.scala-lang</groupId>
-      <artifactId>scala-reflect</artifactId>
-      <version>${scala.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.spark</groupId>
-      <artifactId>spark-core_${scala.binary.version}</artifactId>
-      <version>${spark.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.spark</groupId>
-      <artifactId>spark-sql_${scala.binary.version}</artifactId>
-      <version>${spark.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.spark</groupId>
-      <artifactId>spark-unsafe_${scala.binary.version}</artifactId>
-      <version>${spark.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.spark</groupId>
-      <artifactId>spark-tags_${scala.binary.version}</artifactId>
-      <version>${spark.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.spark</groupId>
-      <artifactId>spark-catalyst_${scala.binary.version}</artifactId>
-      <version>${spark.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
-      <scope>runtime</scope>
-      <optional>true</optional>
-    </dependency>
-
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.scalatest</groupId>
-      <artifactId>scalatest_${scala.binary.version}</artifactId>
-      <version>2.2.4</version>
-      <scope>test</scope>
-    </dependency>
-
-
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-common</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.servlet</groupId>
-          <artifactId>servlet-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.servlet.jsp</groupId>
-          <artifactId>jsp-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-      </exclusions>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-core</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.servlet</groupId>
-          <artifactId>servlet-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.servlet.jsp</groupId>
-          <artifactId>jsp-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-      </exclusions>
-      <scope>provided</scope>
-    </dependency>
-
-
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-client</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.thrift</groupId>
-          <artifactId>thrift</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-log4j12</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jsp-2.1</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jsp-api-2.1</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>servlet-api-2.5</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jersey</groupId>
-          <artifactId>jersey-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jersey</groupId>
-          <artifactId>jersey-json</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jersey</groupId>
-          <artifactId>jersey-server</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jetty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jetty-util</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-runtime</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-compiler</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-common</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.thrift</groupId>
-          <artifactId>thrift</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-log4j12</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jsp-2.1</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jsp-api-2.1</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>servlet-api-2.5</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jersey</groupId>
-          <artifactId>jersey-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jersey</groupId>
-          <artifactId>jersey-json</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jersey</groupId>
-          <artifactId>jersey-server</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jetty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jetty-util</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-runtime</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-compiler</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>joda-time</groupId>
-      <artifactId>joda-time</artifactId>
-      <version>${jodatime.version}</version>
-    </dependency>
-
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdfs</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.servlet</groupId>
-          <artifactId>servlet-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.servlet.jsp</groupId>
-          <artifactId>jsp-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jruby</groupId>
-          <artifactId>jruby-complete</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>io.netty</groupId>
-          <artifactId>netty</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-it</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- Mark every Hadoop jar as provided -->
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-annotations</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-auth</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-yarn-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-hdfs</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-distcp</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-client</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hadoop</groupId>
-      <artifactId>hadoop-mapreduce-client-common</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <!-- We want to take the implementation from Spark -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <version>2.5.0</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>build-helper-maven-plugin</artifactId>
-          <version>3.0.0</version>
-          <executions>
-            <execution>
-              <id>add-source</id>
-              <phase>generate-sources</phase>
-              <goals>
-                <goal>add-source</goal>
-              </goals>
-              <configuration>
-                <sources>
-                  <source>${project.parent.basedir}/src/main/java</source>
-                  <source>${project.parent.basedir}/src/main/scala</source>
-                </sources>
-              </configuration>
-            </execution>
-            <execution>
-              <id>add-test-source</id>
-              <phase>generate-sources</phase>
-              <goals>
-                <goal>add-test-source</goal>
-              </goals>
-              <configuration>
-                <sources>
-                  <source>${project.parent.basedir}/src/test/java</source>
-                  <source>${project.parent.basedir}/src/it/java</source>
-                  <source>${project.parent.basedir}/src/test/scala</source>
-                  <source>${project.parent.basedir}/src/it/scala</source>
-                </sources>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <artifactId>maven-resources-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>copy-resources</id>
-              <phase>generate-resources</phase>
-              <goals>
-                <goal>copy-resources</goal>
-              </goals>
-              <configuration>
-                <outputDirectory>${project.build.directory}/test-classes
-                </outputDirectory>
-                <overwrite>true</overwrite>
-                <resources>
-                  <resource>
-                    <directory>${project.parent.basedir}/src/it/resources</directory>
-                  </resource>
-                </resources>
-              </configuration>
-            </execution>
-            <execution>
-              <id>copy-resources2</id>
-              <phase>generate-resources</phase>
-              <goals>
-                <goal>copy-resources</goal>
-              </goals>
-              <configuration>
-                <outputDirectory>${project.build.directory}/classes
-                </outputDirectory>
-                <overwrite>true</overwrite>
-                <resources>
-                  <resource>
-                    <directory>${project.parent.basedir}/src/main/resources</directory>
-                  </resource>
-                </resources>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <artifactId>maven-dependency-plugin</artifactId>
-          <configuration>
-            <ignoreNonCompile>true</ignoreNonCompile>
-            <ignoredUnusedDeclaredDependencies>
-              <!-- These are all used -->
-              <ignoredUnusedDeclaredDependency>
-                org.apache.hadoop:hadoop-hdfs
-              </ignoredUnusedDeclaredDependency>
-              <ignoredUnusedDeclaredDependency>
-                org.apache.hbase:hbase-it
-              </ignoredUnusedDeclaredDependency>
-            </ignoredUnusedDeclaredDependencies>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>net.alchim31.maven</groupId>
-          <artifactId>scala-maven-plugin</artifactId>
-          <configuration>
-            <charset>${project.build.sourceEncoding}</charset>
-            <jvmArgs>
-              <jvmArg>-Xmx1024m</jvmArg>
-            </jvmArgs>
-            <scalaVersion>${scala.version}</scalaVersion>
-            <scalaCompatVersion>${scala.binary.version}</scalaCompatVersion>
-          </configuration>
-          <executions>
-            <execution>
-              <id>scala-compile-first</id>
-              <phase>process-resources</phase>
-              <goals>
-                <goal>add-source</goal>
-                <goal>compile</goal>
-              </goals>
-            </execution>
-            <execution>
-              <id>scala-test-compile</id>
-              <phase>process-test-resources</phase>
-              <goals>
-                <goal>testCompile</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-
-        <plugin>
-          <groupId>org.scalatest</groupId>
-          <artifactId>scalatest-maven-plugin</artifactId>
-          <version>1.0</version>
-          <configuration>
-            <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
-            <junitxml>.</junitxml>
-            <filereports>WDF TestSuite.txt</filereports>
-            <skipTests>${skip-scala-tests}</skipTests>
-          </configuration>
-          <executions>
-            <execution>
-              <id>integration-test</id>
-              <phase>integration-test</phase>
-              <goals>
-                <goal>test</goal>
-              </goals>
-              <configuration>
-                <!-- Need this false until we can switch to JUnit 4.13 due 
-                  to https://github.com/junit-team/junit4/issues/1223 -->
-                <parallel>false</parallel>
-                <tagsToExclude>Integration-Test</tagsToExclude>
-                <argLine>-Xmx1536m -XX:ReservedCodeCacheSize=512m</argLine>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-compiler-plugin</artifactId>
-          <configuration>
-            <source>1.8</source>
-            <target>1.8</target>
-          </configuration>
-        </plugin>
-        <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-javadoc-plugin</artifactId>
-            <configuration>
-                <skip>${skip.spark.javadoc}</skip>
-            </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-jar-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>empty-javadoc-jar</id>
-              <phase>package</phase>
-              <goals>
-                <goal>jar</goal>
-              </goals>
-              <configuration>
-                <classifier>javadoc</classifier>
-                <classesDirectory>${basedir}/javadoc</classesDirectory>
-              </configuration>
-            </execution>
-          </executions>
-        </plugin>
-        <!-- Taken from phoenix-client-parent
-        this should be kept in sync with Phoenix as much as possible -->
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-shade-plugin</artifactId>
-          <configuration>
-            <shadedArtifactAttached>false</shadedArtifactAttached>
-            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-            <filters>
-              <filter>
-                <artifact>*:*</artifact>
-                <excludes>
-                  <exclude>META-INF/*.SF</exclude>
-                  <exclude>META-INF/*.DSA</exclude>
-                  <exclude>META-INF/*.RSA</exclude>
-                  <exclude>META-INF/license/*</exclude>
-                  <exclude>META-INF/NOTICE</exclude>
-                  <exclude>LICENSE.*</exclude>
-                  <exclude>NOTICE.*</exclude>
-                  <exclude>NOTICE</exclude>
-                  <exclude>README*</exclude>
-                  <!-- Coming from Omid, should be fixed there -->
-                  <exclude>log4j.properties</exclude>
-                </excludes>
-              </filter>
-             <filter>
-                <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
-                <excludes>
-                  <exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
-                  <exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
-                  <exclude>webapps/**</exclude>
-                </excludes>
-              </filter>
-              <!-- Phoenix specific -->
-              <filter>
-                <artifact>org.apache.commons:commons-math3</artifact>
-                <excludes>
-                  <exclude>assets/**</exclude>
-                </excludes>
-              </filter>
-              <filter>
-                <artifact>org.apache.hbase:hbase-server</artifact>
-                <excludes>
-                  <exclude>hbase-webapps/**</exclude>
-                </excludes>
-              </filter>
-              <!-- Phoenix specific -->
-            </filters>
-            <transformers>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>csv-bulk-load-config.properties</resource>
-                <file>
-                  ${project.basedir}/../config/csv-bulk-load-config.properties
-                </file>
-              </transformer>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>README.md</resource>
-                <file>${project.basedir}/../README.md</file>
-              </transformer>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>LICENSE.txt</resource>
-                <file>${project.basedir}/../LICENSE</file>
-              </transformer>
-              <transformer
-                  implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
-                <resource>NOTICE</resource>
-                <file>${project.basedir}/../NOTICE</file>
-              </transformer>
-            </transformers>
-            <relocations>
-              <relocation>
-                <pattern>org/</pattern>
-                <shadedPattern>${shaded.package}.org.</shadedPattern>
-                <excludes>
-                  <exclude>org/apache/hadoop/**</exclude>
-                  <!-- Our non-shaded htrace and logging libraries -->
-                  <exclude>org/apache/htrace/**</exclude>
-                  <exclude>org/slf4j/**</exclude>
-                  <exclude>org/apache/commons/logging/**</exclude>
-                  <exclude>org/apache/log4j/**</exclude>
-                  <!-- Not the org/ packages that are a part of the jdk -->
-                  <exclude>org/ietf/jgss/**</exclude>
-                  <exclude>org/omg/**</exclude>
-                  <exclude>org/w3c/dom/**</exclude>
-                  <exclude>org/xml/sax/**</exclude>
-                  <!-- Extras compared to Hadoop -->
-                  <!-- Hbase classes - Maybe these could be shaded as well ? -->
-                  <exclude>org/apache/hbase/**</exclude>
-                  <!-- We use the spark classpath directly -->
-                  <exclude>org/apache/spark/**</exclude>
-                  <!-- Phoenix classes -->
-                  <exclude>org/apache/phoenix/**</exclude>
-                  <exclude>org/apache/omid/**</exclude>
-                  <!-- Do want/need to expose Tephra as well ? -->
-                </excludes>
-              </relocation>
-              <relocation>
-                <pattern>com/</pattern>
-                <shadedPattern>${shaded.package}.com.</shadedPattern>
-                <excludes>
-                  <!-- Not the com/ packages that are a part of particular jdk implementations -->
-                  <exclude>com/sun/tools/**</exclude>
-                  <exclude>com/sun/javadoc/**</exclude>
-                  <exclude>com/sun/security/**</exclude>
-                  <exclude>com/sun/jndi/**</exclude>
-                  <exclude>com/sun/management/**</exclude>
-                </excludes>
-              </relocation>
-              <relocation>
-                <pattern>io/</pattern>
-                <shadedPattern>${shaded.package}.io.</shadedPattern>
-                <excludes>
-                  <!-- Exclude config keys for Hadoop that look like package names -->
-                  <exclude>io/compression/**</exclude>
-                  <exclude>io/mapfile/**</exclude>
-                  <exclude>io/map/index/*</exclude>
-                  <exclude>io/seqfile/**</exclude>
-                  <exclude>io/file/buffer/size</exclude>
-                  <exclude>io/skip/checksum/errors</exclude>
-                  <exclude>io/sort/*</exclude>
-                  <exclude>io/serializations</exclude>
-                </excludes>
-              </relocation>
-              <!-- JSRs that haven't made it to inclusion in J2SE -->
-              <relocation>
-                <pattern>javax/el/</pattern>
-                <shadedPattern>${shaded.package}.javax.el.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/cache/</pattern>
-                <shadedPattern>${shaded.package}.javax.cache.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/servlet/</pattern>
-                <shadedPattern>${shaded.package}.javax.servlet.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/ws/</pattern>
-                <shadedPattern>${shaded.package}.javax.ws.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/annotation/</pattern>
-                <shadedPattern>${shaded.package}.javax.annotation.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/inject/</pattern>
-                <shadedPattern>${shaded.package}.javax.inject.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javax/validation/</pattern>
-                <shadedPattern>${shaded.package}.javax.validation.</shadedPattern>
-            </relocation>
-              <relocation>
-                <pattern>net/</pattern>
-                <shadedPattern>${shaded.package}.net.</shadedPattern>
-                <excludes>
-                  <!-- Exclude config keys for Hadoop that look like package names -->
-                  <exclude>net/topology/**</exclude>
-                </excludes>
-              </relocation>
-              <!-- okio declares a top level package instead of nested -->
-              <relocation>
-                <pattern>okio/</pattern>
-                <shadedPattern>${shaded.package}.okio.</shadedPattern>
-              </relocation>
-              <!-- Phoenix specific relocations -->
-              <relocation>
-                <!-- Tephra -->
-                <pattern>co/</pattern>
-                <shadedPattern>${shaded.package}.co.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>it/</pattern>
-                <shadedPattern>${shaded.package}.it.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>javassist/</pattern>
-                <shadedPattern>${shaded.package}.javassist.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>jersey/</pattern>
-                <shadedPattern>${shaded.package}.jersey.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>jline/</pattern>
-                <shadedPattern>${shaded.package}.jline.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>mozilla/</pattern>
-                <shadedPattern>${shaded.package}.mozilla.</shadedPattern>
-              </relocation>
-              <relocation>
-                <pattern>tables/</pattern>
-                <shadedPattern>${shaded.package}.tables.</shadedPattern>
-              </relocation>
-              <!-- Phoenix specific relocations end -->
-            </relocations>
-          </configuration>
-          <executions>
-            <execution>
-              <phase>package</phase>
-              <goals>
-                <goal>shade</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-  <profiles>
-    <profile>
-      <id>scala-tests-enabled</id>
-      <activation>
-        <property>
-          <name>scala-tests-enabled</name>
-        </property>
-      </activation>
-      <properties>
-        <skip-scala-tests>false</skip-scala-tests>
-      </properties>
-    </profile>
-  </profiles>
-</project>
diff --git a/phoenix4-connectors-assembly/pom.xml b/phoenix4-connectors-assembly/pom.xml
deleted file mode 100644
index 2d8b143..0000000
--- a/phoenix4-connectors-assembly/pom.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.phoenix</groupId>
-    <artifactId>phoenix-connectors</artifactId>
-    <version>6.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>phoenix4-connectors-assembly</artifactId>
-  <packaging>pom</packaging>
-  <name>Phoenix 4 Connectors Distribution Assembly</name>
-
- <dependencies>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-flume</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-hive</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-hive-shaded</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-kafka</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-spark</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix4-spark-shaded</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>exec-maven-plugin</artifactId>
-        <groupId>org.codehaus.mojo</groupId>
-        <executions>
-          <execution>
-            <id>flume without version</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-flume-base/phoenix4-flume/target</workingDirectory>
-              <arguments>
-                <argument>-fnsv</argument>
-                <argument>
-                  phoenix4-flume-${project.version}-shaded.jar
-                </argument>
-                <argument>
-                  phoenix4-flume-shaded.jar
-                </argument>
-              </arguments>
-            </configuration>
-          </execution>
-          <execution>
-            <id>hive without version</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-hive-base/phoenix4-hive-shaded/target</workingDirectory>
-              <arguments>
-                <argument>-fnsv</argument>
-                <argument>
-                  phoenix4-hive-shaded-${project.version}.jar
-                </argument>
-                <argument>
-                  phoenix4-hive-shaded.jar
-                </argument>
-              </arguments>
-            </configuration>
-          </execution>
-          <execution>
-            <id>spark without version</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-spark-base/phoenix4-spark-shaded/target</workingDirectory>
-              <arguments>
-                <argument>-fnsv</argument>
-                <argument>
-                  phoenix4-spark-shaded-${project.version}.jar
-                </argument>
-                <argument>
-                  phoenix4-spark-shaded.jar
-                </argument>
-              </arguments>
-            </configuration>
-          </execution>
-          <execution>
-            <id>kafka without version</id>
-            <phase>package</phase>
-            <goals>
-              <goal>exec</goal>
-            </goals>
-            <configuration>
-              <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-kafka-base/phoenix4-kafka/target</workingDirectory>
-              <arguments>
-                <argument>-fnsv</argument>
-                <argument>
-                  phoenix4-kafka-${project.version}-shaded-minimal.jar
-                </argument>
-                <argument>
-                  phoenix4-kafka-shaded-minimal.jar
-                </argument>
-              </arguments>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>package-phoenix4-to-tar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>src/build/package-phoenix4-connectors-to-tar-all.xml</descriptor>
-              </descriptors>
-              <finalName>phoenix4-connectors-${project.version}</finalName>
-              <tarLongFileMode>posix</tarLongFileMode>
-              <appendAssemblyId>false</appendAssemblyId>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml b/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml
deleted file mode 100644
index bcfe386..0000000
--- a/phoenix4-connectors-assembly/src/build/components/phoenix4-jars.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<component>
-  <fileSets>
-    <!-- We don't actually have shaded flume JARs ATM,
-    but there's no point in packaging the unshaded ones. -->
-    <fileSet>
-      <directory>${project.basedir}/../phoenix-flume-base/phoenix4-flume/target</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>phoenix4-flume-${project.version}-shaded.jar</include>
-        <include>phoenix4-flume-shaded.jar</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../phoenix-kafka-base/phoenix4-kafka/target</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>phoenix4-kafka-${project.version}-shaded-minimal.jar</include>
-        <include>phoenix4-kafka-shaded-minimal.jar</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../phoenix-spark-base/phoenix4-spark-shaded/target</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>phoenix4-spark-shaded-${project.version}.jar</include>
-        <include>phoenix4-spark-shaded.jar</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>${project.basedir}/../phoenix-hive-base/phoenix4-hive-shaded/target</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>phoenix4-hive-shaded-${project.version}.jar</include>
-        <include>phoenix4-hive-shaded.jar</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</component>
diff --git a/phoenix4-connectors-assembly/src/build/package-phoenix4-connectors-to-tar-all.xml b/phoenix4-connectors-assembly/src/build/package-phoenix4-connectors-to-tar-all.xml
deleted file mode 100644
index 683bce6..0000000
--- a/phoenix4-connectors-assembly/src/build/package-phoenix4-connectors-to-tar-all.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-  <!--This 'all' id is not appended to the produced bundle because we do this: http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers -->
-  <id>all</id>
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-  <includeBaseDirectory>true</includeBaseDirectory>
-
-  <componentDescriptors>
-    <componentDescriptor>src/build/components/phoenix4-jars.xml</componentDescriptor>
-  </componentDescriptors>
-</assembly>
\ No newline at end of file
diff --git a/phoenix5-connectors-assembly/pom.xml b/phoenix5-connectors-assembly/pom.xml
index a2454e0..4530ee9 100644
--- a/phoenix5-connectors-assembly/pom.xml
+++ b/phoenix5-connectors-assembly/pom.xml
@@ -28,13 +28,6 @@
     <version>6.0.0-SNAPSHOT</version>
   </parent>
 
-  <properties>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-  </properties>
-
   <artifactId>phoenix5-connectors-assembly</artifactId>
   <packaging>pom</packaging>
   <name>Phoenix 5 Connectors Distribution Assembly</name>
@@ -84,14 +77,14 @@
             </goals>
             <configuration>
               <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-flume-base/phoenix5-flume/target</workingDirectory>
+              <workingDirectory>${project.basedir}/../phoenix5-flume/target</workingDirectory>
               <arguments>
                 <argument>-fnsv</argument>
                 <argument>
-                  phoenix5-flume-${project.version}-shaded.jar
+                  phoenix5-flume-${project.version}.jar
                 </argument>
                 <argument>
-                  phoenix5-flume-shaded.jar
+                  phoenix5-flume.jar
                 </argument>
               </arguments>
             </configuration>
@@ -104,7 +97,7 @@
             </goals>
             <configuration>
               <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-hive-base/phoenix5-hive-shaded/target</workingDirectory>
+              <workingDirectory>${project.basedir}/../phoenix5-hive-shaded/target</workingDirectory>
               <arguments>
                 <argument>-fnsv</argument>
                 <argument>
@@ -124,7 +117,7 @@
             </goals>
             <configuration>
               <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-spark-base/phoenix5-spark-shaded/target</workingDirectory>
+              <workingDirectory>${project.basedir}/../phoenix5-spark-shaded/target</workingDirectory>
               <arguments>
                 <argument>-fnsv</argument>
                 <argument>
@@ -164,14 +157,14 @@
             </goals>
             <configuration>
               <executable>ln</executable>
-              <workingDirectory>${project.basedir}/../phoenix-kafka-base/phoenix5-kafka/target</workingDirectory>
+              <workingDirectory>${project.basedir}/../phoenix5-kafka/target</workingDirectory>
               <arguments>
                 <argument>-fnsv</argument>
                 <argument>
-                  phoenix5-kafka-${project.version}-shaded-minimal.jar
+                  phoenix5-kafka-${project.version}.jar
                 </argument>
                 <argument>
-                  phoenix5-kafka-shaded-minimal.jar
+                  phoenix5-kafka.jar
                 </argument>
               </arguments>
             </configuration>
diff --git a/phoenix5-connectors-assembly/src/build/components/phoenix5-jars.xml b/phoenix5-connectors-assembly/src/build/components/phoenix5-jars.xml
index 52e38f6..b507a93 100644
--- a/phoenix5-connectors-assembly/src/build/components/phoenix5-jars.xml
+++ b/phoenix5-connectors-assembly/src/build/components/phoenix5-jars.xml
@@ -24,23 +24,23 @@
     <fileSet>
       <!-- We don't actually have shaded flume JARs ATM, 
       but there's no point in packaging the unshaded ones. -->
-      <directory>${project.basedir}/../phoenix-flume-base/phoenix5-flume/target</directory>
+      <directory>${project.basedir}/../phoenix5-flume/target</directory>
       <outputDirectory>/</outputDirectory>
       <includes>
-        <include>phoenix5-flume-${project.version}-shaded.jar</include>
-        <include>phoenix5-flume-shaded.jar</include>
+        <include>phoenix5-flume-${project.version}.jar</include>
+        <include>phoenix5-flume.jar</include>
       </includes>
     </fileSet>
     <fileSet>
-      <directory>${project.basedir}/../phoenix-kafka-base/phoenix5-kafka/target</directory>
+      <directory>${project.basedir}/../phoenix5-kafka/target</directory>
       <outputDirectory>/</outputDirectory>
       <includes>
-        <include>phoenix5-kafka-${project.version}-shaded-minimal.jar</include>
-        <include>phoenix5-kafka-shaded-minimal.jar</include>
+        <include>phoenix5-kafka-${project.version}.jar</include>
+        <include>phoenix5-kafka.jar</include>
       </includes>
     </fileSet>
     <fileSet>
-      <directory>${project.basedir}/../phoenix-spark-base/phoenix5-spark-shaded/target</directory>
+      <directory>${project.basedir}/../phoenix5-spark-shaded/target</directory>
       <outputDirectory>/</outputDirectory>
       <includes>
         <include>phoenix5-spark-shaded-${project.version}.jar</include>
@@ -56,7 +56,7 @@
       </includes>
     </fileSet>
     <fileSet>
-      <directory>${project.basedir}/../phoenix-hive-base/phoenix5-hive-shaded/target</directory>
+      <directory>${project.basedir}/../phoenix5-hive-shaded/target</directory>
       <outputDirectory>/</outputDirectory>
       <includes>
         <include>phoenix5-hive-shaded-${project.version}.jar</include>
diff --git a/phoenix-flume-base/pom.xml b/phoenix5-flume/pom.xml
similarity index 87%
rename from phoenix-flume-base/pom.xml
rename to phoenix5-flume/pom.xml
index e3baa66..8623794 100644
--- a/phoenix-flume-base/pom.xml
+++ b/phoenix5-flume/pom.xml
@@ -29,13 +29,8 @@
     <artifactId>phoenix-connectors</artifactId>
     <version>6.0.0-SNAPSHOT</version>
   </parent>
-  <artifactId>phoenix-flume-base</artifactId>
-  <name>Phoenix Flume Connector - Base</name>
-  <packaging>pom</packaging>
-  <modules>
-    <module>phoenix4-flume</module>
-    <module>phoenix5-flume</module>
-  </modules>
+  <artifactId>phoenix5-flume</artifactId>
+  <name>Phoenix Flume Connector for Phoenix 5</name>
 
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
@@ -62,10 +57,6 @@
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.hbase</groupId>
-      <artifactId>hbase-common</artifactId>
-    </dependency>
 
     <dependency>
       <groupId>com.tdunning</groupId>
@@ -85,12 +76,6 @@
 
     <!-- Test Dependencies -->
     <dependency>
-      <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
-      <classifier>tests</classifier>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hbase</groupId>
       <artifactId>hbase-it</artifactId>
       <type>test-jar</type>
@@ -102,16 +87,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-common</artifactId>
       <scope>test</scope>
@@ -188,6 +163,14 @@
             </execution>
           </executions>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>
diff --git a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/CsvEventSerializerIT.java b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/CsvEventSerializerIT.java
similarity index 100%
rename from phoenix-flume-base/src/it/java/org/apache/phoenix/flume/CsvEventSerializerIT.java
rename to phoenix5-flume/src/it/java/org/apache/phoenix/flume/CsvEventSerializerIT.java
diff --git a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/JsonEventSerializerIT.java b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/JsonEventSerializerIT.java
similarity index 100%
rename from phoenix-flume-base/src/it/java/org/apache/phoenix/flume/JsonEventSerializerIT.java
rename to phoenix5-flume/src/it/java/org/apache/phoenix/flume/JsonEventSerializerIT.java
diff --git a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/PhoenixSinkIT.java b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/PhoenixSinkIT.java
similarity index 97%
rename from phoenix-flume-base/src/it/java/org/apache/phoenix/flume/PhoenixSinkIT.java
rename to phoenix5-flume/src/it/java/org/apache/phoenix/flume/PhoenixSinkIT.java
index 5c5d884..b9fe978 100644
--- a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/PhoenixSinkIT.java
+++ b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/PhoenixSinkIT.java
@@ -40,7 +40,6 @@
 import org.apache.flume.sink.DefaultSinkFactory;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.end2end.NeedsOwnMiniClusterTest;
 import org.apache.phoenix.flume.serializer.CustomSerializer;
 import org.apache.phoenix.flume.serializer.EventSerializers;
@@ -207,8 +206,12 @@
         sink.setChannel(channel);
         
         sink.start();
-        Assert.assertTrue(CompatUtil.tableExists(driver.getConnectionQueryServices(getUrl(),
-                TestUtil.TEST_PROPERTIES).getAdmin(), fullTableName));
+        try {
+            Assert.assertTrue(driver.getConnectionQueryServices(getUrl(), TestUtil.TEST_PROPERTIES).getAdmin()
+                    .tableExists(TableName.valueOf(fullTableName)));
+        } finally {
+            admin.close();
+        }
     }
 
     @Test
diff --git a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/RegexEventSerializerIT.java b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/RegexEventSerializerIT.java
similarity index 100%
rename from phoenix-flume-base/src/it/java/org/apache/phoenix/flume/RegexEventSerializerIT.java
rename to phoenix5-flume/src/it/java/org/apache/phoenix/flume/RegexEventSerializerIT.java
diff --git a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/serializer/CustomSerializer.java b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/serializer/CustomSerializer.java
similarity index 100%
rename from phoenix-flume-base/src/it/java/org/apache/phoenix/flume/serializer/CustomSerializer.java
rename to phoenix5-flume/src/it/java/org/apache/phoenix/flume/serializer/CustomSerializer.java
diff --git a/phoenix-flume-base/src/it/java/org/apache/phoenix/flume/sink/NullPhoenixSink.java b/phoenix5-flume/src/it/java/org/apache/phoenix/flume/sink/NullPhoenixSink.java
similarity index 100%
rename from phoenix-flume-base/src/it/java/org/apache/phoenix/flume/sink/NullPhoenixSink.java
rename to phoenix5-flume/src/it/java/org/apache/phoenix/flume/sink/NullPhoenixSink.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/DefaultKeyGenerator.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/DefaultKeyGenerator.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/DefaultKeyGenerator.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/DefaultKeyGenerator.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/FlumeConstants.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/FlumeConstants.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/FlumeConstants.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/FlumeConstants.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/KeyGenerator.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/KeyGenerator.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/KeyGenerator.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/KeyGenerator.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/SchemaHandler.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/SchemaHandler.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/SchemaHandler.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/SchemaHandler.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/BaseEventSerializer.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/BaseEventSerializer.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/BaseEventSerializer.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/BaseEventSerializer.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/CsvEventSerializer.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/CsvEventSerializer.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/CsvEventSerializer.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/CsvEventSerializer.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/EventSerializer.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/EventSerializer.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/EventSerializer.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/EventSerializer.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/EventSerializers.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/EventSerializers.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/EventSerializers.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/EventSerializers.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/JsonEventSerializer.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/JsonEventSerializer.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/JsonEventSerializer.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/JsonEventSerializer.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/RegexEventSerializer.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/RegexEventSerializer.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/serializer/RegexEventSerializer.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/serializer/RegexEventSerializer.java
diff --git a/phoenix-flume-base/src/main/java/org/apache/phoenix/flume/sink/PhoenixSink.java b/phoenix5-flume/src/main/java/org/apache/phoenix/flume/sink/PhoenixSink.java
similarity index 100%
rename from phoenix-flume-base/src/main/java/org/apache/phoenix/flume/sink/PhoenixSink.java
rename to phoenix5-flume/src/main/java/org/apache/phoenix/flume/sink/PhoenixSink.java
diff --git a/phoenix5-hive-shaded/pom.xml b/phoenix5-hive-shaded/pom.xml
new file mode 100644
index 0000000..298dfd8
--- /dev/null
+++ b/phoenix5-hive-shaded/pom.xml
@@ -0,0 +1,408 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.apache.phoenix</groupId>
+    <artifactId>phoenix-connectors</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>phoenix5-hive-shaded</artifactId>
+  <name>Shaded Phoenix Hive Connector for Phoenix 5</name>
+
+  <properties>
+    <test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir>
+    <hive.version>${hive3.version}</hive.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix5-hive</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.zookeeper</groupId>
+      <artifactId>zookeeper-jute</artifactId>
+      <version>${zookeeper.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- maven-shade-plugin doesn't inherit dependency settings, we must duplicate them to avoid
+    adding the provided dependencies -->
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
+      <scope>runtime</scope>
+      <optional>true</optional>
+    </dependency>
+    <!-- Hive dependencies cannot be specified in the phoenix-hive-common, because of
+    hbase transitive dependency version conflicts -->
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-cli</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-common</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- These three dependencies are falsely flagged by dependency plugin -->
+    <dependency>
+      <groupId> org.apache.hive</groupId>
+      <artifactId>hive-serde</artifactId>
+      <version>${hive.version}</version>
+      <exclusions>
+        <!-- Fix conflict with Minicluster -->
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId> org.apache.hive</groupId>
+      <artifactId>hive-storage-api</artifactId>
+      <version>${hive-storage.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId> org.apache.hive.shims</groupId>
+      <artifactId>hive-shims-common</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- These are actually different between phoenix 5 and phoenix 4 -->
+    <dependency>
+      <groupId> org.apache.hive</groupId>
+      <artifactId>hive-standalone-metastore</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>com.google.guava</groupId>
+          <artifactId>guava</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-mapreduce</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-zookeeper</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-protocol-shaded</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-endpoint</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-minicluster</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.zookeeper</groupId>
+      <artifactId>zookeeper</artifactId>
+      <version>${zookeeper.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- We want to take the implementation from Hive -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <configuration>
+          <shadedArtifactAttached>false</shadedArtifactAttached>
+          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+          <filters>
+            <filter>
+              <artifact>*:*</artifact>
+              <excludes>
+                <exclude>META-INF/*.SF</exclude>
+                <exclude>META-INF/*.DSA</exclude>
+                <exclude>META-INF/*.RSA</exclude>
+                <exclude>META-INF/license/*</exclude>
+                <exclude>META-INF/NOTICE</exclude>
+                <exclude>LICENSE.*</exclude>
+                <exclude>NOTICE.*</exclude>
+                <exclude>NOTICE</exclude>
+                <exclude>README*</exclude>
+                <!-- Coming from Omid, should be fixed there -->
+                <exclude>log4j.properties</exclude>
+              </excludes>
+            </filter>
+            <filter>
+              <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
+              <excludes>
+                <exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
+                <exclude>webapps/**</exclude>
+              </excludes>
+            </filter>
+            <!-- Phoenix specific -->
+            <filter>
+              <artifact>org.apache.commons:commons-math3</artifact>
+              <excludes>
+                <exclude>assets/**</exclude>
+              </excludes>
+            </filter>
+            <filter>
+              <artifact>org.apache.hbase:hbase-server</artifact>
+              <excludes>
+                <exclude>hbase-webapps/**</exclude>
+              </excludes>
+            </filter>
+            <!-- Phoenix specific -->
+          </filters>
+          <transformers>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>csv-bulk-load-config.properties</resource>
+              <file>
+                ${project.basedir}/../config/csv-bulk-load-config.properties
+              </file>
+            </transformer>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>README.md</resource>
+              <file>${project.basedir}/../README.md</file>
+            </transformer>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>LICENSE.txt</resource>
+              <file>${project.basedir}/../LICENSE</file>
+            </transformer>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>NOTICE</resource>
+              <file>${project.basedir}/../NOTICE</file>
+            </transformer>
+          </transformers>
+          <relocations>
+            <relocation>
+              <pattern>org/</pattern>
+              <shadedPattern>${shaded.package}.org.</shadedPattern>
+              <excludes>
+                <exclude>org/apache/hadoop/**</exclude>
+                <!-- Our non-shaded htrace and logging libraries -->
+                <exclude>org/apache/htrace/**</exclude>
+                <exclude>org/slf4j/**</exclude>
+                <exclude>org/apache/commons/logging/**</exclude>
+                <exclude>org/apache/log4j/**</exclude>
+                <!-- Not the org/ packages that are a part of the jdk -->
+                <exclude>org/ietf/jgss/**</exclude>
+                <exclude>org/omg/**</exclude>
+                <exclude>org/w3c/dom/**</exclude>
+                <exclude>org/xml/sax/**</exclude>
+                <!-- Extras compared to Hadoop -->
+                <!-- Hbase classes - Maybe these could be shaded as well ? -->
+                <exclude>org/apache/hbase/**</exclude>
+                <!-- Phoenix classes -->
+                <exclude>org/apache/phoenix/**</exclude>
+                <exclude>org/apache/omid/**</exclude>
+                <!-- Do want/need to expose Tephra as well ? -->
+              </excludes>
+            </relocation>
+            <relocation>
+              <pattern>com/</pattern>
+              <shadedPattern>${shaded.package}.com.</shadedPattern>
+              <excludes>
+                <!-- Not the com/ packages that are a part of particular jdk implementations -->
+                <exclude>com/sun/tools/**</exclude>
+                <exclude>com/sun/javadoc/**</exclude>
+                <exclude>com/sun/security/**</exclude>
+                <exclude>com/sun/jndi/**</exclude>
+                <exclude>com/sun/management/**</exclude>
+                <!-- We are getting unshaded HBase from Hive, we must leave protobuf generated
+                classes alone -->
+                <exclude>com/google/protobuf/**</exclude>
+              </excludes>
+            </relocation>
+            <relocation>
+              <pattern>io/</pattern>
+              <shadedPattern>${shaded.package}.io.</shadedPattern>
+              <excludes>
+                <!-- Exclude config keys for Hadoop that look like package names -->
+                <exclude>io/compression/**</exclude>
+                <exclude>io/mapfile/**</exclude>
+                <exclude>io/map/index/*</exclude>
+                <exclude>io/seqfile/**</exclude>
+                <exclude>io/file/buffer/size</exclude>
+                <exclude>io/skip/checksum/errors</exclude>
+                <exclude>io/sort/*</exclude>
+                <exclude>io/serializations</exclude>
+              </excludes>
+            </relocation>
+            <!-- JSRs that haven't made it to inclusion in J2SE -->
+            <relocation>
+              <pattern>javax/el/</pattern>
+              <shadedPattern>${shaded.package}.javax.el.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/cache/</pattern>
+              <shadedPattern>${shaded.package}.javax.cache.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/servlet/</pattern>
+              <shadedPattern>${shaded.package}.javax.servlet.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/ws/</pattern>
+              <shadedPattern>${shaded.package}.javax.ws.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/annotation/</pattern>
+              <shadedPattern>${shaded.package}.javax.annotation.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/inject/</pattern>
+              <shadedPattern>${shaded.package}.javax.inject.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/validation/</pattern>
+              <shadedPattern>${shaded.package}.javax.validation.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>net/</pattern>
+              <shadedPattern>${shaded.package}.net.</shadedPattern>
+              <excludes>
+                <!-- Exclude config keys for Hadoop that look like package names -->
+                <exclude>net/topology/**</exclude>
+              </excludes>
+            </relocation>
+            <!-- okio declares a top level package instead of nested -->
+            <relocation>
+              <pattern>okio/</pattern>
+              <shadedPattern>${shaded.package}.okio.</shadedPattern>
+            </relocation>
+            <!-- Phoenix specific relocations -->
+            <relocation>
+              <!-- Tephra -->
+              <pattern>co/</pattern>
+              <shadedPattern>${shaded.package}.co.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>it/</pattern>
+              <shadedPattern>${shaded.package}.it.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javassist/</pattern>
+              <shadedPattern>${shaded.package}.javassist.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>jersey/</pattern>
+              <shadedPattern>${shaded.package}.jersey.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>jline/</pattern>
+              <shadedPattern>${shaded.package}.jline.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>mozilla/</pattern>
+              <shadedPattern>${shaded.package}.mozilla.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>tables/</pattern>
+              <shadedPattern>${shaded.package}.tables.</shadedPattern>
+            </relocation>
+            <!-- Phoenix specific relocations end -->
+          </relocations>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <!-- TODO consider not enabling these globally instead -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <executions>
+          <execution>
+             <id>default-compile</id>
+             <phase>none</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file
diff --git a/phoenix5-hive/pom.xml b/phoenix5-hive/pom.xml
new file mode 100644
index 0000000..56ebddd
--- /dev/null
+++ b/phoenix5-hive/pom.xml
@@ -0,0 +1,482 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.phoenix</groupId>
+    <artifactId>phoenix-connectors</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>phoenix5-hive</artifactId>
+  <name>Phoenix Hive Connector for Phoenix 5</name>
+
+  <properties>
+    <test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir>
+    <tez.version>0.9.1</tez.version>
+    <commons-lang3.version>3.9</commons-lang3.version>
+    <hive.version>${hive3.version}</hive.version>
+    <calcite.version>1.16.0</calcite.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
+      <scope>runtime</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-cli</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-common</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- These three dependencies are falsely flagged by dependency plugin -->
+    <dependency>
+      <groupId> org.apache.hive</groupId>
+      <artifactId>hive-serde</artifactId>
+      <version>${hive.version}</version>
+      <exclusions>
+        <!-- Fix conflict with Minicluster -->
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId> org.apache.hive</groupId>
+      <artifactId>hive-storage-api</artifactId>
+      <version>${hive-storage.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId> org.apache.hive.shims</groupId>
+      <artifactId>hive-shims-common</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <!-- These are actually different between phoenix 5 and phoenix 4 -->
+    <dependency>
+      <groupId> org.apache.hive</groupId>
+      <artifactId>hive-standalone-metastore</artifactId>
+      <version>${hive.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-mapreduce</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-zookeeper</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-protocol-shaded</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-endpoint</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-minicluster</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.zookeeper</groupId>
+      <artifactId>zookeeper</artifactId>
+      <version>${zookeeper.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-testing-util</artifactId>
+      <version>${hbase.version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.phoenix.thirdparty</groupId>
+      <artifactId>phoenix-shaded-guava</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>${commons-lang3.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-protocol</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+      <version>${commons-compress.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>${commons-io.version}</version>
+    </dependency>
+
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-core</artifactId>
+      <classifier>tests</classifier>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-server</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-it</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tez</groupId>
+      <artifactId>tez-tests</artifactId>
+      <scope>test</scope>
+      <version>${tez.version}</version>
+      <type>test-jar</type>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-yarn-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tez</groupId>
+      <artifactId>tez-dag</artifactId>
+      <scope>test</scope>
+      <version>${tez.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-yarn-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+      <scope>provided</scope>
+      <version>${log4j2.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <scope>provided</scope>
+      <version>${log4j2.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <scope>provided</scope>
+      <version>${log4j2.version}</version>
+    </dependency>
+
+
+<!-- Mark every HBase and Hadoop jar as provided -->
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-metrics-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-metrics</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-server</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-hadoop-compat</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-hadoop2-compat</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase.thirdparty</groupId>
+      <artifactId>hbase-shaded-miscellaneous</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase.thirdparty</groupId>
+      <artifactId>hbase-shaded-protobuf</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-auth</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-yarn-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <ignoreNonCompile>true</ignoreNonCompile>
+          <ignoredUnusedDeclaredDependencies>
+            <ignoredUnusedDeclaredDependency>
+               org.slf4j:slf4j-api
+            </ignoredUnusedDeclaredDependency>
+            <ignoredUnusedDeclaredDependency>
+              org.apache.commons:commons-lang3
+            </ignoredUnusedDeclaredDependency>
+          </ignoredUnusedDeclaredDependencies>
+          <ignoredUsedUndeclaredDependencies>
+            <!-- I couldn't find it referenced anywhere in the phoenix-hive codebase -->
+            <ignoredUsedUndeclaredDependency>
+              com.google.code.findbugs:jsr305
+            </ignoredUsedUndeclaredDependency>
+            <ignoredUsedUndeclaredDependency>
+              org.apache.calcite.avatica:avatica
+            </ignoredUsedUndeclaredDependency>
+          </ignoredUsedUndeclaredDependencies>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>add-parent-test-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-test-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.parent.basedir}/src/it/java</source>
+                <source>${project.parent.basedir}/src/test/java</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <!-- The Hbase + Hive minicluster setup seems very fragile, so
+          we make sure to run everything as serially as possible -->
+          <forkCount>1</forkCount>
+          <reuseForks>false</reuseForks>
+        </configuration>
+        <executions>
+          <execution>
+            <id>ParallelStatsDisabledTest</id>
+            <configuration>
+              <forkCount>1</forkCount>
+              <reuseForks>false</reuseForks>
+              <argLine>-Xmx3000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine>
+              <groups>org.apache.phoenix.end2end.ParallelStatsDisabledTest</groups>
+            </configuration>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/test-classes
+              </outputDirectory>
+              <overwrite>true</overwrite>
+              <resources>
+                <resource>
+                  <directory>${project.parent.basedir}/src/test/resources</directory>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>8</source>
+          <target>8</target>
+        </configuration>
+      </plugin>
+      <!-- Taken from phoenix-client-parent
+      this should be kept in sync with Phoenix as much as possible -->
+    </plugins>
+  </build>
+
+   <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.calcite</groupId>
+        <artifactId>calcite-core</artifactId>
+        <version>${calcite.version}</version>
+        <exclusions>
+          <exclusion>
+            <!-- PHOENIX-6478: exclude a dependency that is not required and not available at Maven Central -->
+            <groupId>org.pentaho</groupId>
+            <artifactId>pentaho-aggdesigner-algorithm</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+</project>
diff --git a/phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/QTestProcessExecResult.java b/phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/QTestProcessExecResult.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/QTestProcessExecResult.java
rename to phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/QTestProcessExecResult.java
diff --git a/phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java b/phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java
similarity index 99%
rename from phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java
rename to phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java
index 23fec0b..7d7fd65 100644
--- a/phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java
+++ b/phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/QTestUtil.java
@@ -118,7 +118,6 @@
 import org.apache.hadoop.hive.shims.ShimLoader;
 import org.apache.hive.common.util.StreamPrinter;
 import org.apache.logging.log4j.util.Strings;
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.compat.HiveCompatUtil;
 import org.apache.phoenix.compat.MyResult;
 import org.apache.zookeeper.WatchedEvent;
@@ -638,7 +637,7 @@
       cleanUp();
     }
 
-    if (CompatUtil.isPhoenix5() && clusterType.getCoreClusterType() == CoreClusterType.TEZ){
+    if (clusterType.getCoreClusterType() == CoreClusterType.TEZ){
       HiveCompatUtil.destroyTEZSession(SessionState.get());
     }
 
@@ -949,9 +948,7 @@
       return;
     }
 
-    if(CompatUtil.isPhoenix5()){
-      HiveCompatUtil.cleanupQueryResultCache();
-    }
+    HiveCompatUtil.cleanupQueryResultCache();
 
     // allocate and initialize a new conf since a test can
     // modify conf by using 'set' commands
@@ -1087,10 +1084,8 @@
       createRemoteDirs();
     }
 
-    if (CompatUtil.isPhoenix5()) {
-      // Create views registry
-      HiveCompatUtil.initHiveMaterializedViewsRegistry();
-    }
+    // Create views registry
+    HiveCompatUtil.initHiveMaterializedViewsRegistry();
 
     testWarehouse = conf.getVar(HiveConf.ConfVars.METASTOREWAREHOUSE);
     String execEngine = conf.get("hive.execution.engine");
@@ -1099,9 +1094,6 @@
     conf.set("hive.execution.engine", execEngine);
     db = Hive.get(conf);
     drv = HiveCompatUtil.getDriver(conf);
-    if(CompatUtil.isPhoenix4()) {
-      HiveCompatUtil.initHiveMaterializedViewsRegistry(db);
-    }
     pd = new ParseDriver();
     sem = new SemanticAnalyzer(queryState);
   }
diff --git a/phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/security/DummyAuthenticator.java b/phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/security/DummyAuthenticator.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/hadoop/hive/ql/security/DummyAuthenticator.java
rename to phoenix5-hive/src/it/java/org/apache/hadoop/hive/ql/security/DummyAuthenticator.java
diff --git a/phoenix-hive-base/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java b/phoenix5-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
rename to phoenix5-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
diff --git a/phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java b/phoenix5-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
rename to phoenix5-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
diff --git a/phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java b/phoenix5-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
rename to phoenix5-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
diff --git a/phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java b/phoenix5-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
rename to phoenix5-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
diff --git a/phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HiveTezIT.java b/phoenix5-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
similarity index 100%
rename from phoenix-hive-base/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
rename to phoenix5-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
diff --git a/phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java b/phoenix5-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java
similarity index 100%
rename from phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/compat/HiveCompatUtil.java
diff --git a/phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/compat/MyResult.java b/phoenix5-hive/src/main/java/org/apache/phoenix/compat/MyResult.java
similarity index 100%
rename from phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/compat/MyResult.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/compat/MyResult.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixMetaHook.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixMetaHook.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixMetaHook.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixMetaHook.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixRecordUpdater.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixRecordUpdater.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixRecordUpdater.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixRecordUpdater.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixRow.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixRow.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixRow.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixRow.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixRowKey.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixRowKey.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixRowKey.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixRowKey.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixSerDe.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerDe.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixSerDe.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerDe.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
similarity index 98%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
index 505f3a8..a712691 100644
--- a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
+++ b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
@@ -28,7 +28,6 @@
 import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
 import org.apache.hadoop.io.BytesWritable;
 import org.apache.hadoop.io.Writable;
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.compat.HiveCompatUtil;
 import org.apache.phoenix.hive.constants.PhoenixStorageHandlerConstants;
 import org.apache.phoenix.hive.mapreduce.PhoenixResultWritable;
@@ -169,7 +168,7 @@
                             value = ((HiveDecimal) value).bigDecimalValue();
                         } else if (value instanceof HiveChar) {
                             value = ((HiveChar) value).getValue().trim();
-                        } else if (CompatUtil.isPhoenix5()){
+                        } else {
                             value = HiveCompatUtil.getDateOrTimestampValue(value);
                         }
 
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixStorageHandler.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixStorageHandler.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PhoenixStorageHandler.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PhoenixStorageHandler.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PrimaryKeyData.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/PrimaryKeyData.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/PrimaryKeyData.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/PrimaryKeyData.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
similarity index 97%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index 091f9ea..6cb82cb 100644
--- a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -32,6 +32,7 @@
 import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.client.RegionLocator;
 import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.mapreduce.RegionSizeCalculator;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.exec.SerializationUtilities;
@@ -61,7 +62,6 @@
 import org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil;
 import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.util.PhoenixRuntime;
-import org.apache.phoenix.compat.CompatUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -145,7 +145,8 @@
 
             HRegionLocation location = regionLocator.getRegionLocation(scans.get(0).getStartRow()
                     , false);
-            long regionSize = CompatUtil.getSize(regionLocator, connection.getAdmin(), location);
+            RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(regionLocator, connection.getAdmin());
+            long regionSize =  sizeCalculator.getRegionSize(location.getRegionInfo().getRegionName());
             String regionLocation = PhoenixStorageHandlerUtil.getRegionLocation(location, LOG);
 
             if (splitByStats) {
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputSplit.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputSplit.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputSplit.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputSplit.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixOutputFormat.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixOutputFormat.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixOutputFormat.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixOutputFormat.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordReader.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordReader.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordReader.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordReader.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordWriter.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordWriter.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordWriter.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixRecordWriter.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixResultWritable.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixResultWritable.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixResultWritable.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixResultWritable.java
diff --git a/phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/AbstractPhoenixObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBinaryObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBinaryObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBinaryObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBinaryObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBooleanObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBooleanObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBooleanObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixBooleanObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixCharObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspector.java
diff --git a/phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java
similarity index 100%
rename from phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDateObjectInspectorBase.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDecimalObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDecimalObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDecimalObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDecimalObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixFloatObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixFloatObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixFloatObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixFloatObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixIntObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixIntObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixIntObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixIntObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixListObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixListObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixListObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixListObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixLongObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixLongObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixLongObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixLongObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixObjectInspectorFactory.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixShortObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixShortObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixShortObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixShortObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixStringObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixStringObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixStringObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixStringObjectInspector.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspector.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspector.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspector.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspector.java
diff --git a/phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java
similarity index 100%
rename from phoenix-hive-base/phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixTimestampObjectInspectorBase.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ppd/PhoenixPredicateDecomposer.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/ppd/PhoenixPredicateDecomposer.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ppd/PhoenixPredicateDecomposer.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/ppd/PhoenixPredicateDecomposer.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ql/index/IndexPredicateAnalyzer.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/ql/index/IndexPredicateAnalyzer.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ql/index/IndexPredicateAnalyzer.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/ql/index/IndexPredicateAnalyzer.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ql/index/IndexSearchCondition.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/ql/index/IndexSearchCondition.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ql/index/IndexSearchCondition.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/ql/index/IndexSearchCondition.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ql/index/PredicateAnalyzerFactory.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/ql/index/PredicateAnalyzerFactory.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/ql/index/PredicateAnalyzerFactory.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/ql/index/PredicateAnalyzerFactory.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/ColumnMappingUtils.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/ColumnMappingUtils.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/ColumnMappingUtils.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/ColumnMappingUtils.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixConnectionUtil.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixConnectionUtil.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixConnectionUtil.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixConnectionUtil.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixStorageHandlerUtil.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixStorageHandlerUtil.java
similarity index 98%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixStorageHandlerUtil.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixStorageHandlerUtil.java
index d47e8a4..14295da 100644
--- a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixStorageHandlerUtil.java
+++ b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixStorageHandlerUtil.java
@@ -20,7 +20,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.net.InetAddress;
@@ -53,7 +52,6 @@
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.net.DNS;
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.compat.HiveCompatUtil;
 import org.apache.phoenix.hive.PrimaryKeyData;
 import org.apache.phoenix.hive.constants.PhoenixStorageHandlerConstants;
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixUtil.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixUtil.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/PhoenixUtil.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixUtil.java
diff --git a/phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/TypeInfoUtils.java b/phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/TypeInfoUtils.java
similarity index 100%
rename from phoenix-hive-base/src/main/java/org/apache/phoenix/hive/util/TypeInfoUtils.java
rename to phoenix5-hive/src/main/java/org/apache/phoenix/hive/util/TypeInfoUtils.java
diff --git a/phoenix-hive-base/src/test/java/org/apache/phoenix/hive/PrimaryKeyDataTest.java b/phoenix5-hive/src/test/java/org/apache/phoenix/hive/PrimaryKeyDataTest.java
similarity index 100%
rename from phoenix-hive-base/src/test/java/org/apache/phoenix/hive/PrimaryKeyDataTest.java
rename to phoenix5-hive/src/test/java/org/apache/phoenix/hive/PrimaryKeyDataTest.java
diff --git a/phoenix-hive-base/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java b/phoenix5-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
similarity index 100%
rename from phoenix-hive-base/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
rename to phoenix5-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
diff --git a/phoenix-hive-base/src/test/resources/hbase-site.xml b/phoenix5-hive/src/test/resources/hbase-site.xml
similarity index 100%
rename from phoenix-hive-base/src/test/resources/hbase-site.xml
rename to phoenix5-hive/src/test/resources/hbase-site.xml
diff --git a/phoenix-hive-base/src/test/resources/hive-site.xml b/phoenix5-hive/src/test/resources/hive-site.xml
similarity index 100%
rename from phoenix-hive-base/src/test/resources/hive-site.xml
rename to phoenix5-hive/src/test/resources/hive-site.xml
diff --git a/phoenix-hive-base/src/test/resources/log4j.properties b/phoenix5-hive/src/test/resources/log4j.properties
similarity index 100%
rename from phoenix-hive-base/src/test/resources/log4j.properties
rename to phoenix5-hive/src/test/resources/log4j.properties
diff --git a/phoenix-hive-base/src/test/resources/tez-site.xml b/phoenix5-hive/src/test/resources/tez-site.xml
similarity index 100%
rename from phoenix-hive-base/src/test/resources/tez-site.xml
rename to phoenix5-hive/src/test/resources/tez-site.xml
diff --git a/phoenix-kafka-base/pom.xml b/phoenix5-kafka/pom.xml
similarity index 90%
rename from phoenix-kafka-base/pom.xml
rename to phoenix5-kafka/pom.xml
index f2be59a..ecf9c7e 100644
--- a/phoenix-kafka-base/pom.xml
+++ b/phoenix5-kafka/pom.xml
@@ -29,14 +29,8 @@
     <artifactId>phoenix-connectors</artifactId>
     <version>6.0.0-SNAPSHOT</version>
   </parent>
-  <artifactId>phoenix-kafka-base</artifactId>
-  <name>Phoenix Kafka Connector - Base</name>
-
-  <packaging>pom</packaging>
-  <modules>
-    <module>phoenix4-kafka</module>
-    <module>phoenix5-kafka</module>
-  </modules>
+  <artifactId>phoenix5-kafka</artifactId>
+  <name>Phoenix Kafka Connector for Phoenix 5</name>
 
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
@@ -59,28 +53,12 @@
     <!-- To work with kafka with phoenix -->
     <dependency>
       <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
       <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
       <scope>runtime</scope>
       <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>org.apache.kafka</groupId>
-      <artifactId>kafka_2.11</artifactId>
-      <version>${kafka.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kafka</groupId>
-      <artifactId>kafka_2.11</artifactId>
-      <version>${kafka.version}</version>
-      <classifier>test</classifier>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kafka</groupId>
       <artifactId>kafka-clients</artifactId>
       <version>${kafka.version}</version>
     </dependency>
@@ -90,9 +68,8 @@
       <version>${commons-cli.version}</version>
     </dependency>
     <dependency>
-      <groupId>com.101tec</groupId>
-      <artifactId>zkclient</artifactId>
-      <version>${com-101tek-zkclient.version}</version>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix5-flume</artifactId>
     </dependency>
     <!-- Test dependencies -->
     <dependency>
@@ -107,6 +84,13 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.kafka</groupId>
+      <artifactId>kafka_2.11</artifactId>
+      <version>${kafka.version}</version>
+      <classifier>test</classifier>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>
@@ -180,8 +164,16 @@
             </execution>
           </executions>
         </plugin>
-
         <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-site-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
           <executions>
             <execution>
@@ -213,9 +205,9 @@
             <shadeTestJar>false</shadeTestJar>
             <artifactSet>
               <includes>
-                <include>org.apache.phoenix:phoenix${phoenix.main.version}-kafka</include>
+                <include>org.apache.phoenix:phoenix5-kafka</include>
                 <include>org.apache.kafka:kafka-clients</include>
-                <include>org.apache.phoenix:phoenix${phoenix.main.version}-flume</include>
+                <include>org.apache.phoenix:phoenix5-flume</include>
               </includes>
             </artifactSet>
           </configuration>
diff --git a/phoenix-kafka-base/src/it/java/org/apache/phoenix/kafka/PhoenixConsumerIT.java b/phoenix5-kafka/src/it/java/org/apache/phoenix/kafka/PhoenixConsumerIT.java
similarity index 100%
rename from phoenix-kafka-base/src/it/java/org/apache/phoenix/kafka/PhoenixConsumerIT.java
rename to phoenix5-kafka/src/it/java/org/apache/phoenix/kafka/PhoenixConsumerIT.java
diff --git a/phoenix-kafka-base/src/it/resources/consumer.props b/phoenix5-kafka/src/it/resources/consumer.props
similarity index 100%
rename from phoenix-kafka-base/src/it/resources/consumer.props
rename to phoenix5-kafka/src/it/resources/consumer.props
diff --git a/phoenix-kafka-base/src/it/resources/producer.props b/phoenix5-kafka/src/it/resources/producer.props
similarity index 100%
rename from phoenix-kafka-base/src/it/resources/producer.props
rename to phoenix5-kafka/src/it/resources/producer.props
diff --git a/phoenix-kafka-base/src/main/java/org/apache/phoenix/kafka/KafkaConstants.java b/phoenix5-kafka/src/main/java/org/apache/phoenix/kafka/KafkaConstants.java
similarity index 100%
rename from phoenix-kafka-base/src/main/java/org/apache/phoenix/kafka/KafkaConstants.java
rename to phoenix5-kafka/src/main/java/org/apache/phoenix/kafka/KafkaConstants.java
diff --git a/phoenix-kafka-base/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumer.java b/phoenix5-kafka/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumer.java
similarity index 100%
rename from phoenix-kafka-base/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumer.java
rename to phoenix5-kafka/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumer.java
diff --git a/phoenix-kafka-base/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumerTool.java b/phoenix5-kafka/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumerTool.java
similarity index 100%
rename from phoenix-kafka-base/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumerTool.java
rename to phoenix5-kafka/src/main/java/org/apache/phoenix/kafka/consumer/PhoenixConsumerTool.java
diff --git a/phoenix5-spark-shaded/pom.xml b/phoenix5-spark-shaded/pom.xml
new file mode 100644
index 0000000..7cab58c
--- /dev/null
+++ b/phoenix5-spark-shaded/pom.xml
@@ -0,0 +1,293 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.apache.phoenix</groupId>
+    <artifactId>phoenix-connectors</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>phoenix5-spark-shaded</artifactId>
+  <name>Shaded Phoenix Spark Connector for Phoenix 5</name>
+
+  <properties>
+    <top.dir>${project.basedir}/..</top.dir>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix5-spark</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <!-- We want to take the implementation from Spark -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <configuration>
+          <shadedArtifactAttached>false</shadedArtifactAttached>
+          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+          <filters>
+            <filter>
+              <artifact>*:*</artifact>
+              <excludes>
+                <exclude>META-INF/*.SF</exclude>
+                <exclude>META-INF/*.DSA</exclude>
+                <exclude>META-INF/*.RSA</exclude>
+                <exclude>META-INF/license/*</exclude>
+                <exclude>META-INF/NOTICE</exclude>
+                <exclude>LICENSE.*</exclude>
+                <exclude>NOTICE.*</exclude>
+                <exclude>NOTICE</exclude>
+                <exclude>README*</exclude>
+                <!-- Coming from Omid, should be fixed there -->
+                <exclude>log4j.properties</exclude>
+              </excludes>
+            </filter>
+            <filter>
+              <artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
+              <excludes>
+                <exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
+                <exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
+                <exclude>webapps/**</exclude>
+              </excludes>
+            </filter>
+            <!-- Phoenix specific -->
+            <filter>
+              <artifact>org.apache.commons:commons-math3</artifact>
+              <excludes>
+                <exclude>assets/**</exclude>
+              </excludes>
+            </filter>
+            <filter>
+              <artifact>org.apache.hbase:hbase-server</artifact>
+              <excludes>
+                <exclude>hbase-webapps/**</exclude>
+              </excludes>
+            </filter>
+            <!-- Phoenix specific -->
+          </filters>
+          <transformers>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>csv-bulk-load-config.properties</resource>
+              <file>
+                ${project.basedir}/../config/csv-bulk-load-config.properties
+              </file>
+            </transformer>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>README.md</resource>
+              <file>${project.basedir}/../README.md</file>
+            </transformer>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>LICENSE.txt</resource>
+              <file>${project.basedir}/../LICENSE</file>
+            </transformer>
+            <transformer
+                    implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+              <resource>NOTICE</resource>
+              <file>${project.basedir}/../NOTICE</file>
+            </transformer>
+          </transformers>
+          <relocations>
+            <relocation>
+              <pattern>org/</pattern>
+              <shadedPattern>${shaded.package}.org.</shadedPattern>
+              <excludes>
+                <exclude>org/apache/hadoop/**</exclude>
+                <!-- Our non-shaded htrace and logging libraries -->
+                <exclude>org/apache/htrace/**</exclude>
+                <exclude>org/slf4j/**</exclude>
+                <exclude>org/apache/commons/logging/**</exclude>
+                <exclude>org/apache/log4j/**</exclude>
+                <!-- Not the org/ packages that are a part of the jdk -->
+                <exclude>org/ietf/jgss/**</exclude>
+                <exclude>org/omg/**</exclude>
+                <exclude>org/w3c/dom/**</exclude>
+                <exclude>org/xml/sax/**</exclude>
+                <!-- Extras compared to Hadoop -->
+                <!-- Hbase classes - Maybe these could be shaded as well ? -->
+                <exclude>org/apache/hbase/**</exclude>
+                <!-- We use the spark classpath directly -->
+                <exclude>org/apache/spark/**</exclude>
+                <!-- Phoenix classes -->
+                <exclude>org/apache/phoenix/**</exclude>
+                <exclude>org/apache/omid/**</exclude>
+                <!-- Do want/need to expose Tephra as well ? -->
+              </excludes>
+            </relocation>
+            <relocation>
+              <pattern>com/</pattern>
+              <shadedPattern>${shaded.package}.com.</shadedPattern>
+              <excludes>
+                <!-- Not the com/ packages that are a part of particular jdk implementations -->
+                <exclude>com/sun/tools/**</exclude>
+                <exclude>com/sun/javadoc/**</exclude>
+                <exclude>com/sun/security/**</exclude>
+                <exclude>com/sun/jndi/**</exclude>
+                <exclude>com/sun/management/**</exclude>
+              </excludes>
+            </relocation>
+            <relocation>
+              <pattern>io/</pattern>
+              <shadedPattern>${shaded.package}.io.</shadedPattern>
+              <excludes>
+                <!-- Exclude config keys for Hadoop that look like package names -->
+                <exclude>io/compression/**</exclude>
+                <exclude>io/mapfile/**</exclude>
+                <exclude>io/map/index/*</exclude>
+                <exclude>io/seqfile/**</exclude>
+                <exclude>io/file/buffer/size</exclude>
+                <exclude>io/skip/checksum/errors</exclude>
+                <exclude>io/sort/*</exclude>
+                <exclude>io/serializations</exclude>
+              </excludes>
+            </relocation>
+            <!-- JSRs that haven't made it to inclusion in J2SE -->
+            <relocation>
+              <pattern>javax/el/</pattern>
+              <shadedPattern>${shaded.package}.javax.el.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/cache/</pattern>
+              <shadedPattern>${shaded.package}.javax.cache.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/servlet/</pattern>
+              <shadedPattern>${shaded.package}.javax.servlet.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/ws/</pattern>
+              <shadedPattern>${shaded.package}.javax.ws.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/annotation/</pattern>
+              <shadedPattern>${shaded.package}.javax.annotation.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/inject/</pattern>
+              <shadedPattern>${shaded.package}.javax.inject.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javax/validation/</pattern>
+              <shadedPattern>${shaded.package}.javax.validation.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>net/</pattern>
+              <shadedPattern>${shaded.package}.net.</shadedPattern>
+              <excludes>
+                <!-- Exclude config keys for Hadoop that look like package names -->
+                <exclude>net/topology/**</exclude>
+              </excludes>
+            </relocation>
+            <!-- okio declares a top level package instead of nested -->
+            <relocation>
+              <pattern>okio/</pattern>
+              <shadedPattern>${shaded.package}.okio.</shadedPattern>
+            </relocation>
+            <!-- Phoenix specific relocations -->
+            <relocation>
+              <!-- Tephra -->
+              <pattern>co/</pattern>
+              <shadedPattern>${shaded.package}.co.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>it/</pattern>
+              <shadedPattern>${shaded.package}.it.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>javassist/</pattern>
+              <shadedPattern>${shaded.package}.javassist.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>jersey/</pattern>
+              <shadedPattern>${shaded.package}.jersey.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>jline/</pattern>
+              <shadedPattern>${shaded.package}.jline.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>mozilla/</pattern>
+              <shadedPattern>${shaded.package}.mozilla.</shadedPattern>
+            </relocation>
+            <relocation>
+              <pattern>tables/</pattern>
+              <shadedPattern>${shaded.package}.tables.</shadedPattern>
+            </relocation>
+            <!-- Phoenix specific relocations end -->
+          </relocations>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <!-- TODO consider not enabling these globally instead -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <executions>
+          <execution>
+             <id>default-compile</id>
+             <phase>none</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file
diff --git a/phoenix-spark-base/README.md b/phoenix5-spark/README.md
similarity index 100%
rename from phoenix-spark-base/README.md
rename to phoenix5-spark/README.md
diff --git a/phoenix5-spark/pom.xml b/phoenix5-spark/pom.xml
new file mode 100644
index 0000000..5cd2e57
--- /dev/null
+++ b/phoenix5-spark/pom.xml
@@ -0,0 +1,574 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.phoenix</groupId>
+    <artifactId>phoenix-connectors</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>phoenix5-spark</artifactId>
+  <name>Phoenix Spark Connector for Phoenix 5</name>
+
+  <properties>
+    <top.dir>${project.basedir}/..</top.dir>
+    <skip-scala-tests>true</skip-scala-tests>
+  </properties>
+
+  <dependencies>
+
+    <!-- Spark dependencies first to avoid jackson compatibility problems -->
+    <!-- Mark Spark / Scala as provided -->
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-library</artifactId>
+      <version>${scala.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-reflect</artifactId>
+      <version>${scala.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.spark</groupId>
+      <artifactId>spark-core_${scala.binary.version}</artifactId>
+      <version>${spark.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.spark</groupId>
+      <artifactId>spark-sql_${scala.binary.version}</artifactId>
+      <version>${spark.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.spark</groupId>
+      <artifactId>spark-unsafe_${scala.binary.version}</artifactId>
+      <version>${spark.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.spark</groupId>
+      <artifactId>spark-tags_${scala.binary.version}</artifactId>
+      <version>${spark.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.spark</groupId>
+      <artifactId>spark-catalyst_${scala.binary.version}</artifactId>
+      <version>${spark.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
+      <scope>runtime</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.apache.phoenix</groupId>
+      <artifactId>phoenix-core</artifactId>
+      <classifier>tests</classifier>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.scalatest</groupId>
+      <artifactId>scalatest_${scala.binary.version}</artifactId>
+      <version>2.2.4</version>
+      <scope>test</scope>
+    </dependency>
+
+
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-common</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet.jsp</groupId>
+          <artifactId>jsp-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-core</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet.jsp</groupId>
+          <artifactId>jsp-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>provided</scope>
+    </dependency>
+
+
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-client</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.thrift</groupId>
+          <artifactId>thrift</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jsp-2.1</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jsp-api-2.1</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>servlet-api-2.5</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-json</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-server</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jetty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-runtime</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-compiler</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-common</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.thrift</groupId>
+          <artifactId>thrift</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jsp-2.1</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jsp-api-2.1</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>servlet-api-2.5</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-json</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jersey</groupId>
+          <artifactId>jersey-server</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jetty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-runtime</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>tomcat</groupId>
+          <artifactId>jasper-compiler</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-mapreduce</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>joda-time</groupId>
+      <artifactId>joda-time</artifactId>
+      <version>${jodatime.version}</version>
+    </dependency>
+
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>servlet-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet.jsp</groupId>
+          <artifactId>jsp-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jruby</groupId>
+          <artifactId>jruby-complete</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-it</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- Mark every Hadoop jar as provided -->
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-auth</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-yarn-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-distcp</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-client</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-mapreduce-client-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <!-- We want to take the implementation from Spark -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+      <version>2.5.0</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+      <plugins>
+        <plugin>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <configuration>
+            <ignoreNonCompile>true</ignoreNonCompile>
+            <ignoredUnusedDeclaredDependencies>
+              <!-- These are all used -->
+              <ignoredUnusedDeclaredDependency>
+                org.apache.hadoop:hadoop-hdfs
+              </ignoredUnusedDeclaredDependency>
+              <ignoredUnusedDeclaredDependency>
+                org.apache.hbase:hbase-it
+              </ignoredUnusedDeclaredDependency>
+            </ignoredUnusedDeclaredDependencies>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>net.alchim31.maven</groupId>
+          <artifactId>scala-maven-plugin</artifactId>
+          <configuration>
+            <charset>${project.build.sourceEncoding}</charset>
+            <jvmArgs>
+              <jvmArg>-Xmx1024m</jvmArg>
+            </jvmArgs>
+            <scalaVersion>${scala.version}</scalaVersion>
+            <scalaCompatVersion>${scala.binary.version}</scalaCompatVersion>
+          </configuration>
+          <executions>
+            <execution>
+              <id>scala-compile-first</id>
+              <phase>process-resources</phase>
+              <goals>
+                <goal>add-source</goal>
+                <goal>compile</goal>
+              </goals>
+            </execution>
+            <execution>
+              <id>scala-test-compile</id>
+              <phase>process-test-resources</phase>
+              <goals>
+                <goal>testCompile</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+
+        <plugin>
+          <groupId>org.scalatest</groupId>
+          <artifactId>scalatest-maven-plugin</artifactId>
+          <version>1.0</version>
+          <configuration>
+            <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+            <junitxml>.</junitxml>
+            <filereports>WDF TestSuite.txt</filereports>
+            <skipTests>${skip-scala-tests}</skipTests>
+          </configuration>
+          <executions>
+            <execution>
+              <id>integration-test</id>
+              <phase>integration-test</phase>
+              <goals>
+                <goal>test</goal>
+              </goals>
+              <configuration>
+                <!-- Need this false until we can switch to JUnit 4.13 due 
+                  to https://github.com/junit-team/junit4/issues/1223 -->
+                <parallel>false</parallel>
+                <tagsToExclude>Integration-Test</tagsToExclude>
+                <argLine>-Xmx1536m -XX:ReservedCodeCacheSize=512m</argLine>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <configuration>
+            <source>1.8</source>
+            <target>1.8</target>
+          </configuration>
+        </plugin>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <configuration>
+                <skip>${skip.spark.javadoc}</skip>
+            </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>empty-javadoc-jar</id>
+              <phase>package</phase>
+              <goals>
+                <goal>jar</goal>
+              </goals>
+              <configuration>
+                <classifier>javadoc</classifier>
+                <classesDirectory>${basedir}/javadoc</classesDirectory>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+        <!-- Taken from phoenix-client-parent
+        this should be kept in sync with Phoenix as much as possible -->
+      </plugins>
+  </build>
+  <profiles>
+    <profile>
+      <id>scala-tests-enabled</id>
+      <activation>
+        <property>
+          <name>scala-tests-enabled</name>
+        </property>
+      </activation>
+      <properties>
+        <skip-scala-tests>false</skip-scala-tests>
+      </properties>
+    </profile>
+  </profiles>
+</project>
diff --git a/phoenix-spark-base/src/it/java/org/apache/phoenix/spark/AggregateIT.java b/phoenix5-spark/src/it/java/org/apache/phoenix/spark/AggregateIT.java
similarity index 100%
rename from phoenix-spark-base/src/it/java/org/apache/phoenix/spark/AggregateIT.java
rename to phoenix5-spark/src/it/java/org/apache/phoenix/spark/AggregateIT.java
diff --git a/phoenix-spark-base/src/it/java/org/apache/phoenix/spark/OrderByIT.java b/phoenix5-spark/src/it/java/org/apache/phoenix/spark/OrderByIT.java
similarity index 100%
rename from phoenix-spark-base/src/it/java/org/apache/phoenix/spark/OrderByIT.java
rename to phoenix5-spark/src/it/java/org/apache/phoenix/spark/OrderByIT.java
diff --git a/phoenix-spark-base/src/it/java/org/apache/phoenix/spark/SaltedTableIT.java b/phoenix5-spark/src/it/java/org/apache/phoenix/spark/SaltedTableIT.java
similarity index 100%
rename from phoenix-spark-base/src/it/java/org/apache/phoenix/spark/SaltedTableIT.java
rename to phoenix5-spark/src/it/java/org/apache/phoenix/spark/SaltedTableIT.java
diff --git a/phoenix-spark-base/src/it/java/org/apache/phoenix/spark/SparkUtil.java b/phoenix5-spark/src/it/java/org/apache/phoenix/spark/SparkUtil.java
similarity index 100%
rename from phoenix-spark-base/src/it/java/org/apache/phoenix/spark/SparkUtil.java
rename to phoenix5-spark/src/it/java/org/apache/phoenix/spark/SparkUtil.java
diff --git a/phoenix-spark-base/src/it/resources/globalSetup.sql b/phoenix5-spark/src/it/resources/globalSetup.sql
similarity index 100%
rename from phoenix-spark-base/src/it/resources/globalSetup.sql
rename to phoenix5-spark/src/it/resources/globalSetup.sql
diff --git a/phoenix-spark-base/src/it/resources/log4j.xml b/phoenix5-spark/src/it/resources/log4j.xml
similarity index 100%
rename from phoenix-spark-base/src/it/resources/log4j.xml
rename to phoenix5-spark/src/it/resources/log4j.xml
diff --git a/phoenix-spark-base/src/it/resources/tenantSetup.sql b/phoenix5-spark/src/it/resources/tenantSetup.sql
similarity index 100%
rename from phoenix-spark-base/src/it/resources/tenantSetup.sql
rename to phoenix5-spark/src/it/resources/tenantSetup.sql
diff --git a/phoenix-spark-base/src/it/resources/transactionTableSetup.sql b/phoenix5-spark/src/it/resources/transactionTableSetup.sql
similarity index 100%
rename from phoenix-spark-base/src/it/resources/transactionTableSetup.sql
rename to phoenix5-spark/src/it/resources/transactionTableSetup.sql
diff --git a/phoenix-spark-base/src/it/scala/org/apache/phoenix/spark/AbstractPhoenixSparkIT.scala b/phoenix5-spark/src/it/scala/org/apache/phoenix/spark/AbstractPhoenixSparkIT.scala
similarity index 100%
rename from phoenix-spark-base/src/it/scala/org/apache/phoenix/spark/AbstractPhoenixSparkIT.scala
rename to phoenix5-spark/src/it/scala/org/apache/phoenix/spark/AbstractPhoenixSparkIT.scala
diff --git a/phoenix-spark-base/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala b/phoenix5-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
similarity index 100%
rename from phoenix-spark-base/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
rename to phoenix5-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
diff --git a/phoenix-spark-base/src/it/scala/org/apache/phoenix/spark/PhoenixSparkITTenantSpecific.scala b/phoenix5-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkITTenantSpecific.scala
similarity index 100%
rename from phoenix-spark-base/src/it/scala/org/apache/phoenix/spark/PhoenixSparkITTenantSpecific.scala
rename to phoenix5-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkITTenantSpecific.scala
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/SparkResultSet.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/SparkResultSet.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/SparkResultSet.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/SparkResultSet.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSource.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSource.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSource.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSource.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReadOptions.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReadOptions.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReadOptions.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReadOptions.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReader.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReader.java
similarity index 96%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReader.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReader.java
index 3ee821b..b839548 100644
--- a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReader.java
+++ b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixDataSourceReader.java
@@ -21,7 +21,7 @@
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.RegionLocator;
 import org.apache.hadoop.hbase.client.Scan;
-import org.apache.phoenix.compat.CompatUtil;
+import org.apache.hadoop.hbase.mapreduce.RegionSizeCalculator;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.coprocessor.generated.PTableProtos.PTable;
 import org.apache.phoenix.iterate.MapReduceParallelScanGrouper;
@@ -183,7 +183,8 @@
                 String regionLocation = location.getHostname();
 
                 // Get the region size
-                long regionSize = CompatUtil.getSize(regionLocator, connection.getAdmin(), location);
+                RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(regionLocator, connection.getAdmin());
+                long regionSize =  sizeCalculator.getRegionSize(location.getRegionInfo().getRegionName());
                 byte[] pTableCacheBytes = PTableImpl.toProto(queryPlan.getTableRef().getTable()).
                     toByteArray();
                 PhoenixDataSourceReadOptions phoenixDataSourceOptions =
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartition.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartition.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartition.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartition.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartitionReader.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartitionReader.java
similarity index 98%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartitionReader.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartitionReader.java
index 841545c..a58cfa0 100644
--- a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartitionReader.java
+++ b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixInputPartitionReader.java
@@ -27,10 +27,10 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Bytes;
 
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.StatementContext;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
@@ -132,7 +132,7 @@
             // Clear the table region boundary cache to make sure long running jobs stay up to date
             byte[] tableNameBytes = queryPlan.getTableRef().getTable().getPhysicalName().getBytes();
             ConnectionQueryServices services = queryPlan.getContext().getConnection().getQueryServices();
-            services.clearTableRegionCache(CompatUtil.getTableName(tableNameBytes));
+            services.clearTableRegionCache(TableName.valueOf(tableNameBytes));
 
             long renewScannerLeaseThreshold = queryPlan.getContext().getConnection()
                     .getQueryServices().getRenewLeaseThresholdMilliSeconds();
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriteOptions.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriteOptions.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriteOptions.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriteOptions.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriter.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriter.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriter.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataSourceWriter.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriter.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriter.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriter.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriter.java
diff --git a/phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriterFactory.java b/phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriterFactory.java
similarity index 100%
rename from phoenix-spark-base/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriterFactory.java
rename to phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixDataWriterFactory.java
diff --git a/phoenix-spark-base/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister b/phoenix5-spark/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
similarity index 100%
rename from phoenix-spark-base/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
rename to phoenix5-spark/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/ConfigurationUtil.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/ConfigurationUtil.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/ConfigurationUtil.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/ConfigurationUtil.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/DefaultSource.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/DefaultSource.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/DefaultSource.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/DefaultSource.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/FilterExpressionCompiler.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/FilterExpressionCompiler.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/FilterExpressionCompiler.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/FilterExpressionCompiler.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRecordWritable.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/PhoenixRelation.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRelation.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/PhoenixRelation.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRelation.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/SparkContextFunctions.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/SparkContextFunctions.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/SparkContextFunctions.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/SparkContextFunctions.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/SparkSchemaUtil.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/SparkSchemaUtil.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/SparkSchemaUtil.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/SparkSchemaUtil.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/SparkSqlContextFunctions.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/SparkSqlContextFunctions.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/SparkSqlContextFunctions.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/SparkSqlContextFunctions.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/package.scala b/phoenix5-spark/src/main/scala/org/apache/phoenix/spark/package.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/phoenix/spark/package.scala
rename to phoenix5-spark/src/main/scala/org/apache/phoenix/spark/package.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/PhoenixJdbcDialect.scala b/phoenix5-spark/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/PhoenixJdbcDialect.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/PhoenixJdbcDialect.scala
rename to phoenix5-spark/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/PhoenixJdbcDialect.scala
diff --git a/phoenix-spark-base/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/SparkJdbcUtil.scala b/phoenix5-spark/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/SparkJdbcUtil.scala
similarity index 100%
rename from phoenix-spark-base/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/SparkJdbcUtil.scala
rename to phoenix5-spark/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/SparkJdbcUtil.scala
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSourceTest.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSourceTest.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSourceTest.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSourceTest.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixTestingDataSource.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixTestingDataSource.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixTestingDataSource.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/PhoenixTestingDataSource.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingDataSourceReader.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingDataSourceReader.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingDataSourceReader.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingDataSourceReader.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartition.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartition.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartition.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartition.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartitionReader.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartitionReader.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartitionReader.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/reader/PhoenixTestingInputPartitionReader.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataSourceWriter.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataSourceWriter.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataSourceWriter.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataSourceWriter.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriter.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriter.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriter.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriter.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriterFactory.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriterFactory.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriterFactory.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingDataWriterFactory.java
diff --git a/phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingWriterCommitMessage.java b/phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingWriterCommitMessage.java
similarity index 100%
rename from phoenix-spark-base/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingWriterCommitMessage.java
rename to phoenix5-spark/src/test/java/org/apache/phoenix/spark/datasource/v2/writer/PhoenixTestingWriterCommitMessage.java
diff --git a/phoenix-spark-base/src/test/resources/log4j.xml b/phoenix5-spark/src/test/resources/log4j.xml
similarity index 100%
rename from phoenix-spark-base/src/test/resources/log4j.xml
rename to phoenix5-spark/src/test/resources/log4j.xml
diff --git a/phoenix5-spark3-it/pom.xml b/phoenix5-spark3-it/pom.xml
index 52f11ba..ac6aa50 100644
--- a/phoenix5-spark3-it/pom.xml
+++ b/phoenix5-spark3-it/pom.xml
@@ -33,12 +33,6 @@
   <name>Tests for Phoenix Spark 3 Connector for Phoenix 5</name>
 
   <properties>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
     <spark.version>${spark3.version}</spark.version>
     <scala.version>2.12.10</scala.version>
     <scala.binary.version>2.12</scala.binary.version>
diff --git a/phoenix5-spark3-shaded/pom.xml b/phoenix5-spark3-shaded/pom.xml
index 5e881d6..d10e9f2 100644
--- a/phoenix5-spark3-shaded/pom.xml
+++ b/phoenix5-spark3-shaded/pom.xml
@@ -34,12 +34,6 @@
 
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
   </properties>
 
   <dependencies>
diff --git a/phoenix5-spark3/pom.xml b/phoenix5-spark3/pom.xml
index aad4d9e..1b583e6 100644
--- a/phoenix5-spark3/pom.xml
+++ b/phoenix5-spark3/pom.xml
@@ -34,12 +34,6 @@
 
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
-    <phoenix.version>${phoenix-five.version}</phoenix.version>
-    <hbase.version>${hbase-two.version}</hbase.version>
-    <hbase.compat.version>${hbase-two.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-three.version}</hadoop.version>
-    <jdk.version>1.8</jdk.version>
-    <phoenix.main.version>5</phoenix.main.version>
     <spark.version>${spark3.version}</spark.version>
     <scala.version>2.12.10</scala.version>
     <scala.binary.version>2.12</scala.binary.version>
@@ -49,10 +43,6 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.phoenix</groupId>
-      <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.phoenix</groupId>
       <artifactId>phoenix-core</artifactId>
     </dependency>
     <dependency>
@@ -118,6 +108,11 @@
       <artifactId>hbase-client</artifactId>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-mapreduce</artifactId>
+      <scope>provided</scope>
+    </dependency>
 
     <dependency>
       <groupId>com.google.protobuf</groupId>
diff --git a/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixPartitionReader.java b/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixPartitionReader.java
index 4cbc237..8a34cae 100644
--- a/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixPartitionReader.java
+++ b/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixPartitionReader.java
@@ -27,10 +27,10 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Bytes;
 
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.StatementContext;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
@@ -119,7 +119,7 @@
             // Clear the table region boundary cache to make sure long running jobs stay up to date
             byte[] tableNameBytes = queryPlan.getTableRef().getTable().getPhysicalName().getBytes();
             ConnectionQueryServices services = queryPlan.getContext().getConnection().getQueryServices();
-            services.clearTableRegionCache(CompatUtil.getTableName(tableNameBytes));
+            services.clearTableRegionCache(TableName.valueOf(tableNameBytes));
 
             long renewScannerLeaseThreshold = queryPlan.getContext().getConnection()
                     .getQueryServices().getRenewLeaseThresholdMilliSeconds();
diff --git a/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixScan.java b/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixScan.java
index 451d7b1..4e6af60 100644
--- a/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixScan.java
+++ b/phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/reader/PhoenixScan.java
@@ -17,12 +17,12 @@
  */
 package org.apache.phoenix.spark.sql.connector.reader;
 
+import org.apache.hadoop.hbase.mapreduce.RegionSizeCalculator;
 import org.apache.phoenix.schema.PTableImpl;
 import org.apache.phoenix.thirdparty.com.google.common.annotations.VisibleForTesting;
 import org.apache.hadoop.hbase.HRegionLocation;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.RegionLocator;
-import org.apache.phoenix.compat.CompatUtil;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.iterate.MapReduceParallelScanGrouper;
 import org.apache.phoenix.jdbc.PhoenixConnection;
@@ -146,7 +146,8 @@
                 String regionLocation = location.getHostname();
 
                 // Get the region size
-                long regionSize = CompatUtil.getSize(regionLocator, connection.getAdmin(), location);
+                RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(regionLocator, connection.getAdmin());
+                long regionSize =  sizeCalculator.getRegionSize(location.getRegionInfo().getRegionName());
                 byte[] pTableCacheBytes = PTableImpl.toProto(queryPlan.getTableRef().getTable()).
                     toByteArray();
                 phoenixDataSourceOptions =
diff --git a/pom.xml b/pom.xml
index caeaf31..d84fd4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,54 +42,41 @@
   </scm>
 
   <modules>
-      <module>phoenix-connectors-phoenix4-compat</module>
-      <module>phoenix-connectors-phoenix5-compat</module>
       <!-- Changing the module order here may cause maven to get stuck in an infinite loop -->
-      <module>phoenix-hive-base</module>
-      <module>phoenix-flume-base</module>
-      <module>phoenix-kafka-base</module>
-      <module>phoenix-spark-base</module>
+      <module>phoenix5-hive</module>
+      <module>phoenix5-hive-shaded</module>
+      <module>phoenix5-flume</module>
+      <module>phoenix5-kafka</module>
+      <module>phoenix5-spark</module>
+      <module>phoenix5-spark-shaded</module>
       <module>phoenix5-spark3</module>
       <module>phoenix5-spark3-it</module>
       <module>phoenix5-spark3-shaded</module>
-      <module>phoenix4-connectors-assembly</module>
       <module>phoenix5-connectors-assembly</module>
   </modules>
 
   <properties>
     <!-- Phoenix Version -->
-    <phoenix-four.version>4.16.0</phoenix-four.version>
-    <phoenix-five.version>5.1.2</phoenix-five.version>
+    <phoenix.version>5.1.2</phoenix.version>
     <phoenix.thirdparty.version>2.0.0</phoenix.thirdparty.version>
     <!-- Hadoop Versions -->
-    <hbase-one.version>1.4.10</hbase-one.version>
-    <hbase-one.compat.version>1.4.0</hbase-one.compat.version>
-    <hbase-one.zookeeper.version>3.4.12</hbase-one.zookeeper.version>
-    <hbase-two.version>2.1.10</hbase-two.version>
-    <hbase-two.compat.version>2.1.6</hbase-two.compat.version>
-    <hbase-two.zookeeper.version>3.5.9</hbase-two.zookeeper.version>
-    <hbase-thirdparty-version>2.1.0</hbase-thirdparty-version>
-    <hadoop-two.version>2.7.5</hadoop-two.version>
-    <hadoop-three.version>3.0.3</hadoop-three.version>
+    <hbase.version>2.1.10</hbase.version>
+    <hbase.compat.version>2.1.6</hbase.compat.version>
+    <hadoop.version>3.0.3</hadoop.version>
+    <zookeeper.version>3.5.9</zookeeper.version>
 
-    <phoenix.version>${phoenix-four.version}</phoenix.version>
-    <hbase.version>${hbase-one.version}</hbase.version>
-    <hbase.compat.version>${hbase-one.compat.version}</hbase.compat.version>
-    <hadoop.version>${hadoop-two.version}</hadoop.version>
-    <zookeeper.version>${hbase-one.zookeeper.version}</zookeeper.version>
+    <hbase-thirdparty-version>2.1.0</hbase-thirdparty-version>
     
 
     <!-- General Properties -->
     <test.output.tofile>true</test.output.tofile>
     <top.dir>${project.basedir}</top.dir>
 
-    <jdk.version>1.7</jdk.version>
+    <jdk.version>1.8</jdk.version>
 
     <!-- Dependency versions -->
     <hive3.version>3.1.2</hive3.version>
-    <hive2.version>2.3.7</hive2.version>
     <hive.version>${hive3.version}</hive.version>
-    <hive2-storage.version>2.4.0</hive2-storage.version>
     <hive3-storage.version>2.7.0</hive3-storage.version>
     <hive-storage.version>${hive3-storage.version}</hive-storage.version>
     <flume.version>1.4.0</flume.version>
@@ -142,7 +129,7 @@
 
     <shaded.package>org.apache.phoenix.shaded</shaded.package>
     <hbase.shaded.package>org.apache.hadoop.hbase.shaded</hbase.shaded.package>
-    <phoenix.main.version>4</phoenix.main.version>
+    <phoenix.main.version>5</phoenix.main.version>
 
     <skip-scala-tests>true</skip-scala-tests>
     <skip.spark.javadoc>false</skip.spark.javadoc>
@@ -514,36 +501,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix4-flume</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix4-kafka</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix4-spark</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix4-spark-shaded</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix4-hive</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix4-hive-shaded</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
         <artifactId>phoenix5-flume</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -582,16 +539,6 @@
         <artifactId>phoenix5-hive-shaded</artifactId>
         <version>${project.version}</version>
       </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix-connectors-phoenix4-compat</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.phoenix</groupId>
-        <artifactId>phoenix-connectors-phoenix5-compat</artifactId>
-        <version>${project.version}</version>
-      </dependency>
 
       <!-- HBase dependencies -->
 
@@ -789,6 +736,7 @@
         <groupId>org.apache.hadoop</groupId>
         <artifactId>hadoop-mapreduce-client-core</artifactId>
         <version>${hadoop.version}</version>
+        <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.hadoop</groupId>