incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [28/50] [abbrv] Initial Blur Console commit.
Date Fri, 17 May 2013 03:24:55 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/active_record_adapter_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/active_record_adapter_spec.rb b/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/active_record_adapter_spec.rb
deleted file mode 100755
index 6013368..0000000
--- a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/active_record_adapter_spec.rb
+++ /dev/null
@@ -1,278 +0,0 @@
-if ENV["MODEL_ADAPTER"].nil? || ENV["MODEL_ADAPTER"] == "active_record"
-  require "spec_helper"
-
-  class Category
-    has_many :articles
-  end
-
-  class Article < ActiveRecord::Base
-    connection.create_table(table_name) do |t|
-      t.integer :category_id
-      t.string :name
-      t.boolean :published
-      t.boolean :secret
-      t.integer :priority
-    end
-    belongs_to :category
-    has_many :comments
-  end
-
-  class Comment < ActiveRecord::Base
-    connection.create_table(table_name) do |t|
-      t.integer :article_id
-      t.boolean :spam
-    end
-    belongs_to :article
-  end
-
-  describe CanCan::ModelAdapters::ActiveRecordAdapter do
-    before(:each) do
-      Article.delete_all
-      Comment.delete_all
-      @ability = Object.new
-      @ability.extend(CanCan::Ability)
-      @article_table = Article.table_name
-      @comment_table = Comment.table_name
-    end
-
-    it "is for only active record classes" do
-      CanCan::ModelAdapters::ActiveRecordAdapter.should_not be_for_class(Object)
-      CanCan::ModelAdapters::ActiveRecordAdapter.should be_for_class(Article)
-      CanCan::ModelAdapters::AbstractAdapter.adapter_class(Article).should == CanCan::ModelAdapters::ActiveRecordAdapter
-    end
-
-    it "finds record" do
-      article = Article.create!
-      CanCan::ModelAdapters::ActiveRecordAdapter.find(Article, article.id).should == article
-    end
-
-    it "does not fetch any records when no abilities are defined" do
-      Article.create!
-      Article.accessible_by(@ability).should be_empty
-    end
-
-    it "fetches all articles when one can read all" do
-      @ability.can :read, :articles
-      article = Article.create!
-      Article.accessible_by(@ability).should == [article]
-    end
-
-    it "fetches only the articles that are published" do
-      @ability.can :read, :articles, :published => true
-      article1 = Article.create!(:published => true)
-      article2 = Article.create!(:published => false)
-      Article.accessible_by(@ability).should == [article1]
-    end
-
-    it "fetches any articles which are published or secret" do
-      @ability.can :read, :articles, :published => true
-      @ability.can :read, :articles, :secret => true
-      article1 = Article.create!(:published => true, :secret => false)
-      article2 = Article.create!(:published => true, :secret => true)
-      article3 = Article.create!(:published => false, :secret => true)
-      article4 = Article.create!(:published => false, :secret => false)
-      Article.accessible_by(@ability).should == [article1, article2, article3]
-    end
-
-    it "fetches only the articles that are published and not secret" do
-      @ability.can :read, :articles, :published => true
-      @ability.cannot :read, :articles, :secret => true
-      article1 = Article.create!(:published => true, :secret => false)
-      article2 = Article.create!(:published => true, :secret => true)
-      article3 = Article.create!(:published => false, :secret => true)
-      article4 = Article.create!(:published => false, :secret => false)
-      Article.accessible_by(@ability).should == [article1]
-    end
-
-    it "only reads comments for articles which are published" do
-      @ability.can :read, :comments, :article => { :published => true }
-      comment1 = Comment.create!(:article => Article.create!(:published => true))
-      comment2 = Comment.create!(:article => Article.create!(:published => false))
-      Comment.accessible_by(@ability).should == [comment1]
-    end
-
-    it "only reads comments for visible categories through articles" do
-      pending "does ActiveRecord no longer support a deep nested hash of conditions?"
-      @ability.can :read, :comments, :article => { :category => { :visible => true } }
-      comment1 = Comment.create!(:article => Article.create!(:category => Category.create!(:visible => true)))
-      comment2 = Comment.create!(:article => Article.create!(:category => Category.create!(:visible => false)))
-      Comment.accessible_by(@ability).should == [comment1]
-    end
-
-    it "allows conditions in SQL and merge with hash conditions" do
-      @ability.can :read, :articles, :published => true
-      @ability.can :read, :articles, ["secret=?", true]
-      article1 = Article.create!(:published => true, :secret => false)
-      article2 = Article.create!(:published => true, :secret => true)
-      article3 = Article.create!(:published => false, :secret => true)
-      article4 = Article.create!(:published => false, :secret => false)
-      Article.accessible_by(@ability).should == [article1, article2, article3]
-    end
-
-    it "allows a scope for conditions" do
-      @ability.can :read, :articles, Article.where(:secret => true)
-      article1 = Article.create!(:secret => true)
-      article2 = Article.create!(:secret => false)
-      Article.accessible_by(@ability).should == [article1]
-    end
-
-    it "fetches only associated records when using with a scope for conditions" do
-      @ability.can :read, :articles, Article.where(:secret => true)
-      category1 = Category.create!(:visible => false)
-      category2 = Category.create!(:visible => true)
-      article1 = Article.create!(:secret => true, :category => category1)
-      article2 = Article.create!(:secret => true, :category => category2)
-      # for some reason the objects aren't comparing equally here so it's necessary to compare by id
-      category1.articles.accessible_by(@ability).map(&:id).should == [article1.id]
-    end
-
-    it "raises an exception when trying to merge scope with other conditions" do
-      @ability.can :read, :articles, :published => true
-      @ability.can :read, :articles, Article.where(:secret => true)
-      lambda { Article.accessible_by(@ability) }.should raise_error(CanCan::Error, "Unable to merge an Active Record scope with other conditions. Instead use a hash or SQL for read articles ability.")
-    end
-
-    it "does not allow to fetch records when ability with just block present" do
-      @ability.can :read, :articles do
-        false
-      end
-      lambda { Article.accessible_by(@ability) }.should raise_error(CanCan::Error)
-    end
-
-    it "does not allow to check ability on object against SQL conditions without block" do
-      @ability.can :read, :articles, ["secret=?", true]
-      lambda { @ability.can? :read, Article.new }.should raise_error(CanCan::Error)
-    end
-
-    it "has false conditions if no abilities match" do
-      @ability.model_adapter(Article, :read).conditions.should == "'t'='f'"
-    end
-
-    it "returns false conditions for cannot clause" do
-      @ability.cannot :read, :articles
-      @ability.model_adapter(Article, :read).conditions.should == "'t'='f'"
-    end
-
-    it "returns SQL for single `can` definition in front of default `cannot` condition" do
-      @ability.cannot :read, :articles
-      @ability.can :read, :articles, :published => false, :secret => true
-      @ability.model_adapter(Article, :read).conditions.should orderlessly_match(%Q["#{@article_table}"."published" = 'f' AND "#{@article_table}"."secret" = 't'])
-    end
-
-    it "returns true condition for single `can` definition in front of default `can` condition" do
-      @ability.can :read, :articles
-      @ability.can :read, :articles, :published => false, :secret => true
-      @ability.model_adapter(Article, :read).conditions.should eq(:secret => true, :published => false)
-    end
-
-    it "returns `false condition` for single `cannot` definition in front of default `cannot` condition" do
-      @ability.cannot :read, :articles
-      @ability.cannot :read, :articles, :published => false, :secret => true
-      @ability.model_adapter(Article, :read).conditions.should  == "'t'='f'"
-    end
-
-    it "returns `not (sql)` for single `cannot` definition in front of default `can` condition" do
-      @ability.can :read, :articles
-      @ability.cannot :read, :articles, :published => false, :secret => true
-      @ability.model_adapter(Article, :read).conditions.should orderlessly_match(%Q["not (#{@article_table}"."published" = 'f' AND "#{@article_table}"."secret" = 't')])
-    end
-
-    it "returns appropriate sql conditions in complex case" do
-      @ability.can :read, :articles
-      @ability.can :access, :articles, :id => 1
-      @ability.can :update, :articles, :published => true
-      @ability.cannot :update, :articles, :secret => true
-      @ability.model_adapter(Article, :update).conditions.should == %Q[not ("#{@article_table}"."secret" = 't') AND (("#{@article_table}"."published" = 't') OR ("#{@article_table}"."id" = 1))]
-      @ability.model_adapter(Article, :access).conditions.should == {:id => 1}
-      @ability.model_adapter(Article, :read).conditions.should == {:id => 1} # used to be "t=t" but changed with new specificity rule (issue #321)
-    end
-
-    it "does not forget conditions when calling with SQL string" do
-      @ability.can :read, :articles, :published => true
-      @ability.can :read, :articles, ['secret=?', false]
-      adapter = @ability.model_adapter(Article, :read)
-      2.times do
-        adapter.conditions.should == %Q[(secret='f') OR ("#{@article_table}"."published" = 't')]
-      end
-    end
-
-    it "has nil joins if no rules" do
-      @ability.model_adapter(Article, :read).joins.should be_nil
-    end
-
-    it "has nil joins if no nested hashes specified in conditions" do
-      @ability.can :read, :articles, :published => false
-      @ability.can :read, :articles, :secret => true
-      @ability.model_adapter(Article, :read).joins.should be_nil
-    end
-
-    it "merges separate joins into a single array" do
-      @ability.can :read, :articles, :project => { :blocked => false }
-      @ability.can :read, :articles, :company => { :admin => true }
-      @ability.model_adapter(Article, :read).joins.inspect.should orderlessly_match([:company, :project].inspect)
-    end
-
-    it "merges same joins into a single array" do
-      @ability.can :read, :articles, :project => { :blocked => false }
-      @ability.can :read, :articles, :project => { :admin => true }
-      @ability.model_adapter(Article, :read).joins.should == [:project]
-    end
-
-    it "restricts articles given a MetaWhere condition" do
-      pending
-      @ability.can :read, :articles, :priority.lt => 2
-      article1 = Article.create!(:priority => 1)
-      article2 = Article.create!(:priority => 3)
-      Article.accessible_by(@ability).should == [article1]
-      @ability.should be_able_to(:read, article1)
-      @ability.should_not be_able_to(:read, article2)
-    end
-
-    it "should merge MetaWhere and non-MetaWhere conditions" do
-      pending
-      @ability.can :read, Article, :priority.lt => 2
-      @ability.can :read, Article, :priority => 1
-      article1 = Article.create!(:priority => 1)
-      article2 = Article.create!(:priority => 3)
-      Article.accessible_by(@ability).should == [article1]
-      @ability.should be_able_to(:read, article1)
-      @ability.should_not be_able_to(:read, article2)
-    end
-
-    it "matches any MetaWhere condition" do
-      pending
-      adapter = CanCan::ModelAdapters::ActiveRecordAdapter
-      article1 = Article.new(:priority => 1, :name => "Hello World")
-      adapter.matches_condition?(article1, :priority.eq, 1).should be_true
-      adapter.matches_condition?(article1, :priority.eq, 2).should be_false
-      adapter.matches_condition?(article1, :priority.eq_any, [1, 2]).should be_true
-      adapter.matches_condition?(article1, :priority.eq_any, [2, 3]).should be_false
-      adapter.matches_condition?(article1, :priority.eq_all, [1, 1]).should be_true
-      adapter.matches_condition?(article1, :priority.eq_all, [1, 2]).should be_false
-      adapter.matches_condition?(article1, :priority.ne, 2).should be_true
-      adapter.matches_condition?(article1, :priority.ne, 1).should be_false
-      adapter.matches_condition?(article1, :priority.in, [1, 2]).should be_true
-      adapter.matches_condition?(article1, :priority.in, [2, 3]).should be_false
-      adapter.matches_condition?(article1, :priority.nin, [2, 3]).should be_true
-      adapter.matches_condition?(article1, :priority.nin, [1, 2]).should be_false
-      adapter.matches_condition?(article1, :priority.lt, 2).should be_true
-      adapter.matches_condition?(article1, :priority.lt, 1).should be_false
-      adapter.matches_condition?(article1, :priority.lteq, 1).should be_true
-      adapter.matches_condition?(article1, :priority.lteq, 0).should be_false
-      adapter.matches_condition?(article1, :priority.gt, 0).should be_true
-      adapter.matches_condition?(article1, :priority.gt, 1).should be_false
-      adapter.matches_condition?(article1, :priority.gteq, 1).should be_true
-      adapter.matches_condition?(article1, :priority.gteq, 2).should be_false
-      adapter.matches_condition?(article1, :name.like, "%ello worl%").should be_true
-      adapter.matches_condition?(article1, :name.like, "hello world").should be_true
-      adapter.matches_condition?(article1, :name.like, "hello%").should be_true
-      adapter.matches_condition?(article1, :name.like, "h%d").should be_true
-      adapter.matches_condition?(article1, :name.like, "%helo%").should be_false
-      adapter.matches_condition?(article1, :name.like, "hello").should be_false
-      adapter.matches_condition?(article1, :name.like, "hello.world").should be_false
-      # For some reason this is reporting "The not_matches MetaWhere condition is not supported."
-      # adapter.matches_condition?(article1, :name.nlike, "%helo%").should be_true
-      # adapter.matches_condition?(article1, :name.nlike, "%ello worl%").should be_false
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/data_mapper_adapter_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/data_mapper_adapter_spec.rb b/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/data_mapper_adapter_spec.rb
deleted file mode 100755
index 6aeba69..0000000
--- a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/data_mapper_adapter_spec.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-if ENV["MODEL_ADAPTER"] == "data_mapper"
-  require "spec_helper"
-
-  DataMapper.setup(:default, 'sqlite::memory:')
-
-  class DataMapperArticle
-    include DataMapper::Resource
-    property :id, Serial
-    property :published, Boolean, :default => false
-    property :secret, Boolean, :default => false
-    property :priority, Integer
-    has n, :data_mapper_comments
-  end
-
-  class DataMapperComment
-    include DataMapper::Resource
-    property :id, Serial
-    property :spam, Boolean, :default => false
-    belongs_to :data_mapper_article
-  end
-
-  DataMapper.finalize
-  DataMapper.auto_migrate!
-
-  describe CanCan::ModelAdapters::DataMapperAdapter do
-    before(:each) do
-      DataMapperArticle.destroy
-      DataMapperComment.destroy
-      @ability = Object.new
-      @ability.extend(CanCan::Ability)
-    end
-
-    it "is for only data mapper classes" do
-      CanCan::ModelAdapters::DataMapperAdapter.should_not be_for_class(Object)
-      CanCan::ModelAdapters::DataMapperAdapter.should be_for_class(DataMapperArticle)
-      CanCan::ModelAdapters::AbstractAdapter.adapter_class(DataMapperArticle).should == CanCan::ModelAdapters::DataMapperAdapter
-    end
-
-    it "finds record" do
-      article = DataMapperArticle.create
-      CanCan::ModelAdapters::DataMapperAdapter.find(DataMapperArticle, article.id).should == article
-    end
-
-    it "does not fetch any records when no abilities are defined" do
-      DataMapperArticle.create
-      DataMapperArticle.accessible_by(@ability).should be_empty
-    end
-
-    it "fetches all articles when one can read all" do
-      @ability.can :read, :data_mapper_articles
-      article = DataMapperArticle.create
-      DataMapperArticle.accessible_by(@ability).should == [article]
-    end
-
-    it "fetches only the articles that are published" do
-      @ability.can :read, :data_mapper_articles, :published => true
-      article1 = DataMapperArticle.create(:published => true)
-      article2 = DataMapperArticle.create(:published => false)
-      DataMapperArticle.accessible_by(@ability).should == [article1]
-    end
-
-    it "fetches any articles which are published or secret" do
-      @ability.can :read, :data_mapper_articles, :published => true
-      @ability.can :read, :data_mapper_articles, :secret => true
-      article1 = DataMapperArticle.create(:published => true, :secret => false)
-      article2 = DataMapperArticle.create(:published => true, :secret => true)
-      article3 = DataMapperArticle.create(:published => false, :secret => true)
-      article4 = DataMapperArticle.create(:published => false, :secret => false)
-      DataMapperArticle.accessible_by(@ability).should == [article1, article2, article3]
-    end
-
-    it "fetches only the articles that are published and not secret" do
-      pending "the `cannot` may require some custom SQL, maybe abstract out from Active Record adapter"
-      @ability.can :read, :data_mapper_articles, :published => true
-      @ability.cannot :read, :data_mapper_articles, :secret => true
-      article1 = DataMapperArticle.create(:published => true, :secret => false)
-      article2 = DataMapperArticle.create(:published => true, :secret => true)
-      article3 = DataMapperArticle.create(:published => false, :secret => true)
-      article4 = DataMapperArticle.create(:published => false, :secret => false)
-      DataMapperArticle.accessible_by(@ability).should == [article1]
-    end
-
-    it "only reads comments for articles which are published" do
-      @ability.can :read, :data_mapper_comments, :data_mapper_article => { :published => true }
-      comment1 = DataMapperComment.create(:data_mapper_article => DataMapperArticle.create!(:published => true))
-      comment2 = DataMapperComment.create(:data_mapper_article => DataMapperArticle.create!(:published => false))
-      DataMapperComment.accessible_by(@ability).should == [comment1]
-    end
-
-    it "allows conditions in SQL and merge with hash conditions" do
-      @ability.can :read, :data_mapper_articles, :published => true
-      @ability.can :read, :data_mapper_articles, ["secret=?", true]
-      article1 = DataMapperArticle.create(:published => true, :secret => false)
-      article4 = DataMapperArticle.create(:published => false, :secret => false)
-      DataMapperArticle.accessible_by(@ability).should == [article1]
-    end
-
-    it "matches gt comparison" do
-      @ability.can :read, :data_mapper_articles, :priority.gt => 3
-      article1 = DataMapperArticle.create(:priority => 4)
-      article2 = DataMapperArticle.create(:priority => 3)
-      DataMapperArticle.accessible_by(@ability).should == [article1]
-      @ability.should be_able_to(:read, article1)
-      @ability.should_not be_able_to(:read, article2)
-    end
-
-    it "matches gte comparison" do
-      @ability.can :read, :data_mapper_articles, :priority.gte => 3
-      article1 = DataMapperArticle.create(:priority => 4)
-      article2 = DataMapperArticle.create(:priority => 3)
-      article3 = DataMapperArticle.create(:priority => 2)
-      DataMapperArticle.accessible_by(@ability).should == [article1, article2]
-      @ability.should be_able_to(:read, article1)
-      @ability.should be_able_to(:read, article2)
-      @ability.should_not be_able_to(:read, article3)
-    end
-
-    # TODO: add more comparison specs
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/default_adapter_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/default_adapter_spec.rb b/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/default_adapter_spec.rb
deleted file mode 100755
index c2edb4d..0000000
--- a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/default_adapter_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require "spec_helper"
-
-describe CanCan::ModelAdapters::DefaultAdapter do
-  it "is default for generic classes" do
-    CanCan::ModelAdapters::AbstractAdapter.adapter_class(Object).should == CanCan::ModelAdapters::DefaultAdapter
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/mongoid_adapter_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/mongoid_adapter_spec.rb b/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/mongoid_adapter_spec.rb
deleted file mode 100755
index 451e609..0000000
--- a/blur-admin/vendor/gems/cancan/spec/cancan/model_adapters/mongoid_adapter_spec.rb
+++ /dev/null
@@ -1,227 +0,0 @@
-if ENV["MODEL_ADAPTER"] == "mongoid"
-  require "spec_helper"
-
-  class MongoidCategory
-    include Mongoid::Document
-    references_many :mongoid_projects
-  end
-
-  class MongoidProject
-    include Mongoid::Document
-    referenced_in :mongoid_category
-  end
-
-  Mongoid.configure do |config|
-    config.master = Mongo::Connection.new('127.0.0.1', 27017).db("cancan_mongoid_spec")
-  end
-
-  describe CanCan::ModelAdapters::MongoidAdapter do
-    context "Mongoid defined" do
-      before(:each) do
-        @ability = Object.new
-        @ability.extend(CanCan::Ability)
-      end
-
-      after(:each) do
-        Mongoid.master.collections.select do |collection|
-          collection.name !~ /system/
-        end.each(&:drop)
-      end
-
-      it "is for only Mongoid classes" do
-        CanCan::ModelAdapters::MongoidAdapter.should_not be_for_class(Object)
-        CanCan::ModelAdapters::MongoidAdapter.should be_for_class(MongoidProject)
-        CanCan::ModelAdapters::AbstractAdapter.adapter_class(MongoidProject).should == CanCan::ModelAdapters::MongoidAdapter
-      end
-
-      it "finds record" do
-        project = MongoidProject.create
-        CanCan::ModelAdapters::MongoidAdapter.find(MongoidProject, project.id).should == project
-      end
-
-      it "compares properties on mongoid documents with the conditions hash" do
-        model = MongoidProject.new
-        @ability.can :read, :mongoid_projects, :id => model.id
-        @ability.should be_able_to(:read, model)
-      end
-
-      it "is able to read hashes when field is array" do
-        one_to_three = MongoidProject.create(:numbers => ['one', 'two', 'three'])
-        two_to_five  = MongoidProject.create(:numbers => ['two', 'three', 'four', 'five'])
-
-        @ability.can :foo, :mongoid_projects, :numbers => 'one'
-        @ability.should be_able_to(:foo, one_to_three)
-        @ability.should_not be_able_to(:foo, two_to_five)
-      end
-
-      it "returns [] when no ability is defined so no records are found" do
-        MongoidProject.create(:title => 'Sir')
-        MongoidProject.create(:title => 'Lord')
-        MongoidProject.create(:title => 'Dude')
-
-        MongoidProject.accessible_by(@ability, :read).entries.should == []
-      end
-
-      it "returns the correct records based on the defined ability" do
-        @ability.can :read, :mongoid_projects, :title => "Sir"
-        sir   = MongoidProject.create(:title => 'Sir')
-        lord  = MongoidProject.create(:title => 'Lord')
-        dude  = MongoidProject.create(:title => 'Dude')
-
-        MongoidProject.accessible_by(@ability, :read).entries.should == [sir]
-      end
-
-      it "returns the correct records when a mix of can and cannot rules in defined ability" do
-        pending "TODO figure out why this isn't working"
-        @ability.can :manage, :mongoid_projects, :title => 'Sir'
-        @ability.cannot :destroy, :mongoid_projects
-
-        sir   = MongoidProject.create(:title => 'Sir')
-        lord  = MongoidProject.create(:title => 'Lord')
-        dude  = MongoidProject.create(:title => 'Dude')
-
-        MongoidProject.accessible_by(@ability, :destroy).entries.should == [sir]
-      end
-
-      it "is able to mix empty conditions and hashes" do
-        pending "TODO figure out why this isn't working"
-        @ability.can :read, :mongoid_projects
-        @ability.can :read, :mongoid_projects, :title => 'Sir'
-        sir  = MongoidProject.create(:title => 'Sir')
-        lord = MongoidProject.create(:title => 'Lord')
-
-        MongoidProject.accessible_by(@ability, :read).count.should == 2
-      end
-
-      it "returns everything when the defined ability is access all" do
-        @ability.can :access, :all
-        sir   = MongoidProject.create(:title => 'Sir')
-        lord  = MongoidProject.create(:title => 'Lord')
-        dude  = MongoidProject.create(:title => 'Dude')
-
-        MongoidProject.accessible_by(@ability, :read).entries.should == [sir, lord, dude]
-      end
-
-      it "allows a scope for conditions" do
-        @ability.can :read, :mongoid_projects, MongoidProject.where(:title => 'Sir')
-        sir   = MongoidProject.create(:title => 'Sir')
-        lord  = MongoidProject.create(:title => 'Lord')
-        dude  = MongoidProject.create(:title => 'Dude')
-
-        MongoidProject.accessible_by(@ability, :read).entries.should == [sir]
-      end
-
-      describe "Mongoid::Criteria where clause Symbol extensions using MongoDB expressions" do
-        it "handles :field.in" do
-          obj = MongoidProject.create(:title => 'Sir')
-          @ability.can :read, :mongoid_projects, :title.in => ["Sir", "Madam"]
-          @ability.can?(:read, obj).should == true
-          MongoidProject.accessible_by(@ability, :read).should == [obj]
-
-          obj2 = MongoidProject.create(:title => 'Lord')
-          @ability.can?(:read, obj2).should == false
-        end
-
-        describe "activates only when there are Criteria in the hash" do
-          it "Calls where on the model class when there are criteria" do
-            obj = MongoidProject.create(:title => 'Bird')
-            @conditions = {:title.nin => ["Fork", "Spoon"]}
-
-            @ability.can :read, :mongoid_projects, @conditions
-            @ability.should be_able_to(:read, obj)
-          end
-          it "Calls the base version if there are no mongoid criteria" do
-            obj = MongoidProject.new(:title => 'Bird')
-            @conditions = {:id => obj.id}
-            @ability.can :read, :mongoid_projects, @conditions
-            @ability.should be_able_to(:read, obj)
-          end
-        end
-
-        it "handles :field.nin" do
-          obj = MongoidProject.create(:title => 'Sir')
-          @ability.can :read, :mongoid_projects, :title.nin => ["Lord", "Madam"]
-          @ability.can?(:read, obj).should == true
-          MongoidProject.accessible_by(@ability, :read).should == [obj]
-
-          obj2 = MongoidProject.create(:title => 'Lord')
-          @ability.can?(:read, obj2).should == false
-        end
-
-        it "handles :field.size" do
-          obj = MongoidProject.create(:titles => ['Palatin', 'Margrave'])
-          @ability.can :read, :mongoid_projects, :titles.size => 2
-          @ability.can?(:read, obj).should == true
-          MongoidProject.accessible_by(@ability, :read).should == [obj]
-
-          obj2 = MongoidProject.create(:titles => ['Palatin', 'Margrave', 'Marquis'])
-          @ability.can?(:read, obj2).should == false
-        end
-
-        it "handles :field.exists" do
-          obj = MongoidProject.create(:titles => ['Palatin', 'Margrave'])
-          @ability.can :read, :mongoid_projects, :titles.exists => true
-          @ability.can?(:read, obj).should == true
-          MongoidProject.accessible_by(@ability, :read).should == [obj]
-
-          obj2 = MongoidProject.create
-          @ability.can?(:read, obj2).should == false
-        end
-
-        it "handles :field.gt" do
-          obj = MongoidProject.create(:age => 50)
-          @ability.can :read, :mongoid_projects, :age.gt => 45
-          @ability.can?(:read, obj).should == true
-          MongoidProject.accessible_by(@ability, :read).should == [obj]
-
-          obj2 = MongoidProject.create(:age => 40)
-          @ability.can?(:read, obj2).should == false
-        end
-
-        it "handles instance not saved to database" do
-          obj = MongoidProject.new(:title => 'Sir')
-          @ability.can :read, :mongoid_projects, :title.in => ["Sir", "Madam"]
-          @ability.can?(:read, obj).should == true
-
-          # accessible_by only returns saved records
-          MongoidProject.accessible_by(@ability, :read).entries.should == []
-
-          obj2 = MongoidProject.new(:title => 'Lord')
-          @ability.can?(:read, obj2).should == false
-        end
-      end
-
-      it "calls where with matching ability conditions" do
-        obj = MongoidProject.create(:foo => {:bar => 1})
-        @ability.can :read, :mongoid_projects, :foo => {:bar => 1}
-        MongoidProject.accessible_by(@ability, :read).entries.first.should == obj
-      end
-
-      it "excludes from the result if set to cannot" do
-        obj = MongoidProject.create(:bar => 1)
-        obj2 = MongoidProject.create(:bar => 2)
-        @ability.can :read, :mongoid_projects
-        @ability.cannot :read, :mongoid_projects, :bar => 2
-        MongoidProject.accessible_by(@ability, :read).entries.should == [obj]
-      end
-
-      it "combines the rules" do
-        obj = MongoidProject.create(:bar => 1)
-        obj2 = MongoidProject.create(:bar => 2)
-        obj3 = MongoidProject.create(:bar => 3)
-        @ability.can :read, :mongoid_projects, :bar => 1
-        @ability.can :read, :mongoid_projects, :bar => 2
-        MongoidProject.accessible_by(@ability, :read).entries.should =~ [obj, obj2]
-      end
-
-      it "does not allow to fetch records when ability with just block present" do
-        @ability.can :read, :mongoid_projects do
-          false
-        end
-        lambda {
-          MongoidProject.accessible_by(@ability)
-        }.should raise_error(CanCan::Error)
-      end
-    end
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/cancan/rule_spec.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/cancan/rule_spec.rb b/blur-admin/vendor/gems/cancan/spec/cancan/rule_spec.rb
deleted file mode 100755
index 5aacc2c..0000000
--- a/blur-admin/vendor/gems/cancan/spec/cancan/rule_spec.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-require "spec_helper"
-require "ostruct" # for OpenStruct below
-
-# Most of Rule functionality is tested in Ability specs
-describe CanCan::Rule do
-  before(:each) do
-    @conditions = {}
-    @rule = CanCan::Rule.new(true, :read, :integers, @conditions)
-  end
-
-  it "returns no association joins if none exist" do
-    @rule.associations_hash.should == {}
-  end
-
-  it "returns no association for joins if just attributes" do
-    @conditions[:foo] = :bar
-    @rule.associations_hash.should == {}
-  end
-
-  it "returns single association for joins" do
-    @conditions[:foo] = {:bar => 1}
-    @rule.associations_hash.should == {:foo => {}}
-  end
-
-  it "returns multiple associations for joins" do
-    @conditions[:foo] = {:bar => 1}
-    @conditions[:test] = {1 => 2}
-    @rule.associations_hash.should == {:foo => {}, :test => {}}
-  end
-
-  it "returns nested associations for joins" do
-    @conditions[:foo] = {:bar => {1 => 2}}
-    @rule.associations_hash.should == {:foo => {:bar => {}}}
-  end
-
-  it "returns no association joins if conditions is nil" do
-    rule = CanCan::Rule.new(true, :read, :integers)
-    rule.associations_hash.should == {}
-  end
-
-  it "has higher specificity for attributes/conditions" do
-    CanCan::Rule.new(true, :read, :integers).specificity.should eq(1)
-    CanCan::Rule.new(true, :read, :integers, :foo => :bar).specificity.should eq(2)
-    CanCan::Rule.new(true, :read, :integers, :foo).specificity.should eq(2)
-    CanCan::Rule.new(false, :read, :integers).specificity.should eq(3)
-    CanCan::Rule.new(false, :read, :integers, :foo => :bar).specificity.should eq(4)
-    CanCan::Rule.new(false, :read, :integers, :foo).specificity.should eq(4)
-  end
-
-  it "should not be mergeable if conditions are not simple hashes" do
-    meta_where = OpenStruct.new(:name => 'metawhere', :column => 'test')
-    @conditions[meta_where] = :bar
-    @rule.should be_unmergeable
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/matchers.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/matchers.rb b/blur-admin/vendor/gems/cancan/spec/matchers.rb
deleted file mode 100755
index b98bd24..0000000
--- a/blur-admin/vendor/gems/cancan/spec/matchers.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-RSpec::Matchers.define :orderlessly_match do |original_string|
-  match do |given_string|
-    original_string.split('').sort == given_string.split('').sort
-  end
-
-  failure_message_for_should do |given_string|
-    "expected \"#{given_string}\" to have the same characters as \"#{original_string}\""
-  end
-
-  failure_message_for_should_not do |given_string|
-    "expected \"#{given_string}\" not to have the same characters as \"#{original_string}\""
-  end
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/gems/cancan/spec/spec_helper.rb
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/gems/cancan/spec/spec_helper.rb b/blur-admin/vendor/gems/cancan/spec/spec_helper.rb
deleted file mode 100755
index 706ed82..0000000
--- a/blur-admin/vendor/gems/cancan/spec/spec_helper.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'rubygems'
-require 'bundler/setup'
-
-require "sqlite3"
-require "active_record"
-
-case ENV["MODEL_ADAPTER"]
-when "data_mapper"
-  require "dm-core"
-  require "dm-sqlite-adapter"
-  require "dm-migrations"
-when "mongoid"
-  require "mongoid"
-end
-
-require 'active_support/all'
-require 'matchers'
-require 'cancan'
-require 'cancan/matchers'
-
-RSpec.configure do |config|
-  config.treat_symbols_as_metadata_keys_with_true_values = true
-  config.filter_run :focus => true
-  config.run_all_when_everything_filtered = true
-end
-
-class Ability
-  include CanCan::Ability
-
-  def initialize(user)
-  end
-end
-
-ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
-
-class Category < ActiveRecord::Base
-  connection.create_table(table_name) do |t|
-    t.boolean :visible
-  end
-  has_many :projects
-end
-
-class Project < ActiveRecord::Base
-  connection.create_table(table_name) do |t|
-    t.integer :category_id
-    t.string :name
-  end
-  belongs_to :category
-end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-admin/vendor/plugins/.gitkeep
----------------------------------------------------------------------
diff --git a/blur-admin/vendor/plugins/.gitkeep b/blur-admin/vendor/plugins/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/.gitignore
----------------------------------------------------------------------
diff --git a/blur-agent/.gitignore b/blur-agent/.gitignore
deleted file mode 100644
index bb50561..0000000
--- a/blur-agent/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-agent.pid
-agent.log*
-tmp

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3-tests.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3-tests.jar b/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3-tests.jar
deleted file mode 100644
index ed49edd..0000000
Binary files a/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3-tests.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.jar b/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.jar
deleted file mode 100644
index 1e80f45..0000000
Binary files a/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.pom
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.pom b/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.pom
deleted file mode 100644
index bb9940f..0000000
--- a/blur-agent/lib/com/nearinfinity/blur/blur-core/0.1.3/blur-core-0.1.3.pom
+++ /dev/null
@@ -1,79 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<!-- parent>
-		<groupId>com.nearinfinity.blur</groupId>
-		<artifactId>blur</artifactId>
-		<version>0.1.3</version>
-	</parent -->
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.nearinfinity.blur</groupId>
-	<artifactId>blur-core</artifactId>
-	<packaging>jar</packaging>
-	<name>Blur Core</name>
-	<version>0.1.3</version>
-
-	<properties>
-		<enableAssertions>false</enableAssertions>
-	</properties>
-
-	<dependencies>
-		
-	</dependencies>
-
-	<!-- repositories>
-		<repository>
-			<id>libdir</id>
-			<url>file://${basedir}/../lib</url>
-		</repository>
-		<repository>
-			<id>cloudera</id>
-			<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
-		</repository>
-	</repositories>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<executions>
-					<execution>
-						<goals>
-							<goal>test-jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>copy-dependencies</id>
-						<phase>package</phase>
-						<goals>
-							<goal>copy-dependencies</goal>
-						</goals>
-						<configuration>
-							<outputDirectory>${project.build.directory}/../../../lib
-							</outputDirectory>
-							<overWriteReleases>false</overWriteReleases>
-							<overWriteSnapshots>false</overWriteSnapshots>
-							<overWriteIfNewer>true</overWriteIfNewer>
-							<excludeTransitive>true</excludeTransitive>
-							<excludeArtifactIds>junit,commons-cli,commons-logging,hadoop-core,slf4j-api,hadoop-test</excludeArtifactIds>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build -->
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.jar b/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.jar
deleted file mode 100644
index aeb7e7a..0000000
Binary files a/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.pom
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.pom b/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.pom
deleted file mode 100644
index 6efcf13..0000000
--- a/blur-agent/lib/com/nearinfinity/blur/blur-store/0.1.3/blur-store-0.1.3.pom
+++ /dev/null
@@ -1,115 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<!-- parent>
-		<groupId>com.nearinfinity.blur</groupId>
-		<artifactId>blur</artifactId>
-		<version>0.1.3</version>
-	</parent -->
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.nearinfinity.blur</groupId>
-	<artifactId>blur-store</artifactId>
-	<packaging>jar</packaging>
-	<name>Blur Store</name>
-	<version>0.1.3</version>
-
-	<dependencies>
-		<!-- dependency>
-			<groupId>org.apache.lucene</groupId>
-			<artifactId>lucene-core</artifactId>
-			<version>3.5.0.lm</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-cli</groupId>
-			<artifactId>commons-cli</artifactId>
-			<version>1.2</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
-			<artifactId>concurrentlinkedhashmap-lru</artifactId>
-			<version>1.2</version>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-			<version>1.2.15</version>
-			<scope>provided</scope>
-			<exclusions>
-				<exclusion>
-					<groupId>javax.mail</groupId>
-					<artifactId>mail</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>javax.jms</groupId>
-					<artifactId>jms</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.sun.jdmk</groupId>
-					<artifactId>jmxtools</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.sun.jmx</groupId>
-					<artifactId>jmxri</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency-->
-	</dependencies>
-
-	<!-- repositories>
-		<repository>
-			<id>libdir</id>
-			<url>file://${basedir}/../lib</url>
-		</repository>
-		<repository>
-			<id>cloudera</id>
-			<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
-		</repository>
-	</repositories>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<executions>
-					<execution>
-						<goals>
-							<goal>test-jar</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>copy-dependencies</id>
-						<phase>package</phase>
-						<goals>
-							<goal>copy-dependencies</goal>
-						</goals>
-						<configuration>
-							<outputDirectory>${project.build.directory}/../../../lib
-							</outputDirectory>
-							<overWriteReleases>false</overWriteReleases>
-							<overWriteSnapshots>false</overWriteSnapshots>
-							<overWriteIfNewer>true</overWriteIfNewer>
-							<excludeTransitive>true</excludeTransitive>
-							<excludeArtifactIds>junit,commons-cli,commons-logging,hadoop-core,slf4j-api
-							</excludeArtifactIds>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build -->
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.jar b/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.jar
deleted file mode 100644
index 581761a..0000000
Binary files a/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.pom
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.pom b/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.pom
deleted file mode 100644
index 06e2c0b..0000000
--- a/blur-agent/lib/com/nearinfinity/blur/blur-thrift/0.1.3/blur-thrift-0.1.3.pom
+++ /dev/null
@@ -1,73 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<!-- parent>
-		<groupId>com.nearinfinity.blur</groupId>
-		<artifactId>blur</artifactId>
-		<version>0.1.rc1</version>
-	</parent -->
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.nearinfinity.blur</groupId>
-	<artifactId>blur-thrift</artifactId>
-	<packaging>jar</packaging>
-	<name>Blur Thrift</name>
-	<version>0.1.3</version>
-
-	<dependencies>
-		<dependency>
-			<groupId>com.nearinfinity.blur</groupId>
-			<artifactId>blur-util</artifactId>
-			<version>0.1.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.thrift</groupId>
-			<artifactId>libthrift</artifactId>
-			<version>0.7.0</version>
-		</dependency>
-	</dependencies>
-
-	<!-- repositories>
-		<repository>
-			<id>libdir</id>
-			<url>file://${basedir}/../lib</url>
-		</repository>
-	</repositories>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>2.0.2</version>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<version>2.2</version>
-				<executions>
-					<execution>
-						<id>copy-dependencies</id>
-						<phase>package</phase>
-						<goals>
-							<goal>copy-dependencies</goal>
-						</goals>
-						<configuration>
-							<outputDirectory>${project.build.directory}/../../../lib
-							</outputDirectory>
-							<overWriteReleases>false</overWriteReleases>
-							<overWriteSnapshots>false</overWriteSnapshots>
-							<overWriteIfNewer>true</overWriteIfNewer>
-							<excludeTransitive>true</excludeTransitive>
-							<excludeArtifactIds>junit,commons-cli,commons-logging,hadoop,slf4j-api
-							</excludeArtifactIds>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build -->
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.jar b/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.jar
deleted file mode 100644
index d7e5051..0000000
Binary files a/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.pom
----------------------------------------------------------------------
diff --git a/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.pom b/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.pom
deleted file mode 100644
index af96b59..0000000
--- a/blur-agent/lib/com/nearinfinity/blur/blur-util/0.1.3/blur-util-0.1.3.pom
+++ /dev/null
@@ -1,101 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<!-- parent>
-		<groupId>com.nearinfinity.blur</groupId>
-		<artifactId>blur</artifactId>
-		<version>0.1.rc1</version>
-	</parent -->
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.nearinfinity.blur</groupId>
-	<artifactId>blur-util</artifactId>
-	<packaging>jar</packaging>
-	<name>Blur Util</name>
-	<version>0.1.3</version>
-
-	<dependencies>
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging</artifactId>
-			<version>1.1.1</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<version>1.6.1</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-			<version>1.6.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.zookeeper</groupId>
-			<artifactId>zookeeper</artifactId>
-			<version>3.3.4</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>4.7</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-core</artifactId>
-			<version>0.20.2-cdh3u5</version>
-			<scope>compile</scope>
-		</dependency>
-	</dependencies>
-
-	<repositories>
-		<repository>
-			<id>libdir</id>
-			<url>file://${basedir}/../lib</url>
-		</repository>
-		<repository>
-			<id>cloudera</id>
-			<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
-		</repository>
-	</repositories>
-
-	<!-- build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>2.0.2</version>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<version>2.2</version>
-				<executions>
-					<execution>
-						<id>copy-dependencies</id>
-						<phase>package</phase>
-						<goals>
-							<goal>copy-dependencies</goal>
-						</goals>
-						<configuration>
-							<outputDirectory>${project.build.directory}/../../../lib
-							</outputDirectory>
-							<overWriteReleases>false</overWriteReleases>
-							<overWriteSnapshots>false</overWriteSnapshots>
-							<overWriteIfNewer>true</overWriteIfNewer>
-							<excludeTransitive>true</excludeTransitive>
-							<excludeArtifactIds>junit,commons-cli,commons-logging,hadoop-core,slf4j-api,slf4j-log4j12
-							</excludeArtifactIds>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build -->
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.jar b/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.jar
deleted file mode 100644
index f9cb4da..0000000
Binary files a/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.pom
----------------------------------------------------------------------
diff --git a/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.pom b/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.pom
deleted file mode 100644
index e26d843..0000000
--- a/blur-agent/lib/org/igniterealtime/smack/smack/3.2.2/smack-3.2.2.pom
+++ /dev/null
@@ -1,50 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.igniterealtime.smack</groupId>
-	<artifactId>smack</artifactId>
-	<packaging>jar</packaging>
-	<name>smack</name>
-	<version>3.2.2</version>
-	<description>Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence.  This library provides the client side functionality as specified in the core XMPP specifications as related to the client side of said specifications.</description>
-	<parent>
-	    <groupId>org.sonatype.oss</groupId>
-	    <artifactId>oss-parent</artifactId>
-	    <version>5</version>
-	</parent>
-	<organization>
-		<name>Ignite Realtime</name>
-		<url>http://www.igniterealtime.org</url>
-	</organization>
-	<url>http://www.igniterealtime.org/projects/smack/</url>
-	<developers>
-		<developer>
-			<name>Robin Collier</name>
-			<timezone>-5</timezone>
-			<roles>
-				<role>Project Lead</role>
-			</roles>
-		</developer>
-	</developers>
-	<licenses>
-		<license>
-			<name>The Apache Software License, Version 2.0</name>
-			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
-			<distribution>repo</distribution>
-		</license>
-	</licenses>
-	<issueManagement>
-		<system>jira</system>
-		<url>http://www.igniterealtime.org/issues/browse/SMACK</url>
-	</issueManagement>
-	<scm>
-		<connection>scm:svn:http://svn.igniterealtime.org/svn/repos/smack</connection>
-		<developerConnection>scm:svn:https://svn.igniterealtime.org/svn/repos/smack</developerConnection>
-		<url>http://svn.igniterealtime.org/svn/repos/smack</url>
-	</scm>
-
-	<modules>
-	</modules>
-
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/lib/org/igniterealtime/smack/smackx/3.2.2/smackx-3.2.2.jar
----------------------------------------------------------------------
diff --git a/blur-agent/lib/org/igniterealtime/smack/smackx/3.2.2/smackx-3.2.2.jar b/blur-agent/lib/org/igniterealtime/smack/smackx/3.2.2/smackx-3.2.2.jar
deleted file mode 100644
index 4853caf..0000000
Binary files a/blur-agent/lib/org/igniterealtime/smack/smackx/3.2.2/smackx-3.2.2.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/pom.xml
----------------------------------------------------------------------
diff --git a/blur-agent/pom.xml b/blur-agent/pom.xml
deleted file mode 100644
index 94fb4aa..0000000
--- a/blur-agent/pom.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>com.nearinfinity</groupId>
-	<artifactId>blur-agent</artifactId>
-	<packaging>jar</packaging>
-	<version>1.4.2</version>
-	<name>blur-agent</name>
-	<url>http://maven.apache.org</url>
-
-	<dependencies>
-		<!-- RUNTIME DEPENDENCIES -->
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring-jdbc</artifactId>
-			<version>3.0.5.RELEASE</version>
-			<exclusions>
-				<exclusion>
-					<artifactId>aopalliance</artifactId>
-					<groupId>aopalliance</groupId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>2.6</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-collections</groupId>
-			<artifactId>commons-collections</artifactId>
-			<version>3.2.1</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-io</groupId>
-			<artifactId>commons-io</artifactId>
-			<version>2.0.1</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>1.5</version>
-		</dependency>
-		<dependency>
-			<groupId>commons-dbcp</groupId>
-			<artifactId>commons-dbcp</artifactId>
-			<version>1.4</version>
-		</dependency>
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-			<version>5.1.16</version>
-		</dependency>
-		<dependency>
-			<groupId>com.nearinfinity.blur</groupId>
-			<artifactId>blur-thrift</artifactId>
-			<version>0.1.3</version>
-		</dependency>
-		<dependency>
-			<groupId>com.nearinfinity.blur</groupId>
-			<artifactId>blur-util</artifactId>
-			<version>0.1.3</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.thrift</groupId>
-			<artifactId>libthrift</artifactId>
-			<version>0.7.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-			<version>1.6.1</version>
-		</dependency>
-		<dependency>
-			<groupId>com.googlecode.json-simple</groupId>
-			<artifactId>json-simple</artifactId>
-			<version>1.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-mapper-asl</artifactId>
-			<version>1.8.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.codehaus.jackson</groupId>
-			<artifactId>jackson-core-asl</artifactId>
-			<version>1.8.1</version>
-		</dependency>
-		<dependency>
-			<groupId>javax.mail</groupId>
-			<artifactId>mail</artifactId>
-			<version>1.4</version>
-		</dependency>
-		<dependency>
-			<groupId>org.igniterealtime.smack</groupId>
-			<artifactId>smack</artifactId>
-			<version>3.2.2</version>
-		</dependency>
-		<dependency>
-			<groupId>org.igniterealtime.smack</groupId>
-			<artifactId>smackx</artifactId>
-			<version>3.2.2</version>
-		</dependency>
-		
-		<!-- COMPILE DEPENDENCIES -->
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<version>1.6.1</version>
-			<scope>compile</scope>
-		</dependency>
-		
-		<!-- TEST DEPENDENCIES -->
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>4.9</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.nearinfinity.blur</groupId>
-			<artifactId>blur-core</artifactId>
-			<version>0.1.3</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.nearinfinity.blur</groupId>
-			<artifactId>blur-core</artifactId>
-			<version>0.1.3</version>
-			<type>test-jar</type>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.nearinfinity.blur</groupId>
-			<artifactId>blur-store</artifactId>
-			<version>0.1.3</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.hadoop</groupId>
-			<artifactId>hadoop-test</artifactId>
-			<version>0.20.2-cdh3u2</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.subethamail</groupId>
-			<artifactId>subethasmtp</artifactId>
-			<version>3.1.7</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.vysper</groupId>
-			<artifactId>vysper-core</artifactId>
-			<version>0.7</version>
-			<scope>test</scope>
-		</dependency>
-		            
-	</dependencies>
-
-	<repositories>
-		<repository>
-			<id>libdir</id>
-			<url>file://${basedir}/lib</url>
-		</repository>
-		<repository>
-			<id>cloudera</id>
-			<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
-		</repository>
-	</repositories>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>2.0.2</version>
-				<configuration>
-					<source>1.6</source>
-					<target>1.6</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-eclipse-plugin</artifactId>
-				<version>2.9</version>
-				<configuration>
-					<downloadSources>true</downloadSources>
-					<downloadJavadocs>true</downloadJavadocs>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<version>2.3</version>
-				<executions>
-					<execution>
-						<id>copy-dependencies</id>
-						<phase>package</phase>
-						<goals>
-							<goal>copy-dependencies</goal>
-						</goals>
-						<configuration>
-							<outputDirectory>${project.build.directory}/lib</outputDirectory>
-							<overWriteReleases>false</overWriteReleases>
-							<overWriteSnapshots>false</overWriteSnapshots>
-							<overWriteIfNewer>true</overWriteIfNewer>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/Agent.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/Agent.java b/blur-agent/src/main/java/com/nearinfinity/agent/Agent.java
deleted file mode 100644
index 2c8e253..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/Agent.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package com.nearinfinity.agent;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.PrintWriter;
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.PropertyConfigurator;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.cleaners.AgentCleaners;
-import com.nearinfinity.agent.collectors.blur.BlurCollector;
-import com.nearinfinity.agent.collectors.hdfs.HdfsCollector;
-import com.nearinfinity.agent.collectors.zookeeper.ZookeeperCollector;
-import com.nearinfinity.agent.connections.JdbcConnection;
-import com.nearinfinity.agent.connections.blur.BlurDatabaseConnection;
-import com.nearinfinity.agent.connections.cleaners.CleanerDatabaseConnection;
-import com.nearinfinity.agent.connections.hdfs.HdfsDatabaseConnection;
-import com.nearinfinity.agent.connections.zookeeper.ZookeeperDatabaseConnection;
-import com.nearinfinity.agent.exceptions.HdfsThreadException;
-import com.nearinfinity.agent.notifications.Notifier;
-
-public class Agent {
-	public static final long COLLECTOR_SLEEP_TIME = TimeUnit.SECONDS.toMillis(15);
-	public static final long CLEAN_UP_SLEEP_TIME = TimeUnit.SECONDS.toMillis(30);
-
-	private static final Log log = LogFactory.getLog(Agent.class);
-
-	private Agent(Properties props) {
-
-		// Setup database connection
-		JdbcTemplate jdbc = JdbcConnection.createDBConnection(props);
-
-		// Setup the notifier
-		Notifier.getNotifier(props, true);
-
-		List<String> activeCollectors = props.containsKey("active.collectors") ? new ArrayList<String>(Arrays.asList(props.getProperty(
-				"active.collectors").split("\\|"))) : new ArrayList<String>();
-
-		// Setup the collectors
-		setupHdfs(props, jdbc, activeCollectors);
-		setupBlur(props, jdbc, activeCollectors);
-		setupZookeeper(props, jdbc);
-		setupCleaners(jdbc, activeCollectors);
-	}
-
-	public static void main(String[] args) {
-		writePidFile();
-		Properties configProps = loadConfigParams(args);
-		setupLogger(configProps);
-		new Agent(configProps);
-	}
-
-	private void setupCleaners(JdbcTemplate jdbc, List<String> activeCollectors) {
-		new Thread(new AgentCleaners(activeCollectors, new CleanerDatabaseConnection(jdbc)), "Agent Cleaner Thread").start();
-	}
-
-	private void setupBlur(Properties props, JdbcTemplate jdbc, List<String> activeCollectors) {
-		Map<String, String> blurInstances = loadBlurInstances(props);
-		for (Map.Entry<String, String> blurEntry : blurInstances.entrySet()) {
-			final String zookeeperName = blurEntry.getKey();
-			final String connection = blurEntry.getValue();
-			new Thread(new BlurCollector(zookeeperName, connection, activeCollectors, new BlurDatabaseConnection(jdbc), jdbc),
-					"Blur Collector thread - " + zookeeperName).start();
-		}
-	}
-
-	private void setupHdfs(Properties props, final JdbcTemplate jdbc, List<String> activeCollectors) {
-		Map<String, Map<String, String>> hdfsInstances = loadHdfsInstances(props);
-		for (Map<String, String> instance : hdfsInstances.values()) {
-			final String name = instance.get("name");
-			final String thriftUri = instance.get("url.thrift");
-			final String defaultUri = instance.get("url.default");
-			final String user = props.getProperty("hdfs." + name + ".login.user");
-			try {
-				new Thread(new HdfsCollector(name, defaultUri, thriftUri, user, activeCollectors, new HdfsDatabaseConnection(jdbc)),
-						"Hdfs Collector - " + name).start();
-			} catch (HdfsThreadException e) {
-				log.error("The collector for hdfs [" + name + "] will not execute.");
-				continue;
-			}
-		}
-	}
-
-	private void setupZookeeper(Properties props, JdbcTemplate jdbc) {
-		if (props.containsKey("zk.instances")) {
-			List<String> zooKeeperInstances = new ArrayList<String>(Arrays.asList(props.getProperty("zk.instances").split("\\|")));
-			for (String zkInstance : zooKeeperInstances) {
-				String zkUrl = props.getProperty("zk." + zkInstance + ".url");
-				String blurConnection = props.getProperty("blur." + zkInstance + ".url");
-				new Thread(new ZookeeperCollector(zkUrl, zkInstance, blurConnection, new ZookeeperDatabaseConnection(jdbc)), "Zookeeper - "
-						+ zkInstance).start();
-			}
-		}
-	}
-
-	private static void setupLogger(Properties props) {
-		String log4jPropsFile = props.getProperty("log4j.properties", "../conf/log4j.properties");
-
-		if (new File(log4jPropsFile).exists()) {
-			PropertyConfigurator.configure(log4jPropsFile);
-		} else {
-			log.warn("Unable to find log4j properties file.  Using default logging");
-		}
-	}
-
-	private static Properties loadConfigParams(String[] args) {
-		String configFileName;
-		if (args.length == 0) {
-			configFileName = "../conf/blur-agent.config";
-		} else {
-			configFileName = args[0];
-		}
-		File configFile = new File(configFileName);
-
-		if (!configFile.exists() || !configFile.isFile()) {
-			log.fatal("Unable to find config file at " + configFile.getAbsolutePath());
-			System.exit(1);
-		}
-
-		Properties configProps = new Properties();
-		try {
-			configProps.load(new FileInputStream(configFile));
-		} catch (Exception e) {
-			log.fatal("Config File is not a valid properties file: " + e.getMessage());
-			System.exit(1);
-		}
-		return configProps;
-	}
-
-	private static void writePidFile() {
-		try {
-			File pidFile = new File("../agent.pid");
-			PrintWriter pidOut = new PrintWriter(pidFile);
-			log.info("Wrote pid file to: " + pidFile.getAbsolutePath());
-			String nameOfRunningVM = ManagementFactory.getRuntimeMXBean().getName();
-			int p = nameOfRunningVM.indexOf('@');
-			String pid = nameOfRunningVM.substring(0, p);
-			pidOut.write(pid);
-			pidOut.write("\n");
-			pidOut.close();
-		} catch (FileNotFoundException e) {
-			log.fatal("Unable to find pid file. " + e.getMessage());
-			System.exit(1);
-		}
-	}
-
-	private Map<String, String> loadBlurInstances(Properties props) {
-		Map<String, String> instances = new HashMap<String, String>();
-
-		if (props.containsKey("blur.instances")) {
-			String[] blurNames = props.getProperty("blur.instances").split("\\|");
-
-			for (String blur : blurNames) {
-				instances.put(blur, props.getProperty("blur." + blur + ".url"));
-			}
-		}
-
-		return instances;
-	}
-
-	private Map<String, Map<String, String>> loadHdfsInstances(Properties props) {
-		Map<String, Map<String, String>> instances = new HashMap<String, Map<String, String>>();
-
-		if (props.containsKey("hdfs.instances")) {
-			String[] hdfsNames = props.getProperty("hdfs.instances").split("\\|");
-
-			for (String hdfs : hdfsNames) {
-				Map<String, String> instanceInfo = new HashMap<String, String>();
-				instanceInfo.put("url.thrift", props.getProperty("hdfs." + hdfs + ".thrift.url"));
-				instanceInfo.put("url.default", props.getProperty("hdfs." + hdfs + ".url"));
-				instanceInfo.put("name", hdfs);
-				instances.put(hdfs, instanceInfo);
-			}
-		}
-
-		return instances;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/AgentCleaners.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/AgentCleaners.java b/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/AgentCleaners.java
deleted file mode 100644
index 6f72dad..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/AgentCleaners.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import java.util.List;
-
-import com.nearinfinity.agent.Agent;
-import com.nearinfinity.agent.connections.cleaners.interfaces.CleanerDatabaseInterface;
-
-public class AgentCleaners implements Runnable {
-
-	private final boolean cleanQueries;
-	private final boolean cleanHdfsStats;
-	private final CleanerDatabaseInterface database;
-
-	public AgentCleaners(final List<String> activeCollectors, CleanerDatabaseInterface database) {
-		this.cleanQueries = activeCollectors.contains("queries");
-		this.cleanHdfsStats = activeCollectors.contains("hdfs");
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		while (true) {
-			if (this.cleanQueries) {
-				new Thread(new QueriesCleaner(this.database), "Query Cleaner").start();
-			}
-
-			if (this.cleanHdfsStats) {
-				new Thread(new HdfsStatsCleaner(this.database), "Hdfs Stats Cleaner").start();
-			}
-
-			try {
-				Thread.sleep(Agent.CLEAN_UP_SLEEP_TIME);
-			} catch (InterruptedException e) {
-				break;
-			}
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/HdfsStatsCleaner.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/HdfsStatsCleaner.java b/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/HdfsStatsCleaner.java
deleted file mode 100644
index 4a1beb5..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/HdfsStatsCleaner.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.dao.DataAccessException;
-
-import com.nearinfinity.agent.connections.cleaners.interfaces.HdfsDatabaseCleanerInterface;
-
-public class HdfsStatsCleaner implements Runnable {
-	private static final Log log = LogFactory.getLog(QueriesCleaner.class);
-
-	private final HdfsDatabaseCleanerInterface database;
-
-	public HdfsStatsCleaner(HdfsDatabaseCleanerInterface database) {
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			this.database.deleteOldStats();
-		} catch (DataAccessException e) {
-			log.error("An error occured while deleting hdfs stats from the database!", e);
-		} catch (Exception e) {
-			log.error("An unkown error occured while cleaning up the hdfs stats!", e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/QueriesCleaner.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/QueriesCleaner.java b/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/QueriesCleaner.java
deleted file mode 100644
index 1d6fc04..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/cleaners/QueriesCleaner.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.nearinfinity.agent.cleaners;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.dao.DataAccessException;
-
-import com.nearinfinity.agent.connections.cleaners.interfaces.QueryDatabaseCleanerInterface;
-
-public class QueriesCleaner implements Runnable {
-	private static final Log log = LogFactory.getLog(QueriesCleaner.class);
-
-	private final QueryDatabaseCleanerInterface database;
-
-	public QueriesCleaner(final QueryDatabaseCleanerInterface database) {
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			int deletedQueries = this.database.deleteOldQueries();
-			int expiredQueries = this.database.expireOldQueries();
-			if ((deletedQueries + expiredQueries) > 0) {
-				log.info("Removed " + deletedQueries + " queries and " + "Expired " + expiredQueries + " queries, in this pass!");
-			}
-		} catch (DataAccessException e) {
-			log.error("An error occured while deleting queries from the database!", e);
-		} catch (Exception e) {
-			log.error("An unkown error occured while cleaning up the queries!", e);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/BlurCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/BlurCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/BlurCollector.java
deleted file mode 100644
index f60aefd..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/BlurCollector.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.nearinfinity.agent.collectors.blur;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.jdbc.core.JdbcTemplate;
-
-import com.nearinfinity.agent.Agent;
-import com.nearinfinity.agent.collectors.blur.query.QueryCollector;
-import com.nearinfinity.agent.collectors.blur.table.TableCollector;
-import com.nearinfinity.agent.connections.blur.interfaces.BlurDatabaseInterface;
-import com.nearinfinity.agent.exceptions.ZookeeperNameCollisionException;
-import com.nearinfinity.agent.exceptions.ZookeeperNameMissingException;
-import com.nearinfinity.blur.thrift.BlurClient;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-
-public class BlurCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(BlurCollector.class);
-
-	private final String zookeeperName;
-	private final BlurDatabaseInterface database;
-	private final boolean collectTables;
-	private final boolean collectQueries;
-
-	private String connection;
-
-	public BlurCollector(final String zookeeperName, final String connection, final List<String> activeCollectors,
-			final BlurDatabaseInterface database, final JdbcTemplate jdbc) {
-		this.zookeeperName = zookeeperName;
-		this.connection = connection;
-		this.database = database;
-		this.collectTables = activeCollectors.contains("tables");
-		this.collectQueries = activeCollectors.contains("queries");
-	}
-
-	@Override
-	public void run() {
-		while (true) {
-			// Retrieve the zookeeper id
-			int zookeeperId = getZookeeperId();
-
-			// If the connection string is blank then we need to build it from the
-			// online controllers from the database
-			String resolvedConnection = getResolvedConnection(zookeeperId);
-
-			if (StringUtils.isBlank(resolvedConnection)) {
-				try {
-					Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
-				} catch (InterruptedException e) {
-					break;
-				}
-				continue;
-			}
-
-			Iface blurConnection = BlurClient.getClient(resolvedConnection);
-
-			/* Retrieve the clusters and their info */
-			for (Map<String, Object> cluster : this.database.getClusters(zookeeperId)) {
-				String clusterName = (String) cluster.get("NAME");
-				Integer clusterId = (Integer) cluster.get("ID");
-
-				List<String> tables;
-				try {
-					tables = blurConnection.tableListByCluster(clusterName);
-				} catch (Exception e) {
-					log.error("An error occured while trying to retrieve the table list for cluster[" + clusterName + "], skipping cluster", e);
-					continue;
-				}
-
-				for (final String tableName : tables) {
-					int tableId = this.database.getTableId(clusterId, tableName);
-					if (tableId == -1) {
-						continue;
-					}
-
-					if (this.collectTables) {
-						new Thread(new TableCollector(blurConnection, tableName, tableId, this.database), "Table Collector - " + tableName).start();
-					}
-
-					if (this.collectQueries) {
-						new Thread(new QueryCollector(blurConnection, tableName, tableId, this.database), "Query Collector - " + tableName).start();
-					}
-				}
-			}
-
-			try {
-				Thread.sleep(Agent.COLLECTOR_SLEEP_TIME);
-			} catch (InterruptedException e) {
-				break;
-			}
-		}
-	}
-
-	private String getResolvedConnection(int zookeeperId) {
-		if (StringUtils.isBlank(this.connection)) {
-			return this.database.resolveConnectionString(zookeeperId);
-		} else {
-			return this.connection;
-		}
-	}
-
-	private int getZookeeperId() {
-		try {
-			return Integer.parseInt(this.database.getZookeeperId(this.zookeeperName));
-		} catch (NumberFormatException e) {
-			log.error("The returned zookeeperId is not a valid number", e);
-			return -1;
-		} catch (ZookeeperNameMissingException e) {
-			log.error(e.getMessage(), e);
-			return -1;
-		} catch (ZookeeperNameCollisionException e) {
-			log.error(e.getMessage(), e);
-			return -1;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/query/QueryCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/query/QueryCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/query/QueryCollector.java
deleted file mode 100644
index dc7cd48..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/query/QueryCollector.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.query;
-
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-
-import com.nearinfinity.agent.connections.blur.interfaces.QueryDatabaseInterface;
-import com.nearinfinity.agent.types.TimeHelper;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-import com.nearinfinity.blur.thrift.generated.BlurQueryStatus;
-import com.nearinfinity.blur.thrift.generated.SimpleQuery;
-
-public class QueryCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(QueryCollector.class);
-
-	private final Iface blurConnection;
-	private final String tableName;
-	private final int tableId;
-	private final QueryDatabaseInterface database;
-
-	public QueryCollector(Iface connection, String tableName, int tableId, QueryDatabaseInterface database) {
-		this.blurConnection = connection;
-		this.tableName = tableName;
-		this.tableId = tableId;
-		this.database = database;
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public void run() {
-		Set<Long> currentQueries = new HashSet<Long>();
-		try {
-			currentQueries.addAll(blurConnection.queryStatusIdList(tableName));
-			//currentQueries.addAll(this.database.getRunningQueries());
-		} catch (Exception e) {
-			log.error("Unable to get the list of current queries [" + tableName + "]." + e.getMessage());
-			return;
-		}
-		
-		// Mark running queries that can't be found as complete - unknown
-		this.database.markOrphanedRunningQueriesComplete(CollectionUtils.subtract(this.database.getRunningQueries(), currentQueries));
-		
-
-		for (Long queryUUID : currentQueries) {
-			BlurQueryStatus status;
-			try {
-				status = blurConnection.queryStatusById(tableName, queryUUID);
-			} catch (Exception e) {
-				log.error("Unable to get query status for query [" + queryUUID + "]." + e.getMessage());
-				continue;
-			}
-
-			Map<String, Object> oldQuery = this.database.getQuery(this.tableId, queryUUID);
-
-			String times;
-			try {
-				times = new ObjectMapper().writeValueAsString(status.getCpuTimes());
-			} catch (Exception e) {
-				log.error("Unable to parse cpu times.", e);
-				times = null;
-			}
-
-			if (oldQuery == null) {
-				SimpleQuery query = status.getQuery().getSimpleQuery();
-				long startTimeLong = status.getQuery().getStartTime();
-
-				// Set the query creation time to now or given start time
-				Date startTime = (startTimeLong > 0) ? TimeHelper.getAdjustedTime(startTimeLong).getTime() : TimeHelper.now().getTime();
-
-				this.database.createQuery(status, query, times, startTime, this.tableId);
-			} else if (queryHasChanged(status, times, oldQuery)) {
-				this.database.updateQuery(status, times, (Integer) oldQuery.get("ID"));
-			}
-		}
-	}
-
-	private static boolean queryHasChanged(BlurQueryStatus blurQueryStatus, String timesJSON, Map<String, Object> oldQueryInfo) {
-		return blurQueryStatus.getState().getValue() == 0
-				|| !(timesJSON.equals(oldQueryInfo.get("TIMES"))
-						&& blurQueryStatus.getCompleteShards() == (Integer) oldQueryInfo.get("COMPLETE_SHARDS") && blurQueryStatus.getState()
-						.getValue() == (Integer) oldQueryInfo.get("STATE"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/SchemaCollector.java
----------------------------------------------------------------------
diff --git a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/SchemaCollector.java b/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/SchemaCollector.java
deleted file mode 100644
index 029b472..0000000
--- a/blur-agent/src/main/java/com/nearinfinity/agent/collectors/blur/table/SchemaCollector.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package com.nearinfinity.agent.collectors.blur.table;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-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.agent.types.Column;
-import com.nearinfinity.agent.types.Family;
-import com.nearinfinity.blur.thrift.generated.AnalyzerDefinition;
-import com.nearinfinity.blur.thrift.generated.BlurException;
-import com.nearinfinity.blur.thrift.generated.ColumnDefinition;
-import com.nearinfinity.blur.thrift.generated.ColumnFamilyDefinition;
-import com.nearinfinity.blur.thrift.generated.Schema;
-import com.nearinfinity.blur.thrift.generated.TableDescriptor;
-import com.nearinfinity.blur.thrift.generated.Blur.Iface;
-
-public class SchemaCollector implements Runnable {
-	private static final Log log = LogFactory.getLog(SchemaCollector.class);
-
-	private final Iface blurConnection;
-	private final String tableName;
-	private final int tableId;
-	private final TableDescriptor descriptor;
-	private final TableDatabaseInterface database;
-
-	public SchemaCollector(Iface connection, String tableName, int tableId, TableDescriptor descriptor, TableDatabaseInterface database) {
-		this.blurConnection = connection;
-		this.tableName = tableName;
-		this.tableId = tableId;
-		this.descriptor = descriptor;
-		this.database = database;
-	}
-
-	@Override
-	public void run() {
-		try {
-			Schema schema = null;
-			schema = blurConnection.schema(tableName);
-			if (schema == null || descriptor == null) {
-				throw new NullReturnedException("No Schema or Descriptor Defined!");
-			}
-
-			List<Family> columnDefs = getColumnDefinitions(schema);
-
-			AnalyzerDefinition analyzerDefinition = descriptor.getAnalyzerDefinition();
-			if (analyzerDefinition != null) {
-				Map<String, ColumnFamilyDefinition> columnFamilyDefinitions = analyzerDefinition.getColumnFamilyDefinitions();
-				ColumnDefinition analyzerDefaultDefinition = analyzerDefinition.getDefaultDefinition();
-				if (columnFamilyDefinitions == null) {
-					for (Family family : columnDefs) {
-						for (Column column : family.getColumns()) {
-							if (analyzerDefaultDefinition == null) {
-								column.setAnalyzer("UNKNOWN");
-							} else {
-								column.setAnalyzer(analyzerDefaultDefinition.getAnalyzerClassName());
-								column.setFullText(analyzerDefaultDefinition.isFullTextIndex());
-							}
-						}
-					}
-				} else {
-					for (Map.Entry<String, ColumnFamilyDefinition> describeEntry : columnFamilyDefinitions.entrySet()) {
-						Family family = new Family(describeEntry.getKey());
-						int familyIndex = columnDefs.indexOf(family);
-
-						if (familyIndex == -1) {
-							columnDefs.add(family);
-						} else {
-							family = columnDefs.get(familyIndex);
-						}
-
-						Map<String, ColumnDefinition> columnDefinitions = describeEntry.getValue().getColumnDefinitions();
-						ColumnDefinition columnDefaultDefinition = describeEntry.getValue().getDefaultDefinition();
-						if (columnDefinitions == null) {
-							for (Column column : family.getColumns()) {
-								if (columnDefaultDefinition == null && analyzerDefaultDefinition == null) {
-									column.setAnalyzer("UNKNOWN");
-								} else if (columnDefaultDefinition == null) {
-									column.setAnalyzer(analyzerDefaultDefinition.getAnalyzerClassName());
-									column.setFullText(analyzerDefaultDefinition.isFullTextIndex());
-								} else {
-									column.setAnalyzer(columnDefaultDefinition.getAnalyzerClassName());
-									column.setFullText(columnDefaultDefinition.isFullTextIndex());
-								}
-							}
-						} else {
-							for (Map.Entry<String, ColumnDefinition> columnDescription : columnDefinitions.entrySet()) {
-								Column column = new Column(columnDescription.getKey());
-								int columnIndex = family.getColumns().indexOf(column);
-
-								if (columnIndex == -1) {
-									family.getColumns().add(column);
-								} else {
-									column = family.getColumns().get(columnIndex);
-								}
-
-								column.setAnalyzer(columnDescription.getValue().getAnalyzerClassName());
-								column.setFullText(columnDescription.getValue().isFullTextIndex());
-							}
-						}
-					}
-				}
-			}
-			this.database.updateTableSchema(this.tableId, new ObjectMapper().writeValueAsString(columnDefs), this.descriptor
-					.getAnalyzerDefinition().getFullTextAnalyzerClassName());
-		} catch (BlurException e) {
-			log.error("Unable to get the shard schema for table [" + tableName + "].", e);
-		} catch (JsonProcessingException e) {
-			log.error("Unable to convert shard schema to json.", e);
-		} catch (DataAccessException e) {
-			log.error("An error occurred while writing the schema to the database.", e);
-		} catch (NullReturnedException e) {
-			log.error(e.getMessage(), e);
-		} catch (Exception e) {
-			log.error("An unknown error occurred in the TableSchemaCollector.", e);
-		}
-	}
-
-	private List<Family> getColumnDefinitions(final Schema schema) {
-		List<Family> columnDefs = new ArrayList<Family>();
-		Map<String, Set<String>> columnFamilies = schema.getColumnFamilies();
-		if (columnFamilies != null) {
-			for (Map.Entry<String, Set<String>> schemaEntry : columnFamilies.entrySet()) {
-				Family family = new Family(schemaEntry.getKey());
-				for (String columnName : schemaEntry.getValue()) {
-					Column column = new Column(columnName);
-					column.setLive(true);
-					family.getColumns().add(column);
-				}
-				columnDefs.add(family);
-			}
-		}
-		return columnDefs;
-	}
-}


Mime
View raw message