@Test public void oozieUrlSubstitutedInVariableSpace() { OozieJobExecutorJobEntry jobEntry = getStubbedOozieJobExecutorJobEntry(); VariableSpace variableSpace = mock( VariableSpace.class ); String OOZIE_VAR = "${oozie_url}"; when( jobEntry.getVariableSpace() ).thenReturn( variableSpace ); when( config.getOozieUrl() ).thenReturn( OOZIE_VAR ); String SUBSTITUTED_URL = "http: when( variableSpace.environmentSubstitute( OOZIE_VAR ) ) .thenReturn( SUBSTITUTED_URL ); assertThat( jobEntry.getEffectiveOozieUrl( config ), is( SUBSTITUTED_URL ) ); }
@VisibleForTesting String getEffectiveOozieUrl( OozieJobExecutorConfig config ) { String oozieUrl = config.getOozieUrl(); try { NamedCluster nc = getNamedCluster( config ); if ( nc != null && !StringUtils.isEmpty( nc.getOozieUrl() ) ) { oozieUrl = nc.getOozieUrl(); } } catch ( Throwable t ) { logDebug( t.getMessage(), t ); } return getVariableSpace().environmentSubstitute( oozieUrl ); }
OozieJobExecutorJobEntry extends AbstractJobEntry<OozieJobExecutorConfig> implements Cloneable,
  JobEntryInterface { @VisibleForTesting String getEffectiveOozieUrl( OozieJobExecutorConfig config ) { String oozieUrl = config.getOozieUrl(); try { NamedCluster nc = getNamedCluster( config ); if ( nc != null && !StringUtils.isEmpty( nc.getOozieUrl() ) ) { oozieUrl = nc.getOozieUrl(); } } catch ( Throwable t ) { logDebug( t.getMessage(), t ); } return getVariableSpace().environmentSubstitute( oozieUrl ); } }
OozieJobExecutorJobEntry extends AbstractJobEntry<OozieJobExecutorConfig> implements Cloneable,
  JobEntryInterface { @VisibleForTesting String getEffectiveOozieUrl( OozieJobExecutorConfig config ) { String oozieUrl = config.getOozieUrl(); try { NamedCluster nc = getNamedCluster( config ); if ( nc != null && !StringUtils.isEmpty( nc.getOozieUrl() ) ) { oozieUrl = nc.getOozieUrl(); } } catch ( Throwable t ) { logDebug( t.getMessage(), t ); } return getVariableSpace().environmentSubstitute( oozieUrl ); } OozieJobExecutorJobEntry(
    NamedClusterService namedClusterService,
    RuntimeTestActionService runtimeTestActionService, RuntimeTester runtimeTester,
    NamedClusterServiceLocator namedClusterServiceLocator ); @VisibleForTesting  OozieJobExecutorJobEntry(); }
OozieJobExecutorJobEntry extends AbstractJobEntry<OozieJobExecutorConfig> implements Cloneable,
  JobEntryInterface { @VisibleForTesting String getEffectiveOozieUrl( OozieJobExecutorConfig config ) { String oozieUrl = config.getOozieUrl(); try { NamedCluster nc = getNamedCluster( config ); if ( nc != null && !StringUtils.isEmpty( nc.getOozieUrl() ) ) { oozieUrl = nc.getOozieUrl(); } } catch ( Throwable t ) { logDebug( t.getMessage(), t ); } return getVariableSpace().environmentSubstitute( oozieUrl ); } OozieJobExecutorJobEntry(
    NamedClusterService namedClusterService,
    RuntimeTestActionService runtimeTestActionService, RuntimeTester runtimeTester,
    NamedClusterServiceLocator namedClusterServiceLocator ); @VisibleForTesting  OozieJobExecutorJobEntry(); List<String> getValidationWarnings( OozieJobExecutorConfig config, boolean checkOozieConnection ); @Override List<String> getValidationWarnings( OozieJobExecutorConfig config ); Properties getPropertiesFromFile( OozieJobExecutorConfig config ); static Properties getPropertiesFromFile( OozieJobExecutorConfig config, VariableSpace variableSpace ); Properties getProperties( OozieJobExecutorConfig config ); static Properties getProperties( OozieJobExecutorConfig config, VariableSpace variableSpace ); HadoopClientServices getHadoopClientServices(); HadoopClientServices getHadoopClientServices( OozieJobExecutorConfig config ); RuntimeTestActionService getRuntimeTestActionService(); RuntimeTester getRuntimeTester(); NamedClusterService getNamedClusterService(); }
OozieJobExecutorJobEntry extends AbstractJobEntry<OozieJobExecutorConfig> implements Cloneable,
  JobEntryInterface { @VisibleForTesting String getEffectiveOozieUrl( OozieJobExecutorConfig config ) { String oozieUrl = config.getOozieUrl(); try { NamedCluster nc = getNamedCluster( config ); if ( nc != null && !StringUtils.isEmpty( nc.getOozieUrl() ) ) { oozieUrl = nc.getOozieUrl(); } } catch ( Throwable t ) { logDebug( t.getMessage(), t ); } return getVariableSpace().environmentSubstitute( oozieUrl ); } OozieJobExecutorJobEntry(
    NamedClusterService namedClusterService,
    RuntimeTestActionService runtimeTestActionService, RuntimeTester runtimeTester,
    NamedClusterServiceLocator namedClusterServiceLocator ); @VisibleForTesting  OozieJobExecutorJobEntry(); List<String> getValidationWarnings( OozieJobExecutorConfig config, boolean checkOozieConnection ); @Override List<String> getValidationWarnings( OozieJobExecutorConfig config ); Properties getPropertiesFromFile( OozieJobExecutorConfig config ); static Properties getPropertiesFromFile( OozieJobExecutorConfig config, VariableSpace variableSpace ); Properties getProperties( OozieJobExecutorConfig config ); static Properties getProperties( OozieJobExecutorConfig config, VariableSpace variableSpace ); HadoopClientServices getHadoopClientServices(); HadoopClientServices getHadoopClientServices( OozieJobExecutorConfig config ); RuntimeTestActionService getRuntimeTestActionService(); RuntimeTester getRuntimeTester(); NamedClusterService getNamedClusterService(); static final String HTTP_ERROR_CODE_404; static final String HTTP_ERROR_CODE_401; static final String HTTP_ERROR_CODE_403; static final String USER_NAME; static final String VALIDATION_MESSAGES_MISSING_CONFIGURATION; }