// Path: common-sources/src/main/java/com/hortonworks/labutils/PropertyParser.java
// public class PropertyParser {
// 
//   private static final Logger LOG = LoggerFactory.getLogger(PropertyParser.class);
// 
//   public Properties props = new Properties();
//   private String propFileName;
// 
//   public PropertyParser(String propFileName) {
//     this.propFileName = propFileName;
//   }
// 
//   public String getPropFileName() {
//     return propFileName;
//   }
// 
//   public void setPropFileName(String propFileName) {
//     this.propFileName = propFileName;
//   }
// 
//   public String getProperty(String key) {
//     return props.get(key).toString();
//   }
// 
//   public void parsePropsFile() throws IOException {
// 
//     InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
// 
//     try {
//       if (null != inputStream) {
//         props.load(inputStream);
//       } else {
//         throw new IOException("Could not load property file from the resources directory, trying local");
//       }
//     } catch(IOException e) {
//       LOG.error(e.getMessage());
//       e.printStackTrace();
//       try {
//         inputStream = new FileInputStream(new File(propFileName).getAbsolutePath());
//         props.load(inputStream);
//       } catch (IOException ex) {
//         LOG.error("Could not load property file at " + new File(propFileName).getAbsolutePath());
//         ex.printStackTrace();
//         throw ex;
//       }
//     }
//   }
// }


import com.github.sakserv.minicluster.config.ConfigVars;
import com.github.sakserv.minicluster.impl.KafkaLocalBroker;
import com.github.sakserv.minicluster.impl.ZookeeperLocalCluster;
import com.hortonworks.labutils.PropertyParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.misc.Launcher;
import java.io.IOException;
import java.util.Properties;
package com.hortonworks.lab;




/**
 * In this first lab we show how to set up the dev environment and use the Hadoop Mini Clusters project. We'll
 * configure Zookeeper and Kafka and start them in a local mode. Next, we'll generate events using the Akka library
 * and send them to Kafka.
 */
public class Lab {

  private static final Logger LOG = LoggerFactory.getLogger(Lab.class);
// Path: common-sources/src/main/java/com/hortonworks/labutils/PropertyParser.java
// public class PropertyParser {
// 
//   private static final Logger LOG = LoggerFactory.getLogger(PropertyParser.class);
// 
//   public Properties props = new Properties();
//   private String propFileName;
// 
//   public PropertyParser(String propFileName) {
//     this.propFileName = propFileName;
//   }
// 
//   public String getPropFileName() {
//     return propFileName;
//   }
// 
//   public void setPropFileName(String propFileName) {
//     this.propFileName = propFileName;
//   }
// 
//   public String getProperty(String key) {
//     return props.get(key).toString();
//   }
// 
//   public void parsePropsFile() throws IOException {
// 
//     InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
// 
//     try {
//       if (null != inputStream) {
//         props.load(inputStream);
//       } else {
//         throw new IOException("Could not load property file from the resources directory, trying local");
//       }
//     } catch(IOException e) {
//       LOG.error(e.getMessage());
//       e.printStackTrace();
//       try {
//         inputStream = new FileInputStream(new File(propFileName).getAbsolutePath());
//         props.load(inputStream);
//       } catch (IOException ex) {
//         LOG.error("Could not load property file at " + new File(propFileName).getAbsolutePath());
//         ex.printStackTrace();
//         throw ex;
//       }
//     }
//   }
// }


// Path: part1/src/main/java/com/hortonworks/lab/Lab.java
import com.github.sakserv.minicluster.config.ConfigVars;
import com.github.sakserv.minicluster.impl.KafkaLocalBroker;
import com.github.sakserv.minicluster.impl.ZookeeperLocalCluster;
import com.hortonworks.labutils.PropertyParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.misc.Launcher;
import java.io.IOException;
import java.util.Properties;

package com.hortonworks.lab;




/**
 * In this first lab we show how to set up the dev environment and use the Hadoop Mini Clusters project. We'll
 * configure Zookeeper and Kafka and start them in a local mode. Next, we'll generate events using the Akka library
 * and send them to Kafka.
 */
public class Lab {

  private static final Logger LOG = LoggerFactory.getLogger(Lab.class);
  private static PropertyParser propertyParser;