private void parseConfig() throws ParserConfigurationException, SAXException, IOException {
  DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
  factory.setIgnoringComments(true);
  DocumentBuilder builder=factory.newDocumentBuilder();
  Document domTree=null;
  if (_fileName.startsWith("hdfs:") || _fileName.startsWith("gpfs:")) {
    if (!LocalFileUtils.validateExternalFilename(_fileName,true))     throw new IOException("Invalid (non-trustworthy) hdfs config filename.");
    FileSystem DFS=FileSystem.get(ConfigurationManager.getCachedJobConf());
    Path configFilePath=new Path(_fileName);
    domTree=builder.parse(DFS.open(configFilePath));
  }
 else {
    if (!LocalFileUtils.validateExternalFilename(_fileName,false))     throw new IOException("Invalid (non-trustworthy) local config filename.");
    domTree=builder.parse(_fileName);
  }
  _xmlRoot=domTree.getDocumentElement();
}

private void parseConfig ( ) throws ParserConfigurationException , SAXException , IOException { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; factory . setIgnoringComments ( true ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; Document domTree = null ; if ( _fileName . startsWith ( "hdfs:" ) || _fileName . startsWith ( "gpfs:" ) ) { if ( ! LocalFileUtils . validateExternalFilename ( _fileName , true ) ) throw new IOException ( "Invalid (non-trustworthy) hdfs config filename." ) ; FileSystem DFS = FileSystem . get ( ConfigurationManager . getCachedJobConf ( ) ) ; Path configFilePath = new Path ( _fileName ) ; domTree = builder . parse ( DFS . open ( configFilePath ) ) ; } else { if ( ! LocalFileUtils . validateExternalFilename ( _fileName , false ) ) throw new IOException ( "Invalid (non-trustworthy) local config filename." ) ; domTree = builder . parse ( _fileName ) ; } _xmlRoot = domTree . getDocumentElement ( ) ; }
method to parse configuration
