The phoenix thin client is ridiculously huge for what it is. The shaded Avatica client JAR is 6MB, the thin client JAR is 28MB.
This is of course caused by pulling in hadoop-common.
Some ideas for a smaller/better client
- Provide a client JAR that does not try expand on the kerberos capabilities of Avatica.
- this would remove the hadoop dependency
- The use case for the thin client is usually outside the cluster, where the referred config files may not even be available.
- Access through Knox usually doesn't use kerberos at all.
- cleaner client classpath
- Shade with minimizeJar
- 28->11MB, though I did not test if it actually works
- Use hadoop-client-api/runtime (from 3.x)
- less noise on the classpath
- 28->40MB without minimizeJar
- 28->16MB with minimizeJar
- Did not test either
My preferred solution is the first one, where we could look int additionally shading protobuf to further clean up the classpath. This could be an additional artifact, so that we do not break backwards compatibility either way.