I'd change the order of the compare to avoid NPE if this.hadoopVersion is null.
Constants.HADOOP_VERSION.TWO.equals(this.hadoopVersion)