public static void initializeSchemas(Map conf,String id){
  SystemConfiguration.setProperty("data.schemas",(String)conf.get(StormConstants.DSCHEMA_KEY));
  SystemConfiguration.setProperty("query.schemas",(String)conf.get(StormConstants.QSCHEMA_KEY));
  try {
    boolean hdfs=(boolean)conf.get(StormConstants.USE_HDFS);
    if (hdfs) {
      String hdfsUri=(String)conf.get(StormConstants.HDFS_URI_KEY);
      FileSystem fs=FileSystem.get(URI.create(hdfsUri),new Configuration());
      DataSchemaLoader.initialize(true,fs);
      QuerySchemaLoader.initialize(true,fs);
    }
 else {
      DataSchemaLoader.initialize();
      QuerySchemaLoader.initialize();
    }
  }
 catch (  Exception e) {
    logger.error("Failed to initialize schema files.",e);
    throw new RuntimeException(e);
  }
}

public static void initializeSchemas ( Map conf , String id ) { SystemConfiguration . setProperty ( "data.schemas" , ( String ) conf . get ( StormConstants . DSCHEMA_KEY ) ) ; SystemConfiguration . setProperty ( "query.schemas" , ( String ) conf . get ( StormConstants . QSCHEMA_KEY ) ) ; try { boolean hdfs = ( boolean ) conf . get ( StormConstants . USE_HDFS ) ; if ( hdfs ) { String hdfsUri = ( String ) conf . get ( StormConstants . HDFS_URI_KEY ) ; FileSystem fs = FileSystem . get ( URI . create ( hdfsUri ) , new Configuration ( ) ) ; DataSchemaLoader . initialize ( true , fs ) ; QuerySchemaLoader . initialize ( true , fs ) ; } else { DataSchemaLoader . initialize ( ) ; QuerySchemaLoader . initialize ( ) ; } } catch ( Exception e ) { logger . error ( "Failed to initialize schema files." , e ) ; throw new RuntimeException ( e ) ; } }
initialize data and query schema . conf requires values for use_hdfs , hdfs_uri_key , dschema_key , and qschema_key
