Ask Your Question
0

hadoop code in puppet

asked 2014-11-06 04:17:54 -0500

Chutki gravatar image

updated 2014-11-06 04:21:31 -0500

Hi,

I am new to admin side, but I want to convert hadoop file creation from unix to puppet.

Please find the code below.

"DL380p"

ha_file_cre='/root/hadoopfile
logit echo "Creating Hadoop Data disks script, which will run after final server reboot." 

echo "for part in  l m n o p q" >> $ ha_file_cre 
echo "do" >> $ ha_file_cre
echo "  echo "Partioning disk: /dev/sd\${part}" " >> $ ha_file_cre
echo "  echo ",,83" | /sbin/sfdisk /dev/sd\${part}" >> $ ha_file_cre
echo "  mkfs.ext4 /dev/sd\${part}1" >> $ ha_file_cre

So what is my understanding is, the server is DL380p is creating hadoop disk creation.

we are partition the disk as " l m n o p q" under /dev/sd(l,m,n,o,p,q)

I do not understand " echo ",,83" | /sbin/sfdisk /dev/sd\${part}" what it does.

Also do we need to restart the server when we create disk.

So how we need to write the above code in puppet.

package{haddop}

service{hadoop service}

So should I create package and service for this. Please help me.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-11-11 09:11:36 -0500

I do not understand " echo ",,83" | /sbin/sfdisk /dev/sd\${part}" what it does.

This appears to be setting the disk type to 83 (linux disk) for the partition its editing.

On linux, you don't typically need to restart the server when adding disks unless you are adding new physical disks and your interface doesn't allow you to re-scan and import new devices.

As for package and service hadoop, it really depends on which package of hadoop you run. I would recommend checking out some of the forge modules.

https://forge.puppetlabs.com/modules?...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-11-06 04:17:54 -0500

Seen: 47 times

Last updated: Nov 06 '14