// Path: kettle-plugins/common/job/src/main/java/org/pentaho/big/data/kettle/plugins/job/JobEntryUtils.java
// public class JobEntryUtils {
// 
//     /**
//      * @return {@code true} if {@link Boolean#parseBoolean(String)} returns {@code true} for
//      *         {@link #isBlockingExecution()}
//      */
//     /**
//      * Determine if the string equates to {@link Boolean#TRUE} after performing a variable substitution.
//      *
//      * @param s
//      *          String-encoded boolean value or variable expression
//      * @param variableSpace
//      *          Context for variables so we can substitute {@code s}
//      * @return the value returned by {@link Boolean#parseBoolean(String) Boolean.parseBoolean(s)} after substitution
//      */
//     public static boolean asBoolean( String s, VariableSpace variableSpace ) {
//         String value = variableSpace.environmentSubstitute( s );
//         return Boolean.parseBoolean( value );
//     }
// 
//     /**
//      * Parse the string as a {@link Long} after variable substitution.
//      *
//      * @param s
//      *          String-encoded {@link Long} value or variable expression that should resolve to a {@link Long} value
//      * @param variableSpace
//      *          Context for variables so we can substitute {@code s}
//      * @return the value returned by {@link Long#parseLong(String, int) Long.parseLong(s, 10)} after substitution
//      */
//     public static Long asLong( String s, VariableSpace variableSpace ) {
//         String value = variableSpace.environmentSubstitute( s );
//         return value == null ? null : Long.valueOf( value, 10 );
//     }
// }


