Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
Currently verifyParameters will throw an exception
if (parameters.get("zkUrl").isEmpty) however this is unnecessary as ultimately new PhoenixRelation(...)
is called (see PhoenixRelation.scala) which in turn calls new PhoenixRDD(...) (See PhoenixRDD.scala). PhoenixRDD constructor declares zkUrl as optional. PhoenixRDD will try to use zkUrl and fall back on HBase Configuration
// Override the Zookeeper URL if present. Throw exception if no address given. zkUrl match { case Some(url) => ConfigurationUtil.setZookeeperURL(config, url) case _ => { if(ConfigurationUtil.getZookeeperURL(config).isEmpty) { throw new UnsupportedOperationException( s"One of zkUrl or '${HConstants.ZOOKEEPER_QUORUM}' config property must be provided" ) } }
I propose that this check is unnecessary and should be removed. As we will still get an exception, but a little later