ganapati 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/Gemfile +3 -0
  2. data/Gemfile.lock +20 -0
  3. data/Rakefile +2 -1
  4. data/docs/Ganapati.html +265 -0
  5. data/docs/Ganapati/Client.html +998 -0
  6. data/docs/Ganapati/FileUrl.html +469 -0
  7. data/docs/Ganapati/HFile.html +470 -0
  8. data/docs/README_rdoc.html +281 -0
  9. data/docs/ThriftHadoopFileSystem.html +336 -0
  10. data/docs/ThriftHadoopFileSystem/Append_args.html +352 -0
  11. data/docs/ThriftHadoopFileSystem/Append_result.html +357 -0
  12. data/docs/ThriftHadoopFileSystem/BlockLocation.html +367 -0
  13. data/docs/ThriftHadoopFileSystem/Chmod_args.html +357 -0
  14. data/docs/ThriftHadoopFileSystem/Chmod_result.html +352 -0
  15. data/docs/ThriftHadoopFileSystem/Chown_args.html +362 -0
  16. data/docs/ThriftHadoopFileSystem/Chown_result.html +352 -0
  17. data/docs/ThriftHadoopFileSystem/Client.html +2327 -0
  18. data/docs/ThriftHadoopFileSystem/Close_args.html +352 -0
  19. data/docs/ThriftHadoopFileSystem/Close_result.html +357 -0
  20. data/docs/ThriftHadoopFileSystem/CreateFile_args.html +377 -0
  21. data/docs/ThriftHadoopFileSystem/CreateFile_result.html +357 -0
  22. data/docs/ThriftHadoopFileSystem/Create_args.html +352 -0
  23. data/docs/ThriftHadoopFileSystem/Create_result.html +357 -0
  24. data/docs/ThriftHadoopFileSystem/Exists_args.html +352 -0
  25. data/docs/ThriftHadoopFileSystem/Exists_result.html +357 -0
  26. data/docs/ThriftHadoopFileSystem/FileStatus.html +392 -0
  27. data/docs/ThriftHadoopFileSystem/GetFileBlockLocations_args.html +362 -0
  28. data/docs/ThriftHadoopFileSystem/GetFileBlockLocations_result.html +357 -0
  29. data/docs/ThriftHadoopFileSystem/ListStatus_args.html +352 -0
  30. data/docs/ThriftHadoopFileSystem/ListStatus_result.html +357 -0
  31. data/docs/ThriftHadoopFileSystem/MalformedInputException.html +394 -0
  32. data/docs/ThriftHadoopFileSystem/Mkdirs_args.html +352 -0
  33. data/docs/ThriftHadoopFileSystem/Mkdirs_result.html +357 -0
  34. data/docs/ThriftHadoopFileSystem/Open_args.html +352 -0
  35. data/docs/ThriftHadoopFileSystem/Open_result.html +357 -0
  36. data/docs/ThriftHadoopFileSystem/Pathname.html +352 -0
  37. data/docs/ThriftHadoopFileSystem/Processor.html +1053 -0
  38. data/docs/ThriftHadoopFileSystem/Read_args.html +362 -0
  39. data/docs/ThriftHadoopFileSystem/Read_result.html +357 -0
  40. data/docs/ThriftHadoopFileSystem/Rename_args.html +357 -0
  41. data/docs/ThriftHadoopFileSystem/Rename_result.html +357 -0
  42. data/docs/ThriftHadoopFileSystem/Rm_args.html +357 -0
  43. data/docs/ThriftHadoopFileSystem/Rm_result.html +357 -0
  44. data/docs/ThriftHadoopFileSystem/SetInactivityTimeoutPeriod_args.html +354 -0
  45. data/docs/ThriftHadoopFileSystem/SetInactivityTimeoutPeriod_result.html +347 -0
  46. data/docs/ThriftHadoopFileSystem/SetReplication_args.html +357 -0
  47. data/docs/ThriftHadoopFileSystem/SetReplication_result.html +352 -0
  48. data/docs/ThriftHadoopFileSystem/Shutdown_args.html +352 -0
  49. data/docs/ThriftHadoopFileSystem/Shutdown_result.html +347 -0
  50. data/docs/ThriftHadoopFileSystem/Stat_args.html +352 -0
  51. data/docs/ThriftHadoopFileSystem/Stat_result.html +357 -0
  52. data/docs/ThriftHadoopFileSystem/ThriftHandle.html +352 -0
  53. data/docs/ThriftHadoopFileSystem/ThriftIOException.html +394 -0
  54. data/docs/ThriftHadoopFileSystem/Write_args.html +357 -0
  55. data/docs/ThriftHadoopFileSystem/Write_result.html +357 -0
  56. data/docs/created.rid +10 -1
  57. data/docs/images/brick.png +0 -0
  58. data/docs/images/brick_link.png +0 -0
  59. data/docs/images/bug.png +0 -0
  60. data/docs/images/bullet_black.png +0 -0
  61. data/docs/images/bullet_toggle_minus.png +0 -0
  62. data/docs/images/bullet_toggle_plus.png +0 -0
  63. data/docs/images/date.png +0 -0
  64. data/docs/images/find.png +0 -0
  65. data/docs/images/loadingAnimation.gif +0 -0
  66. data/docs/images/macFFBgHack.png +0 -0
  67. data/docs/images/package.png +0 -0
  68. data/docs/images/page_green.png +0 -0
  69. data/docs/images/page_white_text.png +0 -0
  70. data/docs/images/page_white_width.png +0 -0
  71. data/docs/images/plugin.png +0 -0
  72. data/docs/images/ruby.png +0 -0
  73. data/docs/images/tag_green.png +0 -0
  74. data/docs/images/wrench.png +0 -0
  75. data/docs/images/wrench_orange.png +0 -0
  76. data/docs/images/zoom.png +0 -0
  77. data/docs/index.html +544 -20
  78. data/docs/js/darkfish.js +116 -0
  79. data/docs/js/jquery.js +32 -0
  80. data/docs/js/quicksearch.js +114 -0
  81. data/docs/js/thickbox-compressed.js +10 -0
  82. data/docs/lib/ganapati/client_rb.html +52 -0
  83. data/docs/lib/ganapati/hfile_rb.html +52 -0
  84. data/docs/lib/ganapati/utils_rb.html +52 -0
  85. data/docs/lib/ganapati/version_rb.html +52 -0
  86. data/docs/lib/ganapati_rb.html +62 -0
  87. data/docs/lib/thrift/hadoopfs_constants_rb.html +58 -0
  88. data/docs/lib/thrift/hadoopfs_types_rb.html +56 -0
  89. data/docs/lib/thrift/thrift_hadoop_file_system_rb.html +60 -0
  90. data/docs/rdoc.css +759 -0
  91. data/lib/ganapati/client.rb +10 -10
  92. data/lib/ganapati/version.rb +1 -1
  93. metadata +112 -9
