-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmetadata.rb
452 lines (365 loc) · 16.9 KB
/
metadata.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
maintainer "Philip (flip) Kromer - Infochimps, Inc"
maintainer_email "[email protected]"
license "Apache 2.0"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "3.0.5"
description "Hadoop: distributed massive-scale data processing framework. Store and analyze terabyte-scale datasets with ease"
depends "java"
depends "apt"
depends "runit"
depends "volumes"
depends "tuning"
depends "metachef"
depends "dashpot"
recipe "hadoop_cluster::default", "Base configuration for hadoop_cluster"
recipe "hadoop_cluster::add_cloudera_repo", "Add Cloudera repo to package manager"
recipe "hadoop_cluster::cluster_conf", "Configure cluster"
recipe "hadoop_cluster::datanode", "Installs Hadoop Datanode service"
recipe "hadoop_cluster::secondarynn", "Installs Hadoop Secondary Namenode service"
recipe "hadoop_cluster::tasktracker", "Installs Hadoop Tasktracker service"
recipe "hadoop_cluster::jobtracker", "Installs Hadoop Jobtracker service"
recipe "hadoop_cluster::namenode", "Installs Hadoop Namenode service"
recipe "hadoop_cluster::doc", "Installs Hadoop documentation"
recipe "hadoop_cluster::hdfs_fuse", "Installs Hadoop HDFS Fuse service (regular filesystem access to HDFS files)"
recipe "hadoop_cluster::wait_on_hdfs_safemode", "Wait on HDFS Safemode -- insert between cookbooks to ensure HDFS is available"
recipe "hadoop_cluster::simple_dashboard", "Simple Dashboard"
recipe "hadoop_cluster::fake_topology", "Pretend that groups of machines are on different racks so you can execute them without guilt"
%w[ debian ubuntu ].each do |os|
supports os
end
attribute "cluster_size",
:display_name => "Number of machines in the cluster",
:description => "Number of machines in the cluster. This is used to size things like handler counts, etc.",
:default => "5"
attribute "apt/cloudera/force_distro",
:display_name => "Override the distro name apt uses to look up repos",
:description => "Typically, leave this blank. However if (as is the case in Nov 2011) you are on natty but Cloudera's repo only has packages up to maverick, use this to override.",
:default => "maverick"
attribute "apt/cloudera/release_name",
:display_name => "Release identifier (eg cdh3u2) of the cloudera repo to use. See also hadoop/deb_version",
:description => "Release identifier (eg cdh3u2) of the cloudera repo to use. See also hadoop/deb_version",
:default => "cdh3u2"
attribute "hadoop/handle",
:display_name => "Version prefix for the daemons and other components",
:description => "Cloudera distros have a prefix most (but not all) things with. This helps isolate the times they say 'hadoop-0.20' vs. 'hadoop'",
:default => "hadoop-0.20"
attribute "hadoop/deb_version",
:display_name => "Apt revision identifier (eg 0.20.2+923.142-1~maverick-cdh3) of the specific cloudera apt to use. See also apt/release_name",
:description => "Apt revision identifier (eg 0.20.2+923.142-1~maverick-cdh3) of the specific cloudera apt to use. See also apt/release_name",
:default => "0.20.2+923.142-1~maverick-cdh3"
attribute "hadoop/dfs_replication",
:display_name => "Default HDFS replication factor",
:description => "HDFS blocks are by default reproduced to this many machines.",
:default => "3"
attribute "hadoop/reducer_parallel_copies",
:display_name => "",
:description => "",
:default => "10"
attribute "hadoop/compress_output",
:display_name => "",
:description => "",
:default => "false"
attribute "hadoop/compress_output_type",
:display_name => "",
:description => "",
:default => "BLOCK"
attribute "hadoop/compress_output_codec",
:display_name => "",
:description => "",
:default => "org.apache.hadoop.io.compress.DefaultCodec"
attribute "hadoop/compress_mapout",
:display_name => "",
:description => "",
:default => "true"
attribute "hadoop/compress_mapout_codec",
:display_name => "",
:description => "",
:default => "org.apache.hadoop.io.compress.DefaultCodec"
attribute "hadoop/log_retention_hours",
:display_name => "",
:description => "See [Hadoop Log Location and Retention](http://www.cloudera.com/blog/2010/11/hadoop-log-location-and-retention) for more.",
:default => "24"
attribute "hadoop/java_heap_size_max",
:display_name => "",
:description => "uses /etc/default/hadoop-0.20 to set the hadoop daemon's java_heap_size_max",
:default => "1000"
attribute "hadoop/min_split_size",
:display_name => "",
:description => "You may wish to set the following to the same as your HDFS block size, esp if\nyou're seeing issues with s3:// turning 1TB files into 30_000+ map tasks",
:default => "134217728"
attribute "hadoop/s3_block_size",
:display_name => "fs.s3n.block.size",
:description => "Block size to use when reading files using the native S3 filesystem (s3n: URIs).",
:default => "134217728"
attribute "hadoop/hdfs_block_size",
:display_name => "dfs.block.size",
:description => "The default block size for new files",
:default => "134217728"
attribute "hadoop/max_map_tasks",
:display_name => "",
:description => "",
:default => "3"
attribute "hadoop/max_reduce_tasks",
:display_name => "",
:description => "",
:default => "2"
attribute "hadoop/java_child_opts",
:display_name => "",
:description => "",
:default => "-Xmx2432m -Xss128k -XX:+UseCompressedOops -XX:MaxNewSize=200m -server"
attribute "hadoop/java_child_ulimit",
:display_name => "",
:description => "",
:default => "7471104"
attribute "hadoop/io_sort_factor",
:display_name => "",
:description => "",
:default => "25"
attribute "hadoop/io_sort_mb",
:display_name => "",
:description => "",
:default => "250"
attribute "hadoop/extra_classpaths",
:display_name => "",
:description => "Other recipes can add to this under their own special key, for instance\nnode[:hadoop][:extra_classpaths][:hbase] = '/usr/lib/hbase/hbase.jar:/usr/lib/hbase/lib/zookeeper.jar:/usr/lib/hbase/conf'",
:default => ""
attribute "hadoop/home_dir",
:display_name => "",
:description => "",
:default => "/usr/lib/hadoop"
attribute "hadoop/conf_dir",
:display_name => "",
:description => "",
:default => "/etc/hadoop/conf"
attribute "hadoop/pid_dir",
:display_name => "",
:description => "",
:default => "/var/run/hadoop"
attribute "hadoop/log_dir",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/tmp_dir",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/user",
:display_name => "",
:description => "",
:default => "hdfs"
attribute "hadoop/define_topology",
:display_name => "",
:description => "define a rack topology? if false (default), all nodes are in the same 'rack'.",
:default => ""
attribute "hadoop/jobtracker/handler_count",
:display_name => "",
:description => "",
:default => "40"
attribute "hadoop/jobtracker/run_state",
:display_name => "",
:description => "",
:default => "stop"
attribute "hadoop/jobtracker/java_heap_size_max",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/jobtracker/system_hdfsdir",
:display_name => "",
:description => "",
:default => "/hadoop/mapred/system"
attribute "hadoop/jobtracker/staging_hdfsdir",
:display_name => "",
:description => "",
:default => "/hadoop/mapred/system"
attribute "hadoop/jobtracker/port",
:display_name => "",
:description => "",
:default => "8021"
attribute "hadoop/jobtracker/dash_port",
:display_name => "",
:description => "",
:default => "50030"
attribute "hadoop/jobtracker/user",
:display_name => "",
:description => "",
:default => "mapred"
attribute "hadoop/jobtracker/jmx_dash_port",
:display_name => "",
:description => "",
:default => "8008"
attribute "hadoop/namenode/handler_count",
:display_name => "",
:description => "",
:default => "40"
attribute "hadoop/namenode/run_state",
:display_name => "",
:description => "What states to set for services.\nYou want to bring the big daemons up deliberately on initial start.\nOverride in your cluster definition when things are stable.",
:default => "stop"
attribute "hadoop/namenode/java_heap_size_max",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/namenode/port",
:display_name => "",
:description => "",
:default => "8020"
attribute "hadoop/namenode/dash_port",
:display_name => "",
:description => "",
:default => "50070"
attribute "hadoop/namenode/user",
:display_name => "",
:description => "",
:default => "hdfs"
attribute "hadoop/namenode/data_dirs",
:display_name => "",
:description => "These are handled by volumes, which imprints them on the node.\nIf you set an explicit value it will be used and no discovery is done.\nChef Attr Owner Permissions Path Hadoop Attribute\n[:namenode ][:data_dir] hdfs:hadoop drwx------ {persistent_vols}/hadoop/hdfs/name dfs.name.dir\n[:sec..node ][:data_dir] hdfs:hadoop drwxr-xr-x {persistent_vols}/hadoop/hdfs/secondary fs.checkpoint.dir\n[:datanode ][:data_dir] hdfs:hadoop drwxr-xr-x {persistent_vols}/hadoop/hdfs/data dfs.data.dir\n[:tasktracker][:scratch_dir] mapred:hadoop drwxr-xr-x {scratch_vols }/hadoop/hdfs/name mapred.local.dir\n[:jobtracker ][:system_hdfsdir] mapred:hadoop drwxr-xr-x {!!HDFS!! }/hadoop/mapred/system mapred.system.dir\n[:jobtracker ][:staging_hdfsdir] mapred:hadoop drwxr-xr-x {!!HDFS!! }/hadoop/mapred/staging mapred.system.dir\nImportant: In CDH3, the mapred.system.dir directory must be located inside a directory that is owned by mapred. For example, if mapred.system.dir is specified as /mapred/system, then /mapred must be owned by mapred. Don't, for example, specify /mrsystem as mapred.system.dir because you don't want / owned by mapred.",
:default => ""
attribute "hadoop/namenode/jmx_dash_port",
:display_name => "",
:description => "",
:default => "8004"
attribute "hadoop/datanode/handler_count",
:display_name => "",
:description => "",
:default => "8"
attribute "hadoop/datanode/run_state",
:display_name => "",
:description => "You can just kick off the worker daemons, they'll retry. On a full-cluster\nstop/start (or any other time the main daemons' ip address changes) however\nyou will need to converge chef and then restart them all.",
:type => "array",
:default => "start"
attribute "hadoop/datanode/java_heap_size_max",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/datanode/port",
:display_name => "",
:description => "",
:default => "50010"
attribute "hadoop/datanode/ipc_port",
:display_name => "",
:description => "",
:default => "50020"
attribute "hadoop/datanode/dash_port",
:display_name => "",
:description => "",
:default => "50075"
attribute "hadoop/datanode/user",
:display_name => "",
:description => "",
:default => "hdfs"
attribute "hadoop/datanode/data_dirs",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/datanode/jmx_dash_port",
:display_name => "",
:description => "",
:default => "8006"
attribute "hadoop/tasktracker/http_threads",
:display_name => "",
:description => "",
:default => "32"
attribute "hadoop/tasktracker/run_state",
:display_name => "",
:description => "",
:type => "array",
:default => "start"
attribute "hadoop/tasktracker/java_heap_size_max",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/tasktracker/dash_port",
:display_name => "",
:description => "",
:default => "50060"
attribute "hadoop/tasktracker/user",
:display_name => "",
:description => "",
:default => "mapred"
attribute "hadoop/tasktracker/scratch_dirs",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/tasktracker/jmx_dash_port",
:display_name => "",
:description => "",
:default => "8009"
attribute "hadoop/secondarynn/run_state",
:display_name => "",
:description => "",
:default => "stop"
attribute "hadoop/secondarynn/java_heap_size_max",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/secondarynn/dash_port",
:display_name => "",
:description => "",
:default => "50090"
attribute "hadoop/secondarynn/user",
:display_name => "",
:description => "",
:default => "hdfs"
attribute "hadoop/secondarynn/data_dirs",
:display_name => "",
:description => "",
:default => ""
attribute "hadoop/secondarynn/jmx_dash_port",
:display_name => "",
:description => "",
:default => "8005"
attribute "hadoop/hdfs_fuse/run_state",
:display_name => "",
:description => "",
:default => "stop"
attribute "hadoop/balancer/run_state",
:display_name => "",
:description => "",
:default => "stop"
attribute "hadoop/balancer/jmx_dash_port",
:display_name => "",
:description => "",
:default => "8007"
attribute "hadoop/balancer/max_bandwidth",
:display_name => "",
:description => "bytes per second -- 1MB/s by default",
:default => "1048576"
attribute "groups/hadoop/gid",
:display_name => "",
:description => "",
:default => "300"
attribute "groups/supergroup/gid",
:display_name => "",
:description => "",
:default => "301"
attribute "groups/hdfs/gid",
:display_name => "",
:description => "",
:default => "302"
attribute "groups/mapred/gid",
:display_name => "",
:description => "",
:default => "303"
attribute "java/java_home",
:display_name => "",
:description => "",
:default => "/usr/lib/jvm/java-6-sun/jre"
attribute "users/hdfs/uid",
:display_name => "",
:description => "",
:default => "302"
attribute "users/mapred/uid",
:display_name => "",
:description => "",
:default => "303"
attribute "tuning/ulimit/hdfs",
:display_name => "",
:description => "",
:type => "hash",
:default => {:nofile=>{:both=>32768}, :nproc=>{:both=>50000}}
attribute "tuning/ulimit/mapred",
:display_name => "",
:description => "",
:type => "hash",
:default => {:nofile=>{:both=>32768}, :nproc=>{:both=>50000}}