aokolnychyi commented on a change in pull request #2203:
URL: https://github.com/apache/iceberg/pull/2203#discussion_r592930310
##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
##########
@@ -74,78 +73,22 @@
public HiveCatalog() {
}
- public HiveCatalog(Configuration conf) {
- this.name = "hive";
- this.clients = new HiveClientPool(conf);
- this.conf = conf;
- this.createStack = Thread.currentThread().getStackTrace();
- this.closed = false;
- this.fileIO = new HadoopFileIO(conf);
- }
-
- /**
- * Hive Catalog constructor.
- *
- * @deprecated please use the no-arg constructor, setConf and initialize to
construct the catalog. Will be removed in
- * v0.12.0
- * @param name catalog name
- * @param uri Hive metastore uri
- * @param clientPoolSize size of client pool
- * @param conf Hadoop Configuration
- */
- @Deprecated
- public HiveCatalog(String name, String uri, int clientPoolSize,
Configuration conf) {
- this(name, uri, null, clientPoolSize, conf);
- }
-
/**
* Hive Catalog constructor.
*
* @deprecated please use the no-arg constructor, setConf and initialize to
construct the catalog. Will be removed in
- * v0.12.0
- * @param name catalog name
- * @param uri Hive metastore uri
- * @param warehouse location of Hive warehouse
- * @param clientPoolSize size of client pool
+ * v0.13.0
* @param conf Hadoop Configuration
*/
@Deprecated
- public HiveCatalog(String name, String uri, String warehouse, int
clientPoolSize, Configuration conf) {
- this(name, uri, warehouse, clientPoolSize, conf, Maps.newHashMap());
- }
-
- /**
- * Hive Catalog constructor.
- *
- * @deprecated please use the no-arg constructor, setConf and initialize to
construct the catalog. Will be removed in
- * v0.12.0
- * @param name catalog name
- * @param uri Hive metastore uri
- * @param warehouse location of Hive warehouse
- * @param clientPoolSize size of client pool
- * @param conf Hadoop Configuration
- * @param properties extra Hive configuration properties
- */
- @Deprecated
- public HiveCatalog(
- String name,
- String uri,
- String warehouse,
- int clientPoolSize,
- Configuration conf,
- Map<String, String> properties) {
-
- Map<String, String> props = new HashMap<>(properties);
- if (warehouse != null) {
- props.put(CatalogProperties.WAREHOUSE_LOCATION, warehouse);
- }
- if (uri != null) {
- props.put(CatalogProperties.URI, uri);
- }
- props.put(CatalogProperties.CLIENT_POOL_SIZE,
Integer.toString(clientPoolSize));
-
- setConf(conf);
- initialize(name, props);
+ public HiveCatalog(Configuration conf) {
+ this.name = "hive";
+ int clientPoolSize = conf.getInt(CatalogProperties.CLIENT_POOL_SIZE,
CatalogProperties.CLIENT_POOL_SIZE_DEFAULT);
Review comment:
@rymurr, shall we use `setConf` and `initialize` like you in
`HadoopCatalog` PR here too?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]