/** * Query to find if it is an HDP cluster * * @return true if this is invoked in an HDP cluster or false otherwise */ public static boolean isHdp() { return StringUtils.isNotEmpty(getHdpVersion()); }
/** * Query to find if it is an HDP cluster * * @return true if this is invoked in an HDP cluster or false otherwise */ public static boolean isHdp() { return StringUtils.isNotEmpty(getHdpVersion()); }
/** * Retrieve the version of the current Slider install * * @return the version string of the Slider release */ public static String getSliderVersion() { if (isHdp()) { return getHdpVersion(); } else { Properties props = SliderVersionInfo.loadVersionProperties(); return props.getProperty(SliderVersionInfo.APP_VERSION); } }
/** * Retrieve the version of the current Slider install * * @return the version string of the Slider release */ public static String getSliderVersion() { if (isHdp()) { return getHdpVersion(); } else { Properties props = SliderVersionInfo.loadVersionProperties(); return props.getProperty(SliderVersionInfo.APP_VERSION); } }
@Test public void testGetHdpVersion() { String hdpVersion = "2.3.2.0-2766"; Assert.assertEquals("Version should be empty", null, SliderUtils.getHdpVersion()); }
@Test public void testGetHdpVersion() { String hdpVersion = "2.3.2.0-2766"; Assert.assertEquals("Version should be empty", null, SliderUtils.getHdpVersion()); }