@Override
    public final void createCatalog(ClusterName targetCluster, CatalogMetadata catalogMetadata)
            throws ExecutionException, UnsupportedException {

        try {
            connectionHandler.startJob(targetCluster.getName());

            if (logger.isDebugEnabled()) {
                logger.debug(
                        "Creating catalog [" + catalogMetadata.getName().getName() + "] in cluster [" + targetCluster
                                .getName() + "]");
            }
            createCatalog(catalogMetadata, connectionHandler.getConnection(targetCluster.getName()));
            if (logger.isDebugEnabled()) {
                logger.debug("Catalog [" + catalogMetadata.getName().getName()
                        + "] has been created successfully in cluster [" + targetCluster.getName() + "]");
            }
        } finally {
            connectionHandler.endJob(targetCluster.getName());
        }

    }
@ Override public final void createCatalog ( ClusterName targetCluster , CatalogMetadata catalogMetadata ) throws ExecutionException , UnsupportedException { try { connectionHandler . startJob ( targetCluster . getName ( ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Creating catalog [" + catalogMetadata . getName ( ) . getName ( ) + "] in cluster [" + targetCluster . getName ( ) + "]" ) ; } createCatalog ( catalogMetadata , connectionHandler . getConnection ( targetCluster . getName ( ) ) ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Catalog [" + catalogMetadata . getName ( ) . getName ( ) + "] has been created successfully in cluster [" + targetCluster . getName ( ) + "]" ) ; } } finally { connectionHandler . endJob ( targetCluster . getName ( ) ) ; } }
This method creates a catalog.

@param targetCluster   the target cluster where the catalog will be created.
@param catalogMetadata the catalog metadata info.
@throws UnsupportedException if an operation is not supported.
@throws ExecutionException   if an error happens.