private void waitForSchemaPropagation(DBConn dbConn) {
    	for(int i = 0; i < 5; i++) {
    		try {
	    		Map<String, List<String>> versions = dbConn.getClientSession().describe_schema_versions();
	    		if(versions.size() <= 1) return;
	    		m_logger.info("Schema versions are not synchronized yet. Retrying");
	            Thread.sleep(500 + 1000 * i);
    		}catch(Exception ex) {
    			m_logger.warn("Error waiting for schema propagation: {}", ex.getMessage());
    		}
    		m_logger.error("Schema versions have not been synchronized");
    	}
    }
private void waitForSchemaPropagation ( DBConn dbConn ) { for ( int i = 0 ; i < 5 ; i ++ ) { try { Map < String , List < String > > versions = dbConn . getClientSession ( ) . describe_schema_versions ( ) ; if ( versions . size ( ) <= 1 ) return ; m_logger . info ( "Schema versions are not synchronized yet. Retrying" ) ; Thread . sleep ( 500 + 1000 * i ) ; } catch ( Exception ex ) { m_logger . warn ( "Error waiting for schema propagation: {}" , ex . getMessage ( ) ) ; } m_logger . error ( "Schema versions have not been synchronized" ) ; } }
This method waits until all the nodes have the same schema