// Path: src/main/java/io/izenecloud/conf/Configuration.java
// public class Configuration {
// 
// 	private static Configuration conf = null;
// 
// 	public static synchronized Configuration getInstance() {
// 		if (null == conf) {
// 			conf = new Configuration();
// 		}
// 		return conf;
// 	}
// 
// 	public synchronized void load(Path path, FileSystem fs) throws IOException {
// 		final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
// 		FileStatus[] fileStatus = fs.listStatus(path, new GlobFilter(
// 				"*.properties"));
// 		for (FileStatus file : fileStatus) {
// 			if (file.isFile()) {
// 				Path p = file.getPath();
// 				FSDataInputStream in = fs.open(p);
// 				Collection configuration = OBJECT_MAPPER.readValue(in,
// 						Collection.class);
// 				String collection = p.getName().substring(0,
// 						p.getName().lastIndexOf(".properties"));
// 				configuration.setCollecion(collection);
// 				mapper.put(collection, configuration);
// 			}
// 		}
// 	}
// 
// 	private Map<String, Collection> mapper = new HashMap<String, Collection>();
// 
// 	public List<String> getCollections() {
// 		List<String> collectionList = new ArrayList<String>();
// 		Iterator<Map.Entry<String, Collection>> iterator = mapper.entrySet()
// 				.iterator();
// 		while (iterator.hasNext()) {
// 			String collection = iterator.next().getKey();
// 			collectionList.add(collection);
// 		}
// 		return collectionList;
// 	}
// 
// 	public void removeCollection(String collection) {
// 		mapper.remove(collection);
// 	}
// 
// 	public Class<? extends LaserMessageConsumer> getMessageConsumer(
// 			String collection) throws ClassNotFoundException {
// 		return getCollection(collection).getMessageConsumer();
// 	}
// 
// 	public Path getLaserHDFSRoot(String collection) {
// 		return getCollection(collection).getLaserHDFSRoot();
// 
// 	}
// 
// 	public String getCouchbaseCluster(String collection) {
// 		return getCollection(collection).getCouchbaseCluster();
// 	}
// 
// 	public String getCouchbaseBucket(String collection) {
// 		return getCollection(collection).getCouchbaseBucket();
// 
// 	}
// 
// 	public String getCouchbasePassword(String collection) {
// 		return getCollection(collection).getCouchbasePassword();
// 	}
// 
// 	public String getMetaqZookeeper(String collection) {
// 		return getCollection(collection).getMetaqZookeeper();
// 	}
// 
// 	public String getMetaqTopic(String collection) {
// 		return getCollection(collection).getMetaqTopic();
// 	}
// 
// 	public Path getMetaqOutput(String collection) {
// 		return getCollection(collection).getMetaqOutput();
// 
// 	}
// 
// 	public Path getLaserOnlineOutput(String collection) {
// 		return getCollection(collection).getLaserOnlineOutput();
// 	}
// 
// 	public Path getLaserOfflineOutput(String collection) {
// 		return getCollection(collection).getLaserOfflineOutput();
// 	}
// 
// 	public String getLaserOnlineRetrainingFreqency(String collection) {
// 		return getCollection(collection).getLaserOnlineRetrainingFreqency();
// 	}
// 
// 	public String getLaserOfflineRetrainingFreqency(String collection) {
// 		return getCollection(collection).getLaserOfflineRetrainingFreqency();
// 	}
// 
// 	public Integer getUserFeatureDimension(String collection) {
// 		return getCollection(collection).getUserFeatureDimension();
// 	}
// 
// 	public Path getUserFeatureSerializePath(String collection) {
// 		return getCollection(collection).getUserFeatureSerializePath();
// 	}
// 
// 	public Integer getItemFeatureDimension(String collection) {
// 		return getCollection(collection).getItemFeatureDimension();
// 	}
// 
// 	public Integer getTopNClustering(String collection) {
// 		return getCollection(collection).getTopNClustering();
// 	}
// 
// 	public Float getRegularizationFactor(String collection) {
// 		return getCollection(collection).getRegularizationFactor();
// 	}
// 
// 	public Boolean addIntercept(String collection) {
// 		return getCollection(collection).addIntercept();
// 	}
// 
// 	public Integer getMaxIteration(String collection) {
// 		return getCollection(collection).getMaxIteration();
// 	}
// 
// 	public String getMsgpackAddress(String collection) {
// 		return getCollection(collection).getMsgpackAddress();
// 	}
// 
// 	public Integer getMsgpackPort(String collection) {
// 		return getCollection(collection).getMsgpackPort();
// 	}
// 
// 	private Collection getCollection(String collection) {
// 		return mapper.get(collection);
// 	}
// 
// 	private String getProperty(Map<String, Map<String, String>> collection,
// 			String property, String propertyName) {
// 		return collection.get(property).get(propertyName);
// 	}
// }


import io.izenecloud.conf.Configuration;
import java.io.IOException;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
package io.izenecloud.couchbase;





public class CouchbaseInputFormatIT {
	private static final String PROPERTIES = "src/test/properties/laser.properties.examble";
	private org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
	private FileSystem fs;

