incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [26/50] [abbrv] Initial Blur Console commit.
Date Fri, 17 May 2013 03:24:53 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java b/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java
deleted file mode 100644
index ef78912..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/AgentBaseTestClass.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.nearinfinity;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.BeforeClass;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.connections.JdbcConnection;
-
-public abstract class AgentBaseTestClass {
-	protected static JdbcTemplate jdbc;
-
-	@BeforeClass
-	public static void setupDatabaseConnection() {
-		Properties props = new Properties();
-		props.setProperty("store.url", "jdbc:mysql://localhost/blurtools-test");
-		props.setProperty("store.user", "root");
-		props.setProperty("store.password", "");
-		jdbc = JdbcConnection.createDBConnection(props);
-	}
-
-	@After
-	public void tearDownDatabase() {
-		List<String> tables = jdbc.queryForList("select TABLE_NAME from information_schema.tables where table_schema = 'blurtools-test'",
-				String.class);
-
-		for (String table : tables) {
-			if (!"schema_migrations".equalsIgnoreCase(table)) {
-				jdbc.execute("truncate table " + table);
-			}
-		}
-	}
-	
-	protected void waitForThreadToSleep(Thread tiredThread, int catchupTime){
-		while(tiredThread.getState() != Thread.State.TIMED_WAITING){
-			// Wait until the thread goes to sleep
-		}
-		try {
-			Thread.sleep(catchupTime);
-			tiredThread.interrupt();
-		} catch (InterruptedException e) {}
-		return;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java b/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java
deleted file mode 100644
index 21f90c2..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/BlurAgentBaseTestClass.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.nearinfinity;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import com.nearinfinity.blur.MiniCluster;
-
-public abstract class BlurAgentBaseTestClass extends AgentBaseTestClass {
-	@BeforeClass
-	public static void startBlur() {
-		MiniCluster.startDfs("./tmp");
-		MiniCluster.startZooKeeper("./tmp");
-		MiniCluster.startControllers(1);
-		MiniCluster.startShards(1);
-	}
-
-	@AfterClass
-	public static void stopBlur() {
-		MiniCluster.stopShards();
-		MiniCluster.stopControllers();
-		MiniCluster.shutdownZooKeeper();
-		MiniCluster.shutdownDfs();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java
deleted file mode 100644
index 1d35f86..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/AgentCleanerTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import static org.junit.Assert.assertEquals;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.List;
-
-import org.junit.Test;
-
-import com.nearinfinity.AgentBaseTestClass;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class AgentCleanerTest extends AgentBaseTestClass {
-	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldCleanStatsAndQueries() {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.addAll(Arrays.asList("queries", "hdfs"));
-
-		makeOldData();
-
-		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
-		testStatsCleaner.start();
-		waitForThreadToSleep(testStatsCleaner, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(0, hdfsCount);
-		assertEquals(0, queryCount);
-	}
-
-	@Test
-	public void shouldOnlyCleanStats() {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.add("hdfs");
-
-		makeOldData();
-
-		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
-		testStatsCleaner.start();
-		waitForThreadToSleep(testStatsCleaner, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(0, hdfsCount);
-		assertEquals(1, queryCount);
-	}
-
-	@Test
-	public void shouldOnlyCleanQueries() {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.add("queries");
-
-		makeOldData();
-
-		Thread testStatsCleaner = new Thread(new AgentCleaners(activeCollectors, database), "Test Agent Thread");
-		testStatsCleaner.start();
-		waitForThreadToSleep(testStatsCleaner, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		int queryCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(1, hdfsCount);
-		assertEquals(0, queryCount);
-	}
-
-	private void makeOldData() {
-		Calendar overTwoWeeksAgo = TimeHelper.getTimeAgo(16 * 24 * 60 * 60 * 1000);
-		jdbc.update("insert into hdfs_stats (created_at) values (?)", overTwoWeeksAgo);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, overTwoWeeksAgo, overTwoWeeksAgo);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java
deleted file mode 100644
index d26f507..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/HdfsStatsCleanerTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Calendar;
-
-import org.junit.Test;
-
-import com.nearinfinity.AgentBaseTestClass;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class HdfsStatsCleanerTest extends AgentBaseTestClass {
-	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldDeleteOldStats() {
-		Calendar overTwoWeeksAgo = TimeHelper.getTimeAgo(16 * 24 * 60 * 60 * 1000);
-		jdbc.update("insert into hdfs_stats (created_at) values (?)", overTwoWeeksAgo);
-
-		Thread testStatsCleaner = new Thread(new HdfsStatsCleaner(database), "Hdfs Stats Cleaner Test Thread");
-		testStatsCleaner.start();
-		try {
-			testStatsCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(0, updatedCount);
-	}
-	
-	@Test
-	public void shouldNotDeleteYoungStats() {
-		Calendar underTwoWeeksAgo = TimeHelper.getTimeAgo(8 * 24 * 60 * 60 * 1000);
-		jdbc.update("insert into hdfs_stats (created_at) values (?)", underTwoWeeksAgo);
-
-		Thread testStatsCleaner = new Thread(new HdfsStatsCleaner(database), "Hdfs Stats Cleaner Test Thread");
-		testStatsCleaner.start();
-		try {
-			testStatsCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(1, updatedCount);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java
deleted file mode 100644
index 23fb376..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/cleaners/QueryCleanerTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Calendar;
-
-import org.junit.Test;
-
-import com.nearinfinity.AgentBaseTestClass;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-
-public class QueryCleanerTest extends AgentBaseTestClass {
-	private static CleanerDatabaseInterface database = new CleanerDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldExpireOldRunningQueries() {
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(3 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int state = jdbc.queryForInt("select state from blur_queries limit 0, 1");
-		assertEquals(1, state);
-	}
-	
-	@Test
-	public void shouldNotExpireNewlyRunningQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 0, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int state = jdbc.queryForInt("select state from blur_queries limit 0, 1");
-		assertEquals(0, state);
-	}
-	
-	@Test
-	public void shouldNotExpireExpiredRunningQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 1000);
-		// a more recent time, for testing to see if a query is updated after it is created
-		Calendar timeOfUpdate = TimeHelper.getTimeAgo(1 * 30 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries where updated_at > ?", timeOfUpdate);
-		assertEquals(0, updatedCount);
-	}
-	
-	@Test
-	public void shouldDeleteOldQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(3 * 60 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(0, updatedCount);
-	}
-	
-	@Test
-	public void shouldNotDeleteYoungQueries() {		
-		Calendar timeOfQuery = TimeHelper.getTimeAgo(1 * 60 * 60 * 1000);
-		jdbc.update("insert into blur_queries (state, updated_at, created_at) values (?,?,?)", 1, timeOfQuery, timeOfQuery);
-
-		Thread testQueryCleaner = new Thread(new QueriesCleaner(database), "Query Test Thread");
-		testQueryCleaner.start();
-		try {
-			testQueryCleaner.join();
-		} catch (InterruptedException e) {
-			fail("The test QueriesCleaner failed while waiting for it to finish!");
-		}
-
-		int updatedCount = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(1, updatedCount);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java
deleted file mode 100644
index 64e3ca5..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/collectors/blur/query/QueryCollectorTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.query;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
-import org.apache.thrift.TException;
-import org.junit.Test;
-
-import com.nearinfinity.BlurAgentBaseTestClass;
-import com.nearinfinity.agent.connections.blur.BlurDatabaseConnection;
-import com.nearinfinity.blur.MiniCluster;
-import com.nearinfinity.blur.thrift.BlurClient;
-import com.nearinfinity.blur.thrift.generated.AnalyzerDefinition;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-import com.nearinfinity.blur.thrift.generated.BlurException;
-import com.nearinfinity.blur.thrift.generated.BlurQuery;
-import com.nearinfinity.blur.thrift.generated.TableDescriptor;
-
-public class QueryCollectorTest extends BlurAgentBaseTestClass {
-	private static BlurDatabaseConnection database = new BlurDatabaseConnection(jdbc);
-
-	@Test
-	public void shouldAddQueriesToDB() throws BlurException, TException, IOException {
-		Iface blurConnection = BlurClient.getClient(MiniCluster.getControllerConnectionStr());
-
-
-		TableDescriptor td = new TableDescriptor(); 
-		td.setTableUri(MiniCluster.getFileSystemUri() + "/blur-tables/test-table");
-		td.setAnalyzerDefinition(new AnalyzerDefinition());
-		td.setName("test");
-
-		blurConnection.createTable(td);
-		
-		blurConnection.query("test.col:*", new BlurQuery());
-		
-		Thread testQueryCollector = new Thread(new QueryCollector(BlurClient.getClient(MiniCluster.getControllerConnectionStr()), "test",
-				1, database), "Query Test Thread");
-		testQueryCollector.start();
-		try {
-			testQueryCollector.join();
-		} catch (InterruptedException e) {
-			fail("The test QueryCollector failed while waiting for it to finish!");
-		}
-		int query_count = jdbc.queryForInt("select count(id) from blur_queries");
-		assertEquals(1, query_count);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java
deleted file mode 100644
index 041fbb3..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsCollectorTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.nearinfinity.agent.collectors.hdfs;
-
-import static org.junit.Assert.assertEquals;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.nearinfinity.BlurAgentBaseTestClass;
-import com.nearinfinity.agent.connections.hdfs.HdfsDatabaseConnection;
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-import com.nearinfinity.agent.exceptions.HdfsThreadException;
-import com.nearinfinity.blur.MiniCluster;
-
-public class HdfsCollectorTest extends BlurAgentBaseTestClass {
-	private static HdfsDatabaseInterface database = new HdfsDatabaseConnection(jdbc);
-	private static URI hdfsUri;
-
-	@Before
-	public void setup() throws IOException {
-		hdfsUri = MiniCluster.getFileSystemUri();
-	}
-
-	@Test
-	public void shouldCreateHdfs() throws HdfsThreadException {
-		List<String> activeCollectors = new ArrayList<String>();
-
-		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
-				activeCollectors, database), "Hdfs Test Thread");
-		testHdfsCollector.start();
-		waitForThreadToSleep(testHdfsCollector, 250);
-
-		int hdfsCount = jdbc.queryForInt("select count(id) from hdfs");
-		assertEquals(1, hdfsCount);
-	}
-
-	@Test
-	public void shouldCollectStatsWhenActive() throws HdfsThreadException {
-		List<String> activeCollectors = new ArrayList<String>();
-		activeCollectors.add("hdfs");
-
-		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
-				activeCollectors, database), "Hdfs Test Thread");
-		testHdfsCollector.start();
-		waitForThreadToSleep(testHdfsCollector, 250);
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(1, statsCount);
-	}
-
-	@Test
-	public void shouldNotCollectStatsWithoutActive() throws HdfsThreadException {
-		List<String> activeCollectors = new ArrayList<String>();
-
-		Thread testHdfsCollector = new Thread(new HdfsCollector("TestHDFS", hdfsUri.toString(), "hdfs://localhost:55314", null,
-				activeCollectors, database), "Hdfs Test Thread");
-		testHdfsCollector.start();
-		waitForThreadToSleep(testHdfsCollector, 250);
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(0, statsCount);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java
deleted file mode 100644
index 035ec17..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/collectors/hdfs/HdfsStatCollectorTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.nearinfinity.agent.collectors.hdfs;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.URI;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.nearinfinity.BlurAgentBaseTestClass;
-import com.nearinfinity.agent.connections.hdfs.HdfsDatabaseConnection;
-import com.nearinfinity.agent.connections.hdfs.interfaces.HdfsDatabaseInterface;
-import com.nearinfinity.blur.MiniCluster;
-
-public class HdfsStatCollectorTest extends BlurAgentBaseTestClass {
-	private static HdfsDatabaseInterface database = new HdfsDatabaseConnection(jdbc);
-	private static URI hdfsUri;
-
-	@Before
-	public void setup() throws IOException {
-		hdfsUri = MiniCluster.getFileSystemUri();
-	}
-
-	@Test
-	public void shouldNotInsertStatsWithoutParent() {
-		Thread testHdfsStatsCollector = new Thread(new HdfsStatsCollector("Test HDFS", hdfsUri, null, database), "HdfsStat Test Thread");
-		testHdfsStatsCollector.start();
-		try {
-			testHdfsStatsCollector.join();
-		} catch (InterruptedException e) {
-			fail("The test HdfsStatCollector failed while waiting for it to finish!");
-		}
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(0, statsCount);
-	}
-	
-	@Test
-	public void shouldInsertStats() {
-		jdbc.update("insert into hdfs (name) values (?)", "TestHdfs");
-		Thread testHdfsStatsCollector = new Thread(new HdfsStatsCollector("TestHdfs", hdfsUri, null, database), "HdfsStat Test Thread");
-		testHdfsStatsCollector.start();
-		try {
-			testHdfsStatsCollector.join();
-		} catch (InterruptedException e) {
-			fail("The test HdfsStatCollector failed while waiting for it to finish!");
-		}
-
-		int statsCount = jdbc.queryForInt("select count(id) from hdfs_stats");
-		assertEquals(1, statsCount);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java
deleted file mode 100644
index 5587942..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MailerTest.java
+++ /dev/null
@@ -1,259 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.Properties;
-
-import javax.mail.MessagingException;
-
-import org.junit.Test;
-import org.springframework.util.ReflectionUtils;
-import org.subethamail.wiser.Wiser;
-
-import com.nearinfinity.agent.notifications.Mailer;
-
-public class MailerTest {
-
-	@Test
-	public void testSingletons() {
-		// getter no props
-		Mailer mailer = new Mailer(new Properties());
-		assertFieldEquals("Send mail should be false", mailer, "sendMail", false);
-		assertFieldEquals("Recipients shouldn't have been set because sendMail is false.", mailer, "recipients", null);
-		assertFieldEquals("Sender should be null", mailer, "automatedSender", null);
-
-		// getter with props
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		mailer = new Mailer(props);
-		assertFieldEquals("Send mail should be true", mailer, "sendMail", true);
-		assertCollectionFieldEquals("There should be 2 valid recipients", mailer, "recipients", 2);
-		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
-	}
-
-	@Test
-	public void testMailerSetupInvalidAddress() {
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "test@nearinfinity com");
-		Mailer mailer = new Mailer(props);
-
-		assertCollectionFieldEquals("There should be no valid recipients", mailer, "recipients", 0);
-		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
-	}
-
-	@Test
-	public void testMailerSetupWithUniqueDomain() {
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "crohr@abc");
-		Mailer mailer = new Mailer(props);
-
-		assertCollectionFieldEquals("There should be 1 valid recipient", mailer, "recipients", 1);
-		assertFieldEquals("Sender should be crohr", mailer, "automatedSender", "crohr");
-	}
-	
-	@Test
-	public void testSendMessageMailerDisabled() {
-		Wiser server = new Wiser(2500);
-		server.start();
-		
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "false");
-		Mailer mailer = new Mailer(props);
-		mailer.sendMessage("Test Message Subject", "Test Message Body");
-		
-		server.stop();
-		assertTrue(server.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessageNoRecipients() {
-		Wiser server = new Wiser(2500);
-		server.start();
-		
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "25");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		Mailer mailer = new Mailer(props);
-		mailer.sendMessage("Test Message Subject", "Test Message Body");
-		
-		server.stop();
-		assertTrue(server.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessage() throws MessagingException {
-		Wiser server = new Wiser(2500);
-		server.start();
-		
-		Properties props = new Properties();
-		props.setProperty("mail.enabled", "true");
-		props.setProperty("mail.host", "localhost");
-		props.setProperty("mail.port", "2500");
-		props.setProperty("mail.sender.username", "crohr");
-		props.setProperty("mail.from.address", "crohr");
-		props.setProperty("mail.sender.password", "password");
-		props.setProperty("mail.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		Mailer mailer = new Mailer(props);
-		mailer.sendMessage("Test Message Subject", "Test Message Body");
-		
-		server.stop();
-		assertTrue(server.getMessages().size() == 2);
-		assertEquals("Test Message Subject", server.getMessages().get(0).getMimeMessage().getSubject());
-	}
-
-//	@Test
-//	public void testSendZookeeperNotice() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		setupActiveMailer("crohr@nearinfinity.com").notifyZookeeperOffline("ZK1");
-//
-//		server.stop();
-//
-//		assertProperMessageSent("Zookeeper", "ZK1", server);
-//	}
-//	
-//	@Test
-//	public void testSendControllersNoticeSingleNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("C1");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyControllerOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMessageSent("Controllers", "C1", server);
-//	}
-//	
-//	@Test
-//	public void testSendControllersNoticeMultiNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("C1");
-//		names.add("C2");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyControllerOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMultiMessageSent("Controllers", names, server);
-//	}
-//	
-//	@Test
-//	public void testSendShardsNoticeSingleNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("S1");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyShardOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMessageSent("Shards", "S1", server);
-//	}
-//	
-//	@Test
-//	public void testSendShardsNoticeMultiNode() throws MessagingException, IOException {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("S1");
-//		names.add("S2");
-//		
-//		setupActiveMailer("crohr@nearinfinity.com").notifyShardOffline(names);
-//
-//		server.stop();
-//
-//		assertProperMultiMessageSent("Shards", names, server);
-//	}
-//
-//	@Test
-//	public void testNoMessageSentWithNoRecipients() {
-//		Wiser server = new Wiser(2500);
-//		server.start();
-//
-//		List<String> names = new ArrayList<String>();
-//		names.add("S1");
-//		setupActiveMailer("").notifyShardOffline(names);
-//
-//		server.stop();
-//
-//		assertTrue(server.getMessages().size() == 0);
-//	}
-
-//	private Mailer setupActiveMailer(String recipients) {
-//		Properties props = new Properties();
-//		props.setProperty("mail.host", "localhost");
-//		props.setProperty("mail.port", "2500");
-//		props.setProperty("mail.sender.username", "crohr");
-//		props.setProperty("mail.sender.password", "password");
-//		props.setProperty("mail.recipients", recipients);
-//		return new Mailer(props);
-//	}
-//
-//	private void assertProperMessageSent(String type, String name, Wiser server) throws MessagingException, IOException {
-//		assertTrue(server.getMessages().size() == 1);
-//		Iterator<WiserMessage> emailIter = server.getMessages().iterator();
-//		WiserMessage email = (WiserMessage) emailIter.next();
-//		assertTrue(email.getMimeMessage().getSubject().equals("Blur Console: " + type + " [" + name + "] may have gone offline!"));
-//		assertEquals("Blur Console has received notice that " + type + " [" + name
-//				+ "] has recently gone offline, if this was expected please ignore this email.",
-//				StringUtils.trim((String) email.getMimeMessage().getContent()));
-//	}
-//	
-//	private void assertProperMultiMessageSent(String type, List<String> names, Wiser server) throws MessagingException, IOException {
-//		assertTrue(server.getMessages().size() == 1);
-//		Iterator<WiserMessage> emailIter = server.getMessages().iterator();
-//		WiserMessage email = (WiserMessage) emailIter.next();
-//		assertTrue(email.getMimeMessage().getSubject().equals("Blur Console: Multiple " + type + " may have gone offline!"));
-//		assertEquals("Blur Console has received notice that " + type + " [" + StringUtils.join(names, "','")
-//				+ "] have recently gone offline, if this was expected please ignore this email.",
-//				StringUtils.trim((String) email.getMimeMessage().getContent()));
-//	}
-
-	private void assertFieldEquals(String message, Object object, String fieldName, Object value) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, value, ReflectionUtils.getField(field, object));
-	}
-
-	@SuppressWarnings("unchecked")
-	private void assertCollectionFieldEquals(String message, Object object, String fieldName, int expectedCollectionSize) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, expectedCollectionSize, ((Collection<Object>) ReflectionUtils.getField(field, object)).size());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java
deleted file mode 100644
index 2e95e8a..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/MessengerTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.Properties;
-
-import javax.mail.MessagingException;
-
-import org.junit.Test;
-import org.springframework.util.ReflectionUtils;
-
-public class MessengerTest {
-
-	@Test
-	public void testSingletons() {
-		// getter no props
-		Messenger mailer = new Messenger(new Properties());
-		assertFieldEquals("Send message should be false", mailer, "sendMessage", false);
-		assertFieldEquals("Recipients shouldn't have been set because sendMessage is false.", mailer, "recipients", null);
-
-		// getter with props
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "true");
-		props.setProperty("messenger.host", "localhost");
-		props.setProperty("messenger.port", "25");
-		props.setProperty("messenger.user", "crohr");
-		props.setProperty("messenger.password", "password");
-		props.setProperty("messenger.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		mailer = new Messenger(props);
-		assertFieldEquals("Send messenger should be true", mailer, "sendMessage", true);
-		assertCollectionFieldEquals("There should be 2 valid recipients", mailer, "recipients", 2);
-	}
-
-	
-	@Test
-	public void testSendMessageMessengerDisabled() {
-		XMPPEmbeddedServer.startServer(2500);
-		
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "false");
-		Messenger mailer = new Messenger(props);
-		mailer.sendMessage("Test Message");
-		
-		XMPPEmbeddedServer.stopServer();
-		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessageNoRecipients() {
-		XMPPEmbeddedServer.startServer(2500);
-		
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "true");
-		props.setProperty("messenger.host", "localhost");
-		props.setProperty("messenger.port", "2500");
-		props.setProperty("messenger.user", "crohr");
-		props.setProperty("messenger.password", "password");
-		Messenger mailer = new Messenger(props);
-		mailer.sendMessage("Test Message");
-		
-		XMPPEmbeddedServer.stopServer();
-		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
-	}
-	
-	@Test
-	public void testSendMessage() throws MessagingException {
-		XMPPEmbeddedServer.startServer(2500);
-		
-		Properties props = new Properties();
-		props.setProperty("messenger.enabled", "true");
-		props.setProperty("messenger.host", "localhost");
-		props.setProperty("messenger.port", "2500");
-		props.setProperty("messenger.user", "crohr");
-		props.setProperty("messenger.password", "password");
-		props.setProperty("messenger.recipients", "crohr@nearinfinity.com|bmarcur@nearinfinity.com");
-		Messenger mailer = new Messenger(props);
-		mailer.sendMessage("Test Message");
-		
-		XMPPEmbeddedServer.stopServer();
-		assertTrue(XMPPEmbeddedServer.getMessages().size() == 0);
-		//assertEquals("Test Message", XMPPEmbeddedServer.getMessages().get(0));
-	}
-	
-	private void assertFieldEquals(String message, Object object, String fieldName, Object value) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, value, ReflectionUtils.getField(field, object));
-	}
-
-	@SuppressWarnings("unchecked")
-	private void assertCollectionFieldEquals(String message, Object object, String fieldName, int expectedCollectionSize) {
-		Field field = ReflectionUtils.findField(object.getClass(), fieldName);
-		ReflectionUtils.makeAccessible(field);
-		assertEquals(message, expectedCollectionSize, ((Collection<Object>) ReflectionUtils.getField(field, object)).size());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java b/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java
deleted file mode 100644
index ca4b161..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/NotifierTest.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-public class NotifierTest {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java b/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java
deleted file mode 100644
index ebe728b..0000000
--- a/blur-agent/src/test/java/com/nearinfinity/agent/notifications/XMPPEmbeddedServer.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.nearinfinity.agent.notifications;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class XMPPEmbeddedServer implements Runnable {
-	private static final Log log = LogFactory.getLog(XMPPEmbeddedServer.class);
-	private static Thread serverThread;
-	private static XMPPEmbeddedServer server;
-	private ServerSocket socket;
-	
-	public static void startServer(int port) {
-		server = new XMPPEmbeddedServer(port);
-		serverThread = new Thread(server);
-		serverThread.start();
-	}
-	
-	public static void stopServer() {
-		server.closeServer();
-		serverThread.interrupt();
-	}
-	
-	public static List<Object> getMessages() {
-		return new ArrayList<Object>();
-	}
-	
-	private XMPPEmbeddedServer(int port) {
-		try {
-			log.info("Starting IM Server *:" + port);
-			socket = new ServerSocket(port);
-			log.info("IM Server started *:" + port);
-		} catch (IOException e) {
-			log.error("Error creating IM server:" + e.getMessage());
-			stopServer();
-		}
-	}
-
-	@Override
-	public void run() {
-		if (socket == null) {
-			log.info("IM Server has not been configured.");
-		} else {
-			while(true) {
-				if (socket != null) {
-					try {
-						Socket accept = socket.accept();
-						System.out.println("got a connection");
-						
-						PrintWriter out = new PrintWriter(accept.getOutputStream(), true);
-						out.println("<stream id='xxxx' from='192.168.0.12:5222' xmlns='jabber:client'/>");
-						
-						BufferedReader in = new BufferedReader(new InputStreamReader(accept.getInputStream()));
-						
-						String inputLine;
-						while ((inputLine = in.readLine()) != null) { 
-							System.out.println(inputLine);
-						}
-						
-//						out = new PrintWriter(accept.getOutputStream(), true);
-//						out.println("<iq type='result' id='reg2'/>");
-						
-						
-						
-					} catch (IOException e) {
-//						e.printStackTrace();
-					}
-				}
-			}
-		}
-	}
-	
-	public void closeServer() {
-		if (socket != null) {
-			try {
-				log.info("Shutting down IM server");
-				socket.close();
-				log.info("IM server has been shut down");
-			} catch (IOException e) {
-				log.error("There was a problem trying to close IM server: " + e.getMessage());
-			}
-			socket = null;
-		}
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/resources/invalid_matching.lic
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/resources/invalid_matching.lic b/blur-agent/src/test/resources/invalid_matching.lic
deleted file mode 100644
index bea4ca7..0000000
--- a/blur-agent/src/test/resources/invalid_matching.lic
+++ /dev/null
@@ -1,22 +0,0 @@
-=== BEGIN LICENSE ===
-NIC-Testing-Bad
--1
-YEARLY
-2012-09-11
-2013-09-11
-Blur Tools
-qhGyWf2cmNK4L4pT5hSyi3YxLx/4Olu27nas9DGeoPfsHzx47v
-PeohZ19ho1Oket4YPM9N8bmX7el2r1dLhFxn8xDdASSn6AO2LE
-jYwf57U1GYjLtmRTHMPdw/Y1hZGafHMc9QVk8pc+lTg1eA2aAv
-7sCrc4B+z/HocmeDCRKJOsCSQuXwFW3LtufE2JlCF4i1xTIc3N
-+hn1mdjqpsqEkQfEaeRzjz6l8a5gfxp1h4ny/MZdyAPnrorIJf
-DdLsc9mdKz3Mf82I5h2jZwCQBmSpQbHM1IZEBpEm2B4EA18lpP
-BOO3hzmolbkeHOMWqGjtXvlKMDmh0ZOdhl1esQKyar0esoZn5j
-6lF6nZZOJuugbICQ82vSoOcnhHqJaxgu/GM6ntfctfPcsl9IUe
-FhKi4b3dkkjeodEHmR1tqdoLfEFEp73T8MJReBBu31J+vAeqMW
-OZ427ETuLDN7KiKsbQcRQnnioHsA7Ah7VtBO++loVDEAhmBbyj
-IuyTJmd+dMMLXT6U2M60bsvRfqFqTbd358XZjB9SumrhGFlAKA
-0cCI6UcYyyKgQ+PwPGoCxM+1OjcQ/2nWock0qmWsYBBro0CrPJ
-SPk8QKAkh1V8xBFrUZ8RaosjnE2Z9mzl2a+qugb40Y1+r6h1uX
-U9/GP9buxArj/dkvgHm4m6bV0vtkOgOaw=
-=== END LICENSE ===
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/resources/invalid_type.lic
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/resources/invalid_type.lic b/blur-agent/src/test/resources/invalid_type.lic
deleted file mode 100644
index 10a9906..0000000
--- a/blur-agent/src/test/resources/invalid_type.lic
+++ /dev/null
@@ -1,22 +0,0 @@
-=== BEGIN LICENSE ===
-NIC-Testing
--1
-UNKNOWN
-2012-09-11
-2013-09-11
-Blur Tools
-qhGyWf2cmNK4L4pT5hSyi3YxLx/4Olu27nas9DGeoPfsHzx47v
-PeohZ19ho1Oket4YPM9N8bmX7el2r1dLhFxn8xDdASSn6AO2LE
-jYwf57U1GYjLtmRTHMPdw/Y1hZGafHMc9QVk8pc+lTg1eA2aAv
-7sCrc4B+z/HocmeDCRKJOsCSQuXwFW3LtufE2JlCF4i1xTIc3N
-+hn1mdjqpsqEkQfEaeRzjz6l8a5gfxp1h4ny/MZdyAPnrorIJf
-DdLsc9mdKz3Mf82I5h2jZwCQBmSpQbHM1IZEBpEm2B4EA18lpP
-BOO3hzmolbkeHOMWqGjtXvlKMDmh0ZOdhl1esQKyar0esoZn5j
-6lF6nZZOJuugbICQ82vSoOcnhHqJaxgu/GM6ntfctfPcsl9IUe
-FhKi4b3dkkjeodEHmR1tqdoLfEFEp73T8MJReBBu31J+vAeqMW
-OZ427ETuLDN7KiKsbQcRQnnioHsA7Ah7VtBO++loVDEAhmBbyj
-IuyTJmd+dMMLXT6U2M60bsvRfqFqTbd358XZjB9SumrhGFlAKA
-0cCI6UcYyyKgQ+PwPGoCxM+1OjcQ/2nWock0qmWsYBBro0CrPJ
-SPk8QKAkh1V8xBFrUZ8RaosjnE2Z9mzl2a+qugb40Y1+r6h1uX
-U9/GP9buxArj/dkvgHm4m6bV0vtkOgOaw=
-=== END LICENSE ===
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/test/resources/valid_yearly.lic
----------------------------------------------------------------------
diff --git a/blur-agent/src/test/resources/valid_yearly.lic b/blur-agent/src/test/resources/valid_yearly.lic
deleted file mode 100644
index 95ec73c..0000000
--- a/blur-agent/src/test/resources/valid_yearly.lic
+++ /dev/null
@@ -1,22 +0,0 @@
-=== BEGIN LICENSE ===
-NIC-Testing
--1
-YEARLY
-2012-09-11
-2013-09-11
-Blur Tools
-qhGyWf2cmNK4L4pT5hSyi3YxLx/4Olu27nas9DGeoPfsHzx47v
-PeohZ19ho1Oket4YPM9N8bmX7el2r1dLhFxn8xDdASSn6AO2LE
-jYwf57U1GYjLtmRTHMPdw/Y1hZGafHMc9QVk8pc+lTg1eA2aAv
-7sCrc4B+z/HocmeDCRKJOsCSQuXwFW3LtufE2JlCF4i1xTIc3N
-+hn1mdjqpsqEkQfEaeRzjz6l8a5gfxp1h4ny/MZdyAPnrorIJf
-DdLsc9mdKz3Mf82I5h2jZwCQBmSpQbHM1IZEBpEm2B4EA18lpP
-BOO3hzmolbkeHOMWqGjtXvlKMDmh0ZOdhl1esQKyar0esoZn5j
-6lF6nZZOJuugbICQ82vSoOcnhHqJaxgu/GM6ntfctfPcsl9IUe
-FhKi4b3dkkjeodEHmR1tqdoLfEFEp73T8MJReBBu31J+vAeqMW
-OZ427ETuLDN7KiKsbQcRQnnioHsA7Ah7VtBO++loVDEAhmBbyj
-IuyTJmd+dMMLXT6U2M60bsvRfqFqTbd358XZjB9SumrhGFlAKA
-0cCI6UcYyyKgQ+PwPGoCxM+1OjcQ/2nWock0qmWsYBBro0CrPJ
-SPk8QKAkh1V8xBFrUZ8RaosjnE2Z9mzl2a+qugb40Y1+r6h1uX
-U9/GP9buxArj/dkvgHm4m6bV0vtkOgOaw=
-=== END LICENSE ===
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
deleted file mode 100755
index 4aab53e..0000000
--- a/build.sh
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/bin/bash
-
-version=$1
-
-# Setup build directory
-if [ ! -e "build" ]; then
-  echo "Creating build directory"
-  mkdir "build"
-fi
-
-# Clean build directory
-echo "Cleaning build directory"
-rm -r build/*
-
-##########################
-# Prep Rails app         #
-##########################
-echo "Assembling Rails app"
-cd blur-admin
-bundle install
-
-echo "Compiling assets"
-bundle exec rake RAILS_ENV=production js:routes
-bundle exec rake RAILS_ENV=production assets:clean
-bundle exec rake RAILS_ENV=production assets:precompile
-
-cd ../build
-GUI_DIR=gui
-mkdir $GUI_DIR
-
-echo "Copying Rails files"
-cp ../blur-admin/Rakefile ../blur-admin/config.ru $GUI_DIR
-
-echo "Copying app"
-cp -r ../blur-admin/app $GUI_DIR
-
-echo "Copying config"
-cp -r ../blur-admin/config $GUI_DIR
-rm $GUI_DIR/config/environments/development.rb
-rm $GUI_DIR/config/environments/test.rb
-
-echo "Copying db"
-cp -r ../blur-admin/db $GUI_DIR
-
-echo "Copying lib"
-cp -r ../blur-admin/lib $GUI_DIR
-rm -r $GUI_DIR/lib/pounder
-rm -r $GUI_DIR/lib/tasks/*.rake
-
-echo "Copying public"
-cp -r ../blur-admin/public $GUI_DIR
-
-echo "Copying script"
-cp -r ../blur-admin/script $GUI_DIR
-
-mkdir $GUI_DIR/tmp
-touch $GUI_DIR/tmp/placeholder.txt
-
-echo "Copying vendor"
-cp -r ../blur-admin/vendor $GUI_DIR
-
-echo "Copy production files"
-cp ../etc/default/Gemfile $GUI_DIR/
-cp ../etc/default/database.yml $GUI_DIR/config/
-
-echo "Vendor gems"
-cd $GUI_DIR
-bundle install
-bundle package
-
-find . -name .DS_Store | xargs rm
-
-echo "Compressing and zipping rails dir"
-cd ..
-mv $GUI_DIR "$GUI_DIR-$version"
-tar -cvzf "$GUI_DIR-$version.tar.gz" "$GUI_DIR-$version"
-
-#################################
-# Prep Agent                    #
-#################################
-
-echo "Build agent jar"
-cd ../blur-agent
-mvn clean package -DskipTests
-cd ../build
-
-mkdir agent
-
-echo "Create bin dir"
-mkdir agent/bin
-cp ../etc/*.sh agent/bin
-chmod 775 agent/bin/*.sh
-
-echo "Create conf dir"
-mkdir agent/conf
-cp ../etc/agent.config.sample agent/conf
-cp ../etc/log4j.properties agent/conf 
-
-echo "Create lib dir"
-mkdir agent/lib
-cp ../blur-agent/target/blur-agent-*.jar agent/lib/agent.jar
-cp ../blur-agent/target/lib/*.jar agent/lib
-rm agent/lib/ant*.jar
-rm agent/lib/commons-cli*.jar
-rm agent/lib/commons-el*.jar
-rm agent/lib/commons-httpclient*.jar
-rm agent/lib/commons-net*.jar
-rm agent/lib/core*.jar
-rm agent/lib/hamcrest*.jar
-rm agent/lib/hsqldb*.jar
-rm agent/lib/jasper*.jar
-rm agent/lib/jets3t*.jar
-rm agent/lib/jetty*.jar
-rm agent/lib/jsp-api*.jar
-rm agent/lib/junit*.jar
-rm agent/lib/mysql-connector-java*.jar
-rm agent/lib/oro*.jar
-rm agent/lib/servlet-api*.jar
-rm agent/lib/xmlenc*.jar
-
-echo "Compressing and zipping agent dir"
-mv agent "agent-$version"
-tar -cvzf "agent-$version.tar.gz" "agent-$version"
-
-#################################
-# Final packaging               #
-#################################
-
-cp ../etc/INSTALL .
-cp ../etc/install.sh .
-cp ../etc/VERSION .
-tar -cvzf "blur-tools-$version.tar.gz" "$GUI_DIR-$version.tar.gz" "agent-$version.tar.gz" INSTALL VERSION
-
-echo "Build complete"

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/INSTALL
----------------------------------------------------------------------
diff --git a/etc/INSTALL b/etc/INSTALL
deleted file mode 100644
index baee13d..0000000
--- a/etc/INSTALL
+++ /dev/null
@@ -1,52 +0,0 @@
-This document is intended to aid in the installation of the Blur Console
-application pieces.  Please contact support@nearinfinity.com if you have
-any problems installing the tool.
-
-System Requirements
-========================================================================
-Required:
-	* Ruby 1.9.3+ (with bundler gem)
-	* Java 6+
-	* Mysql 5.5+
-	* mysql jdbc connector (http://www.mysql.com/products/connector/)
-
-Recommended:
-	* Apache webserver
-	* Phusion Passenger
-	
-Installing the Rails application
-========================================================================
-1. Extract the blur-console-version.tar.gz
-2. Copy the rails directory into the appropriate folder for your webserver
-3. Change your directory to the rails directory
-		cd rails
-4. Create a tmp and log directory
-5. Install the dependent libraries
-		bundle install --local
-6. Update configuration files for your environment
-		a. Setup your mysql connection information in config/database.yml
-7. If this is a new install create the database
-		bundle exec rake RAILS_ENV=production db:create
-8. Update the database with any changes
-		bundle exec rake RAILS_ENV=production db:migrate
-9. Load any initial data
-		bundle exec rake RAILS_ENV=production db:seed
-10. Configure your webserver to point to the rails directory according to 
-   the server documentation
-11. Open your browser to the url you specified in your server configuration
-	 (i.e. https://mydomain.com/)
-
-Note: Currently the initial data that is loaded is a default admin user.  The
-username is admin and the password is password.  This should be changed immediately.
-
-Installing the Agent application
-===============================================================================
-1. Extract the agent-version.tar.gz
-2. Copy the agent directory to the location you want it to reside.
-3. Place the mysql jdbc connector jar into the agent/lib folder.
-4. Create log directory
-5. Update configuration files for your environment
-		a. Copy agent/conf/agent.config.sample to agent/conf/blur-agent.config
-		b. Update agent/conf/blur-agent.config to specify the information about your install and cluster(s).
-6. Start the agent by running agent/bin/start-agent.sh
-		To stop the agent run agent/bin/stop-agent.sh

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/VERSION
----------------------------------------------------------------------
diff --git a/etc/VERSION b/etc/VERSION
deleted file mode 100644
index c9929e3..0000000
--- a/etc/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.4.2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/agent.config.sample
----------------------------------------------------------------------
diff --git a/etc/agent.config.sample b/etc/agent.config.sample
deleted file mode 100644
index ca9983d..0000000
--- a/etc/agent.config.sample
+++ /dev/null
@@ -1,45 +0,0 @@
-# Mysql connection information
-#store.url=
-#store.user=
-#store.password=
-
-# ZooKeeper Instances (instances separated by | )
-#zk.instances=some-zk
-
-#zk.some-zk.url=
-
-# Active Collectors
-active.collectors=hdfs|queries|tables
-
-# HDFS Collector properties (instances separated by | )
-#hdfs.instances=some-hdfs
-
-#hdfs.some-hdfs.thrift.url=
-#hdfs.some-hdfs.url=
-#hdfs.some-hdfs.login.user=SOMEUSER (optional)
-
-# Blur properties (instances separated by | )
-#blur.instances=some-blur
-
-#blur.some-blur.url=
-
-# Email Properties
-# mail.enabled=true
-# mail.host=smtp.DOMAIN.com
-# mail.port=1337
-
-# mail.sender.username=SENDER@gmail.com
-# mail.sender.password=PASSWORD
-
-# mail.from.address=DoNotReply
-# mail.recipients=ADMINS@gmail.com|OTHERADMINS@gmail.com
-
-# IM Properties
-# messenger.enabled=true
-# messenger.host=google.com
-# messenger.port=5222
-
-# messenger.user=SENDER@gmail.com
-# messenger.password=password
-
-# messenger.recipients=ADMINS@gmail.com|OTHERADMINS@gmail.com

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/agent.sh
----------------------------------------------------------------------
diff --git a/etc/agent.sh b/etc/agent.sh
deleted file mode 100644
index 591b3d7..0000000
--- a/etc/agent.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-bin=`dirname $0`
-bin=`cd "$bin"; pwd`
-
-export BLUR_AGENT_HOME="$bin"/..
-export BLUR_AGENT_HOME_LIB=$BLUR_AGENT_HOME/lib
-
-for f in $BLUR_AGENT_HOME_LIB/*.jar; do
-  BLUR_AGENT_CLASSPATH="$BLUR_AGENT_CLASSPATH:$f"
-done
-
-cd $BLUR_AGENT_HOME/bin
-
-$JAVA_HOME/bin/java -cp $BLUR_AGENT_CLASSPATH com.nearinfinity.agent.Agent $1

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/default/Gemfile
----------------------------------------------------------------------
diff --git a/etc/default/Gemfile b/etc/default/Gemfile
deleted file mode 100644
index 9edaae8..0000000
--- a/etc/default/Gemfile
+++ /dev/null
@@ -1,22 +0,0 @@
-source 'https://rubygems.org'
-
-gem 'rails', '3.2.2'
-
-gem 'mysql2'
-gem 'jquery-rails'
-gem 'thrift_client'
-gem 'authlogic'
-gem 'cancan', '2.0.0.alpha', :path => 'vendor/gems/cancan'
-gem 'twitter_bootstrap_form_for'
-gem 'bootstrap-sass'
-gem 'js-routes'
-gem 'haml-rails'
-gem 'sass-rails',   '~> 3.2.3'
-gem 'ejs'
-
-# Gems used only for assets and not required
-# in production environments by default.
-group :assets do
-  gem 'coffee-rails', '~> 3.2.1'
-  gem 'uglifier', '>= 1.0.3'
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/default/database.yml
----------------------------------------------------------------------
diff --git a/etc/default/database.yml b/etc/default/database.yml
deleted file mode 100644
index b9e6cee..0000000
--- a/etc/default/database.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-production:
-  adapter: mysql2
-  encoding: utf8
-  database: blurtools
-  host: localhost
-  pool: 5
-  username: root
-  password: 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/log4j.properties
----------------------------------------------------------------------
diff --git a/etc/log4j.properties b/etc/log4j.properties
deleted file mode 100644
index a19a0ab..0000000
--- a/etc/log4j.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# Root logger option
-log4j.rootLogger=WARN, file
-# Direct log messages to a log file
-log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.file.File=../log/agent.log
-log4j.appender.file.DatePattern='.'yyyy-MM-dd
-log4j.appender.file.layout=org.apache.log4j.PatternLayout
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/start-agent.sh
----------------------------------------------------------------------
diff --git a/etc/start-agent.sh b/etc/start-agent.sh
deleted file mode 100644
index d9d4e71..0000000
--- a/etc/start-agent.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-nohup $bin/agent.sh $1 &

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/etc/stop-agent.sh
----------------------------------------------------------------------
diff --git a/etc/stop-agent.sh b/etc/stop-agent.sh
deleted file mode 100644
index 0787b12..0000000
--- a/etc/stop-agent.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-kill `cat $bin/../agent.pid`

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/README
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/README b/src/contrib/blur-console/README
new file mode 100644
index 0000000..cbf515b
--- /dev/null
+++ b/src/contrib/blur-console/README
@@ -0,0 +1,8 @@
+The following tools are included in this repository:
+
+Console:
+    rails application
+        - The admin rails application for administering a Blur instance
+
+    agent
+        - Java agent that collects various information for the admin console

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/.gitignore
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/.gitignore b/src/contrib/blur-console/blur-admin/.gitignore
new file mode 100644
index 0000000..a1c95d0
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/.gitignore
@@ -0,0 +1,23 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+#   git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
+
+# Ignore compiled assets
+/public/assets/*
+/app/assets/javascripts/routes.js
+.sass-cache
+
+#ignore rubymine
+/.idea

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/Capfile
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/Capfile b/src/contrib/blur-console/blur-admin/Capfile
new file mode 100644
index 0000000..39258ef
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/Capfile
@@ -0,0 +1,33 @@
+require 'capistrano/recipes/deploy/strategy/remote_cache'
+
+class RemoteCacheSubdir < Capistrano::Deploy::Strategy::RemoteCache
+
+  private
+
+  def repository_cache_subdir
+    if configuration[:deploy_subdir] then
+      File.join(repository_cache, configuration[:deploy_subdir])
+    else
+      repository_cache
+    end
+  end
+
+  def copy_repository_cache
+    logger.trace "copying the cached version to #{configuration[:release_path]}"
+    if copy_exclude.empty? 
+      run "cp -RPp #{repository_cache_subdir} #{configuration[:release_path]} && #{mark}"
+    else
+      exclusions = copy_exclude.map { |e| "--exclude=\"#{e}\"" }.join(' ')
+      run "rsync -lrpt #{exclusions} #{repository_cache_subdir}/* #{configuration[:release_path]} && #{mark}"
+    end
+  end
+
+end
+
+
+set :strategy, RemoteCacheSubdir.new(self)
+
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+
+load 'config/deploy' # remove this line to skip loading any of the default tasks
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/Gemfile
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/Gemfile b/src/contrib/blur-console/blur-admin/Gemfile
new file mode 100644
index 0000000..c9c4f16
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/Gemfile
@@ -0,0 +1,39 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.2'
+
+gem 'mysql2'
+gem 'jquery-rails'
+gem 'thrift_client'
+gem 'authlogic'
+gem 'cancan', '2.0.0.alpha', :path => 'vendor/gems/cancan'
+gem 'twitter_bootstrap_form_for'
+gem 'bootstrap-sass'
+gem 'js-routes'
+gem 'haml-rails'
+gem 'sass-rails',   '~> 3.2.3'
+gem 'ejs'
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+  gem 'coffee-rails', '~> 3.2.1'
+  gem 'uglifier', '>= 1.0.3'
+end
+
+group :development, :test do
+  gem 'rspec-rails'
+  gem 'capybara'
+  gem 'capybara-webkit'
+  gem 'ci_reporter'
+  gem 'rails-erd'
+  gem 'factory_girl_rails'
+  gem 'launchy'
+  gem 'thin'
+  gem 'debugger'
+end
+
+group :test do
+  gem 'simplecov', :require => false
+end
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/Gemfile.lock
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/Gemfile.lock b/src/contrib/blur-console/blur-admin/Gemfile.lock
new file mode 100644
index 0000000..83e00ae
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/Gemfile.lock
@@ -0,0 +1,222 @@
+PATH
+  remote: vendor/gems/cancan
+  specs:
+    cancan (2.0.0.alpha)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    actionmailer (3.2.2)
+      actionpack (= 3.2.2)
+      mail (~> 2.4.0)
+    actionpack (3.2.2)
+      activemodel (= 3.2.2)
+      activesupport (= 3.2.2)
+      builder (~> 3.0.0)
+      erubis (~> 2.7.0)
+      journey (~> 1.0.1)
+      rack (~> 1.4.0)
+      rack-cache (~> 1.1)
+      rack-test (~> 0.6.1)
+      sprockets (~> 2.1.2)
+    activemodel (3.2.2)
+      activesupport (= 3.2.2)
+      builder (~> 3.0.0)
+    activerecord (3.2.2)
+      activemodel (= 3.2.2)
+      activesupport (= 3.2.2)
+      arel (~> 3.0.2)
+      tzinfo (~> 0.3.29)
+    activeresource (3.2.2)
+      activemodel (= 3.2.2)
+      activesupport (= 3.2.2)
+    activesupport (3.2.2)
+      i18n (~> 0.6)
+      multi_json (~> 1.0)
+    addressable (2.2.7)
+    arel (3.0.2)
+    authlogic (3.1.0)
+      activerecord (>= 3.0.7)
+      activerecord (>= 3.0.7)
+    bootstrap-sass (2.0.1)
+    builder (3.0.0)
+    capybara (1.1.2)
+      mime-types (>= 1.16)
+      nokogiri (>= 1.3.3)
+      rack (>= 1.0.0)
+      rack-test (>= 0.5.4)
+      selenium-webdriver (~> 2.0)
+      xpath (~> 0.1.4)
+    capybara-webkit (0.12.1)
+      capybara (>= 1.0.0, < 1.2)
+      json
+    childprocess (0.3.1)
+      ffi (~> 1.0.6)
+    ci_reporter (1.7.0)
+      builder (>= 2.1.2)
+    coffee-rails (3.2.2)
+      coffee-script (>= 2.2.0)
+      railties (~> 3.2.0)
+    coffee-script (2.2.0)
+      coffee-script-source
+      execjs
+    coffee-script-source (1.2.0)
+    columnize (0.3.6)
+    daemons (1.1.9)
+    debugger (1.2.0)
+      columnize (>= 0.3.1)
+      debugger-linecache (~> 1.1.1)
+      debugger-ruby_core_source (~> 1.1.3)
+    debugger-linecache (1.1.2)
+      debugger-ruby_core_source (>= 1.1.1)
+    debugger-ruby_core_source (1.1.3)
+    diff-lcs (1.1.3)
+    ejs (1.0.0)
+    erubis (2.7.0)
+    eventmachine (0.12.10)
+    execjs (1.3.0)
+      multi_json (~> 1.0)
+    factory_girl (2.6.0)
+      activesupport (>= 2.3.9)
+    factory_girl_rails (1.7.0)
+      factory_girl (~> 2.6.0)
+      railties (>= 3.0.0)
+    ffi (1.0.11)
+    haml (3.1.4)
+    haml-rails (0.3.4)
+      actionpack (~> 3.0)
+      activesupport (~> 3.0)
+      haml (~> 3.0)
+      railties (~> 3.0)
+    hike (1.2.1)
+    i18n (0.6.0)
+    journey (1.0.3)
+    jquery-rails (2.0.1)
+      railties (>= 3.2.0, < 5.0)
+      thor (~> 0.14)
+    js-routes (0.7.5)
+      rails (>= 3.0)
+    json (1.6.5)
+    launchy (2.0.5)
+      addressable (~> 2.2.6)
+    mail (2.4.1)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.17.2)
+    multi_json (1.3.6)
+    mysql2 (0.3.11)
+    nokogiri (1.5.0)
+    polyglot (0.3.3)
+    rack (1.4.1)
+    rack-cache (1.1)
+      rack (>= 0.4)
+    rack-ssl (1.3.2)
+      rack
+    rack-test (0.6.1)
+      rack (>= 1.0)
+    rails (3.2.2)
+      actionmailer (= 3.2.2)
+      actionpack (= 3.2.2)
+      activerecord (= 3.2.2)
+      activeresource (= 3.2.2)
+      activesupport (= 3.2.2)
+      bundler (~> 1.0)
+      railties (= 3.2.2)
+    rails-erd (0.4.5)
+      activerecord (~> 3.0)
+      activesupport (~> 3.0)
+      ruby-graphviz (~> 0.9.18)
+    railties (3.2.2)
+      actionpack (= 3.2.2)
+      activesupport (= 3.2.2)
+      rack-ssl (~> 1.3.2)
+      rake (>= 0.8.7)
+      rdoc (~> 3.4)
+      thor (~> 0.14.6)
+    rake (0.9.2.2)
+    rdoc (3.12)
+      json (~> 1.4)
+    rspec (2.8.0)
+      rspec-core (~> 2.8.0)
+      rspec-expectations (~> 2.8.0)
+      rspec-mocks (~> 2.8.0)
+    rspec-core (2.8.0)
+    rspec-expectations (2.8.0)
+      diff-lcs (~> 1.1.2)
+    rspec-mocks (2.8.0)
+    rspec-rails (2.8.1)
+      actionpack (>= 3.0)
+      activesupport (>= 3.0)
+      railties (>= 3.0)
+      rspec (~> 2.8.0)
+    ruby-graphviz (0.9.21)
+    rubyzip (0.9.6.1)
+    sass (3.1.15)
+    sass-rails (3.2.4)
+      railties (~> 3.2.0)
+      sass (>= 3.1.10)
+      tilt (~> 1.3)
+    selenium-webdriver (2.20.0)
+      childprocess (>= 0.2.5)
+      ffi (~> 1.0)
+      multi_json (~> 1.0)
+      rubyzip
+    simplecov (0.6.4)
+      multi_json (~> 1.0)
+      simplecov-html (~> 0.5.3)
+    simplecov-html (0.5.3)
+    sprockets (2.1.2)
+      hike (~> 1.2)
+      rack (~> 1.0)
+      tilt (~> 1.1, != 1.3.0)
+    thin (1.4.1)
+      daemons (>= 1.0.9)
+      eventmachine (>= 0.12.6)
+      rack (>= 1.0.0)
+    thor (0.14.6)
+    thrift (0.8.0)
+    thrift_client (0.8.1)
+      thrift (~> 0.8.0)
+    tilt (1.3.3)
+    treetop (1.4.10)
+      polyglot
+      polyglot (>= 0.3.1)
+    twitter_bootstrap_form_for (1.0.5)
+      actionpack (~> 3)
+      railties (~> 3)
+    tzinfo (0.3.31)
+    uglifier (1.2.3)
+      execjs (>= 0.3.0)
+      multi_json (>= 1.0.2)
+    xpath (0.1.4)
+      nokogiri (~> 1.3)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  authlogic
+  bootstrap-sass
+  cancan (= 2.0.0.alpha)!
+  capybara
+  capybara-webkit
+  ci_reporter
+  coffee-rails (~> 3.2.1)
+  debugger
+  ejs
+  factory_girl_rails
+  haml-rails
+  jquery-rails
+  js-routes
+  launchy
+  mysql2
+  rails (= 3.2.2)
+  rails-erd
+  rspec-rails
+  sass-rails (~> 3.2.3)
+  simplecov
+  thin
+  thrift_client
+  twitter_bootstrap_form_for
+  uglifier (>= 1.0.3)

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/Rakefile
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/Rakefile b/src/contrib/blur-console/blur-admin/Rakefile
new file mode 100644
index 0000000..8427d1e
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/Rakefile
@@ -0,0 +1,21 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+module ::BlurAdmin
+  class Application
+    include Rake::DSL
+  end
+end
+
+module ::RakeFileUtils
+  extend Rake::FileUtilsExt
+end
+
+if Rails.env == 'development' or Rails.env == 'test'
+  require 'ci/reporter/rake/rspec'
+end
+
+BlurAdmin::Application.load_tasks

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/Regression.md
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/Regression.md b/src/contrib/blur-console/blur-admin/Regression.md
new file mode 100644
index 0000000..d53e8d5
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/Regression.md
@@ -0,0 +1,90 @@
+# Regression Testing
+## Steps needed to manually regression test BlurConsole:
+
+### Dashboard
+  1. Click on a zookeeper, this should take you to that zookeepers environment page and set it as the current zookeeper.
+  2. Click on an hdfs, this should take you to the hdfs page and open up the root of the selected hdfs instance.
+  3. Change the state of a few of the shards and controllers, make sure that the zookeeper widgets update properly. This includes the icon states and the number of online and offline shards/controllers.
+  4. Change the state of the hdfs, make sure that the hdfs widgets update properly.
+  5. Start a new session, and click on the Environment header link, this should prompt a popup asking for a Zookeeper to set as the current.
+
+  Last Completed: 1/7/2013
+
+### Environment Page
+  1. Ensure that the values in the tables track the state of the nodes (similar to the Dashboard page). Change values and ensure that the values in the tables update.
+  2. Change the zookeeper status and ensure that the header changes color and text properly.
+  3. Set the zookeeper, controller's, and shard's status to offline. While offline they should have an 'x' icon that will 'forget' the nodes. Ensure that this is true and that by clicking each one the item is removed.
+
+  Last Completed: 1/7/2013
+
+### Blur Tables Page
+  1. Enable, disable, and delete tables. Ensure that the tables move into their intermediary states and then eventually reach their end state.
+    * Try this with tables that have been queried recently
+    * Try this with the check all and multi-check functionality
+  2. View the hosts and shards, ensure that the values are accurate.
+  3. Click on the view column and ensure that the table metadata is consistent.
+    * Also while inside this popup test that the terms search ability still works.
+  4. Comment on a table and ensure that the comment is preserved during table state changes.
+
+
+### Blur Queries Page
+  1. Run, or create, a few queries and ensure that they appear in the queries table.
+  2. Set the "Queries in the last" option to the different values and ensure that they are being hidden / shown properly.
+  3. Set the "Quick filter" to the different values and ensure that the queries are being properly filtered.
+  4. Set the "Auto Refresh" to the different values and ensure that the server is being queried at the new interval.
+  5. Test a few different filters in the "Filter Queries" box, be sure to test the hidden column state.
+  6. Test that the columns sort properly when sorting by each header.
+
+  Last Completed: 1/7/2013
+
+### Search Page
+  1. Run a query and ensure that it is returning results.
+  2. Change the table and test to see that it changes the filters in the advanced tab.
+  3. Advanced Tab
+    * Test that the column and column family filters work properly.
+    * Test that the search on and return functions limit each other and request / return the proper values.
+    * Test that start and fetch alter the returned results.
+    * Test the pre and post filters.
+  4. Saved Tab
+    * Test creating a new saved search
+    * Test loading a saved search
+    * Test updating a saved search
+    * Test deleting a saved search
+
+  Last Completed: 1/7/2013
+
+### Hdfs Page
+  1. Traverse the file system looking at top level hdfs instances, folders, and files.
+  2. Right click at each level to see the changes in the options.
+  3. Test each of the menu options at each level.
+  4. Test that the radial graph works and can be navigated.
+
+  Last Completed: 1/7/2013
+
+### Hdfs Metrics Page
+  1. Hover over the data points and check that the labels are displaying the proper values.
+  2. Change the date range using the calendar popup and the sliders, ensure that the range is changing properly.
+  3. Check that the above tests pass for all tabs.
+
+  Last Completed: 1/7/2013
+
+### Audits Page
+  1. Perform a few actions that will cause an audit to be generated, then check that the audit is displayed in the audit table.
+  2. Change the date range and ensure that the audits outside the range are removed from the list.
+  3. Enter a few different search terms into the "Filter Audits" box and test that it is properly filtering the audits.
+
+  Last Completed: 1/7/2013
+
+### Admin Page
+  1. Test that an admin can edit a user.
+  2. Test that an admin can create a user.
+  3. Test that an admin can delete a user.
+  3. Test that an admin can change Table Filter regex.
+
+  Last Completed: 1/7/2013
+
+### Account Page
+  1. Test that a user can choose column family preferences, also ensure that these preferences are being enforced on the search page.
+  2. Test that a user can choose a zookeeper preference, also ensure that this preference is being enforced on the initial navigation of the app.
+  3. Test that a user can edit themselves, and not others.
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/404_file_not_found.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/404_file_not_found.png b/src/contrib/blur-console/blur-admin/app/assets/images/404_file_not_found.png
new file mode 100644
index 0000000..e7b3ad3
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/404_file_not_found.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/arrow_down.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/arrow_down.png b/src/contrib/blur-console/blur-admin/app/assets/images/arrow_down.png
new file mode 100644
index 0000000..00366c7
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/arrow_down.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/arrow_up.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/arrow_up.png b/src/contrib/blur-console/blur-admin/app/assets/images/arrow_up.png
new file mode 100644
index 0000000..e4d764a
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/arrow_up.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/blur_logo.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/blur_logo.png b/src/contrib/blur-console/blur-admin/app/assets/images/blur_logo.png
new file mode 100644
index 0000000..520ce8f
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/blur_logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/database16.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/database16.png b/src/contrib/blur-console/blur-admin/app/assets/images/database16.png
new file mode 100644
index 0000000..f60d8c5
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/database16.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/expand_folder.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/expand_folder.png b/src/contrib/blur-console/blur-admin/app/assets/images/expand_folder.png
new file mode 100644
index 0000000..6b860d9
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/expand_folder.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/failure.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/failure.png b/src/contrib/blur-console/blur-admin/app/assets/images/failure.png
new file mode 100644
index 0000000..3c47544
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/failure.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/favicon.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/favicon.png b/src/contrib/blur-console/blur-admin/app/assets/images/favicon.png
new file mode 100644
index 0000000..fa799f9
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/favicon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/file16.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/file16.png b/src/contrib/blur-console/blur-admin/app/assets/images/file16.png
new file mode 100644
index 0000000..d6e7119
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/file16.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/folder16.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/folder16.png b/src/contrib/blur-console/blur-admin/app/assets/images/folder16.png
new file mode 100644
index 0000000..b6c5bb0
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/folder16.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/gradient.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/gradient.png b/src/contrib/blur-console/blur-admin/app/assets/images/gradient.png
new file mode 100644
index 0000000..535d664
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/gradient.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/green_light.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/green_light.png b/src/contrib/blur-console/blur-admin/app/assets/images/green_light.png
new file mode 100644
index 0000000..7e92315
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/green_light.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/icons.gif
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/icons.gif b/src/contrib/blur-console/blur-admin/app/assets/images/icons.gif
new file mode 100644
index 0000000..a58eb93
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/icons.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/loader.gif
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/loader.gif b/src/contrib/blur-console/blur-admin/app/assets/images/loader.gif
new file mode 100644
index 0000000..1845e7d
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/loader.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/offline.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/offline.png b/src/contrib/blur-console/blur-admin/app/assets/images/offline.png
new file mode 100644
index 0000000..2c9d655
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/offline.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/online.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/online.png b/src/contrib/blur-console/blur-admin/app/assets/images/online.png
new file mode 100644
index 0000000..beecde3
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/online.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/red_light.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/red_light.png b/src/contrib/blur-console/blur-admin/app/assets/images/red_light.png
new file mode 100644
index 0000000..3a6306c
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/red_light.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/server_error.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/server_error.png b/src/contrib/blur-console/blur-admin/app/assets/images/server_error.png
new file mode 100644
index 0000000..fa06893
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/server_error.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/vline.gif
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/vline.gif b/src/contrib/blur-console/blur-admin/app/assets/images/vline.gif
new file mode 100644
index 0000000..1b00ae5
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/vline.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/images/warning.png
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/images/warning.png b/src/contrib/blur-console/blur-admin/app/assets/images/warning.png
new file mode 100644
index 0000000..df58c97
Binary files /dev/null and b/src/contrib/blur-console/blur-admin/app/assets/images/warning.png differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/javascripts/admin.js
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/admin.js b/src/contrib/blur-console/blur-admin/app/assets/javascripts/admin.js
new file mode 100644
index 0000000..4ca3ef6
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/admin.js
@@ -0,0 +1,11 @@
+$(document).ready(function(){
+  $('.table-filter').on('ajax:submit', function(){
+    $(this).find('.control-group').addClass('info');
+  });
+  $('.table-filter').on('ajax:success', function(){
+    $(this).find('.control-group').addClass('success');
+  });
+  $('.table-filter').on('ajax:error', function(){
+    $(this).find('.control-group').addClass('error');
+  });
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/javascripts/application.js
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/application.js b/src/contrib/blur-console/blur-admin/app/assets/javascripts/application.js
new file mode 100644
index 0000000..c67ad30
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/application.js
@@ -0,0 +1,79 @@
+//= require jquery
+//= require jquery-ui
+//= require jquery_ujs
+//= require modernizr
+//= require placeholder
+//= require bootstrap
+//= require bootstrap-modal-helper
+//= require templates
+//= require underscore
+//= require backbone/backbone
+//= require backbone/backbone-extension
+//= require flash_message
+//= require_self
+
+$(document).ready(function(){
+  // Global variable for the spinner (makes displaying the spinner simpler)
+  window.Spinner = $('<img id="loading-spinner" alt="Loading..." src="/assets/loader.gif"/>')
+  // Global display message function
+
+  // Determines the help tab that needs to be opened
+  $('#page-help').click(function(){
+    var url = window.location.pathname;
+    var tab;
+    if (url === '/' || url === 'zookeepers') {
+      tab = "dashboard";
+    } else if (url.substring(1) == 'users') {
+      tab = "admin";
+    } else if (url.match(/hdfs(?!_)/)){
+      tab = "hdfs";
+    } else {
+      var pieces = url.substring(1).split('/');
+      if (pieces.length <= 2) {
+        tab = pieces[0];
+      } else {
+        tab = pieces[2];
+      }
+    }
+    window.open(Routes.help_path(tab), "Help Menu","menubar=0,resizable=0,width=500,height=600");
+    return false;
+  });
+
+  if (typeof Zookeeper !== 'undefined' && Zookeeper.instances){
+    $('#env_link, #tables_link, #queries_link, #search_link').click( function(evt){
+      var self = this;
+      if (Zookeeper.instances.length === 0){
+        alert('There are no Zookeeper Instances registered yet.  This page will not work until then.');
+        return false;
+      } else if (Zookeeper.instances.length === 1 || CurrentZookeeper !== null){
+        return;
+      } else {
+        var select_box = "<div style='text-align:center'><select id='zookeeper_selector' style='font-size: 20px'><option value=''></option>";
+        $.each(Zookeeper.instances, function(){
+          select_box += "<option value='" + this.id + "'>" + this.name + "</option>";
+        });
+        select_box += "</select></div>";
+        $().popup({
+          body: select_box,
+          title: 'Select a Zookeeper Instance to use:',
+          shown: function(){
+            $('#zookeeper_selector').change(function(){
+              window.location = window.location.protocol + '//' + window.location.host + '/zookeepers/' + $(this).val() + ($(self).attr('data-url-extension') || '');
+            });
+          }
+        });
+        return false;
+      }
+    });
+  }
+
+  $('#zookeeper_id').change(function(){
+    if (window.location.href.match(/(zookeepers\/)\d/)){
+      window.location = window.location.href.replace(/(zookeepers\/)\d/, '$1' + $(this).val());
+    } else {
+      window.location = '/zookeepers/' + + $(this).val();
+    }
+  });
+
+  $('.dropdown-toggle').dropdown();
+});

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/assets/javascripts/audits.js
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/assets/javascripts/audits.js b/src/contrib/blur-console/blur-admin/app/assets/javascripts/audits.js
new file mode 100644
index 0000000..6d28bf7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/assets/javascripts/audits.js
@@ -0,0 +1,112 @@
+//= require jquery.dataTables
+//= require jquery.timepicker
+//= require datatables.fnReloadAjax
+//= require_self
+
+$.extend( $.fn.dataTableExt.oStdClasses, {
+  "sSortAsc": "header headerSortDown",
+  "sSortDesc": "header headerSortUp",
+  "sSortable": "header"
+});
+
+$(document).ready(function() {
+  //Sets max time to one hour after page load to fix button with Now button not going to current time
+  var adjust_time = function(date){
+    date.setHours(date.getHours()+1);
+    return date;
+  };
+  var setup_datepickers = function(){
+    var default_timepicker_options = {
+      showMinute: false,
+      maxDate: adjust_time(new Date),
+      hourGrid: 6,
+      ampm: true,
+    };
+
+    var from_now = new Date();
+    var from_hours = urlVars['from']
+    from_now.setMinutes(0);
+
+
+
+    var to_now = new Date();
+    var to_hours = urlVars['to']
+    to_now.setMinutes(0);
+
+    var from_input = $('<input class="from-cal" placeholder="from"/>').datetimepicker(default_timepicker_options);
+    var to_input = $('<input class="to-cal" placeholder="to"/>').datetimepicker(default_timepicker_options);
+
+    if (from_hours){
+      from_now.setHours(from_now.getHours() - from_hours);
+      from_input.datepicker('setDate', from_now);
+    }
+
+    if (to_hours){
+      to_now.setHours(to_now.getHours() - to_hours);
+      to_input.datepicker('setDate', to_now);
+    }
+
+    $('.row > .span2').prepend('<label>Audit range:</label>', from_input, to_input ,'<button class="btn refresh-button">Refresh</button>');
+  };
+  //Grabs the current time from the page elements (long number string in element id's) 
+  var urlVars = function() {
+    var vars = {};
+    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
+      vars[key] = value;
+    });
+    return vars;
+  }();
+
+  var columnDefinitions = [
+    {mData: 'action', bSortable : false},
+    {mData: 'zookeeper_affected'},
+    {mData: 'username', bVisible : false, bSortable : false},
+    {mData: 'user'},
+    {mData: 'model'},
+    {mData: 'mutation'},
+    {mData: 'date_audited', asSorting: ['desc', 'asc']}
+  ];
+
+  var audit_data_table = $('#audits_table > table').dataTable({
+      sDom: "<'row'<'span4'i><'span8'><'span3'f><'span2'r>>t",
+      bPaginate: false,
+      bProcessing: true,
+      bAutoWidth: false,
+      bDeferRender: true,
+      aoColumns: columnDefinitions,
+      oLanguage: {
+        sInfoEmpty: "",
+        sInfo: "Displaying _TOTAL_ audits",
+        sSearch: "Filter audits:",
+        sZeroRecords: "No audits to display",
+        sInfoFiltered: "(filtered from _MAX_ total audits)"
+      }
+  });
+  //On Page Load
+  audit_data_table.fnSort([[6, 'desc']]);
+
+  setup_datepickers();
+  //Page Listeners
+  $('.refresh-button').on('click', function(){
+    var now = new Date();
+    var from = Math.floor((now - $('.from-cal').datetimepicker('getDate')) / 3600 / 1000);
+    var to = Math.floor((now - $('.to-cal').datetimepicker('getDate')) / 3600 / 1000);
+    var params = '?from=' + from + '&to=' + to;
+    var full_url = window.location.protocol + '//' + window.location.host + window.location.pathname + params;
+
+    if (!Modernizr.history) {
+      window.location(full_url);
+    } else {
+      audit_data_table.fnReloadAjax(Routes.audits_path({format: 'json'}) + params);
+
+      if(location.search.length === 0){
+        history.replaceState(null, "Audits | Blur Console", full_url);
+      } else if(location.search !== full_url){
+        history.pushState(null, "Search | Blur Console", full_url);
+      }
+    }
+  });
+});
+
+
+


Mime
View raw message