public String withoutUnit(PropertyUnit unit) {
      return hasUnit(unit)
        ? value.substring(0, value.length() - unit.toString().length())
        : value;
    }
@return property value with removed unit
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UnitUpdater.java