private static void setClusterInfo ( Catalog catalog , DeploymentType deployment ) { ClusterType cluster = deployment . getCluster ( ) ; int kFactor = cluster . getKfactor ( ) ; Cluster catCluster = catalog . getClusters ( ) . get ( "cluster" ) ; // copy the deployment info that is currently not recorded anywhere else Deployment catDeploy = catCluster . getDeployment ( ) . get ( "deployment" ) ; catDeploy . setKfactor ( kFactor ) ; if ( deployment . getPartitionDetection ( ) . isEnabled ( ) ) { catCluster . setNetworkpartition ( true ) ; } else { catCluster . setNetworkpartition ( false ) ; } setSystemSettings ( deployment , catDeploy ) ; catCluster . setHeartbeattimeout ( deployment . getHeartbeat ( ) . getTimeout ( ) ) ; // copy schema modification behavior from xml to catalog if ( cluster . getSchema ( ) != null ) { catCluster . setUseddlschema ( cluster . getSchema ( ) == SchemaType . DDL ) ; } else { // Don't think we can get here, deployment schema guarantees a default value hostLog . warn ( "Schema modification setting not found. " + "Forcing default behavior of UpdateCatalog to modify database schema." ) ; catCluster . setUseddlschema ( false ) ; } }
Set cluster info in the catalog .