aws-glue-datacatalog-spark-client/src/main/java/com/amazonaws/glue/catalog/metastore/AWSCatalogMetastoreClient.java [193:225]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private AWSCatalogMetastoreClient(Builder builder) throws MetaException {
    conf = Objects.firstNonNull(builder.conf, new HiveConf());

    if (builder.wh != null) {
      this.wh = builder.wh;
    } else {
      this.wh = new Warehouse(conf);
    }
    
    if (builder.catalogId != null) {
      this.catalogId = builder.catalogId;
    } else {
      this.catalogId = null;
    }

    GlueClientFactory clientFactory = Objects.firstNonNull(builder.clientFactory, new AWSGlueClientFactory(conf));
    AWSGlueMetastoreFactory metastoreFactory = Objects.firstNonNull(builder.metastoreFactory,
            new AWSGlueMetastoreFactory());

    glueClient = clientFactory.newClient();
    AWSGlueMetastore glueMetastore = metastoreFactory.newMetastore(conf);
    glueMetastoreClientDelegate = new GlueMetastoreClientDelegate(this.conf, glueMetastore, wh);

    /**
     * It seems weird to create databases as part of glueClient construction. This
     * part should probably be moved to the section in hive code right after the
     * metastore glueClient is instantiated. For now, simply copying the
     * functionality in the thrift server
     */
    if(builder.createDefaults && !doesDefaultDBExist()) {
      createDefaultDatabase();
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-glue-datacatalog-hive2-client/src/main/java/com/amazonaws/glue/catalog/metastore/AWSCatalogMetastoreClient.java [205:237]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private AWSCatalogMetastoreClient(Builder builder) throws MetaException {
    conf = Objects.firstNonNull(builder.conf, new HiveConf());

    if (builder.wh != null) {
      this.wh = builder.wh;
    } else {
      this.wh = new Warehouse(conf);
    }
    
    if (builder.catalogId != null) {
    	this.catalogId = builder.catalogId;
    } else {
    	this.catalogId = null;
    }

    GlueClientFactory clientFactory = Objects.firstNonNull(builder.clientFactory, new AWSGlueClientFactory(conf));
    AWSGlueMetastoreFactory metastoreFactory = Objects.firstNonNull(builder.metastoreFactory,
            new AWSGlueMetastoreFactory());

    glueClient = clientFactory.newClient();
    AWSGlueMetastore glueMetastore = metastoreFactory.newMetastore(conf);
    glueMetastoreClientDelegate = new GlueMetastoreClientDelegate(this.conf, glueMetastore, wh);

    /**
     * It seems weird to create databases as part of client construction. This
     * part should probably be moved to the section in hive code right after the
     * metastore client is instantiated. For now, simply copying the
     * functionality in the thrift server
     */
    if(builder.createDefaults && !doesDefaultDBExist()) {
      createDefaultDatabase();
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



