incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [27/50] [abbrv] Initial Blur Console commit.
Date Fri, 17 May 2013 03:24:54 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/ServerCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/ServerCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/ServerCollector.java
deleted file mode 100644
index 31c8fbc..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/ServerCollector.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.table;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.springframework.dao.DataAccessException;
-
-import com.nearinfinity.agent.connections.blur.interfaces.TableDatabaseInterface;
-import com.nearinfinity.agent.exceptions.NullReturnedException;
-import com.nearinfinity.blur.thrift.generated.BlurException;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-
-public class ServerCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(ServerCollector.class);
-
-	private final Iface blurConnection;
-	private final String tableName;
-	private final int tableId;
-	private final TableDatabaseInterface database;
-
-	public ServerCollector(Iface connection, String tableName, int tableId, TableDatabaseInterface database) {
-		this.blurConnection = connection;
-		this.tableName = tableName;
-		this.tableId = tableId;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			Map<String, String> shardServerLayout = blurConnection.shardServerLayout(tableName);
-			if (shardServerLayout == null) {
-				throw new NullReturnedException("No server layout was returned!");
-			}
-			Map<String, ArrayList<String>> serverLayout = getServerLayout(shardServerLayout);
-			this.database.updateTableServer(tableId, new ObjectMapper().writeValueAsString(serverLayout));
-
-		} catch (BlurException e) {
-			log.error("Unable to get shard server layout for table [" + tableName + "].", e);
-		} catch (JsonProcessingException e) {
-			log.error("Unable to convert the shard layout to json.", e);
-		} catch (DataAccessException e) {
-			log.error("An error occurred while writing the server to the database.", e);
-		} catch (NullReturnedException e) {
-			log.error(e.getMessage(), e);
-		} catch (Exception e) {
-			log.error("An unknown error occurred in the TableServerCollector.", e);
-		}
-	}
-
-	private Map<String, ArrayList<String>> getServerLayout(Map<String, String> shardServerLayout) {
-		Map<String, ArrayList<String>> formattedShard = new HashMap<String, ArrayList<String>>();
-		for (String shard : shardServerLayout.keySet()) {
-			String host = shardServerLayout.get(shard);
-			if (formattedShard.get(host) != null) {
-				formattedShard.get(host).add(shard);
-			} else {
-				formattedShard.put(host, new ArrayList<String>(Arrays.asList(shard)));
-			}
-		}
-		return formattedShard;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/StatsCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/StatsCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/StatsCollector.java
deleted file mode 100644
index 3b91f8f..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/StatsCollector.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.table;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.dao.DataAccessException;
-
-import com.nearinfinity.agent.connections.blur.interfaces.TableDatabaseInterface;
-import com.nearinfinity.agent.exceptions.NullReturnedException;
-import com.nearinfinity.blur.thrift.generated.BlurException;
-import com.nearinfinity.blur.thrift.generated.TableStats;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-
-public class StatsCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(StatsCollector.class);
-
-	private final Iface blurConnection;
-	private final String tableName;
-	private final int tableId;
-	private final TableDatabaseInterface database;
-
-	public StatsCollector(Iface connection, String tableName, int tableId, TableDatabaseInterface database) {
-		this.blurConnection = connection;
-		this.tableName = tableName;
-		this.tableId = tableId;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			TableStats tableStats = blurConnection.getTableStats(this.tableName);
-
-			if (tableStats == null) {
-				throw new NullReturnedException("No table statistics were returned!");
-			}
-
-			this.database.updateTableStats(tableId, tableStats.getBytes(), tableStats.getQueries(), tableStats.getRecordCount(),
-					tableStats.getRowCount());
-		} catch (BlurException e) {
-			log.error("Unable to get table stats for table [" + tableId + "].", e);
-		} catch (DataAccessException e) {
-			log.error("An error occurred while writing the server to the database.", e);
-		} catch (NullReturnedException e) {
-			log.error(e.getMessage(), e);
-		} catch (Exception e) {
-			log.error("An unknown error occurred in the TableServerCollector.", e);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/TableCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/TableCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/TableCollector.java
deleted file mode 100644
index 606092a..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/TableCollector.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.table;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import com.nearinfinity.agent.connections.blur.interfaces.TableDatabaseInterface;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-import com.nearinfinity.blur.thrift.generated.TableDescriptor;
-
-public class TableCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(TableCollector.class);
-
-	private final Iface blurConnection;
-	private final String tableName;
-	private final int tableId;
-	private final TableDatabaseInterface database;
-
-	public TableCollector(Iface connection, String tableName, int tableId, TableDatabaseInterface database) {
-		this.blurConnection = connection;
-		this.tableName = tableName;
-		this.database = database;
-		this.tableId = tableId;
-	}
-
-	@Override
-	public void run() {
-		try {
-			TableDescriptor descriptor;
-			try {
-				descriptor = blurConnection.describe(tableName);
-			} catch (Exception e) {
-				log.error("An error occured while trying to describe the table [" + tableName + "], skipping table", e);
-				return;
-			}
-
-			/* spawn the different table info collectors */
-			if (descriptor.isEnabled) {
-				new Thread(new SchemaCollector(this.blurConnection, this.tableName, this.tableId, descriptor, this.database),
-						"Table Schema Collector - " + this.tableName).start();
-			}
-			new Thread(new ServerCollector(this.blurConnection, this.tableName, this.tableId, this.database), "Table Server Collector - "
-					+ this.tableName).start();
-			new Thread(new StatsCollector(this.blurConnection, this.tableName, this.tableId, this.database), "Table Stats Collector - "
-					+ this.tableName).start();
-
-		} catch (Exception e) {
-			log.error("An unknown error occurred.", e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollector.java
deleted file mode 100644
index 4802799..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollector.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.nearinfinity.agent.collectors.hdfs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import com.nearinfinity.agent.Agent;
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-import com.nearinfinity.agent.exceptions.HdfsThreadException;
-
-public class HdfsCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(HdfsCollector.class);
-
-	private final URI defaultUri;
-	private final String hdfsName;
-	private final String user;
-	private final HdfsDatabaseInterface databaseConnection;
-	private final boolean collectHdfs;
-
-	public HdfsCollector(final String hdfsName, final String defaultUri, final String thriftUri, final String user,
-			final List<String> activeCollectors, final HdfsDatabaseInterface databaseConnection) throws HdfsThreadException {
-		try {
-			this.defaultUri = new URI(defaultUri);
-			this.hdfsName = hdfsName;
-			this.user = user;
-			this.databaseConnection = databaseConnection;
-			this.collectHdfs = activeCollectors.contains("hdfs");
-
-			initializeHdfs(hdfsName, thriftUri);
-
-		} catch (URISyntaxException e) {
-			log.error(e.getMessage(), e);
-			throw new HdfsThreadException();
-		} catch (Exception e) {
-			log.error("An unkown error occured while creating the collector.", e);
-			throw new HdfsThreadException();
-		}
-	}
-
-	@Override
-	public void run() {
-		while (true) {
-			if (this.collectHdfs) {
-				new Thread(new HdfsStatsCollector(this.hdfsName, defaultUri, this.user, this.databaseConnection), "Hdfs Collector - "
-						+ this.hdfsName).start();
-			}
-
-			try {
-				Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
-			} catch (InterruptedException e) {
-				break;
-			}
-		}
-	}
-
-	private void initializeHdfs(String name, String thriftUri) throws URISyntaxException {
-		URI parsedThriftUri = new URI(thriftUri);
-		this.databaseConnection.setHdfsInfo(name, parsedThriftUri.getHost(), parsedThriftUri.getPort());
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatsCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatsCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatsCollector.java
deleted file mode 100644
index faa5eb3..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatsCollector.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.nearinfinity.agent.collectors.hdfs;
-
-import java.io.IOException;
-import java.net.URI;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.FsStatus;
-import org.apache.hadoop.hdfs.DistributedFileSystem;
-import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
-import org.apache.hadoop.hdfs.protocol.FSConstants.DatanodeReportType;
-import org.springframework.dao.DataAccessException;
-
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-import com.nearinfinity.agent.exceptions.NullReturnedException;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class HdfsStatsCollector implements Runnable {
-	private final static Log log = LogFactory.getLog(HdfsStatsCollector.class);
-
-	private final String hdfsName;
-	private final URI uri;
-	private final String host;
-	private final int port;
-	private final String user;
-	private final HdfsDatabaseInterface database;
-
-	public HdfsStatsCollector(final String hdfsName, final URI uri, final String user, final HdfsDatabaseInterface database) {
-		this.uri = uri;
-		this.host = uri.getHost();
-		this.port = uri.getPort();
-		this.hdfsName = hdfsName;
-		this.user = user;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			int hdfsId = this.database.getHdfsId(this.hdfsName);
-			if (hdfsId == -1) {
-				log.error("The HDFS [" + this.hdfsName + "] does not exist in the database");
-				return;
-			}
-
-			// Creates a filesystem connection (if a user is given
-			// then the filesystem can get additional information)
-			FileSystem fileSystem = (this.user != null) ? FileSystem.get(this.uri, new Configuration(), this.user) : FileSystem.get(this.uri,
-					new Configuration());
-
-			if (fileSystem instanceof DistributedFileSystem) {
-				DistributedFileSystem dfs = (DistributedFileSystem) fileSystem;
-
-				FsStatus ds = dfs.getStatus();
-				long capacity = ds.getCapacity();
-				long used = ds.getUsed();
-				long logical_used = used / dfs.getDefaultReplication();
-				long remaining = ds.getRemaining();
-				long presentCapacity = used + remaining;
-
-				long liveNodes = -1;
-				long deadNodes = -1;
-				long totalNodes = -1;
-
-				try {
-					DatanodeInfo[] live = dfs.getClient().datanodeReport(DatanodeReportType.LIVE);
-					DatanodeInfo[] dead = dfs.getClient().datanodeReport(DatanodeReportType.DEAD);
-
-					liveNodes = live.length;
-					deadNodes = dead.length;
-					totalNodes = liveNodes + deadNodes;
-				} catch (Exception e) {
-					log.warn("Access denied for user. Skipping node information.");
-				}
-
-				this.database.insertHdfsStats(capacity, presentCapacity, remaining, used, logical_used, (((1.0 * used) / presentCapacity) * 100),
-						dfs.getUnderReplicatedBlocksCount(), dfs.getCorruptBlocksCount(), dfs.getMissingBlocksCount(), totalNodes, liveNodes,
-						deadNodes, TimeHelper.now().getTime(), host, port, hdfsId);
-
-				dfs.close();
-			}
-		} catch (IOException e) {
-			log.error("An IO error occurred while communicating with the DFS.", e);
-		} catch (DataAccessException e) {
-			log.error("An error occurred while writing the HDFSStats to the DB.", e);
-		} catch (NullReturnedException e) {
-			log.error(e.getMessage(), e);
-		} catch (Exception e) {
-			log.error("An unknown error occurred in the CollectorManager.", e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ClusterCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ClusterCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ClusterCollector.java
deleted file mode 100644
index f08cf15..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ClusterCollector.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.nearinfinity.agent.collectors.zookeeper;
-
-import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
-
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ClusterDatabaseInterface;
-
-public class ClusterCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(ClusterCollector.class);
-
-	private final int zookeeperId;
-	private final ZooKeeper zookeeper;
-	private final ClusterDatabaseInterface database;
-
-	public ClusterCollector(int zookeeperId, ZooKeeper zookeeper, ClusterDatabaseInterface database) {
-		this.zookeeperId = zookeeperId;
-		this.zookeeper = zookeeper;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		List<String> onlineClusters;
-		try {
-			onlineClusters = zookeeper.getChildren("/blur/clusters", false);
-		} catch (Exception e) {
-			log.error("Error getting clusters from zookeeper in ClusterCollector.", e);
-			return;
-		}
-
-		for (String cluster : onlineClusters) {
-			try {
-				boolean safeMode = isClusterInSafeMode(cluster);
-				int clusterId = this.database.insertOrUpdateCluster(safeMode, cluster, zookeeperId);
-
-				new Thread(new ShardCollector(clusterId, cluster, this.zookeeper, this.database), "Shard Collector - " + cluster).start();
-				new Thread(new TableCollector(clusterId, cluster, this.zookeeper, this.database), "Table Collector - " + cluster).start();
-			} catch (KeeperException e) {
-				log.error("Error talking to zookeeper in ClusterCollector.", e);
-			} catch (InterruptedException e) {
-				log.error("Zookeeper session expired in ClusterCollector.", e);
-			}
-		}
-
-	}
-
-	private boolean isClusterInSafeMode(String cluster) throws KeeperException, InterruptedException {
-		String blurSafemodePath = "/blur/clusters/" + cluster + "/safemode";
-		Stat stat = this.zookeeper.exists(blurSafemodePath, false);
-		if (stat == null) {
-			return false;
-		}
-
-		byte[] data = this.zookeeper.getData(blurSafemodePath, false, stat);
-		if (data == null) {
-			return false;
-		}
-
-		long timestamp = Long.parseLong(new String(data));
-		long waitTime = timestamp - System.currentTimeMillis();
-		if (waitTime > 0) {
-			return true;
-		}
-		return false;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ControllerCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ControllerCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ControllerCollector.java
deleted file mode 100644
index 3a87497..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ControllerCollector.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.nearinfinity.agent.collectors.zookeeper;
-
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooKeeper;
-
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ControllerDatabaseInterface;
-import com.nearinfinity.agent.notifications.Notifier;
-
-public class ControllerCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(ControllerCollector.class);
-
-	private final int zookeeperId;
-	private final ZooKeeper zookeeper;
-	private final ControllerDatabaseInterface database;
-
-	public ControllerCollector(int zookeeperId, ZooKeeper zookeeper, ControllerDatabaseInterface database) {
-		this.zookeeperId = zookeeperId;
-		this.zookeeper = zookeeper;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			List<String> onlineControllers = this.zookeeper.getChildren("/blur/online-controller-nodes", false);
-			int recentlyOffline = this.database.markOfflineControllers(onlineControllers, this.zookeeperId);
-			if (recentlyOffline > 0) {
-				Notifier.getNotifier().notifyControllerOffline(this.database.getRecentOfflineControllerNames(recentlyOffline));
-			}
-			updateOnlineControllers(onlineControllers);
-		} catch (KeeperException e) {
-			log.error("Error talking to zookeeper in ControllerCollector.", e);
-		} catch (InterruptedException e) {
-			log.error("Zookeeper session expired in ControllerCollector.", e);
-		}
-
-	}
-
-	private void updateOnlineControllers(List<String> controllers) throws KeeperException, InterruptedException {
-		for (String controller : controllers) {
-			String blurVersion = "UNKNOWN";
-
-			byte[] b = this.zookeeper.getData("/blur/online-controller-nodes/" + controller, false, null);
-			if (b != null && b.length > 0) {
-				blurVersion = new String(b);
-			}
-
-			this.database.updateOnlineController(controller, zookeeperId, blurVersion);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ShardCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ShardCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ShardCollector.java
deleted file mode 100644
index c081478..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ShardCollector.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.nearinfinity.agent.collectors.zookeeper;
-
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooKeeper;
-
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ShardsDatabaseInterface;
-import com.nearinfinity.agent.notifications.Notifier;
-
-public class ShardCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(ShardCollector.class);
-
-	private final int clusterId;
-	private final String clusterName;
-	private final ZooKeeper zookeeper;
-	private final ShardsDatabaseInterface database;
-
-	public ShardCollector(int clusterId, String clusterName, ZooKeeper zookeeper, ShardsDatabaseInterface database) {
-		this.clusterId = clusterId;
-		this.clusterName = clusterName;
-		this.zookeeper = zookeeper;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			List<String> shards = this.zookeeper.getChildren("/blur/clusters/" + clusterName + "/online/shard-nodes", false);
-			int recentlyOffline = this.database.markOfflineShards(shards, this.clusterId);
-			if (recentlyOffline > 0) {
-				Notifier.getNotifier().notifyShardOffline(this.database.getRecentOfflineShardNames(recentlyOffline));
-			}
-			updateOnlineShards(shards);
-		} catch (KeeperException e) {
-			log.error("Error talking to zookeeper in ShardCollector.", e);
-		} catch (InterruptedException e) {
-			log.error("Zookeeper session expired in ShardCollector.", e);
-		}
-	}
-
-	private void updateOnlineShards(List<String> shards) throws KeeperException, InterruptedException {
-		for (String shard : shards) {
-			String blurVersion = "UNKNOWN";
-
-			byte[] b = this.zookeeper.getData("/blur/clusters/" + clusterName + "/online/shard-nodes/" + shard, false, null);
-			if (b != null && b.length > 0) {
-				blurVersion = new String(b);
-			}
-
-			this.database.updateOnlineShard(shard, this.clusterId, blurVersion);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/TableCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/TableCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/TableCollector.java
deleted file mode 100644
index f218a13..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/TableCollector.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.nearinfinity.agent.collectors.zookeeper;
-
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooKeeper;
-
-import com.nearinfinity.agent.connections.zookeeper.interfaces.TableDatabaseInterface;
-
-public class TableCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(TableCollector.class);
-
-	private final int clusterId;
-	private final String clusterName;
-	private final ZooKeeper zookeeper;
-	private final TableDatabaseInterface database;
-
-	public TableCollector(int clusterId, String clusterName, ZooKeeper zookeeper, TableDatabaseInterface database) {
-		this.clusterId = clusterId;
-		this.clusterName = clusterName;
-		this.zookeeper = zookeeper;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			List<String> tables = this.zookeeper.getChildren("/blur/clusters/" + clusterName + "/tables", false);
-			this.database.markDeletedTables(tables, this.clusterId);
-			updateOnlineTables(tables);
-		} catch (KeeperException e) {
-			log.error("Error talking to zookeeper in TableCollector.", e);
-		} catch (InterruptedException e) {
-			log.error("Zookeeper session expired in TableCollector.", e);
-		}
-	}
-
-	private void updateOnlineTables(List<String> tables) throws KeeperException, InterruptedException {
-		for (String table : tables) {
-			String tablePath = "/blur/clusters/" + clusterName + "/tables/" + table;
-
-			String uri = new String(this.zookeeper.getData(tablePath + "/uri", false, null));
-			boolean enabled = this.zookeeper.getChildren(tablePath, false).contains("enabled");
-
-			this.database.updateOnlineTable(table, this.clusterId, uri, enabled);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ZookeeperCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ZookeeperCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ZookeeperCollector.java
deleted file mode 100644
index 107327e..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/zookeeper/ZookeeperCollector.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package com.nearinfinity.agent.collectors.zookeeper;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.URI;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.zookeeper.WatchedEvent;
-import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.Watcher.Event.KeeperState;
-import org.apache.zookeeper.ZooKeeper;
-import org.codehaus.jackson.map.ObjectMapper;
-
-import com.nearinfinity.agent.Agent;
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ZookeeperDatabaseInterface;
-import com.nearinfinity.agent.notifications.Notifier;
-
-public class ZookeeperCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(ZookeeperCollector.class);
-
-	private ZooKeeper zookeeper;
-	private boolean connected;
-
-	private final String url;
-	private final String name;
-	private final int id;
-	private final ZookeeperDatabaseInterface database;
-
-	public ZookeeperCollector(String url, String name, String blurConnection, ZookeeperDatabaseInterface database) {
-		this.url = url;
-		this.name = name;
-		this.database = database;
-		this.id = database.insertOrUpdateZookeeper(name, url, blurConnection);
-	}
-
-	@Override
-	public void run() {
-		while (true) {
-			try {
-				if (!this.connected) {
-					this.zookeeper = new ZooKeeper(this.url, 3000, new Watcher() {
-						@Override
-						public void process(WatchedEvent event) {
-							KeeperState state = event.getState();
-							if (state == KeeperState.Disconnected || state == KeeperState.Expired) {
-								log.warn("Zookeeper [" + name + "] disconnected event.");
-								database.setZookeeperOffline(id);
-								Notifier.getNotifier().notifyZookeeperOffline(name);
-								connected = false;
-							} else if (state == KeeperState.SyncConnected) {
-								log.info("Zookeeper [" + name + "] session established.");
-								connected = true;
-							}
-						}
-					});
-				}
-			} catch (IOException e) {
-				log.error("A zookeeper [" + this.name + "] connection could not be created, waiting 30 seconds.");
-				// Sleep the thread for 30secs to give the Zookeeper a chance to become
-				// available.
-				try {
-					Thread.sleep(30000);
-					continue;
-				} catch (InterruptedException ex) {
-					log.info("Exiting Zookeeper [" + this.name + "] instance");
-					return;
-				}
-			}
-
-			if (this.connected) {
-				new Thread(new ControllerCollector(this.id, this.zookeeper, this.database), "Controller Collector - " + this.name).start();
-				new Thread(new ClusterCollector(this.id, this.zookeeper, this.database), "Cluster Collector - " + this.name).start();
-			}
-
-			testEnsembleHealth();
-
-			try {
-				Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
-			} catch (InterruptedException e) {
-				log.info("Exiting Zookeeper [" + this.name + "] instance");
-				return;
-			}
-		}
-	}
-
-	private void testEnsembleHealth() {
-		String[] connections = this.url.split(",");
-		List<String> onlineZookeepers = new ArrayList<String>();
-		for (String connection : connections) {
-			try {
-				URI parsedConnection = new URI("my://" + connection);
-				String host = parsedConnection.getHost();
-				int port = parsedConnection.getPort() >= 0 ? parsedConnection.getPort() : 2181;
-				byte[] reqBytes = new byte[4];
-				ByteBuffer req = ByteBuffer.wrap(reqBytes);
-				req.putInt(ByteBuffer.wrap("ruok".getBytes()).getInt());
-				Socket socket = new Socket();
-				socket.setSoLinger(false, 10);
-				socket.setSoTimeout(20000);
-				parsedConnection.getPort();
-				socket.connect(new InetSocketAddress(host, port));
-
-				InputStream response = socket.getInputStream();
-				OutputStream question = socket.getOutputStream();
-
-				question.write(reqBytes);
-
-				byte[] resBytes = new byte[4];
-
-				response.read(resBytes);
-				String status = new String(resBytes);
-				if (status.equals("imok")) {
-					onlineZookeepers.add(connection);
-				}
-				socket.close();
-				response.close();
-				question.close();
-			} catch (Exception e) {
-				log.error("A connection to " + connection + " could not be made.", e);
-			}
-		}
-		try {
-			if (connections.length == onlineZookeepers.size()){
-				this.database.setZookeeperOnline(id);
-			} else if (connections.length < onlineZookeepers.size() * 2) {
-				this.database.setZookeeperWarning(this.id);
-			} else if (this.connected){
-				this.database.setZookeeperFailure(this.id);
-			} else {
-				this.database.setZookeeperOffline(this.id);
-			}
-			this.database.setOnlineEnsembleNodes(new ObjectMapper().writeValueAsString(onlineZookeepers), this.id);
-		} catch (Exception e) {
-			log.error("The online ensemble nodes array could not be created, writing that they are all offline!");
-			this.database.setOnlineEnsembleNodes("{}", this.id);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/JdbcConnection.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/JdbcConnection.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/JdbcConnection.java
deleted file mode 100644
index 3804c89..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/JdbcConnection.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.nearinfinity.agent.connections;
-
-import java.util.Properties;
-
-import org.apache.commons.dbcp.BasicDataSource;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-public class JdbcConnection {
-	public static JdbcTemplate createDBConnection(Properties props) {
-		String url = props.getProperty("store.url");
-		BasicDataSource dataSource = new BasicDataSource();
-		dataSource.setDriverClassName("com.mysql.jdbc.Driver");
-		dataSource.setUrl(url);
-		dataSource.setUsername(props.getProperty("store.user"));
-		dataSource.setPassword(props.getProperty("store.password"));
-		dataSource.setMaxActive(80);
-		dataSource.setMinIdle(2);
-		dataSource.setMaxWait(10000);
-		dataSource.setMaxIdle(-1);
-		dataSource.setRemoveAbandoned(true);
-		dataSource.setRemoveAbandonedTimeout(60);
-		dataSource.setDefaultAutoCommit(true);
-
-		return new JdbcTemplate(dataSource);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/BlurDatabaseConnection.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/BlurDatabaseConnection.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/BlurDatabaseConnection.java
deleted file mode 100644
index 311fba2..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/BlurDatabaseConnection.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.nearinfinity.agent.connections.blur;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang.StringUtils;
-import org.json.simple.JSONValue;
-import org.springframework.dao.IncorrectResultSizeDataAccessException;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.connections.blur.interfaces.BlurDatabaseInterface;
-import com.nearinfinity.agent.exceptions.TableCollisionException;
-import com.nearinfinity.agent.exceptions.TableMissingException;
-import com.nearinfinity.agent.exceptions.ZookeeperNameCollisionException;
-import com.nearinfinity.agent.exceptions.ZookeeperNameMissingException;
-import com.nearinfinity.agent.types.TimeHelper;
-import com.nearinfinity.blur.thrift.generated.BlurQueryStatus;
-import com.nearinfinity.blur.thrift.generated.SimpleQuery;
-
-public class BlurDatabaseConnection implements BlurDatabaseInterface {
-
-	private final JdbcTemplate jdbc;
-
-	public BlurDatabaseConnection(JdbcTemplate jdbc) {
-		this.jdbc = jdbc;
-	}
-
-	@Override
-	public String resolveConnectionString(int zookeeperId) {
-		String queryString = "select distinct node_name from blur_controllers where zookeeper_id = ? and controller_status = 1";
-		List<String> controller_uris = jdbc.queryForList(queryString, new String[] { Integer.toString(zookeeperId) }, String.class);
-		String connection = StringUtils.join(controller_uris, ',');
-		this.jdbc.update("update zookeepers set blur_urls=? where id = ?", connection, zookeeperId);
-		return connection;
-	}
-
-	@Override
-	public String getZookeeperId(final String zookeeperName) throws ZookeeperNameMissingException, ZookeeperNameCollisionException {
-		List<Map<String, Object>> zookeepers = jdbc.queryForList("select id from zookeepers where name = ?", zookeeperName);
-		switch (zookeepers.size()) {
-		case 0:
-			throw new ZookeeperNameMissingException(zookeeperName);
-		case 1:
-			return zookeepers.get(0).get("ID").toString();
-		default:
-			throw new ZookeeperNameCollisionException(zookeepers.size(), zookeeperName);
-		}
-	}
-
-	@Override
-	public List<Map<String, Object>> getClusters(final int zookeeperId) {
-		return jdbc.queryForList("select id, name from clusters where zookeeper_id = ?", zookeeperId);
-	}
-
-	@Override
-	public Map<String, Object> getExistingTable(final String table, final Integer clusterId) throws TableMissingException,
-			TableCollisionException {
-		List<Map<String, Object>> existingTable = jdbc.queryForList(
-				"select id, cluster_id from blur_tables where table_name=? and cluster_id=?", table, clusterId);
-		switch (existingTable.size()) {
-		case 0:
-			throw new TableMissingException(table);
-		case 1:
-			return existingTable.get(0);
-		default:
-			throw new TableCollisionException(existingTable.size(), table);
-		}
-	}
-
-	@Override
-	public int getTableId(int clusterId, String tableName) {
-		try {
-			return jdbc.queryForInt("select id from blur_tables where cluster_id=? and table_name =?", clusterId, tableName);
-		} catch (IncorrectResultSizeDataAccessException e) {
-			return -1;
-		}
-	}
-
-	@Override
-	public void updateTableSchema(final int tableId, final String schema, final String tableAnalyzer) {
-		jdbc.update("update blur_tables set table_schema=?, table_analyzer=? where id=?", new Object[] { schema, tableAnalyzer, tableId });
-	}
-
-	@Override
-	public void updateTableServer(final int tableId, String server) {
-		jdbc.update("update blur_tables set server=? where id=?", new Object[] { server, tableId });
-	}
-
-	@Override
-	public void updateTableStats(final int tableId, Long tableBytes, Long tableQueries, Long tableRecordCount, Long tableRowCount) {
-		jdbc.update("update blur_tables set current_size=?, query_usage=?, record_count=?, row_count=? where id=?", new Object[] { tableBytes,
-				tableQueries, tableRecordCount, tableRowCount, tableId });
-	}
-
-	public Map<String, Object> getQuery(int tableId, long UUID) {
-		try {
-			return this.jdbc.queryForMap("select id, complete_shards, times, state from blur_queries where blur_table_id=? and uuid=?", tableId,
-					UUID);
-		} catch (IncorrectResultSizeDataAccessException e) {
-			return null;
-		}
-	}
-
-	public void createQuery(BlurQueryStatus status, SimpleQuery query, String times, Date startTime, int tableId) {
-		this.jdbc
-				.update(
-						"insert into blur_queries (query_string, times, complete_shards, total_shards, state, uuid, created_at, updated_at, blur_table_id, super_query_on, facets, start, fetch_num, pre_filters, post_filters, selector_column_families, selector_columns, userid, record_only) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
-						query.getQueryStr(),
-						times,
-						status.getCompleteShards(),
-						status.getTotalShards(),
-						status.getState().getValue(),
-						status.getUuid(),
-						startTime,
-						TimeHelper.now().getTime(),
-						tableId,
-						query.isSuperQueryOn(),
-						StringUtils.join(status.getQuery().getFacets(), ", "),
-						status.getQuery().getStart(),
-						status.getQuery().getFetch(),
-						query.getPreSuperFilter(),
-						query.getPostSuperFilter(),
-						status.getQuery().getSelector() == null ? null : JSONValue.toJSONString(status.getQuery().getSelector()
-								.getColumnFamiliesToFetch()),
-						status.getQuery().getSelector() == null ? null : JSONValue.toJSONString(status.getQuery().getSelector().getColumnsToFetch()),
-						status.getQuery().getUserContext(), status.getQuery().getSelector() == null ? null : status.getQuery().getSelector()
-								.isRecordOnly());
-	}
-
-	public void updateQuery(BlurQueryStatus status, String times, int queryId) {
-		jdbc.update("update blur_queries set times=?, complete_shards=?, total_shards=?, state=?, updated_at=? where id=?", times,
-				status.getCompleteShards(), status.getTotalShards(), status.getState().getValue(), TimeHelper.now().getTime(), queryId);
-	}
-
-	@Override
-	public List<Long> getRunningQueries() {
-		return this.jdbc.queryForList("select uuid from blur_queries where state = 0", Long.class);
-	}
-
-	@Override
-	public void markOrphanedRunningQueriesComplete(Collection<Long> queries) {
-		if (!queries.isEmpty()) {
-			this.jdbc.update("update blur_queries set state=3 where uuid in (" + StringUtils.join(queries, ", ") + ")");
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/BlurDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/BlurDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/BlurDatabaseInterface.java
deleted file mode 100644
index 679e903..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/BlurDatabaseInterface.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.nearinfinity.agent.connections.blur.interfaces;
-
-import java.util.List;
-import java.util.Map;
-
-import com.nearinfinity.agent.connections.blur.interfaces.TableDatabaseInterface;
-import com.nearinfinity.agent.exceptions.TableCollisionException;
-import com.nearinfinity.agent.exceptions.TableMissingException;
-import com.nearinfinity.agent.exceptions.ZookeeperNameCollisionException;
-import com.nearinfinity.agent.exceptions.ZookeeperNameMissingException;
-
-public interface BlurDatabaseInterface extends TableDatabaseInterface, QueryDatabaseInterface {
-	String resolveConnectionString(int zookeeperId);
-
-	String getZookeeperId(final String zookeeperName) throws ZookeeperNameMissingException, ZookeeperNameCollisionException;
-
-	List<Map<String, Object>> getClusters(final int zookeeperId);
-
-	Map<String, Object> getExistingTable(final String table, final Integer clusterId) throws TableMissingException, TableCollisionException;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/QueryDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/QueryDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/QueryDatabaseInterface.java
deleted file mode 100644
index e9436b1..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/QueryDatabaseInterface.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.nearinfinity.agent.connections.blur.interfaces;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import com.nearinfinity.blur.thrift.generated.BlurQueryStatus;
-import com.nearinfinity.blur.thrift.generated.SimpleQuery;
-
-public interface QueryDatabaseInterface {
-	Map<String, Object> getQuery(int tableId, long UUID);
-
-	List<Long> getRunningQueries();
-
-	void createQuery(BlurQueryStatus status, SimpleQuery query, String times, Date startTime, int tableId);
-
-	void updateQuery(BlurQueryStatus status, String times, int queryId);
-	
-	void markOrphanedRunningQueriesComplete(Collection<Long> queries);
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/TableDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/TableDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/TableDatabaseInterface.java
deleted file mode 100644
index dbc8e01..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/blur/interfaces/TableDatabaseInterface.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.nearinfinity.agent.connections.blur.interfaces;
-
-public interface TableDatabaseInterface {
-	int getTableId(int clusterId, String tableName);
-
-	void updateTableSchema(final int tableId, final String schema, final String tableAnalyzer);
-
-	void updateTableServer(final int tableId, final String server);
-
-	void updateTableStats(final int tableId, final Long tableBytes, final Long tableQueries, final Long tableRecordCount,
-			final Long tableRowCount);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/CleanerDatabaseConnection.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/CleanerDatabaseConnection.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/CleanerDatabaseConnection.java
deleted file mode 100644
index 6ba5555..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/CleanerDatabaseConnection.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.nearinfinity.agent.connections.cleaners;
-
-import java.util.Calendar;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class CleanerDatabaseConnection implements CleanerDatabaseInterface {
-	private final JdbcTemplate jdbc;
-
-	// Query Expiration Times
-	private final int expireThreshold = 2 * 60 * 1000;
-	private final int deleteThreshold = 2 * 60 * 60 * 1000;
-
-	// Hdfs Expiration Times
-	private final int timeToLive = 14 * 24 * 60 * 60 * 1000;
-
-	public CleanerDatabaseConnection(JdbcTemplate jdbc) {
-		this.jdbc = jdbc;
-	}
-
-	@Override
-	public int deleteOldQueries() {
-		Calendar twoHoursAgo = TimeHelper.getTimeAgo(deleteThreshold);
-		return this.jdbc.update("delete from blur_queries where created_at < ?", twoHoursAgo.getTime());
-	}
-
-	@Override
-	public int expireOldQueries() {
-		Calendar now = TimeHelper.now();
-		Calendar twoMinutesAgo = TimeHelper.getTimeAgo(expireThreshold);
-		return this.jdbc.update("update blur_queries set state=1, updated_at=? where updated_at < ? and state = 0", now.getTime(),
-				twoMinutesAgo);
-	}
-
-	@Override
-	public int deleteOldStats() {
-		Calendar ttlDaysAgo = TimeHelper.getTimeAgo(timeToLive);
-		return jdbc.update("delete from hdfs_stats where created_at < ?", ttlDaysAgo);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/CleanerDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/CleanerDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/CleanerDatabaseInterface.java
deleted file mode 100644
index fef657e..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/CleanerDatabaseInterface.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.nearinfinity.agent.connections.cleaners.interfaces;
-
-public interface CleanerDatabaseInterface extends HdfsDatabaseCleanerInterface, QueryDatabaseCleanerInterface {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/HdfsDatabaseCleanerInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/HdfsDatabaseCleanerInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/HdfsDatabaseCleanerInterface.java
deleted file mode 100644
index eeb7f48..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/HdfsDatabaseCleanerInterface.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.nearinfinity.agent.connections.cleaners.interfaces;
-
-public interface HdfsDatabaseCleanerInterface {
-	int deleteOldStats();
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/QueryDatabaseCleanerInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/QueryDatabaseCleanerInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/QueryDatabaseCleanerInterface.java
deleted file mode 100644
index 5d2b337..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/cleaners/interfaces/QueryDatabaseCleanerInterface.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.connections.cleaners.interfaces;
-
-public interface QueryDatabaseCleanerInterface {
-	int deleteOldQueries();
-
-	int expireOldQueries();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/HdfsDatabaseConnection.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/HdfsDatabaseConnection.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/HdfsDatabaseConnection.java
deleted file mode 100644
index 6e65620..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/HdfsDatabaseConnection.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.nearinfinity.agent.connections.hdfs;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.dao.IncorrectResultSizeDataAccessException;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-import com.nearinfinity.agent.exceptions.NullReturnedException;
-
-public class HdfsDatabaseConnection implements HdfsDatabaseInterface {
-	private final JdbcTemplate jdbc;
-
-	public HdfsDatabaseConnection(JdbcTemplate jdbc) {
-		this.jdbc = jdbc;
-	}
-
-	@Override
-	public void setHdfsInfo(String name, String host, int port) {
-		List<Map<String, Object>> existingHdfs = jdbc.queryForList("select id from hdfs where name=?", name);
-
-		if (existingHdfs.isEmpty()) {
-			jdbc.update("insert into hdfs (name, host, port) values (?, ?, ?)", name, host, port);
-		} else {
-			jdbc.update("update hdfs set host=?, port=? where id=?", host, port, existingHdfs.get(0).get("ID"));
-		}
-	}
-
-	@Override
-	public int getHdfsId(String name) throws NullReturnedException {
-		try {
-			return jdbc.queryForInt("select id from hdfs where name = ?", name);
-		} catch (IncorrectResultSizeDataAccessException e) {
-			return -1;
-		}
-	}
-
-	@Override
-	public void insertHdfsStats(long capacity, long presentCapacity, long remaining, long used, long logical_used, double d,
-			long underReplicatedBlocksCount, long corruptBlocksCount, long missingBlocksCount, long totalNodes, long liveNodes, long deadNodes,
-			Date time, String host, int port, int hdfsId) {
-		jdbc.update(
-				"insert into hdfs_stats (config_capacity, present_capacity, dfs_remaining, dfs_used_real, dfs_used_logical, dfs_used_percent, under_replicated, corrupt_blocks, missing_blocks, total_nodes, live_nodes, dead_nodes, created_at, host, port, hdfs_id) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
-				capacity, presentCapacity, remaining, used, logical_used, (((1.0 * used) / presentCapacity) * 100), underReplicatedBlocksCount,
-				corruptBlocksCount, missingBlocksCount, totalNodes, liveNodes, deadNodes, time, host, port, hdfsId);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/interfaces/HdfsDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/interfaces/HdfsDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/interfaces/HdfsDatabaseInterface.java
deleted file mode 100644
index 0d6abe2..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/hdfs/interfaces/HdfsDatabaseInterface.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.nearinfinity.agent.connections.hdfs.interfaces;
-
-import java.util.Date;
-
-import com.nearinfinity.agent.exceptions.NullReturnedException;
-
-public interface HdfsDatabaseInterface {
-	void setHdfsInfo(String name, String host, int port);
-
-	int getHdfsId(String name) throws NullReturnedException;
-
-	void insertHdfsStats(long capacity, long presentCapacity, long remaining, long used, long logical_used, double d,
-			long underReplicatedBlocksCount, long corruptBlocksCount, long missingBlocksCount, long totalNodes, long liveNodes, long deadNodes,
-			Date time, String host, int port, int hdfsId);
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/ZookeeperDatabaseConnection.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/ZookeeperDatabaseConnection.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/ZookeeperDatabaseConnection.java
deleted file mode 100644
index cca9dae..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/ZookeeperDatabaseConnection.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package com.nearinfinity.agent.connections.zookeeper;
-
-import java.util.List;
-import org.apache.commons.lang.StringUtils;
-import org.springframework.dao.EmptyResultDataAccessException;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ClusterDatabaseInterface;
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ControllerDatabaseInterface;
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ShardsDatabaseInterface;
-import com.nearinfinity.agent.connections.zookeeper.interfaces.TableDatabaseInterface;
-import com.nearinfinity.agent.connections.zookeeper.interfaces.ZookeeperDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class ZookeeperDatabaseConnection implements ZookeeperDatabaseInterface, ControllerDatabaseInterface, TableDatabaseInterface,
-		ShardsDatabaseInterface, ClusterDatabaseInterface {
-
-	private final JdbcTemplate jdbc;
-
-	public ZookeeperDatabaseConnection(JdbcTemplate jdbc) {
-		this.jdbc = jdbc;
-	}
-
-	@Override
-	public void setZookeeperOnline(int zookeeperId) {
-		this.jdbc.update("update zookeepers set zookeeper_status=? where id=?", 1, zookeeperId);
-	}
-
-	@Override
-	public void setZookeeperWarning(int zookeeperId) {
-		this.jdbc.update("update zookeepers set zookeeper_status=? where id=?", 2, zookeeperId);
-	}
-
-	@Override
-	public void setZookeeperFailure(int zookeeperId) {
-		this.jdbc.update("update zookeepers set zookeeper_status=? where id=?", 3, zookeeperId);
-	}
-
-	@Override
-	public void setZookeeperOffline(int zookeeperId) {
-		this.jdbc.update("update zookeepers set zookeeper_status=? where id=?", 0, zookeeperId);
-	}
-
-	@Override
-	public int insertOrUpdateZookeeper(String name, String url, String blurConnection) {
-		int updatedCount = jdbc.update("update zookeepers set url=? where name=?", url, name);
-
-		if (updatedCount == 0) {
-			jdbc.update("insert into zookeepers (name, url, blur_urls) values (?, ?, ?)", name, url, blurConnection);
-		}
-
-		return jdbc.queryForInt("select id from zookeepers where name = ?", name);
-	}
-
-	@Override
-	public int insertOrUpdateCluster(boolean safeMode, String cluster, int zookeeperId) {
-		int updateCount = this.jdbc.update("update clusters set safe_mode=? where name=? and zookeeper_id=?", safeMode, cluster, zookeeperId);
-		if (updateCount == 0) {
-			this.jdbc.update("insert into clusters (name, zookeeper_id, safe_mode) values (?, ?, ?)", cluster, zookeeperId, safeMode);
-		}
-		return this.jdbc.queryForInt("select id from clusters where name=? and zookeeper_id=?", cluster, zookeeperId);
-	}
-
-	@Override
-	public int markOfflineControllers(List<String> onlineControllers, int zookeeperId) {
-		if (onlineControllers.isEmpty()) {
-			return this.jdbc.update("update blur_controllers set controller_status=0, updated_at=? where zookeeper_id = ?", TimeHelper.now().getTime(),
-					zookeeperId);
-		} else {
-			return this.jdbc.update(
-					"update blur_controllers set controller_status=0, updated_at=? where controller_status!=0 and node_name not in ('"
-							+ StringUtils.join(onlineControllers, "','") + "') and zookeeper_id = ?", TimeHelper.now().getTime(), zookeeperId);
-		}
-	}
-
-	@Override
-	public int markOfflineShards(List<String> onlineShards, int clusterId) {
-		if (onlineShards.isEmpty()) {
-			return this.jdbc.update("update blur_shards set shard_status=0 updated_at=? where cluster_id = ?", TimeHelper.now().getTime(), clusterId);
-		} else {
-			return this.jdbc.update(
-					"update blur_shards set shard_status=0, updated_at=? where shard_status!=0 and node_name not in ('" + StringUtils.join(onlineShards, "','")
-							+ "') and cluster_id=?", TimeHelper.now().getTime(), clusterId);
-		}
-	}
-
-	@Override
-	public void markDeletedTables(List<String> onlineTables, int clusterId) {
-		if (onlineTables.isEmpty()) {
-			this.jdbc.update("delete from blur_tables where cluster_id=?", clusterId);
-		} else {
-			this.jdbc.update("delete from blur_tables where cluster_id=? and table_name not in ('"
-					+ StringUtils.join(onlineTables, "','") + "')", clusterId);
-		}
-	}
-
-	@Override
-	public void updateOnlineController(String controller, int zookeeperId, String blurVersion) {
-		int zookeeperStatus = this.jdbc.queryForInt("select zookeeper_status from zookeepers where id=?", zookeeperId);
-		int status = (zookeeperStatus == 0 || zookeeperStatus == 2) ? 2 : 1;
-		int updatedCount = this.jdbc.update(
-				"update blur_controllers set controller_status=?, blur_version=?, updated_at=? where node_name=? and zookeeper_id =?", status, blurVersion,
-				TimeHelper.now().getTime(), controller, zookeeperId);
-
-		if (updatedCount == 0) {
-			this.jdbc.update(
-					"insert into blur_controllers (node_name, controller_status, zookeeper_id, blur_version, created_at, updated_at) values (?, ?, ?, ?, ?, ?)",
-					controller, status, zookeeperId, blurVersion, TimeHelper.now().getTime(), TimeHelper.now().getTime());
-		}
-	}
-
-	@Override
-	public void updateOnlineShard(String shard, int clusterId, String blurVersion) {
-		int zookeeperStatus = this.jdbc.queryForInt(
-				"select zookeepers.zookeeper_status from zookeepers, clusters where clusters.id=? and clusters.zookeeper_id=zookeepers.id;",
-				clusterId);
-		int status = (zookeeperStatus == 0 || zookeeperStatus == 2) ? 2 : 1;
-		int updatedCount = this.jdbc.update("update blur_shards set shard_status=?, blur_version=?, updated_at=? where node_name=? and cluster_id=?",
-				status, blurVersion, TimeHelper.now().getTime(), shard, clusterId);
-
-		if (updatedCount == 0) {
-			this.jdbc.update(
-					"insert into blur_shards (node_name, shard_status, cluster_id, blur_version, created_at, updated_at) values (?, ?, ?, ?, ?, ?)", shard,
-					status, clusterId, blurVersion, TimeHelper.now().getTime(), TimeHelper.now().getTime());
-		}
-	}
-
-	@Override
-	public void updateOnlineTable(String table, int clusterId, String uri, boolean enabled) {
-		try{
-			int currentStatus = this.jdbc.queryForInt("select table_status from blur_tables where table_name=? and cluster_id=?", table, clusterId);
-			if (enabled && currentStatus != 3){
-				this.jdbc.update("update blur_tables set table_uri=?, table_status=?, updated_at=? where table_name=? and cluster_id=?",
-						uri, 4, TimeHelper.now().getTime(), table, clusterId);
-				
-			}
-			if (!enabled && currentStatus != 5) {
-				this.jdbc.update("update blur_tables set table_uri=?, table_status=?, updated_at=? where table_name=? and cluster_id=?",
-						uri, 2, TimeHelper.now().getTime(), table, clusterId);
-			}
-		} catch(EmptyResultDataAccessException e){
-			this.jdbc.update("insert into blur_tables (table_name, table_uri, table_status, cluster_id, updated_at) values (?, ?, ?, ?, ?)", table,
-					uri, (enabled ? 4 : 2), clusterId, TimeHelper.now().getTime());
-		}
-	}
-
-	@Override
-	public void setOnlineEnsembleNodes(String ensembleArray, int zookeeperId) {
-		this.jdbc.update("update zookeepers set online_ensemble_nodes=? where id=?", ensembleArray, zookeeperId);
-	}
-
-	@Override
-	public List<String> getRecentOfflineShardNames(int amount) {
-		return this.jdbc.queryForList("select node_name from blur_shards where shard_status=0 order by updated_at limit 0, " + amount, String.class);
-	}
-
-	@Override
-	public List<String> getRecentOfflineControllerNames(int amount) {
-		return this.jdbc.queryForList("select node_name from blur_controllers where controller_status=0 order by updated_at limit 0, " + amount,
-				String.class);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ClusterDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ClusterDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ClusterDatabaseInterface.java
deleted file mode 100644
index 80713ad..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ClusterDatabaseInterface.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.nearinfinity.agent.connections.zookeeper.interfaces;
-
-public interface ClusterDatabaseInterface extends ShardsDatabaseInterface, TableDatabaseInterface {
-
-	int insertOrUpdateCluster(boolean safeMode, String cluster, int zookeeperId);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ControllerDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ControllerDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ControllerDatabaseInterface.java
deleted file mode 100644
index 6fd2831..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ControllerDatabaseInterface.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.nearinfinity.agent.connections.zookeeper.interfaces;
-
-import java.util.List;
-
-public interface ControllerDatabaseInterface {
-
-	int markOfflineControllers(List<String> onlineControllers, int zookeeperId);
-
-	void updateOnlineController(String controller, int zookeeperId, String blurVersion);
-
-	List<String> getRecentOfflineControllerNames(int amount);
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ShardsDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ShardsDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ShardsDatabaseInterface.java
deleted file mode 100644
index 7215cd4..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ShardsDatabaseInterface.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.nearinfinity.agent.connections.zookeeper.interfaces;
-
-import java.util.List;
-
-public interface ShardsDatabaseInterface {
-
-	int markOfflineShards(List<String> onlineShards, int clusterId);
-
-	void updateOnlineShard(String shard, int clusterId, String blurVersion);
-
-	List<String> getRecentOfflineShardNames(int amount);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/TableDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/TableDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/TableDatabaseInterface.java
deleted file mode 100644
index f7ede4a..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/TableDatabaseInterface.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.nearinfinity.agent.connections.zookeeper.interfaces;
-
-import java.util.List;
-
-public interface TableDatabaseInterface {
-
-	void markDeletedTables(List<String> onlineTables, int clusterId);
-
-	void updateOnlineTable(String table, int clusterId, String uri, boolean enabled);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ZookeeperDatabaseInterface.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ZookeeperDatabaseInterface.java b/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ZookeeperDatabaseInterface.java
deleted file mode 100644
index 47e2ae1..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/connections/zookeeper/interfaces/ZookeeperDatabaseInterface.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.nearinfinity.agent.connections.zookeeper.interfaces;
-
-public interface ZookeeperDatabaseInterface extends ControllerDatabaseInterface, ClusterDatabaseInterface {
-
-	void setZookeeperOnline(int id);
-
-	void setZookeeperWarning(int id);
-
-	void setZookeeperOffline(int id);
-
-  void setZookeeperFailure(int id);
-
-	int insertOrUpdateZookeeper(String name, String url, String blurConnection);
-
-	void setOnlineEnsembleNodes(String ensembleArray, int zookeeperId);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/CollisionException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/CollisionException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/CollisionException.java
deleted file mode 100644
index 335217a..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/CollisionException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class CollisionException extends Exception {
-	public CollisionException(int size, String type, String name) {
-		super("Found [" + size + "] " + type + " by identifier [" + name + "].  Need one and only one result.  Skipping collection.");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/HdfsThreadException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/HdfsThreadException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/HdfsThreadException.java
deleted file mode 100644
index 8de4997..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/HdfsThreadException.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class HdfsThreadException extends Exception {
-	public HdfsThreadException() {
-		super();
-	}
-
-	public HdfsThreadException(String message) {
-		super(message);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/InvalidLicenseException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/InvalidLicenseException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/InvalidLicenseException.java
deleted file mode 100644
index f8351e0..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/InvalidLicenseException.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-public class InvalidLicenseException extends Exception {
-	private static final long serialVersionUID = 1317409878802094298L;
-
-	public InvalidLicenseException(String message) {
-		super(message);
-	}
-
-	public InvalidLicenseException(String message, Throwable cause) {
-		super(message, cause);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/MissingException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/MissingException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/MissingException.java
deleted file mode 100644
index 917991b..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/MissingException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class MissingException extends Exception {
-	public MissingException(String type, String name) {
-		super("Couldn't Find a " + type + " by name [" + name + "].  Need a single result.  Skipping collection.");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/NullReturnedException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/NullReturnedException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/NullReturnedException.java
deleted file mode 100644
index 7761462..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/NullReturnedException.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class NullReturnedException extends Exception {
-	public NullReturnedException() {
-		super();
-	}
-
-	public NullReturnedException(String message) {
-		super(message);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableCollisionException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableCollisionException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableCollisionException.java
deleted file mode 100644
index e174781..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableCollisionException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class TableCollisionException extends CollisionException {
-	public TableCollisionException(int size, String table) {
-		super(size, "Table", table);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableMissingException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableMissingException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableMissingException.java
deleted file mode 100644
index f98c7a3..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/TableMissingException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class TableMissingException extends MissingException {
-	public TableMissingException(String table) {
-		super("Table", table);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameCollisionException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameCollisionException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameCollisionException.java
deleted file mode 100644
index 6d1dff0..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameCollisionException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class ZookeeperNameCollisionException extends CollisionException {
-	public ZookeeperNameCollisionException(int size, String zookeeperName) {
-		super(size, "Zookeepers", zookeeperName);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameMissingException.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameMissingException.java b/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameMissingException.java
deleted file mode 100644
index 61f4d3e..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/exceptions/ZookeeperNameMissingException.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.nearinfinity.agent.exceptions;
-
-@SuppressWarnings("serial")
-public class ZookeeperNameMissingException extends MissingException {
-	public ZookeeperNameMissingException(String zookeeperName) {
-		super("Zookeeper", zookeeperName);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/monitor/ThreadController.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/monitor/ThreadController.java b/blur-agent/src/main/java/com/nearinfinity/agent/monitor/ThreadController.java
deleted file mode 100644
index e2d46df..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/monitor/ThreadController.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.nearinfinity.agent.monitor;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-public class ThreadController {
-	private static Set<Thread> threads = new HashSet<Thread>();
-	public static boolean exitOnStop = true;
-
-	public static void registerThread(Thread thread) {
-		if (thread != null) {
-			threads.add(thread);
-		}
-	}
-
-	public static void stopAllThreads() {
-		Iterator<Thread> iterator = threads.iterator();
-		while (iterator.hasNext()) {
-			Thread next = iterator.next();
-			next.interrupt();
-			iterator.remove();
-		}
-
-		if (exitOnStop) {
-			System.exit(1);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/notifications/AgentMailerAuthenticator.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/AgentMailerAuthenticator.java b/blur-agent/src/main/java/com/nearinfinity/agent/notifications/AgentMailerAuthenticator.java
deleted file mode 100644
index 047bf8c..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/AgentMailerAuthenticator.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import javax.mail.Authenticator;
-import javax.mail.PasswordAuthentication;
-
-public class AgentMailerAuthenticator extends Authenticator {
-	private final PasswordAuthentication authentication;
-
-	public AgentMailerAuthenticator(String username, String password) {
-		this.authentication = new PasswordAuthentication(username, password);
-	}
-
-	protected PasswordAuthentication getPasswordAuthentication() {
-		return this.authentication;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Mailer.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Mailer.java b/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Mailer.java
deleted file mode 100644
index 7548df4..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Mailer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class Mailer {
-	private static final Log log = LogFactory.getLog(Mailer.class);
-
-	private AgentMailerAuthenticator authenticator;
-	private String automatedSender;
-	private List<InternetAddress> recipients;
-	private Properties mailerProperties;
-	private boolean sendMail = false;
-
-	public Mailer(Properties props) {
-		if (props.containsKey("mail.enabled") && props.getProperty("mail.enabled").equals("true")) {
-			sendMail = true;
-			authenticator = new AgentMailerAuthenticator(props.getProperty("mail.sender.username"), props.getProperty("mail.sender.password"));
-			automatedSender = props.getProperty("mail.from.address", "DoNotReply");
-			setupRecipients(props.getProperty("mail.recipients", ""));			
-			
-			mailerProperties = new Properties();
-			mailerProperties.put("mail.transport.protocol", "smtp");
-			mailerProperties.put("mail.smtp.host", props.getProperty("mail.host", ""));
-			mailerProperties.put("mail.smtp.port", props.getProperty("mail.port", ""));
-			mailerProperties.put("mail.smtp.auth", "true");
-			mailerProperties.put("mail.smtp.starttls.enable", "true");
-		}
-	}
-
-	public void sendMessage(String subject, String messageBody) {
-		if (!sendMail) {
-			log.info("Mailer has been disabled.  No emails will be sent.");
-			return;
-		}
-		if (recipients.isEmpty()) {
-			log.warn("There were no recipients found to send mail to.  Skipping send mail.");
-			return;
-		}
-
-		Session session = Session.getInstance(this.mailerProperties, this.authenticator);
-		try {
-			MimeMessage message = new MimeMessage(session);
-			message.setFrom(new InternetAddress(this.automatedSender));
-			message.addRecipients(Message.RecipientType.TO, recipients.toArray(new InternetAddress[recipients.size()]));
-
-			message.setSubject(subject);
-			message.setContent(messageBody, "text/plain");
-
-			Transport.send(message);
-		} catch (MessagingException e) {
-			log.error("An error occured while sending a warning email.", e);
-		}
-	}
-	
-	private void setupRecipients(String recipientProp) {
-		recipients = new ArrayList<InternetAddress>();
-		for (String email : recipientProp.split("\\|")) {
-			try {
-				recipients.add(new InternetAddress(email));
-			} catch (AddressException e) {
-				log.warn("Invalid email address found.  Ignoring.", e);
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Messenger.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Messenger.java b/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Messenger.java
deleted file mode 100644
index 6791375..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Messenger.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jivesoftware.smack.Chat;
-import org.jivesoftware.smack.ChatManager;
-import org.jivesoftware.smack.Connection;
-import org.jivesoftware.smack.ConnectionConfiguration;
-import org.jivesoftware.smack.MessageListener;
-import org.jivesoftware.smack.XMPPConnection;
-import org.jivesoftware.smack.XMPPException;
-import org.jivesoftware.smack.packet.Message;
-
-public class Messenger {
-	private static final Log log = LogFactory.getLog(Messenger.class);
-	
-	private String host;
-	private int port;
-	private String username;
-	private String password;
-	private Set<String> recipients;
-	private boolean sendMessage = false;
-	
-	public Messenger(Properties props) {
-		if (props.containsKey("messenger.enabled") && props.getProperty("messenger.enabled").equals("true")) {
-			sendMessage = true;
-			host = props.getProperty("messenger.host");
-			port = Integer.parseInt(props.getProperty("messenger.port", "5222"));
-			username = props.getProperty("messenger.user");
-			password = props.getProperty("messenger.password");
-			
-			recipients = new HashSet<String>();
-			for (String recip : props.getProperty("messenger.recipients", "").split("\\|")) {
-				if (StringUtils.isNotBlank(recip)) {
-					recipients.add(recip);
-				}
-			}
-		}
-	}
-	
-	public void sendMessage(String message) {
-		if (sendMessage && !recipients.isEmpty()) {
-			try {
-				// Create the configuration for this new connection
-				ConnectionConfiguration config = new ConnectionConfiguration(host, port);
-				config.setCompressionEnabled(true);
-				config.setSASLAuthenticationEnabled(true);
-				config.setSendPresence(false);
-				config.setRosterLoadedAtLogin(false);
-				
-				Connection connection = new XMPPConnection(config);
-				// Connect to the server
-				connection.connect();
-				// Log into the server
-				connection.login(username, password);
-				ChatManager manager = connection.getChatManager();
-				for (String recipient : recipients) {
-					Chat chat = manager.createChat(recipient, new MessageListener() {
-						
-						@Override
-						public void processMessage(Chat chat, Message message) {
-							try {
-								chat.sendMessage("Sorry I'm just a bot");
-							} catch (XMPPException e) {
-								//Ignore response
-							}
-						}
-					});
-					chat.sendMessage(message);
-				}
-				// Disconnect from the server
-				connection.disconnect();
-			} catch (Exception e) {
-				log.warn("Unable to send Instant Message: " + e.getMessage());
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Notifier.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Notifier.java b/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Notifier.java
deleted file mode 100644
index 21182d2..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/notifications/Notifier.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class Notifier {
-	private static final Log log = LogFactory.getLog(Notifier.class);
-	private static final String SUBJECT = "Blur Console: {0} nodes may have gone offline!";
-	private static final String MESSAGE = "Blur Console has received notice that the following {0} nodes have recently gone offline.\n\n{1}";
-	private static Notifier notifier;
-	
-	private Mailer mailer;
-	private Messenger messenger;
-	
-	private Notifier(Properties props) {
-		mailer = new Mailer(props);
-		messenger = new Messenger(props);
-	}
-	
-	public void notifyZookeeperOffline(String zookeeperName) {
-		sendNotification("Zookeeper", new ArrayList<String>(Arrays.asList(new String[]{zookeeperName})));
-	}
-
-	public void notifyControllerOffline(List<String> controllerNames) {
-		sendNotification("Controller", controllerNames);
-	}
-
-	public void notifyShardOffline(List<String> shardNames) {
-		sendNotification("Shard", shardNames);
-	}
-	
-	private void sendNotification(String nodeType, List<String> nodeNames) {
-		String subject = MessageFormat.format(SUBJECT, nodeType);
-		String message = MessageFormat.format(MESSAGE, nodeType, StringUtils.join(nodeNames, "\n"));
-		
-		mailer.sendMessage(subject, message);
-		messenger.sendMessage(message);
-	}
-	
-	public static Notifier getNotifier(Properties props, boolean forceNew) {
-		if (notifier == null || forceNew) {
-			notifier = new Notifier(props);
-		}
-		return notifier;
-	}
-
-	public static Notifier getNotifier() {
-		if (notifier != null) {
-			return notifier;
-		}
-
-		log.warn("Notifier has not been configured yet.  No notifications will be sent.");
-		return new Notifier(new Properties());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/types/Column.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/types/Column.java b/blur-agent/src/main/java/com/nearinfinity/agent/types/Column.java
deleted file mode 100644
index c52d347..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/types/Column.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.nearinfinity.agent.types;
-
-public class Column {
-	String name;
-	String analyzer;
-	boolean fullText;
-	boolean live;
-
-	public Column(String name) {
-		this.name = name;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getAnalyzer() {
-		return analyzer;
-	}
-
-	public void setAnalyzer(String analyzer) {
-		this.analyzer = analyzer;
-	}
-
-	public boolean isLive() {
-		return live;
-	}
-
-	public void setLive(boolean live) {
-		this.live = live;
-	}
-
-	public boolean isFullText() {
-		return fullText;
-	}
-
-	public void setFullText(boolean fullText) {
-		this.fullText = fullText;
-	}
-
-	public boolean isSearchable() {
-		return (this.analyzer != null && this.analyzer != "");
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((name == null) ? 0 : name.hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		Column other = (Column) obj;
-		if (name == null) {
-			if (other.name != null)
-				return false;
-		} else if (!name.equals(other.name))
-			return false;
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/types/Family.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/types/Family.java b/blur-agent/src/main/java/com/nearinfinity/agent/types/Family.java
deleted file mode 100644
index 806f7d0..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/types/Family.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.nearinfinity.agent.types;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Family {
-	String name;
-	List<Column> columns = new ArrayList<Column>();
-
-	public Family(String name) {
-		this.name = name;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public List<Column> getColumns() {
-		return columns;
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((name == null) ? 0 : name.hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		Family other = (Family) obj;
-		if (name == null) {
-			if (other.name != null)
-				return false;
-		} else if (!name.equals(other.name))
-			return false;
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/types/TimeHelper.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/types/TimeHelper.java b/blur-agent/src/main/java/com/nearinfinity/agent/types/TimeHelper.java
deleted file mode 100644
index 5069031..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/types/TimeHelper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.nearinfinity.agent.types;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
-public class TimeHelper {
-	public static Calendar now() {
-		return getAdjustedTime(new Date().getTime());
-	}
-
-	public static Calendar getAdjustedTime(long time) {
-		Calendar cal = Calendar.getInstance();
-		TimeZone z = cal.getTimeZone();
-		cal.add(Calendar.MILLISECOND, -(z.getOffset(time)));
-		return cal;
-	}
-	
-	public static Calendar getTimeAgo(int timeAgoInMS){
-		Calendar timeAgo = Calendar.getInstance();
-		timeAgo.setTimeInMillis(now().getTimeInMillis());
-		timeAgo.add(Calendar.MILLISECOND, -timeAgoInMS);
-		return timeAgo;
-	}
-}


Mime
View raw message