[Groonga-commit] droonga/droonga-engine at 412ca73 [master] Follow to change of class relations

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Apr 15 14:39:36 JST 2015


YUKI Hiroshi	2015-04-15 14:39:36 +0900 (Wed, 15 Apr 2015)

  New Revision: 412ca73e4feefd273cee217c53d7607d4b337214
  https://github.com/droonga/droonga-engine/commit/412ca73e4feefd273cee217c53d7607d4b337214

  Message:
    Follow to change of class relations

  Modified files:
    bin/droonga-engine-catalog-generate
    bin/droonga-engine-catalog-modify
    bin/droonga-engine-join
    bin/droonga-engine-set-role
    bin/droonga-engine-unjoin
  Renamed files:
    test/unit/catalog/test_generator.rb
      (from test/unit/test_catalog_generator.rb)

  Modified: bin/droonga-engine-catalog-generate (+12 -12)
===================================================================
--- bin/droonga-engine-catalog-generate    2015-04-15 14:32:40 +0900 (8e24a40)
+++ bin/droonga-engine-catalog-generate    2015-04-15 14:39:36 +0900 (9e299f3)
@@ -21,17 +21,17 @@ require "json"
 require "pathname"
 
 require "droonga/engine/version"
-require "droonga/catalog_generator"
+require "droonga/catalog/generator"
 require "droonga/safe_file_writer"
 require "droonga/service_installation"
 
 service_installation = Droonga::ServiceInstallation.new
 service_installation.ensure_using_service_base_directory
 
-generator = Droonga::CatalogGenerator.new
+generator = Droonga::Catalog::Generator.new
 current_dataset = {}
 datasets = {
-  Droonga::CatalogGenerator::DEFAULT_DATASET => current_dataset
+  Droonga::Catalog::Generator::DEFAULT_DATASET => current_dataset
 }
 
 options = OpenStruct.new
@@ -51,37 +51,37 @@ end
 parser.on("--dataset=NAME",
           "Add a dataset its name is NAME.",
           "And set the NAME to the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_DATASET})") do |name|
+          "(#{Droonga::Catalog::Generator::DEFAULT_DATASET})") do |name|
   current_dataset = datasets[name] = {}
 end
 parser.on("--n-workers=N", Integer,
           "Use N workers for the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_N_WORKERS})") do |n|
+          "(#{Droonga::Catalog::Generator::DEFAULT_N_WORKERS})") do |n|
   current_dataset[:n_workers] = n
 end
 parser.on("--hosts=NAME1,NAME2,...", Array,
           "Use given hosts for replicas of the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_HOSTS.join(",")})") do |hosts|
+          "(#{Droonga::Catalog::Generator::DEFAULT_HOSTS.join(",")})") do |hosts|
   current_dataset[:hosts] = hosts
 end
 parser.on("--port=PORT", Integer,
           "Use the PORT as the port for the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_PORT})") do |port|
+          "(#{Droonga::Catalog::Generator::DEFAULT_PORT})") do |port|
   current_dataset[:port] = port
 end
 parser.on("--tag=TAG",
           "Use the TAG as the tag for the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_TAG})") do |tag|
+          "(#{Droonga::Catalog::Generator::DEFAULT_TAG})") do |tag|
   current_dataset[:tag] = tag
 end
 parser.on("--n-slices=N", Integer,
           "Use N slices for each replica.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_N_SLICES})") do |n|
+          "(#{Droonga::Catalog::Generator::DEFAULT_N_SLICES})") do |n|
   current_dataset[:n_slices] = n
 end
 parser.on("--plugins=PLUGIN1,PLUGIN2,...", Array,
           "Use PLUGINS for the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_PLUGINS.join(",")})") do |plugins|
