Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4808

Phoenix Spark Do not verify zKUrl in DefaultSource.scala

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      Currently verifyParameters will throw an exception

      zkUrl check

      if (parameters.get("zkUrl").isEmpty) however this is unnecessary as ultimately new PhoenixRelation(...)

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            lbronshtein Lev Bronshtein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: