incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [21/50] [abbrv] Initial Blur Console commit.
Date Fri, 17 May 2013 03:24:48 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/routes.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/routes.rb b/src/contrib/blur-console/blur-admin/config/routes.rb
new file mode 100644
index 0000000..5d06002
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/routes.rb
@@ -0,0 +1,100 @@
+BlurAdmin::Application.routes.draw do
+  # User routes
+  resources :users do
+    match '/preferences/:pref_type' => 'preferences#update', :via => :put, :as => :preference
+  end
+
+  resources :admin_settings, :only => [:update]
+
+  # Zookeeper routes
+  resources :zookeepers, :only => [:index, :show, :destroy], :shallow => true do
+    # Nested cluster Resource
+    resources :clusters, :only => [:destroy] do
+      # Nested Shards Resource
+      resources :blur_shards, :only => [:index, :destroy]
+    end
+
+    # Nested BlurTables Resource
+    resources :blur_tables, :only => :index do
+
+      # BlurTable routes
+      member do
+        get 'terms'
+        get 'hosts'
+        get 'schema'
+        put 'comment'
+      end
+      collection do
+        put 'enable'
+        put 'disable'
+        delete 'destroy'
+      end
+    end
+
+    # Nested BlurQueries Resource
+    resources :blur_queries, :only => [:index, :show] do
+
+      #Blur Queries routes
+      member do
+        put 'cancel'
+      end
+      collection do
+        get 'refresh/:time_length', :action => :refresh, :as => :refresh
+      end
+    end
+
+    # Nested Controller Resource
+    resources :blur_controllers, :only => [:destroy]
+
+    # Nested Search Resource
+    resources :searches, :only => [:index, :update, :show, :destroy] do
+      collection do
+        post 'save'
+        post ':blur_table', :action => :create, :as => :fetch_results
+        get 'filters/:blur_table', :action => :filters, :as => :filters
+      end
+    end
+
+    # Zookeeper specific action
+    member do
+      get 'long_running' => 'zookeepers#long_running_queries', :as => :long_running_queries
+    end
+  end
+
+  resources :hdfs, :only => :index do
+    get '(/:id(/show(*fs_path)))', :action => :index, :on => :collection
+    member do
+      get 'info'
+      get 'folder_info'
+      get 'slow_folder_info'
+      get 'expand(*fs_path)', :action => :expand, :as => :expand, :format => false
+      get 'file_info(*fs_path)', :action => :file_info, :as => :file_info, :format => false
+      post 'move', :action => :move_file
+      post 'mkdir'
+      post 'delete_file'
+      get 'upload_form'
+      post 'upload'
+      get 'structure', :action => :file_tree
+
+    end
+  end
+
+  resources :user_sessions, :only => [:create]
+  resources :hdfs_metrics, :only => [:index] do
+    member do
+      get 'stats', :action => :stats
+    end
+  end
+
+  resources :audits, :only => [:index]
+
+  match 'login' => 'user_sessions#new', :as => :login
+  match 'logout' => 'user_sessions#destroy', :as => :logout
+  match 'help/:tab' => 'application#help', :as => :help
+  root :to => 'zookeepers#index'
+
+    #Errors
+  match '/404' => 'errors#error_404'
+  match '/500' => 'errors#error_500'
+  match '/422' => 'errors#error_422'
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110524204140_create_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110524204140_create_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110524204140_create_blur_tables.rb
new file mode 100644
index 0000000..fabff77
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110524204140_create_blur_tables.rb
@@ -0,0 +1,15 @@
+class CreateBlurTables < ActiveRecord::Migration
+  def self.up
+    create_table :blur_tables do |t|
+      t.string :table_name
+      t.integer :current_size
+      t.integer :query_usage
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :blur_tables
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110524213803_create_hdfs_stats.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110524213803_create_hdfs_stats.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110524213803_create_hdfs_stats.rb
new file mode 100644
index 0000000..ff75ad8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110524213803_create_hdfs_stats.rb
@@ -0,0 +1,23 @@
+class CreateHdfsStats < ActiveRecord::Migration
+  def self.up
+    create_table :hdfs_stats do |t|
+      t.string :hdfs_name
+      t.integer :config_capacity
+      t.integer :present_capacity
+      t.integer :dfs_remaining
+      t.integer :dfs_used
+      t.decimal :dfs_used_percent
+      t.integer :under_replicated
+      t.integer :corrupt_blocks
+      t.integer :missing_blocks
+      t.integer :total_nodes
+      t.integer :dead_nodes
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :hdfs_stats
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110525015557_create_blur_queries.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110525015557_create_blur_queries.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110525015557_create_blur_queries.rb
new file mode 100644
index 0000000..6a044b7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110525015557_create_blur_queries.rb
@@ -0,0 +1,19 @@
+class CreateBlurQueries < ActiveRecord::Migration
+  def self.up
+    create_table :blur_queries do |t|
+      t.string :query_string
+      t.integer :cpu_time
+      t.integer :real_time
+      t.integer :complete
+      t.boolean :interrupted
+      t.boolean :running
+      t.string :uuid
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :blur_queries
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110526003150_add_extra_columns_to_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110526003150_add_extra_columns_to_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110526003150_add_extra_columns_to_blur_tables.rb
new file mode 100644
index 0000000..b7d10be
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110526003150_add_extra_columns_to_blur_tables.rb
@@ -0,0 +1,19 @@
+class AddExtraColumnsToBlurTables < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :table_name, :string
+    add_column :blur_queries, :super_query_on, :boolean
+    add_column :blur_queries, :facets, :string
+    add_column :blur_queries, :selectors, :string
+    add_column :blur_queries, :start, :integer
+    add_column :blur_queries, :fetch, :integer
+  end
+
+  def self.down
+    remove_column :blur_queries, :table_name
+    remove_column :blur_queries, :super_query_on
+    remove_column :blur_queries, :facets
+    remove_column :blur_queries, :selectors
+    remove_column :blur_queries, :start
+    remove_column :blur_queries, :fetch
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110526193123_add_filter_columns_to_blur_queries.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110526193123_add_filter_columns_to_blur_queries.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110526193123_add_filter_columns_to_blur_queries.rb
new file mode 100644
index 0000000..4e7838c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110526193123_add_filter_columns_to_blur_queries.rb
@@ -0,0 +1,11 @@
+class AddFilterColumnsToBlurQueries < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :pre_filters, :text, :limit => 64.kilobytes + 1
+    add_column :blur_queries, :post_filters, :text, :limit => 64.kilobytes + 1
+  end
+
+  def self.down
+    remove_column :blur_queries, :pre_filters
+    remove_column :blur_queries, :post_filters
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110526201313_modify_fetch_column_name.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110526201313_modify_fetch_column_name.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110526201313_modify_fetch_column_name.rb
new file mode 100644
index 0000000..c59b97b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110526201313_modify_fetch_column_name.rb
@@ -0,0 +1,9 @@
+class ModifyFetchColumnName < ActiveRecord::Migration
+  def self.up
+    rename_column :blur_queries, :fetch, :fetch_num
+  end
+
+  def self.down
+    rename_column :blur_queries, :fetch_num, :fetch
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110602014308_add_selector_columns.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110602014308_add_selector_columns.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110602014308_add_selector_columns.rb
new file mode 100644
index 0000000..fe0de05
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110602014308_add_selector_columns.rb
@@ -0,0 +1,15 @@
+class AddSelectorColumns < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :selector_column_families, :text
+    add_column :blur_queries, :selector_columns, :text
+
+    remove_column :blur_queries, :selectors
+  end
+
+  def self.down
+    remove_column :blur_queries, :selector_column_families
+    remove_column :blur_queries, :selector_columns
+
+    add_column :blur_queries, :selectors, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110603004748_add_userid_to_blur_queries.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110603004748_add_userid_to_blur_queries.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110603004748_add_userid_to_blur_queries.rb
new file mode 100644
index 0000000..9b980c3
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110603004748_add_userid_to_blur_queries.rb
@@ -0,0 +1,9 @@
+class AddUseridToBlurQueries < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :userid, :string
+  end
+
+  def self.down
+    remove_column :blur_queries, :userid
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110607191131_create_users.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110607191131_create_users.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110607191131_create_users.rb
new file mode 100644
index 0000000..bddcb4b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110607191131_create_users.rb
@@ -0,0 +1,16 @@
+class CreateUsers < ActiveRecord::Migration
+  def self.up
+    create_table :users do |t|
+      t.string :username
+      t.string :email
+      t.string :crypted_password
+      t.string :password_salt
+      t.string :persistence_token
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :users
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110613135529_add_roles_mask_to_users.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110613135529_add_roles_mask_to_users.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110613135529_add_roles_mask_to_users.rb
new file mode 100644
index 0000000..159dd1a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110613135529_add_roles_mask_to_users.rb
@@ -0,0 +1,9 @@
+class AddRolesMaskToUsers < ActiveRecord::Migration
+  def self.up
+    add_column :users, :roles_mask, :integer
+  end
+
+  def self.down
+    remove_column :users, :roles_mask
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110614201547_add_count_column_to_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110614201547_add_count_column_to_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110614201547_add_count_column_to_blur_tables.rb
new file mode 100644
index 0000000..e2835e7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110614201547_add_count_column_to_blur_tables.rb
@@ -0,0 +1,9 @@
+class AddCountColumnToBlurTables < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :record_count, :integer, :limit => 8
+  end
+
+  def self.down
+    remove_column :blur_tables, :record_count
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110616133049_add_status_column_to_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110616133049_add_status_column_to_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110616133049_add_status_column_to_blur_tables.rb
new file mode 100644
index 0000000..38f2d80
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110616133049_add_status_column_to_blur_tables.rb
@@ -0,0 +1,9 @@
+class AddStatusColumnToBlurTables < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :status, :boolean
+  end
+
+  def self.down
+    remove_column :blur_tables, :record_count
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110617140116_add_agentdata_column_to_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110617140116_add_agentdata_column_to_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110617140116_add_agentdata_column_to_blur_tables.rb
new file mode 100644
index 0000000..81da54b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110617140116_add_agentdata_column_to_blur_tables.rb
@@ -0,0 +1,15 @@
+class AddAgentdataColumnToBlurTables < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :table_uri, :boolean
+    add_column :blur_tables, :table_analyzer, :text
+    add_column :blur_tables, :schema, :text
+    add_column :blur_tables, :server, :text
+  end
+
+  def self.down
+    remove_column :blur_tables, :table_uri
+    remove_column :blur_tables, :table_analyzer
+    remove_column :blur_tables, :schema
+    remove_column :blur_tables, :server
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110617142244_fix_table_types.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110617142244_fix_table_types.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110617142244_fix_table_types.rb
new file mode 100644
index 0000000..69ccaa8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110617142244_fix_table_types.rb
@@ -0,0 +1,11 @@
+class FixTableTypes < ActiveRecord::Migration
+  def self.up
+    change_column :blur_tables, :status, :integer
+    change_column :blur_tables, :table_uri, :string
+  end
+
+  def self.down
+    change_column :blur_tables, :status, :boolean
+    change_column :blur_tables, :table_uri, :boolean
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110617163052_change_schema_column.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110617163052_change_schema_column.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110617163052_change_schema_column.rb
new file mode 100644
index 0000000..3951fc8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110617163052_change_schema_column.rb
@@ -0,0 +1,9 @@
+class ChangeSchemaColumn < ActiveRecord::Migration
+  def self.up
+    rename_column :blur_tables, :schema, :table_schema
+  end
+
+  def self.down
+    rename_column :blur_tables, :table_schema, :schema
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110621202105_add_table_id_column_to_blur_queries.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110621202105_add_table_id_column_to_blur_queries.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110621202105_add_table_id_column_to_blur_queries.rb
new file mode 100644
index 0000000..bf45db9
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110621202105_add_table_id_column_to_blur_queries.rb
@@ -0,0 +1,9 @@
+class AddTableIdColumnToBlurQueries < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :blur_table_id, :int
+  end
+
+  def self.down
+    remove_column :blur_queries, :blur_table_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110621202658_remove_table_name_column_from_blur_queries.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110621202658_remove_table_name_column_from_blur_queries.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110621202658_remove_table_name_column_from_blur_queries.rb
new file mode 100644
index 0000000..bd3df32
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110621202658_remove_table_name_column_from_blur_queries.rb
@@ -0,0 +1,9 @@
+class RemoveTableNameColumnFromBlurQueries < ActiveRecord::Migration
+  def self.up
+    remove_column :blur_queries, :table_name
+  end
+
+  def self.down
+    add_column :blur_queries, :table_name, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110621225406_create_blur_zookeeper_instances.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110621225406_create_blur_zookeeper_instances.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110621225406_create_blur_zookeeper_instances.rb
new file mode 100644
index 0000000..0bd24f7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110621225406_create_blur_zookeeper_instances.rb
@@ -0,0 +1,14 @@
+class CreateBlurZookeeperInstances < ActiveRecord::Migration
+  def self.up
+    create_table :blur_zookeeper_instances do |t|
+      t.string :host
+      t.string :port
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :blur_zookeeper_instances
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110621225838_create_controllers.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110621225838_create_controllers.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110621225838_create_controllers.rb
new file mode 100644
index 0000000..8b37589
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110621225838_create_controllers.rb
@@ -0,0 +1,17 @@
+class CreateControllers < ActiveRecord::Migration
+  def self.up
+    create_table :controllers do |t|
+      t.integer :status
+      t.string :blur_version
+      t.string :node_name
+      t.string :node_location
+      t.integer :blur_zookeeper_instance_id
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :controllers
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110621230243_create_clusters.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110621230243_create_clusters.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110621230243_create_clusters.rb
new file mode 100644
index 0000000..79662f4
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110621230243_create_clusters.rb
@@ -0,0 +1,14 @@
+class CreateClusters < ActiveRecord::Migration
+  def self.up
+    create_table :clusters do |t|
+      t.string :name
+      t.integer :controller_id
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :clusters
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110621230340_create_shards.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110621230340_create_shards.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110621230340_create_shards.rb
new file mode 100644
index 0000000..4f4021f
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110621230340_create_shards.rb
@@ -0,0 +1,17 @@
+class CreateShards < ActiveRecord::Migration
+  def self.up
+    create_table :shards do |t|
+      t.integer :status
+      t.string :blur_version
+      t.string :node_name
+      t.string :node_location
+      t.integer :cluster_id
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :shards
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110622025021_update_columns_on_blur_zookeeper_instances.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110622025021_update_columns_on_blur_zookeeper_instances.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110622025021_update_columns_on_blur_zookeeper_instances.rb
new file mode 100644
index 0000000..d2fbc84
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110622025021_update_columns_on_blur_zookeeper_instances.rb
@@ -0,0 +1,21 @@
+class UpdateColumnsOnBlurZookeeperInstances < ActiveRecord::Migration
+  def self.up
+    add_column :blur_zookeeper_instances, :name, :string
+
+    remove_column :blur_zookeeper_instances, :port
+    remove_column :blur_zookeeper_instances, :created_at
+    remove_column :blur_zookeeper_instances, :updated_at
+
+    rename_column :blur_zookeeper_instances, :host, :url
+  end
+
+  def self.down
+    remove_column :blur_zookeeper_instances, :name
+
+    add_column :blur_zookeeper_instances, :port, :string
+    add_column :blur_zookeeper_instances, :created_at, :datetime
+    add_column :blur_zookeeper_instances, :updated_at, :datetime
+
+    rename_column :blur_zookeeper_instances, :url, :host
+  end
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110623200720_add_status_column_to_zookeeper_instance.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110623200720_add_status_column_to_zookeeper_instance.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110623200720_add_status_column_to_zookeeper_instance.rb
new file mode 100644
index 0000000..6f5a481
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110623200720_add_status_column_to_zookeeper_instance.rb
@@ -0,0 +1,9 @@
+class AddStatusColumnToZookeeperInstance < ActiveRecord::Migration
+  def self.up
+    add_column :blur_zookeeper_instances, :status, :integer
+  end
+
+  def self.down
+    remove_column :blur_zookeeper_instances, :status
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110627180604_change_uuid_columntoint.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110627180604_change_uuid_columntoint.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110627180604_change_uuid_columntoint.rb
new file mode 100644
index 0000000..09d4712
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110627180604_change_uuid_columntoint.rb
@@ -0,0 +1,9 @@
+class ChangeUuidColumntoint < ActiveRecord::Migration
+  def self.up
+    change_column :blur_queries, :uuid, :integer
+  end
+
+  def self.down
+    change_column :blur_queries, :uuid, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110627183020_change_uuid_int_to_bigint.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110627183020_change_uuid_int_to_bigint.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110627183020_change_uuid_int_to_bigint.rb
new file mode 100644
index 0000000..719d32c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110627183020_change_uuid_int_to_bigint.rb
@@ -0,0 +1,9 @@
+class ChangeUuidIntToBigint < ActiveRecord::Migration
+  def self.up
+    change_column :blur_queries, :uuid, :integer, :limit => 8
+  end
+
+  def self.down
+    change_column :blur_queries, :uuid, :integer
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110629190801_change_cluster_to_belong_to_instance.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110629190801_change_cluster_to_belong_to_instance.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110629190801_change_cluster_to_belong_to_instance.rb
new file mode 100644
index 0000000..cf718e7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110629190801_change_cluster_to_belong_to_instance.rb
@@ -0,0 +1,9 @@
+class ChangeClusterToBelongToInstance < ActiveRecord::Migration
+  def self.up
+    rename_column :clusters, :controller_id, :blur_zookeeper_instance_id
+  end
+
+  def self.down
+    rename_column :clusters, :blur_zookeeper_instance_id, :controller_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110630160404_rename_blur_zookeeper_instances_to_zookeepers.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110630160404_rename_blur_zookeeper_instances_to_zookeepers.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110630160404_rename_blur_zookeeper_instances_to_zookeepers.rb
new file mode 100644
index 0000000..5a019df
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110630160404_rename_blur_zookeeper_instances_to_zookeepers.rb
@@ -0,0 +1,9 @@
+class RenameBlurZookeeperInstancesToZookeepers < ActiveRecord::Migration
+  def self.up
+    rename_table :blur_zookeeper_instances, :zookeepers
+  end
+
+  def self.down
+    rename_table :zookeepers, :blur_zookeeper_instances
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110630161453_rename_blur_zookeeper_instance_id.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110630161453_rename_blur_zookeeper_instance_id.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110630161453_rename_blur_zookeeper_instance_id.rb
new file mode 100644
index 0000000..636f968
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110630161453_rename_blur_zookeeper_instance_id.rb
@@ -0,0 +1,11 @@
+class RenameBlurZookeeperInstanceId < ActiveRecord::Migration
+  def self.up
+    rename_column :clusters, :blur_zookeeper_instance_id, :zookeeper_id
+    rename_column :controllers, :blur_zookeeper_instance_id, :zookeeper_id
+  end
+
+  def self.down
+    rename_column :clusters, :zookeeper_id, :blur_zookeeper_instance_id
+    rename_column :controllers, :zookeeper_id, :blur_zookeeper_instance_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110701142732_change_blur_table_current_size_to_bigint.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110701142732_change_blur_table_current_size_to_bigint.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110701142732_change_blur_table_current_size_to_bigint.rb
new file mode 100644
index 0000000..5c08000
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110701142732_change_blur_table_current_size_to_bigint.rb
@@ -0,0 +1,13 @@
+class ChangeBlurTableCurrentSizeToBigint < ActiveRecord::Migration
+  def self.up
+    change_table :blur_tables do |t|
+      t.change :current_size, :integer, :limit => 8
+    end
+  end
+
+  def self.down
+    change_table :blur_tables do |t|
+      t.change :current_size, :integer
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110701185350_create_searches.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110701185350_create_searches.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110701185350_create_searches.rb
new file mode 100644
index 0000000..4a3cc12
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110701185350_create_searches.rb
@@ -0,0 +1,20 @@
+class CreateSearches < ActiveRecord::Migration
+  def self.up
+    create_table :searches do |t|
+      t.boolean :super_query
+      t.string :columns
+      t.integer :fetch
+      t.integer :offset
+      t.string :name
+      t.string :query
+      t.integer :blur_table_id
+      t.integer :user_id
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :searches
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110705170021_change_columnsto_textobject.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110705170021_change_columnsto_textobject.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110705170021_change_columnsto_textobject.rb
new file mode 100644
index 0000000..892d664
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110705170021_change_columnsto_textobject.rb
@@ -0,0 +1,9 @@
+class ChangeColumnstoTextobject < ActiveRecord::Migration
+  def self.up
+    change_column :searches, :columns, :text
+  end
+
+  def self.down
+    change_column :searches, :columns, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110705191234_add_column_shard_id_to_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110705191234_add_column_shard_id_to_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110705191234_add_column_shard_id_to_blur_tables.rb
new file mode 100644
index 0000000..bb79f55
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110705191234_add_column_shard_id_to_blur_tables.rb
@@ -0,0 +1,9 @@
+class AddColumnShardIdToBlurTables < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :shard_id, :integer
+  end
+
+  def self.down
+    remove_column :blur_tables, :shard_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110707132418_create_shards_blur_tables_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110707132418_create_shards_blur_tables_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110707132418_create_shards_blur_tables_table.rb
new file mode 100644
index 0000000..a4ba515
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110707132418_create_shards_blur_tables_table.rb
@@ -0,0 +1,14 @@
+class CreateShardsBlurTablesTable < ActiveRecord::Migration
+  def self.up
+    create_table :blur_tables_shards, :id => false do |t|
+      t.integer :shard_id
+      t.integer :blur_table_id
+    end
+    remove_column :blur_tables, :shard_id
+  end
+
+  def self.down
+    drop_table :blur_tables_shards
+    add_column :blur_tables, :shard_id, :integer
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110707201314_update_model_with_new_understand_of_shards.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110707201314_update_model_with_new_understand_of_shards.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110707201314_update_model_with_new_understand_of_shards.rb
new file mode 100644
index 0000000..5076962
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110707201314_update_model_with_new_understand_of_shards.rb
@@ -0,0 +1,16 @@
+class UpdateModelWithNewUnderstandOfShards < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :cluster_id, :integer
+
+    drop_table :blur_tables_shards
+  end
+
+  def self.down
+    remove_column :blur_tables, :cluster_id
+
+    create_table :blur_tables_shards, :id => false do |t|
+      t.integer :shard_id
+      t.integer :blur_table_id
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110713141138_create_preferences.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110713141138_create_preferences.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110713141138_create_preferences.rb
new file mode 100644
index 0000000..8ec543a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110713141138_create_preferences.rb
@@ -0,0 +1,15 @@
+class CreatePreferences < ActiveRecord::Migration
+  def self.up
+    create_table :preferences do |t|
+      t.string :name
+      t.string :pref_type
+      t.text :value
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :preferences
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110714160454_adding_useridto_the_model_for_association.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110714160454_adding_useridto_the_model_for_association.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110714160454_adding_useridto_the_model_for_association.rb
new file mode 100644
index 0000000..faeae13
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110714160454_adding_useridto_the_model_for_association.rb
@@ -0,0 +1,9 @@
+class AddingUseridtoTheModelForAssociation < ActiveRecord::Migration
+  def self.up
+    add_column :preferences, :user_id, :integer
+  end
+
+  def self.down
+    remove_column :preferences, :user_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110719191147_create_metrics_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110719191147_create_metrics_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110719191147_create_metrics_table.rb
new file mode 100644
index 0000000..ef8be99
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110719191147_create_metrics_table.rb
@@ -0,0 +1,22 @@
+class CreateMetricsTable < ActiveRecord::Migration
+  def self.up
+    create_table :system_metrics, :force => true do |t|
+      t.column :name, :string, :null => false
+      t.column :started_at, :datetime, :null => false
+      t.column :transaction_id, :string
+      t.column :payload, :text
+      t.column :duration, :float, :null => false
+      t.column :exclusive_duration, :float, :null => false
+      t.column :request_id, :integer
+      t.column :parent_id, :integer
+      t.column :action, :string, :null => false
+      t.column :category, :string, :null => false
+    end
+
+    # TODO: Add indexes
+  end
+
+  def self.down
+    drop_table :system_metrics
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110726194727_add_columns_to_hdfs_stats.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110726194727_add_columns_to_hdfs_stats.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110726194727_add_columns_to_hdfs_stats.rb
new file mode 100644
index 0000000..70afe2f
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110726194727_add_columns_to_hdfs_stats.rb
@@ -0,0 +1,11 @@
+class AddColumnsToHdfsStats < ActiveRecord::Migration
+  def self.up
+    add_column :hdfs_stats, :host, :string
+    add_column :hdfs_stats, :port, :integer
+  end
+
+  def self.down
+    remove_column :hdfs_stats, :host
+    remove_column :hdfs_stats, :port
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110727012928_create_hdfs.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110727012928_create_hdfs.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110727012928_create_hdfs.rb
new file mode 100644
index 0000000..856e168
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110727012928_create_hdfs.rb
@@ -0,0 +1,15 @@
+class CreateHdfs < ActiveRecord::Migration
+  def self.up
+    create_table :hdfs do |t|
+      t.string :host
+      t.string :port
+      t.string :name
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :hdfs
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110727013041_update_hdfs_stats.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110727013041_update_hdfs_stats.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110727013041_update_hdfs_stats.rb
new file mode 100644
index 0000000..a03fa5f
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110727013041_update_hdfs_stats.rb
@@ -0,0 +1,11 @@
+class UpdateHdfsStats < ActiveRecord::Migration
+  def self.up
+    remove_column :hdfs_stats, :hdfs_name
+    add_column :hdfs_stats, :hdfs_id, :integer
+  end
+
+  def self.down
+    add_column :hdfs_stats, :hdfs_name, :string
+    remove_column :hdfs_stats, :hdfs_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110809202748_add_host_and_port_to_zookeeper.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110809202748_add_host_and_port_to_zookeeper.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110809202748_add_host_and_port_to_zookeeper.rb
new file mode 100644
index 0000000..5e87e62
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110809202748_add_host_and_port_to_zookeeper.rb
@@ -0,0 +1,11 @@
+class AddHostAndPortToZookeeper < ActiveRecord::Migration
+  def self.up
+    add_column :zookeepers, :host, :string
+    add_column :zookeepers, :port, :string
+  end
+
+  def self.down
+    remove_column :zookeepers, :host
+    remove_column :zookeepers, :port
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110810141028_add_row_count_to_blur_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110810141028_add_row_count_to_blur_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110810141028_add_row_count_to_blur_table.rb
new file mode 100644
index 0000000..51e85fd
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110810141028_add_row_count_to_blur_table.rb
@@ -0,0 +1,9 @@
+class AddRowCountToBlurTable < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :row_count, :integer, :limit => 8
+  end
+
+  def self.down
+    remove_column :blur_tables, :row_count
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110810142348_change_blur_queries_model.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110810142348_change_blur_queries_model.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110810142348_change_blur_queries_model.rb
new file mode 100644
index 0000000..e76b1af
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110810142348_change_blur_queries_model.rb
@@ -0,0 +1,30 @@
+class ChangeBlurQueriesModel < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :times, :string
+    remove_column :blur_queries, :cpu_time
+    remove_column :blur_queries, :real_time
+
+    remove_column :blur_queries, :interrupted
+    remove_column :blur_queries, :running
+
+    rename_column :blur_queries, :complete, :complete_shards
+    add_column :blur_queries, :total_shards, :integer
+
+    add_column :blur_queries, :state, :integer
+
+  end
+
+  def self.down
+    remove_column :blur_queries, :times
+    add_column :blur_queries, :cpu_time, :integer
+    add_column :blur_queries, :real_time, :integer
+
+    add_column :blur_queries, :interrupted, :boolean
+    add_column :blur_queries, :running, :boolean
+
+    rename_column :blur_queries, :complete_shards, :complete
+    remove_column :blur_queries, :total_shards
+
+    remove_column :blur_queries, :state
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110929222508_add_live_nodes_to_hdfs_stats.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110929222508_add_live_nodes_to_hdfs_stats.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110929222508_add_live_nodes_to_hdfs_stats.rb
new file mode 100644
index 0000000..a2cc40f
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110929222508_add_live_nodes_to_hdfs_stats.rb
@@ -0,0 +1,9 @@
+class AddLiveNodesToHdfsStats < ActiveRecord::Migration
+  def self.up
+    add_column :hdfs_stats, :live_nodes, :int
+  end
+
+  def self.down
+    remove_column :hdfs_stats, :live_nodes
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20110929224549_update_hdfs_stats_column_sizes.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20110929224549_update_hdfs_stats_column_sizes.rb b/src/contrib/blur-console/blur-admin/db/migrate/20110929224549_update_hdfs_stats_column_sizes.rb
new file mode 100644
index 0000000..728a375
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20110929224549_update_hdfs_stats_column_sizes.rb
@@ -0,0 +1,25 @@
+class UpdateHdfsStatsColumnSizes < ActiveRecord::Migration
+  def self.up
+    change_column :hdfs_stats, :config_capacity, :integer, :limit => 7
+    change_column :hdfs_stats, :present_capacity, :integer, :limit => 7
+    change_column :hdfs_stats, :dfs_remaining, :integer, :limit => 7
+    change_column :hdfs_stats, :dfs_used, :integer, :limit => 7
+    change_column :hdfs_stats, :under_replicated, :integer, :limit => 7
+    change_column :hdfs_stats, :corrupt_blocks, :integer, :limit => 7
+    change_column :hdfs_stats, :missing_blocks, :integer, :limit => 7
+    change_column :hdfs_stats, :port, :string
+    change_column :hdfs_stats, :dfs_used_percent, :float
+  end
+
+  def self.down
+    change_column :hdfs_stats, :config_capacity, :integer
+    change_column :hdfs_stats, :present_capacity, :integer
+    change_column :hdfs_stats, :dfs_remaining, :integer
+    change_column :hdfs_stats, :dfs_used, :integer
+    change_column :hdfs_stats, :under_replicated, :integer
+    change_column :hdfs_stats, :corrupt_blocks, :integer
+    change_column :hdfs_stats, :missing_blocks, :integer
+    change_column :hdfs_stats, :port, :integer
+    change_column :hdfs_stats, :dfs_used_percent, :decimal
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111001193840_add_license_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111001193840_add_license_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111001193840_add_license_table.rb
new file mode 100644
index 0000000..f3e7006
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111001193840_add_license_table.rb
@@ -0,0 +1,13 @@
+class AddLicenseTable < ActiveRecord::Migration
+  def self.up
+    create_table :licenses, {:id => false} do |t|
+      t.string :org
+      t.date :issued_date
+      t.date :expires_date
+    end
+  end
+
+  def self.down
+    drop_table :licenses
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111002175546_add_indexes.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111002175546_add_indexes.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111002175546_add_indexes.rb
new file mode 100644
index 0000000..ad39fd2
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111002175546_add_indexes.rb
@@ -0,0 +1,31 @@
+class AddIndexes < ActiveRecord::Migration
+  def self.up
+    add_index :blur_queries, :blur_table_id
+    add_index :blur_tables, :cluster_id
+    add_index :clusters, :zookeeper_id
+    add_index :controllers, :zookeeper_id
+    add_index :hdfs_stats, :hdfs_id
+    add_index :preferences, :user_id
+    add_index :searches, :blur_table_id
+    add_index :searches, :user_id
+    add_index :shards, :cluster_id
+    add_index :system_metrics, :transaction_id
+    add_index :system_metrics, :request_id
+    add_index :system_metrics, :parent_id
+  end
+
+  def self.down
+    remove_index :blur_queries, :blur_table_id
+    remove_index :blur_tables, :cluster_id
+    remove_index :clusters, :zookeeper_id
+    remove_index :controllers, :zookeeper_id
+    remove_index :hdfs_stats, :hdfs_id
+    remove_index :preferences, :user_id
+    remove_index :searches, :blur_table_id
+    remove_index :searches, :user_id
+    remove_index :shards, :cluster_id
+    remove_index :system_metrics, :transaction_id
+    remove_index :system_metrics, :request_id
+    remove_index :system_metrics, :parent_id
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111011041727_remove_extra_columns.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111011041727_remove_extra_columns.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111011041727_remove_extra_columns.rb
new file mode 100644
index 0000000..6cb19ad
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111011041727_remove_extra_columns.rb
@@ -0,0 +1,27 @@
+class RemoveExtraColumns < ActiveRecord::Migration
+  def self.up
+    remove_column :shards, :created_at
+    remove_column :shards, :updated_at
+    remove_column :hdfs_stats, :updated_at
+    remove_column :hdfs, :created_at
+    remove_column :hdfs, :updated_at
+    remove_column :controllers, :created_at
+    remove_column :controllers, :updated_at
+    remove_column :clusters, :created_at
+    remove_column :clusters, :updated_at
+    remove_column :blur_tables, :created_at
+  end
+
+  def self.down
+    add_column :shards, :created_at, :datetime
+    add_column :shards, :updated_at, :datetime
+    add_column :hdfs_stats, :updated_at, :datetime
+    add_column :hdfs, :created_at, :datetime
+    add_column :hdfs, :updated_at, :datetime
+    add_column :controllers, :created_at, :datetime
+    add_column :controllers, :updated_at, :datetime
+    add_column :clusters, :created_at, :datetime
+    add_column :clusters, :updated_at, :datetime
+    add_column :blur_tables, :created_at, :datetime
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111015191154_add_name_column_to_users.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111015191154_add_name_column_to_users.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111015191154_add_name_column_to_users.rb
new file mode 100644
index 0000000..995f042
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111015191154_add_name_column_to_users.rb
@@ -0,0 +1,9 @@
+class AddNameColumnToUsers < ActiveRecord::Migration
+  def self.up
+    add_column :users, :name, :string
+  end
+
+  def self.down
+    remove_column :users, :name
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111030120201_remove_node_location_column.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111030120201_remove_node_location_column.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111030120201_remove_node_location_column.rb
new file mode 100644
index 0000000..6a4d56b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111030120201_remove_node_location_column.rb
@@ -0,0 +1,11 @@
+class RemoveNodeLocationColumn < ActiveRecord::Migration
+  def self.up
+    remove_column :shards, :node_location
+    remove_column :controllers, :node_location
+  end
+
+  def self.down
+    add_column :shards, :node_location, :string
+    add_column :controllers, :node_location, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111030120430_increase_size_of_query_column.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111030120430_increase_size_of_query_column.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111030120430_increase_size_of_query_column.rb
new file mode 100644
index 0000000..07e1deb
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111030120430_increase_size_of_query_column.rb
@@ -0,0 +1,9 @@
+class IncreaseSizeOfQueryColumn < ActiveRecord::Migration
+  def self.up
+    change_column :blur_queries, :query_string, :text
+  end
+
+  def self.down
+    change_column :blur_queries, :query_string, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111130011338_change_host_port_to_url.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111130011338_change_host_port_to_url.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111130011338_change_host_port_to_url.rb
new file mode 100644
index 0000000..5562e11
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111130011338_change_host_port_to_url.rb
@@ -0,0 +1,12 @@
+class ChangeHostPortToUrl < ActiveRecord::Migration
+  def self.up
+    remove_columns(:zookeepers, :host, :port)
+    add_column(:zookeepers, :blur_urls, :string, :limit=>4000)
+  end
+
+  def self.down
+    add_column :zookeepers, :host, :string
+    add_column :zookeepers, :port, :string
+    remove_column :zookeepers, :blur_urls
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111219160043_add_record_only_to_search.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111219160043_add_record_only_to_search.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111219160043_add_record_only_to_search.rb
new file mode 100644
index 0000000..28345d4
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111219160043_add_record_only_to_search.rb
@@ -0,0 +1,9 @@
+class AddRecordOnlyToSearch < ActiveRecord::Migration
+  def self.up
+    add_column :searches, :record_only, :boolean, :default => 0
+  end
+
+  def self.down
+    remove_column :searches, :record_only
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20111229213416_change_licenses_to_add_node_info.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20111229213416_change_licenses_to_add_node_info.rb b/src/contrib/blur-console/blur-admin/db/migrate/20111229213416_change_licenses_to_add_node_info.rb
new file mode 100644
index 0000000..fe43892
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20111229213416_change_licenses_to_add_node_info.rb
@@ -0,0 +1,11 @@
+class ChangeLicensesToAddNodeInfo < ActiveRecord::Migration
+  def self.up
+    add_column :licenses, :node_overage, :int
+    add_column :licenses, :grace_period_days_remain, :int
+  end
+
+  def self.down
+    remove_column :licenses, :node_overage
+    remove_column :licenses, :grace_period_days_remain
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120110024452_update_license_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120110024452_update_license_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120110024452_update_license_table.rb
new file mode 100644
index 0000000..4ddf20a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120110024452_update_license_table.rb
@@ -0,0 +1,9 @@
+class UpdateLicenseTable < ActiveRecord::Migration
+  def self.up
+    add_column :licenses, :cluster_overage, :integer
+  end
+
+  def self.down
+    remove_column :licenses, :cluster_overage
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120226002653_change_blur_tables_updated_at.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120226002653_change_blur_tables_updated_at.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120226002653_change_blur_tables_updated_at.rb
new file mode 100644
index 0000000..d48fa44
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120226002653_change_blur_tables_updated_at.rb
@@ -0,0 +1,9 @@
+class ChangeBlurTablesUpdatedAt < ActiveRecord::Migration
+  def up
+    change_column :blur_tables, :updated_at, :datetime, {:null => true}
+  end
+
+  def down
+    change_column :blur_tables, :updated_at, :datetime, {:null => false}
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120309015311_add_safe_mode.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120309015311_add_safe_mode.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120309015311_add_safe_mode.rb
new file mode 100644
index 0000000..713920a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120309015311_add_safe_mode.rb
@@ -0,0 +1,9 @@
+class AddSafeMode < ActiveRecord::Migration
+  def up
+    add_column :clusters, :safe_mode, :boolean
+  end
+
+  def down
+    remove_column :clusters, :safe_mode
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120604180240_add_record_only_to_blur_queries.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120604180240_add_record_only_to_blur_queries.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120604180240_add_record_only_to_blur_queries.rb
new file mode 100644
index 0000000..df4734d
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120604180240_add_record_only_to_blur_queries.rb
@@ -0,0 +1,9 @@
+class AddRecordOnlyToBlurQueries < ActiveRecord::Migration
+  def self.up
+    add_column :blur_queries, :record_only, :boolean
+  end
+
+  def self.down
+    remove_column :blur_queries, :record_only
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120615195724_change_query_string_to_medium_text_datatype.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120615195724_change_query_string_to_medium_text_datatype.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120615195724_change_query_string_to_medium_text_datatype.rb
new file mode 100644
index 0000000..1a92a1c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120615195724_change_query_string_to_medium_text_datatype.rb
@@ -0,0 +1,9 @@
+class ChangeQueryStringToMediumTextDatatype < ActiveRecord::Migration
+  def up
+    change_column :blur_queries, :query_string, :text, :limit=>16777215
+  end
+
+  def down
+    change_column :blur_queries, :query_string, :text
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120618225024_change_type_to_smaller_size_med_text.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120618225024_change_type_to_smaller_size_med_text.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120618225024_change_type_to_smaller_size_med_text.rb
new file mode 100644
index 0000000..4688ad4
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120618225024_change_type_to_smaller_size_med_text.rb
@@ -0,0 +1,9 @@
+class ChangeTypeToSmallerSizeMedText < ActiveRecord::Migration
+  def up
+    change_column :blur_queries, :query_string, :text, :limit => 64.kilobytes + 1
+  end
+
+  def down
+    change_column :blur_queries, :query_string, :text, :limit => 16777215
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120621155420_add_comments_column_to_blur_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120621155420_add_comments_column_to_blur_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120621155420_add_comments_column_to_blur_tables.rb
new file mode 100644
index 0000000..5a74076
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120621155420_add_comments_column_to_blur_tables.rb
@@ -0,0 +1,10 @@
+class AddCommentsColumnToBlurTables < ActiveRecord::Migration
+  def self.up
+    add_column :blur_tables, :comments, :string
+  end
+  
+  def self.down
+    remove_column :blur_tables, :comments
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120807191217_create_audits.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120807191217_create_audits.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120807191217_create_audits.rb
new file mode 100644
index 0000000..f2ec2f7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120807191217_create_audits.rb
@@ -0,0 +1,12 @@
+class CreateAudits < ActiveRecord::Migration
+  def change
+    create_table :audits do |t|
+      t.string :user
+      t.integer :mutation
+      t.integer :model_affected
+      t.string :action
+
+      t.timestamps
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120807192046_change_audit_integers_to_strings.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120807192046_change_audit_integers_to_strings.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120807192046_change_audit_integers_to_strings.rb
new file mode 100644
index 0000000..203cd80
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120807192046_change_audit_integers_to_strings.rb
@@ -0,0 +1,11 @@
+class ChangeAuditIntegersToStrings < ActiveRecord::Migration
+  def up
+    change_column :audits, :mutation, :string
+    change_column :audits, :model_affected, :string
+  end
+
+  def down
+    change_column :audits, :mutation, :integer
+    change_column :audits, :model_affected, :integer
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120808182829_change_user_to_user_id.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120808182829_change_user_to_user_id.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120808182829_change_user_to_user_id.rb
new file mode 100644
index 0000000..1e0edba
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120808182829_change_user_to_user_id.rb
@@ -0,0 +1,11 @@
+class ChangeUserToUserId < ActiveRecord::Migration
+  def up
+    change_column :audits, :user, :integer
+    rename_column :audits, :user, :user_id
+  end
+
+  def down
+    rename_column :audits, :user_id, :user
+    change_column :audits, :user, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120813192325_change_used_to_both_logical_and_real.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120813192325_change_used_to_both_logical_and_real.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120813192325_change_used_to_both_logical_and_real.rb
new file mode 100644
index 0000000..2501087
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120813192325_change_used_to_both_logical_and_real.rb
@@ -0,0 +1,8 @@
+class ChangeUsedToBothLogicalAndReal < ActiveRecord::Migration
+  def change
+    change_table :hdfs_stats do |t|
+      t.rename :dfs_used, :dfs_used_real
+      t.integer :dfs_used_logical
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120813203219_fix_integer_length_for_logical_column.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120813203219_fix_integer_length_for_logical_column.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120813203219_fix_integer_length_for_logical_column.rb
new file mode 100644
index 0000000..3f1ef42
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120813203219_fix_integer_length_for_logical_column.rb
@@ -0,0 +1,7 @@
+class FixIntegerLengthForLogicalColumn < ActiveRecord::Migration
+  def change
+    change_table :hdfs_stats do |t|
+      t.change :dfs_used_logical, :integer, :limit => 8
+    end
+  end
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb
new file mode 100644
index 0000000..f06d2f5
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb
@@ -0,0 +1,42 @@
+class UpdateCollationOnAllTables < ActiveRecord::Migration
+  def up
+    execute "ALTER TABLE audits DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE audits CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE blur_queries DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE blur_queries CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE blur_tables DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE blur_tables CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE clusters DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE clusters CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE controllers DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE controllers CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE hdfs DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE hdfs CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE hdfs_stats DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE hdfs_stats CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE licenses DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE licenses CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE preferences DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE preferences CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE searches DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE searches CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE shards DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE shards CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE users DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE users CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+    
+    execute "ALTER TABLE zookeepers DEFAULT CHARACTER SET utf8 COLLATE utf8_bin"
+    execute "ALTER TABLE zookeepers CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin"
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb
new file mode 100644
index 0000000..7c0941b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb
@@ -0,0 +1,5 @@
+class ChangeControllerstoBlurControllers < ActiveRecord::Migration
+  def change
+    rename_table :controllers, :blur_controllers
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb
new file mode 100644
index 0000000..8a263ef
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb
@@ -0,0 +1,5 @@
+class ChangeShardtoBlurShards < ActiveRecord::Migration
+  def change
+    rename_table :shards, :blur_shards
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb
new file mode 100644
index 0000000..1f67b15
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb
@@ -0,0 +1,5 @@
+class AddZookeeperToAudits < ActiveRecord::Migration
+  def change
+    add_column :audits, :zookeeper_affected, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb
new file mode 100644
index 0000000..70a3b8d
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb
@@ -0,0 +1,6 @@
+class AddPreFilterToSearch < ActiveRecord::Migration
+  def change
+    add_column :searches, :pre_filter, :text
+
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb b/src/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb
new file mode 100644
index 0000000..543db87
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb
@@ -0,0 +1,6 @@
+class AddPostFilterToSearch < ActiveRecord::Migration
+  def change
+    add_column :searches, :post_filter, :text
+
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb b/src/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb
new file mode 100644
index 0000000..96c3e8b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb
@@ -0,0 +1,5 @@
+class AddOnlineEnsembleNodes < ActiveRecord::Migration
+  def change
+    add_column :zookeepers, :online_ensemble_nodes, :string
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb b/src/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb
new file mode 100644
index 0000000..e1ba023
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb
@@ -0,0 +1,10 @@
+class AddTimestampsToBlurObjects < ActiveRecord::Migration
+  def change
+    change_table :blur_shards do |table|
+      table.timestamps
+    end
+    change_table :blur_controllers do |table|
+      table.timestamps
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb
new file mode 100644
index 0000000..1747fcd
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb
@@ -0,0 +1,9 @@
+class AddAdminConifgurationsTable < ActiveRecord::Migration
+  def change
+    create_table :admin_settings do |table|
+      table.column :setting, :string, :null => false
+      table.column :value, :string
+      table.timestamps
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb b/src/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb
new file mode 100644
index 0000000..bb6f82b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb
@@ -0,0 +1,15 @@
+class RenameStatusColumns < ActiveRecord::Migration
+  def up
+    rename_column :blur_controllers, :status, :controller_status
+    rename_column :blur_shards, :status, :shard_status
+    rename_column :blur_tables, :status, :table_status
+    rename_column :zookeepers, :status, :zookeeper_status
+  end
+
+  def down
+    rename_column :blur_controllers, :controller_status, :status
+    rename_column :blur_shards, :shard_status, :status
+    rename_column :blur_tables, :table_status, :status
+    rename_column :zookeepers, :status, :zookeeper_status
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb b/src/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb
new file mode 100644
index 0000000..7659f14
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb
@@ -0,0 +1,16 @@
+class DropLicensesTable < ActiveRecord::Migration
+  def up
+    drop_table :licenses
+  end
+
+  def down
+    create_table "licenses", :id => false, :force => true do |t|
+      t.string  "org"
+      t.date    "issued_date"
+      t.date    "expires_date"
+      t.integer "node_overage"
+      t.integer "grace_period_days_remain"
+      t.integer "cluster_overage"
+    end
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/schema.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/schema.rb b/src/contrib/blur-console/blur-admin/db/schema.rb
new file mode 100644
index 0000000..c8de443
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/schema.rb
@@ -0,0 +1,199 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 20130505151503) do
+
+  create_table "admin_settings", :force => true do |t|
+    t.string   "setting",    :null => false
+    t.string   "value"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
+  end
+
+  create_table "audits", :force => true do |t|
+    t.integer  "user_id"
+    t.string   "mutation"
+    t.string   "model_affected"
+    t.string   "action"
+    t.datetime "created_at",         :null => false
+    t.datetime "updated_at",         :null => false
+    t.string   "zookeeper_affected"
+  end
+
+  create_table "blur_controllers", :force => true do |t|
+    t.integer  "controller_status"
+    t.string   "blur_version"
+    t.string   "node_name"
+    t.integer  "zookeeper_id"
+    t.datetime "created_at",        :null => false
+    t.datetime "updated_at",        :null => false
+  end
+
+  add_index "blur_controllers", ["zookeeper_id"], :name => "index_controllers_on_zookeeper_id"
+
+  create_table "blur_queries", :force => true do |t|
+    t.text     "query_string",             :limit => 16777215
+    t.integer  "complete_shards"
+    t.integer  "uuid",                     :limit => 8
+    t.datetime "created_at",                                   :null => false
+    t.datetime "updated_at",                                   :null => false
+    t.boolean  "super_query_on"
+    t.string   "facets"
+    t.integer  "start"
+    t.integer  "fetch_num"
+    t.text     "pre_filters",              :limit => 16777215
+    t.text     "post_filters",             :limit => 16777215
+    t.text     "selector_column_families"
+    t.text     "selector_columns"
+    t.string   "userid"
+    t.integer  "blur_table_id"
+    t.string   "times"
+    t.integer  "total_shards"
+    t.integer  "state"
+    t.boolean  "record_only"
+  end
+
+  add_index "blur_queries", ["blur_table_id"], :name => "index_blur_queries_on_blur_table_id"
+
+  create_table "blur_shards", :force => true do |t|
+    t.integer  "shard_status"
+    t.string   "blur_version"
+    t.string   "node_name"
+    t.integer  "cluster_id"
+    t.datetime "created_at",   :null => false
+    t.datetime "updated_at",   :null => false
+  end
+
+  add_index "blur_shards", ["cluster_id"], :name => "index_shards_on_cluster_id"
+
+  create_table "blur_tables", :force => true do |t|
+    t.string   "table_name"
+    t.integer  "current_size",   :limit => 8
+    t.integer  "query_usage"
+    t.datetime "updated_at"
+    t.integer  "record_count",   :limit => 8
+    t.integer  "table_status"
+    t.string   "table_uri"
+    t.text     "table_analyzer"
+    t.text     "table_schema"
+    t.text     "server"
+    t.integer  "cluster_id"
+    t.integer  "row_count",      :limit => 8
+    t.string   "comments"
+  end
+
+  add_index "blur_tables", ["cluster_id"], :name => "index_blur_tables_on_cluster_id"
+
+  create_table "clusters", :force => true do |t|
+    t.string  "name"
+    t.integer "zookeeper_id"
+    t.boolean "safe_mode"
+  end
+
+  add_index "clusters", ["zookeeper_id"], :name => "index_clusters_on_zookeeper_id"
+
+  create_table "hdfs", :force => true do |t|
+    t.string "host"
+    t.string "port"
+    t.string "name"
+  end
+
+  create_table "hdfs_stats", :force => true do |t|
+    t.integer  "config_capacity",  :limit => 8
+    t.integer  "present_capacity", :limit => 8
+    t.integer  "dfs_remaining",    :limit => 8
+    t.integer  "dfs_used_real",    :limit => 8
+    t.float    "dfs_used_percent"
+    t.integer  "under_replicated", :limit => 8
+    t.integer  "corrupt_blocks",   :limit => 8
+    t.integer  "missing_blocks",   :limit => 8
+    t.integer  "total_nodes"
+    t.integer  "dead_nodes"
+    t.datetime "created_at",                    :null => false
+    t.string   "host"
+    t.string   "port"
+    t.integer  "hdfs_id"
+    t.integer  "live_nodes"
+    t.integer  "dfs_used_logical", :limit => 8
+  end
+
+  add_index "hdfs_stats", ["hdfs_id"], :name => "index_hdfs_stats_on_hdfs_id"
+
+  create_table "preferences", :force => true do |t|
+    t.string   "name"
+    t.string   "pref_type"
+    t.text     "value"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
+    t.integer  "user_id"
+  end
+
+  add_index "preferences", ["user_id"], :name => "index_preferences_on_user_id"
+
+  create_table "searches", :force => true do |t|
+    t.boolean  "super_query"
+    t.text     "columns"
+    t.integer  "fetch"
+    t.integer  "offset"
+    t.string   "name"
+    t.string   "query"
+    t.integer  "blur_table_id"
+    t.integer  "user_id"
+    t.datetime "created_at",                       :null => false
+    t.datetime "updated_at",                       :null => false
+    t.boolean  "record_only",   :default => false
+    t.text     "pre_filter"
+    t.text     "post_filter"
+  end
+
+  add_index "searches", ["blur_table_id"], :name => "index_searches_on_blur_table_id"
+  add_index "searches", ["user_id"], :name => "index_searches_on_user_id"
+
+  create_table "system_metrics", :force => true do |t|
+    t.string   "name",               :null => false
+    t.datetime "started_at",         :null => false
+    t.string   "transaction_id"
+    t.text     "payload"
+    t.float    "duration",           :null => false
+    t.float    "exclusive_duration", :null => false
+    t.integer  "request_id"
+    t.integer  "parent_id"
+    t.string   "action",             :null => false
+    t.string   "category",           :null => false
+  end
+
+  add_index "system_metrics", ["parent_id"], :name => "index_system_metrics_on_parent_id"
+  add_index "system_metrics", ["request_id"], :name => "index_system_metrics_on_request_id"
+  add_index "system_metrics", ["transaction_id"], :name => "index_system_metrics_on_transaction_id"
+
+  create_table "users", :force => true do |t|
+    t.string   "username"
+    t.string   "email"
+    t.string   "crypted_password"
+    t.string   "password_salt"
+    t.string   "persistence_token"
+    t.datetime "created_at",        :null => false
+    t.datetime "updated_at",        :null => false
+    t.integer  "roles_mask"
+    t.string   "name"
+  end
+
+  create_table "zookeepers", :force => true do |t|
+    t.string  "url"
+    t.string  "name"
+    t.integer "zookeeper_status"
+    t.string  "blur_urls",             :limit => 4000
+    t.string  "online_ensemble_nodes"
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/db/seeds.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/db/seeds.rb b/src/contrib/blur-console/blur-admin/db/seeds.rb
new file mode 100644
index 0000000..4ae194e
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/db/seeds.rb
@@ -0,0 +1,15 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
+#   Mayor.create(:name => 'Daley', :city => cities.first)
+
+User.create({:username => 'admin',
+            :name => 'Delete Me',
+            :password => 'password',
+            :password_confirmation =>
+            'password',
+            :email => 'admin@blurtools.io',
+            :roles_mask => 31}, :without_protection => true)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/doc/README_FOR_APP
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/doc/README_FOR_APP b/src/contrib/blur-console/blur-admin/doc/README_FOR_APP
new file mode 100644
index 0000000..fe41f5c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/doc/README_FOR_APP
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/lib/assets/.gitkeep
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/lib/assets/.gitkeep b/src/contrib/blur-console/blur-admin/lib/assets/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb b/src/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb
new file mode 100644
index 0000000..347359c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb
@@ -0,0 +1,13 @@
+class BlurThriftClient
+  @@connections = {}
+
+  # ["host:port","host2:port"]
+  def self.client(host_port)
+    if host_port.class == String
+      urls = host_port.split(/,/)
+    else
+      urls = Array(host_port)
+    end
+    ThriftClient.new Blur::Blur::Client, urls, :retries => 10
+  end
+end


Mime
View raw message