+          "(#{Droonga::Catalog::Generator::DEFAULT_PLUGINS.join(",")})") do |plugins|
   current_dataset[:plugins] = plugins
 end
 parser.on("--schema=PATH",
@@ -102,8 +102,8 @@ parser.on("--replicas=PATH",
 end
 parser.parse!(ARGV)
 
-if datasets[Droonga::CatalogGenerator::DEFAULT_DATASET].empty?
-  datasets.delete(Droonga::CatalogGenerator::DEFAULT_DATASET)
+if datasets[Droonga::Catalog::Generator::DEFAULT_DATASET].empty?
+  datasets.delete(Droonga::Catalog::Generator::DEFAULT_DATASET)
 end
 
 if service_installation.user_exist? and

  Modified: bin/droonga-engine-catalog-modify (+4 -4)
===================================================================
--- bin/droonga-engine-catalog-modify    2015-04-15 14:32:40 +0900 (9627169)
+++ bin/droonga-engine-catalog-modify    2015-04-15 14:39:36 +0900 (409cfd8)
@@ -21,17 +21,17 @@ require "json"
 require "pathname"
 
 require "droonga/engine/version"
-require "droonga/catalog_generator"
+require "droonga/catalog/generator"
 require "droonga/safe_file_writer"
 require "droonga/service_installation"
 
 service_installation = Droonga::ServiceInstallation.new
 service_installation.ensure_using_service_base_directory
 
-generator = Droonga::CatalogGenerator.new
+generator = Droonga::Catalog::Generator.new
 current_dataset = {}
 datasets = {
-  Droonga::CatalogGenerator::DEFAULT_DATASET => current_dataset
+  Droonga::Catalog::Generator::DEFAULT_DATASET => current_dataset
 }
 
 options = OpenStruct.new
@@ -65,7 +65,7 @@ end
 parser.on("--dataset=NAME",
           "Add a dataset its name is NAME.",
           "And set the NAME to the current dataset.",
-          "(#{Droonga::CatalogGenerator::DEFAULT_DATASET})") do |name|
+          "(#{Droonga::Catalog::Generator::DEFAULT_DATASET})") do |name|
   current_dataset = datasets[name] = {}
 end
 parser.on("--replica-hosts=NAME1,NAME2,...", Array,

  Modified: bin/droonga-engine-join (+7 -7)
===================================================================
--- bin/droonga-engine-join    2015-04-15 14:32:40 +0900 (66cd06d)
+++ bin/droonga-engine-join    2015-04-15 14:39:36 +0900 (7587f51)
@@ -25,8 +25,8 @@ require "droonga/engine/version"
 require "droonga/path"
 require "droonga/node_name"
 require "droonga/catalog/dataset"
-require "droonga/catalog_fetcher"
-require "droonga/catalog_loader"
+require "droonga/catalog/fetcher"
+require "droonga/catalog/loader"
 require "droonga/safe_file_writer"
 require "droonga/data_absorber_client"
 require "droonga/serf"
@@ -148,7 +148,7 @@ class JoinCommand
   end
 
   def parse_source_catalog
-    loader = Droonga::CatalogLoader.new
+    loader = Droonga::Catalog::Loader.new
     loader.parse(raw_source_catalog)
   end
 
@@ -157,10 +157,10 @@ class JoinCommand
   end
 
   def fetch_source_catalog
-    fetcher = Droonga::CatalogFetcher.new(:host          => source_node.host,
-                                          :port          => source_node.port,
-                                          :tag           => source_node.tag,
-                                          :receiver_host => @options["receiver-host"])
+    fetcher = Droonga::Catalog::Fetcher.new(:host          => source_node.host,
+                                            :port          => source_node.port,
+                                            :tag           => source_node.tag,
+                                            :receiver_host => @options["receiver-host"])
     fetcher.fetch(:dataset => dataset)
   end
 

  Modified: bin/droonga-engine-set-role (+4 -4)
===================================================================
--- bin/droonga-engine-set-role    2015-04-15 14:32:40 +0900 (30c0066)
+++ bin/droonga-engine-set-role    2015-04-15 14:39:36 +0900 (0c43e95)
@@ -19,7 +19,7 @@ require "slop"
 require "socket"
 
 require "droonga/engine/version"
-require "droonga/catalog_generator"
+require "droonga/node_name"
 require "droonga/serf"
 
 class SetRoleCommand
@@ -47,14 +47,14 @@ class SetRoleCommand
                 :default => Socket.gethostname)
       option.on(:dataset=,
                 "Dataset name of for the target node.",
-                :default => Droonga::CatalogGenerator::DEFAULT_DATASET)
+                :default => Droonga::NodeName::DEFAULT_DATASET)
       option.on(:port=,
                 "Port number of the source cluster to be connected.",
                 :as => Integer,
-                :default => Droonga::CatalogGenerator::DEFAULT_PORT)
+                :default => Droonga::NodeName::DEFAULT_PORT)
       option.on(:tag=,
                 "Tag name of the soruce cluster to be connected.",
-                :default => Droonga::CatalogGenerator::DEFAULT_TAG)
+                :default => Droonga::NodeName::DEFAULT_TAG)
 
       option.separator("Miscellaneous:")
       option.on(:verbose, "Output details for internal operations.",

  Modified: bin/droonga-engine-unjoin (+13 -12)
===================================================================
--- bin/droonga-engine-unjoin    2015-04-15 14:32:40 +0900 (3520283)
+++ bin/droonga-engine-unjoin    2015-04-15 14:39:36 +0900 (4f46ae2)
@@ -21,9 +21,10 @@ require "pathname"
 
 require "droonga/engine/version"
 require "droonga/path"
-require "droonga/catalog_fetcher"
-require "droonga/catalog_generator"
-require "droonga/catalog_loader"
+require "droonga/node_name"
+require "droonga/catalog/fetcher"
+require "droonga/catalog/generator"
+require "droonga/catalog/loader"
 require "droonga/serf"
 
 class UnjoinCommand
@@ -51,14 +52,14 @@ class UnjoinCommand
                 :default => Socket.gethostname)
       option.on(:dataset=,
                 "Dataset name of for the node to be unjoined.",
-                :default => Droonga::CatalogGenerator::DEFAULT_DATASET)
+                :default => Droonga::NodeName::DEFAULT_DATASET)
       option.on(:port=,
                 "Port number of the source cluster to be connected.",
                 :as => Integer,
-                :default => Droonga::CatalogGenerator::DEFAULT_PORT)
+                :default => Droonga::NodeName::DEFAULT_PORT)
       option.on(:tag=,
                 "Tag name of the soruce cluster to be connected.",
-                :default => Droonga::CatalogGenerator::DEFAULT_TAG)
+                :default => Droonga::NodeName::DEFAULT_TAG)
 
       option.separator("Miscellaneous:")
       option.on(:verbose, "Output details for internal operations.",
@@ -99,7 +100,7 @@ class UnjoinCommand
   end
 
   def parse_catalog
-    loader = Droonga::CatalogLoader.new
+    loader = Droonga::Catalog::Loader.new
     loader.parse(raw_catalog)
   end
 
@@ -108,10 +109,10 @@ class UnjoinCommand
   end
 
   def fetch_catalog
-    fetcher = Droonga::CatalogFetcher.new(:host          => replica_remove_host,
-                                          :port          => port,
-                                          :tag           => tag,
-                                          :receiver_host => @options["receiver-host"])
+    fetcher = Droonga::Catalog::Fetcher.new(:host          => replica_remove_host,
+                                            :port          => port,
+                                            :tag           => tag,
+                                            :receiver_host => @options["receiver-host"])
     fetcher.fetch(:dataset => dataset_name)
   end
 
@@ -120,7 +121,7 @@ class UnjoinCommand
   end
 
   def detect_remaining_node
-    generator = Droonga::CatalogGenerator.new
+    generator = Droonga::Catalog::Generator.new
     generator.load(raw_catalog)
 
     dataset = generator.dataset_for_host(replica_remove_host)

  Renamed: test/unit/catalog/test_generator.rb (+2 -2) 97%
===================================================================
--- test/unit/test_catalog_generator.rb    2015-04-15 14:32:40 +0900 (a770be0)
+++ test/unit/catalog/test_generator.rb    2015-04-15 14:39:36 +0900 (ce5bcb1)
@@ -13,11 +13,11 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-require "droonga/catalog_generator"
+require "droonga/catalog/generator"
 
 class CatalogGeneratorTest < Test::Unit::TestCase
   def setup
-    @generator = Droonga::CatalogGenerator.new
+    @generator = Droonga::Catalog::Generator.new
     @normalized_time_value = "2014-02-09T00:00:00Z"
   end
 
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index