import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.lang.StringUtils;
import org.pentaho.big.data.kettle.plugins.job.JobEntryUtils;
import org.pentaho.hadoop.shim.api.HadoopClientServices;
import org.pentaho.hadoop.shim.api.HadoopClientServicesException;
import org.pentaho.hadoop.shim.api.cluster.NamedCluster;
import org.pentaho.hadoop.shim.api.cluster.NamedClusterService;
import org.pentaho.hadoop.shim.api.cluster.NamedClusterServiceLocator;
import org.pentaho.hadoop.shim.api.cluster.ClusterInitializationException;
import org.pentaho.big.data.kettle.plugins.job.AbstractJobEntry;
import org.pentaho.big.data.kettle.plugins.job.JobEntryMode;
import org.pentaho.big.data.kettle.plugins.job.PropertyEntry;
import org.pentaho.di.core.Result;
import org.pentaho.di.core.annotations.JobEntry;
import org.pentaho.di.core.exception.KettleFileException;
import org.pentaho.di.core.util.StringUtil;
import org.pentaho.di.core.variables.VariableSpace;
import org.pentaho.di.core.vfs.KettleVFS;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.job.entry.JobEntryInterface;
import org.pentaho.hadoop.shim.api.oozie.OozieJobInfo;
import org.pentaho.hadoop.shim.api.oozie.OozieServiceException;
import org.pentaho.metastore.api.exceptions.MetaStoreException;
import org.pentaho.runtime.test.RuntimeTester;
import org.pentaho.runtime.test.action.RuntimeTestActionService;
    return new OozieJobExecutorConfig();
  }

  public List<String> getValidationWarnings( OozieJobExecutorConfig config, boolean checkOozieConnection ) {
    List<String> messages = new ArrayList<>();

    // verify there is a job name
    if ( StringUtil.isEmpty( config.getJobEntryName() ) ) {
      messages.add( BaseMessages.getString( OozieJobExecutorJobEntry.class, "ValidationMessages.Missing.JobName" ) );
    }
    NamedCluster nc = null;
    try {
      nc = getNamedCluster( config );
    } catch ( MetaStoreException e ) {
      messages
        .add( BaseMessages.getString( OozieJobExecutorJobEntry.class, VALIDATION_MESSAGES_MISSING_CONFIGURATION ) );
    }

    if ( null == nc || nc.getName().equals( "" ) || nc.getShimIdentifier().equals( "" ) ) {
      messages.add(
        BaseMessages.getString( OozieJobExecutorJobEntry.class, "ValidationMessages.Missing.NamedCluster", config.getClusterName() ) );
      return messages;
    }

    verifyOozieUrl( config, checkOozieConnection, messages, nc );
    checkOozieConnection( config, checkOozieConnection, messages );
    verifyJobConfiguration( config, checkOozieConnection, messages );

    boolean pollingIntervalValid = false;
    try {
// Path: kettle-plugins/common/job/src/main/java/org/pentaho/big/data/kettle/plugins/job/JobEntryUtils.java
// public class JobEntryUtils {
// 
//     /**
//      * @return {@code true} if {@link Boolean#parseBoolean(String)} returns {@code true} for
//      *         {@link #isBlockingExecution()}
//      */
//     /**
//      * Determine if the string equates to {@link Boolean#TRUE} after performing a variable substitution.
//      *
//      * @param s
//      *          String-encoded boolean value or variable expression
//      * @param variableSpace
//      *          Context for variables so we can substitute {@code s}
//      * @return the value returned by {@link Boolean#parseBoolean(String) Boolean.parseBoolean(s)} after substitution
//      */
//     public static boolean asBoolean( String s, VariableSpace variableSpace ) {
//         String value = variableSpace.environmentSubstitute( s );
//         return Boolean.parseBoolean( value );
//     }
// 
//     /**
//      * Parse the string as a {@link Long} after variable substitution.
//      *
//      * @param s
//      *          String-encoded {@link Long} value or variable expression that should resolve to a {@link Long} value
//      * @param variableSpace
//      *          Context for variables so we can substitute {@code s}
//      * @return the value returned by {@link Long#parseLong(String, int) Long.parseLong(s, 10)} after substitution
//      */
//     public static Long asLong( String s, VariableSpace variableSpace ) {
//         String value = variableSpace.environmentSubstitute( s );
//         return value == null ? null : Long.valueOf( value, 10 );
//     }
// }


// Path: kettle-plugins/oozie/src/main/java/org/pentaho/big/data/kettle/plugins/oozie/OozieJobExecutorJobEntry.java
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ConnectException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.lang.StringUtils;
import org.pentaho.big.data.kettle.plugins.job.JobEntryUtils;
import org.pentaho.hadoop.shim.api.HadoopClientServices;
import org.pentaho.hadoop.shim.api.HadoopClientServicesException;
import org.pentaho.hadoop.shim.api.cluster.NamedCluster;
import org.pentaho.hadoop.shim.api.cluster.NamedClusterService;
import org.pentaho.hadoop.shim.api.cluster.NamedClusterServiceLocator;
import org.pentaho.hadoop.shim.api.cluster.ClusterInitializationException;
import org.pentaho.big.data.kettle.plugins.job.AbstractJobEntry;
import org.pentaho.big.data.kettle.plugins.job.JobEntryMode;
import org.pentaho.big.data.kettle.plugins.job.PropertyEntry;
import org.pentaho.di.core.Result;
import org.pentaho.di.core.annotations.JobEntry;
import org.pentaho.di.core.exception.KettleFileException;
import org.pentaho.di.core.util.StringUtil;
import org.pentaho.di.core.variables.VariableSpace;
import org.pentaho.di.core.vfs.KettleVFS;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.job.entry.JobEntryInterface;
import org.pentaho.hadoop.shim.api.oozie.OozieJobInfo;
import org.pentaho.hadoop.shim.api.oozie.OozieServiceException;
import org.pentaho.metastore.api.exceptions.MetaStoreException;
import org.pentaho.runtime.test.RuntimeTester;
import org.pentaho.runtime.test.action.RuntimeTestActionService;

    return new OozieJobExecutorConfig();
  }

  public List<String> getValidationWarnings( OozieJobExecutorConfig config, boolean checkOozieConnection ) {
    List<String> messages = new ArrayList<>();

    // verify there is a job name
    if ( StringUtil.isEmpty( config.getJobEntryName() ) ) {
      messages.add( BaseMessages.getString( OozieJobExecutorJobEntry.class, "ValidationMessages.Missing.JobName" ) );
    }
    NamedCluster nc = null;
    try {
      nc = getNamedCluster( config );
    } catch ( MetaStoreException e ) {
      messages
        .add( BaseMessages.getString( OozieJobExecutorJobEntry.class, VALIDATION_MESSAGES_MISSING_CONFIGURATION ) );
    }

    if ( null == nc || nc.getName().equals( "" ) || nc.getShimIdentifier().equals( "" ) ) {
      messages.add(
        BaseMessages.getString( OozieJobExecutorJobEntry.class, "ValidationMessages.Missing.NamedCluster", config.getClusterName() ) );
      return messages;
    }

    verifyOozieUrl( config, checkOozieConnection, messages, nc );
    checkOozieConnection( config, checkOozieConnection, messages );
    verifyJobConfiguration( config, checkOozieConnection, messages );

    boolean pollingIntervalValid = false;
    try {
      long pollingInterval = JobEntryUtils.asLong( config.getBlockingPollingInterval(), variables );