@Test public void testStackIdVersion() { final EasyMockSupport easyMockSupport = new EasyMockSupport(); Injector injector = easyMockSupport.createNiceMock(Injector.class); UpgradeCatalog240 upgradeCatalog240 = new UpgradeCatalog240(injector); assertFalse(upgradeCatalog240.isAtLeastHdp25(new StackId("HDP-2.3"))); assertFalse(upgradeCatalog240.isAtLeastHdp25(new StackId("HDP-2.4"))); assertTrue(upgradeCatalog240.isAtLeastHdp25(new StackId("HDP-2.5"))); assertTrue(upgradeCatalog240.isAtLeastHdp25(new StackId("HDP-2.6"))); assertFalse(upgradeCatalog240.isAtLeastHdp25(new StackId("SOMETHINGELSE-1.4"))); }
protected boolean isAtLeastHdp25(StackId stackId) { if (null == stackId) { return false; } try { return stackId.compareTo(new StackId("HDP-2.5")) >= 0; } catch (Exception e) { return false; } }
UpgradeCatalog240 extends AbstractUpgradeCatalog { protected boolean isAtLeastHdp25(StackId stackId) { if (null == stackId) { return false; } try { return stackId.compareTo(new StackId("HDP-2.5")) >= 0; } catch (Exception e) { return false; } } }
UpgradeCatalog240 extends AbstractUpgradeCatalog { protected boolean isAtLeastHdp25(StackId stackId) { if (null == stackId) { return false; } try { return stackId.compareTo(new StackId("HDP-2.5")) >= 0; } catch (Exception e) { return false; } } @Inject  UpgradeCatalog240(Injector injector); }
UpgradeCatalog240 extends AbstractUpgradeCatalog { protected boolean isAtLeastHdp25(StackId stackId) { if (null == stackId) { return false; } try { return stackId.compareTo(new StackId("HDP-2.5")) >= 0; } catch (Exception e) { return false; } } @Inject  UpgradeCatalog240(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion(); }
UpgradeCatalog240 extends AbstractUpgradeCatalog { protected boolean isAtLeastHdp25(StackId stackId) { if (null == stackId) { return false; } try { return stackId.compareTo(new StackId("HDP-2.5")) >= 0; } catch (Exception e) { return false; } } @Inject  UpgradeCatalog240(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion(); static final String DESIRED_VERSION_COLUMN_NAME; static final String BLUEPRINT_SETTING_TABLE; static final String BLUEPRINT_NAME_COL; static final String SETTING_NAME_COL; static final String SETTING_DATA_COL; static final String ID; static final String BLUEPRINT_TABLE; static final String VIEWINSTANCE_TABLE; static final String SHORT_URL_COLUMN; static final String CLUSTER_HANDLE_COLUMN; static final String REQUESTSCHEDULE_TABLE; static final String AUTHENTICATED_USER_ID_COLUMN; static final String TIMELINE_METRICS_SINK_COLLECTION_PERIOD; static final String ONE_DIR_PER_PARITION_PROPERTY; static final String VIEWURL_TABLE; static final String URL_ID_COLUMN; static final String PRECISION_TABLE_TTL_PROPERTY; static final String CLUSTER_SECOND_TABLE_TTL_PROPERTY; static final String CLUSTER_TYPE_COLUMN; static final String REMOTE_AMBARI_CLUSTER_TABLE; static final String REMOTE_AMBARI_CLUSTER_SERVICE_TABLE; static final String CLUSTER_ID; static final String SERVICE_NAME; static final String CLUSTER_NAME; }