try {
// Initialize the comparator class and run its compare method
comparatorClass = Class.forName("org.apache.hadoop.cli.util." +
comparatorType);
ComparatorBase comp = (ComparatorBase) comparatorClass.newInstance();
compareOutput = comp.compare(CommandExecutor.getLastCommandOutput(),
compdata.getExpectedOutput());
} catch (Exception e) {
LOG.info("Error in instantiating the comparator" + e);
}
}