rbpig 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/rbpig CHANGED
@@ -12,10 +12,6 @@ OptionParser.new do |opts|
12
12
  opts.on("-c", "--conf HADOOP_CONF", "Use this hadoop cluster xml config file.") do |config|
13
13
  options.hadoop_config = config
14
14
  end
15
-
16
- opts.on("-m", "--mata-conf HIVE_CONF", "Use this hive metastore xml config file.") do |config|
17
- options.hive_config = config
18
- end
19
15
 
20
16
  opts.on_tail("-h", "--help", "Show this message") do
21
17
  puts opts
@@ -23,4 +19,4 @@ OptionParser.new do |opts|
23
19
  end
24
20
  end.parse!
25
21
 
26
- exec(RBPig.executable(:hadoop_config => options.hadoop_config, :hive_config => options.hive_config))
22
+ exec(RBPig.executable(:hadoop_config => options.hadoop_config))
Binary file
Binary file
@@ -1,6 +1,5 @@
1
1
  require 'fileutils'
2
2
  require 'rexml/document'
3
- require File.join(File.dirname(__FILE__), "rbpig", "dataset")
4
3
 
5
4
  module RBPig
6
5
  class << self
@@ -25,25 +24,20 @@ module RBPig
25
24
 
26
25
  private
27
26
  def pig_configs(configs)
28
- {:hadoop_config => nil, :hive_config => nil}.merge(configs || {})
27
+ {:hadoop_config => nil}.merge(configs || {})
29
28
  end
30
29
 
31
30
  def pig_classpath(configs)
32
31
  classpath = [
33
32
  "#{File.join(File.dirname(__FILE__), %w[.. java dist porkchop.jar])}",
34
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive hive-exec-0.5.0+32.jar])}",
35
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive hive-metastore-0.5.0+32.jar])}",
36
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive libfb303.jar])}",
37
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive jdo2-api-2.3-SNAPSHOT.jar])}",
38
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive datanucleus-core-1.1.2-patched.jar])}",
39
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive datanucleus-enhancer-1.1.2.jar])}",
40
- "#{File.join(File.dirname(__FILE__), %w[.. java lib hive datanucleus-rdbms-1.1.2.jar])}",
41
- "#{File.join(File.dirname(__FILE__), %w[.. java lib pig jsp-2.1-6.1.14.jar])}"
33
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib hive hive-metastore-0.7.0-CDH3B4.jar])}",
34
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib hive thrift-0.5.0.jar])}",
35
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib hive thrift-fb303-0.5.0.jar])}",
36
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib jsp-2.1.jar])}",
37
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib log4j-1.2.16.jar])}",
38
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib slf4j-api-1.6.1.jar])}",
39
+ "#{File.join(File.dirname(__FILE__), %w[.. java lib slf4j-log4j12-1.6.1.jar])}"
42
40
  ]
43
- unless configs[:hive_config].nil?
44
- raise "Rename '#{configs[:hive_config]}' to hive-site.xml for hive metastore configuration." unless File.basename(configs[:hive_config]) == "hive-site.xml"
45
- classpath << File.dirname(configs[:hive_config])
46
- end
47
41
  classpath.join(":").freeze
48
42
  end
49
43
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jae Lee
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-11 00:00:00 +00:00
17
+ date: 2011-03-10 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -43,16 +43,14 @@ extra_rdoc_files: []
43
43
  files:
44
44
  - bin/rbpig
45
45
  - lib/rbpig.rb
46
- - lib/rbpig/dataset.rb
47
46
  - java/dist/porkchop.jar
48
- - java/lib/hive/hive-exec-0.5.0+32.jar
49
- - java/lib/hive/hive-metastore-0.5.0+32.jar
50
- - java/lib/hive/libfb303.jar
51
- - java/lib/hive/jdo2-api-2.3-SNAPSHOT.jar
52
- - java/lib/hive/datanucleus-core-1.1.2-patched.jar
53
- - java/lib/hive/datanucleus-enhancer-1.1.2.jar
54
- - java/lib/hive/datanucleus-rdbms-1.1.2.jar
55
- - java/lib/pig/jsp-2.1-6.1.14.jar
47
+ - java/lib/hive/hive-metastore-0.7.0-CDH3B4.jar
48
+ - java/lib/hive/thrift-0.5.0.jar
49
+ - java/lib/hive/thrift-fb303-0.5.0.jar
50
+ - java/lib/jsp-2.1.jar
51
+ - java/lib/log4j-1.2.16.jar
52
+ - java/lib/slf4j-api-1.6.1.jar
53
+ - java/lib/slf4j-log4j12-1.6.1.jar
56
54
  has_rdoc: true
57
55
  homepage: https://github.com/forward/rbpig
58
56
  licenses: []
Binary file
@@ -1,23 +0,0 @@
1
- module RBPig
2
- class Dataset
3
- class << self
4
- HIVE_CONFIG = {:database => "default", :database_root => "/user/hive/warehouse"}
5
-
6
- def hive(table_name, storage_type = :text_file, config = {})
7
- raise "storage type other than :text_file is not supported." unless storage_type == :text_file
8
-
9
- config = HIVE_CONFIG.merge(:field_separator => "\\t").merge(config)
10
- new("#{table_name} = LOAD '#{config[:database_root]}/#{table_name}' USING HiveTableLoader('#{config[:field_separator]}', '#{config[:database]}');")
11
- end
12
- end
13
-
14
- def to_s
15
- @load_script
16
- end
17
-
18
- private
19
- def initialize(load_script)
20
- @load_script = load_script
21
- end
22
- end
23
- end