@@ -53,19 +53,19 @@ module Ganapati
53
53
  end
54
54
 
55
55
  def readlines(path, sep="\n")
56
- lastbit = ""
56
+ buffer = ""
57
+
57
58
  readchunks(path) { |chunk|
58
- parts = chunk.split(sep)
59
- if parts.length == 0
60
- yield lastbit if lastbit != ""
61
- elsif parts.length == 1
62
- yield lastbit + parts.first
63
- else
64
- yield lastbit + parts.first
65
- parts.slice(1, parts.length).each { |p| yield p }
59
+ buffer << chunk
60
+
61
+ # partitions[1] will be empty if sep does not exist in the string
62
+ while partitions = buffer.partition(sep) and !partitions[1].empty?
63
+ yield partitions.first
64
+ buffer = partitions.last
66
65
  end
67
- lastbit = ""
68
66
  }
67
+
68
+ yield buffer if buffer.size > 0
69
69
  end
70
70
 
71
71
  # for writing to a new file
@@ -1,3 +1,3 @@
1
1
  module Ganapati
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ganapati
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Muller
@@ -34,6 +34,22 @@ dependencies:
34
34
  version: 0.5.0
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: mocha
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 55
46
+ segments:
47
+ - 0
48
+ - 10
49
+ - 0
50
+ version: 0.10.0
51
+ type: :development
52
+ version_requirements: *id002
37
53
  description: Hadoop HDFS Thrift interface for Ruby
