rbhive 0.1.10 → 0.1.11

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.
Files changed (2) hide show
  1. data/lib/rbhive/connection.rb +10 -2
  2. metadata +3 -3
@@ -51,6 +51,15 @@ module RBHive
51
51
  client.execute(query)
52
52
  end
53
53
 
54
+ def priority=(priority)
55
+ set("mapred.job.priority", priority)
56
+ end
57
+
58
+ def set(name,value)
59
+ @logger.info("Setting #{name}=#{value}")
60
+ client.execute("SET #{name}=#{value}")
61
+ end
62
+
54
63
  def fetch(query)
55
64
  execute(query)
56
65
  ResultSet.new(client.fetchAll)
@@ -99,10 +108,9 @@ module RBHive
99
108
  private
100
109
 
101
110
  def output(sep, out_file)
102
- sv = self.map { |r| r.join(sep) }.join("\n")
111
+ sv = self.map { |r| r.join("\"" + sep + "\"") }.join("\n")
103
112
  return sv if out_file.nil?
104
113
  File.open(out_file, 'w') { |f| f << sv }
105
114
  end
106
115
  end
107
116
  end
108
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbhive
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 10
10
- version: 0.1.10
9
+ - 11
10
+ version: 0.1.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Forward Internet Group