hadoop-find 0.1.1-java → 0.1.2-java

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 (4) hide show
  1. data/CHANGELOG +4 -0
  2. data/README +6 -1
  3. data/bin/hfind.rb +15 -4
  4. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ * 2011-07-27 - fsf
2
+ - new: added --user (-u) and --group(-g) filtering options
3
+ - change: --uri's short -u option is now -i
4
+
1
5
  * 2011-07-13 - fsf
2
6
  - new: added --no-hidden (-D) option to not display or follow hidden
3
7
  files and directories (_ for hdfs, . for unix)
data/README CHANGED
@@ -18,12 +18,17 @@ usage: hfind [options] path
18
18
  -m, --mmin # files modified before (-x) or after (+x) minutes ago
19
19
  -M, --mtime # files modified before (-x) or after (+x) days ago
20
20
  -s, --size # file size > (+x), < (-x), or == (x)
21
+ -u, --user # files owned by a particular username
22
+ -g, --group # files owned by a particular group
21
23
  -r, --repl # replication factor > (+x), < (-x), or == (x)
24
+ -n, --name # show paths matching a regular expression
22
25
  -U, --under # show under-replicated files
23
26
  -t, --type # show type (f)ile or (d)irectory
24
27
  -l, --ls # show full listing detail
25
28
  -h, --human # show human readable file sizes
26
- -u, --uri # show full uri for path
29
+ -D, --no-hidden # do not show hidden files
30
+ -i, --uri # show full uri for path
31
+ -v, --version
27
32
  -H, --help
28
33
 
29
34
  Please let me know if you find this software useful!
@@ -3,7 +3,7 @@
3
3
  require 'java'
4
4
  require 'getoptlong'
5
5
 
6
- APP_VERSION = '0.1.1'
6
+ APP_VERSION = '0.1.2'
7
7
 
8
8
  class HadoopFSFinder
9
9
  def initialize uri, opts = {}
@@ -137,6 +137,9 @@ class HadoopFSFinder
137
137
  type = f.dir? ? 'd' : 'f'
138
138
  return if @opts[:type] and @opts[:type] != type
139
139
 
140
+ return if @opts[:user] and @opts[:user] != f.owner
141
+ return if @opts[:group] and @opts[:group] != f.group
142
+
140
143
  size = f.len
141
144
  return if not filter_size size
142
145
 
@@ -241,14 +244,16 @@ usage: hfind [options] path
241
244
  -m, --mmin # files modified before (-x) or after (+x) minutes ago
242
245
  -M, --mtime # files modified before (-x) or after (+x) days ago
243
246
  -s, --size # file size > (+x), < (-x), or == (x)
244
- -n, --name # display paths matching a regular expression
247
+ -u, --user # files owned by a particular username
248
+ -g, --group # files owned by a particular group
245
249
  -r, --repl # replication factor > (+x), < (-x), or == (x)
250
+ -n, --name # show paths matching a regular expression
246
251
  -U, --under # show under-replicated files
247
252
  -t, --type # show type (f)ile or (d)irectory
248
253
  -l, --ls # show full listing detail
249
254
  -h, --human # show human readable file sizes
250
255
  -D, --no-hidden # do not show hidden files
251
- -u, --uri # show full uri for path
256
+ -i, --uri # show full uri for path
252
257
  -v, --version
253
258
  -H, --help
254
259
  EOF
@@ -267,8 +272,10 @@ gopts = GetoptLong.new(
267
272
  [ '--mtime', '-M', GetoptLong::REQUIRED_ARGUMENT ],
268
273
  [ '--type', '-t', GetoptLong::REQUIRED_ARGUMENT ],
269
274
  [ '--name', '-n', GetoptLong::REQUIRED_ARGUMENT ],
275
+ [ '--user', '-u', GetoptLong::REQUIRED_ARGUMENT ],
276
+ [ '--group', '-g', GetoptLong::REQUIRED_ARGUMENT ],
270
277
  [ '--ls', '-l', GetoptLong::NO_ARGUMENT ],
271
- [ '--uri', '-u', GetoptLong::NO_ARGUMENT ],
278
+ [ '--uri', '-i', GetoptLong::NO_ARGUMENT ],
272
279
  [ '--under', '-U', GetoptLong::NO_ARGUMENT ],
273
280
  [ '--human', '-h', GetoptLong::NO_ARGUMENT ],
274
281
  [ '--no-hidden', '-D', GetoptLong::NO_ARGUMENT ],
@@ -294,6 +301,10 @@ gopts.each do |opt, arg|
294
301
  opts[:type] = arg
295
302
  when '--name'
296
303
  opts[:name_re] = arg
304
+ when '--user'
305
+ opts[:user] = arg
306
+ when '--group'
307
+ opts[:group] = arg
297
308
  when '--human'
298
309
  opts[:human] = true
299
310
  when '--ls'
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: java
11
11
  authors:
12
12
  - Frank Fejes
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-13 00:00:00 -05:00
17
+ date: 2011-07-27 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies: []
20
20