38
54
  email: brian.muller@livingsocial.com
39
55
  executables:
@@ -45,6 +61,9 @@ extensions: []
45
61
  extra_rdoc_files: []
46
62
 
47
63
  files:
64
+ - bin/hcp
65
+ - bin/hdfs_thrift_server
66
+ - bin/hls
48
67
  - lib/ganapati/client.rb
49
68
  - lib/ganapati/hfile.rb
50
69
  - lib/ganapati/utils.rb
@@ -53,9 +72,6 @@ files:
53
72
  - lib/thrift/hadoopfs_constants.rb
54
73
  - lib/thrift/hadoopfs_types.rb
55
74
  - lib/thrift/thrift_hadoop_file_system.rb
56
- - LICENSE
57
- - Rakefile
58
- - README.rdoc
59
75
  - docs/classes/Ganapati/Client.html
60
76
  - docs/classes/Ganapati/FileUrl.html
61
77
  - docs/classes/Ganapati/HFile.html
@@ -120,11 +136,98 @@ files:
120
136
  - docs/fr_class_index.html
121
137
  - docs/fr_file_index.html
122
138
  - docs/fr_method_index.html
139
+ - docs/Ganapati/Client.html
140
+ - docs/Ganapati/FileUrl.html
141
+ - docs/Ganapati/HFile.html
142
+ - docs/Ganapati.html
143
+ - docs/images/brick.png
144
+ - docs/images/brick_link.png
145
+ - docs/images/bug.png
146
+ - docs/images/bullet_black.png
147
+ - docs/images/bullet_toggle_minus.png
148
+ - docs/images/bullet_toggle_plus.png
149
+ - docs/images/date.png
150
+ - docs/images/find.png
151
+ - docs/images/loadingAnimation.gif
152
+ - docs/images/macFFBgHack.png
153
+ - docs/images/package.png
154
+ - docs/images/page_green.png
155
+ - docs/images/page_white_text.png
156
+ - docs/images/page_white_width.png
157
+ - docs/images/plugin.png
158
+ - docs/images/ruby.png
159
+ - docs/images/tag_green.png
160
+ - docs/images/wrench.png
161
+ - docs/images/wrench_orange.png
162
+ - docs/images/zoom.png
123
163
  - docs/index.html
164
+ - docs/js/darkfish.js
165
+ - docs/js/jquery.js
166
+ - docs/js/quicksearch.js
167
+ - docs/js/thickbox-compressed.js
168
+ - docs/lib/ganapati/client_rb.html
169
+ - docs/lib/ganapati/hfile_rb.html
170
+ - docs/lib/ganapati/utils_rb.html
171
+ - docs/lib/ganapati/version_rb.html
172
+ - docs/lib/ganapati_rb.html
173
+ - docs/lib/thrift/hadoopfs_constants_rb.html
174
+ - docs/lib/thrift/hadoopfs_types_rb.html
175
+ - docs/lib/thrift/thrift_hadoop_file_system_rb.html
124
176
  - docs/rdoc-style.css
