private static DbSchemasDiff genGeoDiffs(DbSchemas spec,List<DbSchema> geoSchemas){
  List<String> geoSchemaNames=new ArrayList<>();
  for (  DbSchema geoSchema : geoSchemas) {
    geoSchemaNames.add(geoSchema.getName());
  }
  List<DbSchema> specSchemaList=new ArrayList<>();
  for (  DbSchema schema : spec.getSchemas()) {
    if (geoSchemaNames.contains(schema.getName())) {
      specSchemaList.add(schema);
    }
  }
  return new DbSchemasDiff(new DbSchemas(specSchemaList),new DbSchemas(geoSchemas));
}

private static DbSchemasDiff genGeoDiffs ( DbSchemas spec , List < DbSchema > geoSchemas ) { List < String > geoSchemaNames = new ArrayList < > ( ) ; for ( DbSchema geoSchema : geoSchemas ) { geoSchemaNames . add ( geoSchema . getName ( ) ) ; } List < DbSchema > specSchemaList = new ArrayList < > ( ) ; for ( DbSchema schema : spec . getSchemas ( ) ) { if ( geoSchemaNames . contains ( schema . getName ( ) ) ) { specSchemaList . add ( schema ) ; } } return new DbSchemasDiff ( new DbSchemas ( specSchemaList ) , new DbSchemas ( geoSchemas ) ) ; }
filter out all the non - geo db schemas from the spec and generate a diff note that some cfs might have been migrated from local db to geo db so we need to grab a latest list of geo schemas from the current schema first .
