http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb b/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb deleted file mode 100644 index a792f43..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20120820073548_update_collation_on_all_tables.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb b/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb deleted file mode 100644 index c3811a8..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20120824172333_change_controllersto_blur_controllers.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -class ChangeControllerstoBlurControllers < ActiveRecord::Migration - def change - rename_table :controllers, :blur_controllers - end -end http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb b/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb deleted file mode 100644 index 3bb2e54..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20120824174553_change_shardto_blur_shards.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -class ChangeShardtoBlurShards < ActiveRecord::Migration - def change - rename_table :shards, :blur_shards - end -end http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb b/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb deleted file mode 100644 index 5622439..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20120827172222_add_zookeeper_to_audits.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb b/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb deleted file mode 100644 index 58bf9b4..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20120926202222_add_pre_filter_to_search.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb b/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb deleted file mode 100644 index 404234b..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20120926202240_add_post_filter_to_search.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb b/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb deleted file mode 100644 index f177616..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20121025175857_add_online_ensemble_nodes.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb b/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb deleted file mode 100644 index ecf9325..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20121030184429_add_timestamps_to_blur_objects.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb b/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb deleted file mode 100644 index c88062e..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20121220193623_add_admin_conifgurations_table.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb b/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb deleted file mode 100644 index 673a73a..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20130106191159_rename_status_columns.rb +++ /dev/null @@ -1,32 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb b/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb deleted file mode 100644 index 2409c6c..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20130505151503_drop_licenses_table.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -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/688e9d08/contrib/blur-console/blur-admin/db/migrate/20130829031155_change_blur_queries_uuid_to_string.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20130829031155_change_blur_queries_uuid_to_string.rb b/contrib/blur-console/blur-admin/db/migrate/20130829031155_change_blur_queries_uuid_to_string.rb deleted file mode 100644 index 458f5a0..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20130829031155_change_blur_queries_uuid_to_string.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -class ChangeBlurQueriesUuidToString < ActiveRecord::Migration - def up - change_column :blur_queries, :uuid, :string - end - - def down - change_column :blur_queries, :uuid, :limit => 8 - end -end http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/db/migrate/20130904130250_increase_size_of_query_times_json.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/migrate/20130904130250_increase_size_of_query_times_json.rb b/contrib/blur-console/blur-admin/db/migrate/20130904130250_increase_size_of_query_times_json.rb deleted file mode 100644 index ba9a21e..0000000 --- a/contrib/blur-console/blur-admin/db/migrate/20130904130250_increase_size_of_query_times_json.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with this -# work for additional information regarding copyright ownership. The ASF -# licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -class IncreaseSizeOfQueryTimesJson < ActiveRecord::Migration - def up - change_column :blur_queries, :times, :text - end - - def down - change_column :blur_queries, :times, :string - end -end http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/db/schema.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/schema.rb b/contrib/blur-console/blur-admin/db/schema.rb deleted file mode 100644 index 88a4b9c..0000000 --- a/contrib/blur-console/blur-admin/db/schema.rb +++ /dev/null @@ -1,199 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# 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 => 20130904130250) 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.string "uuid" - 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.text "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 "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/688e9d08/contrib/blur-console/blur-admin/db/seeds.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/db/seeds.rb b/contrib/blur-console/blur-admin/db/seeds.rb deleted file mode 100644 index bcddc9d..0000000 --- a/contrib/blur-console/blur-admin/db/seeds.rb +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with this -# work for additional information regarding copyright ownership. The ASF -# licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# 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 => '[email protected]', - :roles_mask => 31}, :without_protection => true) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb b/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb deleted file mode 100644 index e0aebfb..0000000 --- a/contrib/blur-console/blur-admin/lib/blur_thrift_client.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with this -# work for additional information regarding copyright ownership. The ASF -# licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -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 http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/lib/hdfs_thrift_client.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/lib/hdfs_thrift_client.rb b/contrib/blur-console/blur-admin/lib/hdfs_thrift_client.rb deleted file mode 100644 index bed9146..0000000 --- a/contrib/blur-console/blur-admin/lib/hdfs_thrift_client.rb +++ /dev/null @@ -1,93 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with this -# work for additional information regarding copyright ownership. The ASF -# licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -class HdfsThriftClient - @@connections = {} - - def self.client(host_port) - socket = Thrift::Socket.new(host_port.split(":").first,host_port.split(":").last) - transport = Thrift::BufferedTransport.new(socket) - transport.open - protocol = Thrift::BinaryProtocol.new(transport) - client = ThriftHadoopFileSystem::Client.new(protocol) - - Client.new(client) - end - - class Client - def initialize(client) - @client = client - end - - def stat(path) - @client.stat(pathname(path)) - end - - def mkdirs(path) - @client.mkdirs(pathname(path)) - end - - def rename(from, to) - @client.rename(pathname(from),pathname(to)) - end - - def delete(path, recursive=false) - @client.rm pathname(path), recursive - end - - def put(local, remote) - handle = @client.create(pathname(remote)) - Kernel.open(local) { |source| - # read 1 MB at a time - while record = source.read(1048576) - @client.write(handle, record) - end - @client.close(handle) - } - end - - def ls(path, recursive=false) - statuses = @client.listStatus(pathname(path)) - return statuses unless recursive - statuses + statuses.select { |s| s.isdir }.map { |s| ls(s.path, recursive) }.flatten - end - - def folder_tree(path, depth) - if depth == 0 - return {:name => path, :size => folder_size(path)} - end - statuses = @client.listStatus(pathname(path)) - file_tree = {:name => path, :children => - statuses.map do |status| - status.isdir ? folder_tree(status.path, depth - 1) : {:name => status.path, :size => status.length} - end - } - end - - private - def pathname(path) - ThriftHadoopFileSystem::Pathname.new(:pathname => path.to_s) - end - - def folder_size(path) - statuses = @client.listStatus(pathname(path)) - size = 0 - statuses.each do |status| - size += status.isdir ? folder_size(status.path) : status.length - end - size - end - end -end http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/lib/pounder/pounder.rb ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/lib/pounder/pounder.rb b/contrib/blur-console/blur-admin/lib/pounder/pounder.rb deleted file mode 100644 index cc2237f..0000000 --- a/contrib/blur-console/blur-admin/lib/pounder/pounder.rb +++ /dev/null @@ -1,76 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with this -# work for additional information regarding copyright ownership. The ASF -# licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -class Pounder - def self.run - # Setup object heirarchy - zk = Zookeeper.create!(:name => "Pounder-zk") - cluster = Cluster.create!(:name => "Pounder-cluster", :zookeeper => zk) - table = BlurTable.create!(:table_name => "Pounder-table", :table_status=> 0, :cluster => cluster) - - # Loop and add queries - threads = [] - - # Add new queries - threads << Thread.new(table) { |blur_table| - count = 0 - while count < 1000 - state = rand(3) - completed = 20 - if state == 0 || state == 1 - completed = 20 - rand(20) - end - query = BlurQuery.create!(:query_string => "query_#{count}", :uuid => count, :created_at => Time.now, :updated_at => Time.now, :blur_table => blur_table, :state => state, :total_shards => 20, :complete_shards => completed, :times => '{}') - puts "Query #{count} created: #{query.state_str}" - count = count + 1 - sleep(rand(6)) - end - } - - # Update running queries - threads << Thread.new(table) { |blur_table| - count = 0 - while count < 1000 - query = BlurQuery.where("state = 0 and blur_table_id = '#{blur_table.id}'").order("RAND()").first - - if query - state = rand(3) - completed = 20 - if state == 0 || state == 1 - completed = 20 - rand(20) - end - query.update_attributes!({:state => state, :complete_shards => completed, :updated_at => Time.now}) - puts "Query #{count} updated" - end - count = count + 1 - sleep(rand(6)) - end - } - - threads.each { |thread| thread.join } - - # Clean up objects - Zookeeper.destroy(zk.id) - end - - def self.clean - zk = Zookeeper.where("name = 'Pounder-zk'") - if !zk.empty? - zk.each do |z| - Zookeeper.destroy(z.id) - end - end - end -end \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/lib/tasks/coverage.rake ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/lib/tasks/coverage.rake b/contrib/blur-console/blur-admin/lib/tasks/coverage.rake deleted file mode 100644 index 50bfa7a..0000000 --- a/contrib/blur-console/blur-admin/lib/tasks/coverage.rake +++ /dev/null @@ -1,34 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -tests = [:models, :controllers, :helpers] -tests_tasks = tests.collect{ |type| "cov:#{type.to_s}" } - -namespace :cov do - tests.each do |type| - desc "Rspec with simplecov (#{type.to_s} only)" - task type do - ENV['COVERAGE'] = 'true' - ENV['PORTION'] = type.to_s - Rake::Task["spec:#{type}"].execute - end - end -end - -desc "Rspec with simplecov" -task :cov => tests_tasks \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/688e9d08/contrib/blur-console/blur-admin/lib/tasks/pounder.rake ---------------------------------------------------------------------- diff --git a/contrib/blur-console/blur-admin/lib/tasks/pounder.rake b/contrib/blur-console/blur-admin/lib/tasks/pounder.rake deleted file mode 100644 index 4185537..0000000 --- a/contrib/blur-console/blur-admin/lib/tasks/pounder.rake +++ /dev/null @@ -1,31 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -require 'pounder/pounder' - -namespace :pounder do - desc "Creates a continuous random set of queries into the database" - task :run => :environment do - Pounder.run - end - - desc "Clean up pounder data, for use when the pounder fails unexpectedly" - task :clean => :environment do - Pounder.clean - end -end \ No newline at end of file