125
- - bin/hdfs_thrift_server
126
- - bin/hls
127
- - bin/hcp
177
+ - docs/rdoc.css
178
+ - docs/README_rdoc.html
179
+ - docs/ThriftHadoopFileSystem/Append_args.html
180
+ - docs/ThriftHadoopFileSystem/Append_result.html
181
+ - docs/ThriftHadoopFileSystem/BlockLocation.html
182
+ - docs/ThriftHadoopFileSystem/Chmod_args.html
183
+ - docs/ThriftHadoopFileSystem/Chmod_result.html
184
+ - docs/ThriftHadoopFileSystem/Chown_args.html
185
+ - docs/ThriftHadoopFileSystem/Chown_result.html
186
+ - docs/ThriftHadoopFileSystem/Client.html
187
+ - docs/ThriftHadoopFileSystem/Close_args.html
188
+ - docs/ThriftHadoopFileSystem/Close_result.html
189
+ - docs/ThriftHadoopFileSystem/Create_args.html
190
+ - docs/ThriftHadoopFileSystem/Create_result.html
191
+ - docs/ThriftHadoopFileSystem/CreateFile_args.html
192
+ - docs/ThriftHadoopFileSystem/CreateFile_result.html
193
+ - docs/ThriftHadoopFileSystem/Exists_args.html
194
+ - docs/ThriftHadoopFileSystem/Exists_result.html
195
+ - docs/ThriftHadoopFileSystem/FileStatus.html
196
+ - docs/ThriftHadoopFileSystem/GetFileBlockLocations_args.html
197
+ - docs/ThriftHadoopFileSystem/GetFileBlockLocations_result.html
198
+ - docs/ThriftHadoopFileSystem/ListStatus_args.html
199
+ - docs/ThriftHadoopFileSystem/ListStatus_result.html
200
+ - docs/ThriftHadoopFileSystem/MalformedInputException.html
201
+ - docs/ThriftHadoopFileSystem/Mkdirs_args.html
202
+ - docs/ThriftHadoopFileSystem/Mkdirs_result.html
203
+ - docs/ThriftHadoopFileSystem/Open_args.html
204
+ - docs/ThriftHadoopFileSystem/Open_result.html
205
+ - docs/ThriftHadoopFileSystem/Pathname.html
206
+ - docs/ThriftHadoopFileSystem/Processor.html
207
+ - docs/ThriftHadoopFileSystem/Read_args.html
208
+ - docs/ThriftHadoopFileSystem/Read_result.html
209
+ - docs/ThriftHadoopFileSystem/Rename_args.html
210
+ - docs/ThriftHadoopFileSystem/Rename_result.html
211
+ - docs/ThriftHadoopFileSystem/Rm_args.html
212
+ - docs/ThriftHadoopFileSystem/Rm_result.html
213
+ - docs/ThriftHadoopFileSystem/SetInactivityTimeoutPeriod_args.html
214
+ - docs/ThriftHadoopFileSystem/SetInactivityTimeoutPeriod_result.html
215
+ - docs/ThriftHadoopFileSystem/SetReplication_args.html
216
+ - docs/ThriftHadoopFileSystem/SetReplication_result.html
217
+ - docs/ThriftHadoopFileSystem/Shutdown_args.html
218
+ - docs/ThriftHadoopFileSystem/Shutdown_result.html
219
+ - docs/ThriftHadoopFileSystem/Stat_args.html
220
+ - docs/ThriftHadoopFileSystem/Stat_result.html
221
+ - docs/ThriftHadoopFileSystem/ThriftHandle.html
222
+ - docs/ThriftHadoopFileSystem/ThriftIOException.html
223
+ - docs/ThriftHadoopFileSystem/Write_args.html
224
+ - docs/ThriftHadoopFileSystem/Write_result.html
225
+ - docs/ThriftHadoopFileSystem.html
226
+ - Gemfile
227
+ - Gemfile.lock
228
+ - LICENSE
229
+ - Rakefile
230
+ - README.rdoc
128
231
  has_rdoc: true
129
232
  homepage: https://github.com/livingsocial/ganapati
130
233
  licenses: []