Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to do it without deleting the tmp file system in hdfs

How to do it without deleting the tmp file system in hdfs

New Contributor

Hi Team,

 

My client is not allowing to delete OS /tmp file systme in hdfc, so can you please provide us options for without delete the /tmp dir.

 

Linux version: REHL 5.8

 

OS Version Click this Link

Red Hat/CentOS/Oracle 5Red Hat/CentOS/Oracle 5 link

 

 Create the /tmp, Staging and Log Directories

  1.    Remove the old /tmp if it exists:

$ sudo -u hdfs hadoop fs -rm -r /tmp

  1.    Create the new directories and set permissions:
  2.    $ sudo -u hdfs hadoop fs -mkdir -p /tmp/hadoop-yarn/staging/history/done_intermediate
  3.    $ sudo -u hdfs hadoop fs -chown -R mapred:mapred /tmp/hadoop-yarn/staging
  4.    $ sudo -u hdfs hadoop fs -chmod -R 1777 /tmp
  5.    $ sudo -u hdfs hadoop fs -mkdir -p /var/log/hadoop-yarn

Create the /tmp directory after HDFS is up and running, and set its permissions to 1777 (drwxrwxrwt), as follows:

$ sudo -u hdfs hadoop fs -mkdir /tmp
$ sudo -u hdfs hadoop fs -chmod -R 1777 /tmp

 

 

Regards,

Venkat.M

venkat.reddy626@gmail.com

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3 REPLIES 3
Highlighted

Re: How to do it without deleting the tmp file system in hdfs

Master Collaborator

Which instructions are you following that require the HDFS /tmp directory to be deleted?  Can you paste a link?

Re: How to do it without deleting the tmp file system in hdfs

New Contributor

Thanks for your reply,

 

I am using the below link,  Followed the below steps to start hdfs,

 

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/c...

 

Start HDFS

To deploy HDFS now, proceed as follows.
  1. Deploy the configuration.
  2. Start HDFS.
  3. Create the /tmp directory.
Deploy the configuration

To deploy your configuration to your entire cluster:

  1. Push your custom directory (for example /etc/hadoop/conf.my_cluster) to each node in your cluster; for example:
    $ scp -r /etc/hadoop/conf.my_cluster myuser@myCDHnode-<n>.mycompany.com:/etc/hadoop/conf.my_cluster
  2. Manually set alternatives on each node to point to that directory, as follows.

    To manually set the configuration on Red Hat-compatible systems:

    $ sudo alternatives --verbose --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.my_cluster 50 
    $ sudo alternatives --set hadoop-conf /etc/hadoop/conf.my_cluster

    To manually set the configuration on Ubuntu and SLES systems:

    $ sudo update-alternatives --install /etc/hadoop/conf hadoop-conf /etc/hadoop/conf.my_cluster 50
    $ sudo update-alternatives --set hadoop-conf /etc/hadoop/conf.my_cluster

    For more information on alternatives, see the update-alternatives(8) man page on Ubuntu and SLES systems or the alternatives(8) man page On Red Hat-compatible systems.

Start HDFS
Start HDFS on each node in the cluster, as follows:
for x in `cd /etc/init.d ; ls hadoop-hdfs-*` ; do sudo service $x start ; done
  Note:

This starts all the CDH services installed on the node. This is normally what you want, but you can start services individually if you prefer.

Create the /tmp directory
  Important:

If you do not create /tmp properly, with the right permissions as shown below, you may have problems with CDH components later. Specifically, if you don't create /tmp yourself, another process may create it automatically with restrictive permissions that will prevent your other applications from using it.

Create the /tmp directory after HDFS is up and running, and set its permissions to 1777 (drwxrwxrwt), as follows:

$ sudo -u hdfs hadoop fs -mkdir /tmp
$ sudo -u hdfs hadoop fs -chmod -R 1777 /tmp

 

If the above steps are not correct, can you please guide on us how to do the HDFS startup.

 

Regards,

Venkat.M

venkat.reddy626@gmail.com

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Re: How to do it without deleting the tmp file system in hdfs

New Contributor
Hi,

http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Quick-Start/cdh5qs_y...

we followed the above link to install hadoop CDH5 in LINUX server.