hortonworks-spark / shc

The Apache Spark - Apache HBase Connector is a library to support Spark accessing HBase table as external data source or sink.
Apache License 2.0
552 stars 281 forks source link

one call connection zk and closed it ? #316

Closed axzhcode closed 3 years ago

axzhcode commented 5 years ago

when i use this:

sc.parallelize(data)
      .toDF()
      .write
      .mode(SaveMode.Overwrite)
      .options(Map(HBaseTableCatalog.tableCatalog -> Catalog.writeTest, HBaseTableCatalog.newTable -> "5"))
      .format("org.apache.spark.sql.execution.datasources.hbase")
      .save()

every time the zookeeper connection is created and closed?

Opening socket connection to server... Closing zookeeper sessionid...

Is there a caching method?