	@BeforeTest
	public void setup() throws IOException {
		Path path = new Path(PROPERTIES);
		fs = path.getFileSystem(conf);
		Configuration.getInstance().load(path, fs);
	}

// Path: src/main/java/io/izenecloud/conf/Configuration.java
// public class Configuration {
// 
// 	private static Configuration conf = null;
// 
// 	public static synchronized Configuration getInstance() {
// 		if (null == conf) {
// 			conf = new Configuration();
// 		}
// 		return conf;
// 	}
// 
// 	public synchronized void load(Path path, FileSystem fs) throws IOException {
// 		final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
// 		FileStatus[] fileStatus = fs.listStatus(path, new GlobFilter(
// 				"*.properties"));
// 		for (FileStatus file : fileStatus) {
// 			if (file.isFile()) {
// 				Path p = file.getPath();
// 				FSDataInputStream in = fs.open(p);
// 				Collection configuration = OBJECT_MAPPER.readValue(in,
// 						Collection.class);
// 				String collection = p.getName().substring(0,
// 						p.getName().lastIndexOf(".properties"));
// 				configuration.setCollecion(collection);
// 				mapper.put(collection, configuration);
// 			}
// 		}
// 	}
// 
// 	private Map<String, Collection> mapper = new HashMap<String, Collection>();
// 
// 	public List<String> getCollections() {
// 		List<String> collectionList = new ArrayList<String>();
// 		Iterator<Map.Entry<String, Collection>> iterator = mapper.entrySet()
// 				.iterator();
// 		while (iterator.hasNext()) {
// 			String collection = iterator.next().getKey();
// 			collectionList.add(collection);
// 		}
// 		return collectionList;
// 	}
// 
// 	public void removeCollection(String collection) {
// 		mapper.remove(collection);
// 	}
// 
// 	public Class<? extends LaserMessageConsumer> getMessageConsumer(
// 			String collection) throws ClassNotFoundException {
// 		return getCollection(collection).getMessageConsumer();
// 	}
// 
// 	public Path getLaserHDFSRoot(String collection) {
// 		return getCollection(collection).getLaserHDFSRoot();
// 
// 	}
// 
// 	public String getCouchbaseCluster(String collection) {
// 		return getCollection(collection).getCouchbaseCluster();
// 	}
// 
// 	public String getCouchbaseBucket(String collection) {
// 		return getCollection(collection).getCouchbaseBucket();
// 
// 	}
// 
// 	public String getCouchbasePassword(String collection) {
// 		return getCollection(collection).getCouchbasePassword();
// 	}
// 
// 	public String getMetaqZookeeper(String collection) {
// 		return getCollection(collection).getMetaqZookeeper();
// 	}
// 
// 	public String getMetaqTopic(String collection) {
// 		return getCollection(collection).getMetaqTopic();
// 	}
// 
// 	public Path getMetaqOutput(String collection) {
// 		return getCollection(collection).getMetaqOutput();
// 
// 	}
// 
// 	public Path getLaserOnlineOutput(String collection) {
// 		return getCollection(collection).getLaserOnlineOutput();
// 	}
// 
// 	public Path getLaserOfflineOutput(String collection) {
// 		return getCollection(collection).getLaserOfflineOutput();
// 	}
// 
// 	public String getLaserOnlineRetrainingFreqency(String collection) {
// 		return getCollection(collection).getLaserOnlineRetrainingFreqency();
// 	}
// 
// 	public String getLaserOfflineRetrainingFreqency(String collection) {
// 		return getCollection(collection).getLaserOfflineRetrainingFreqency();
// 	}
// 
// 	public Integer getUserFeatureDimension(String collection) {
// 		return getCollection(collection).getUserFeatureDimension();
// 	}
// 
// 	public Path getUserFeatureSerializePath(String collection) {
// 		return getCollection(collection).getUserFeatureSerializePath();
// 	}
// 
// 	public Integer getItemFeatureDimension(String collection) {
// 		return getCollection(collection).getItemFeatureDimension();
// 	}
// 
// 	public Integer getTopNClustering(String collection) {
// 		return getCollection(collection).getTopNClustering();
// 	}
// 
// 	public Float getRegularizationFactor(String collection) {
// 		return getCollection(collection).getRegularizationFactor();
// 	}
// 
// 	public Boolean addIntercept(String collection) {
// 		return getCollection(collection).addIntercept();
// 	}
// 
// 	public Integer getMaxIteration(String collection) {
// 		return getCollection(collection).getMaxIteration();
// 	}
// 
// 	public String getMsgpackAddress(String collection) {
// 		return getCollection(collection).getMsgpackAddress();
// 	}
// 
// 	public Integer getMsgpackPort(String collection) {
// 		return getCollection(collection).getMsgpackPort();
// 	}
// 
// 	private Collection getCollection(String collection) {
// 		return mapper.get(collection);
// 	}
// 
// 	private String getProperty(Map<String, Map<String, String>> collection,
// 			String property, String propertyName) {
// 		return collection.get(property).get(propertyName);
// 	}
// }


// Path: src/test/java/io/izenecloud/couchbase/CouchbaseInputFormatIT.java
import io.izenecloud.conf.Configuration;
import java.io.IOException;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import static org.testng.Assert.*;

package io.izenecloud.couchbase;





public class CouchbaseInputFormatIT {
	private static final String PROPERTIES = "src/test/properties/laser.properties.examble";
	private org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
	private FileSystem fs;

	@BeforeTest
	public void setup() throws IOException {
		Path path = new Path(PROPERTIES);
		fs = path.getFileSystem(conf);
		Configuration.getInstance().load(path, fs);
	}

	@Test