How to contribute limited amount of storage as slave to the cluster

How to contribute limited amount of storage as slave to the cluster

Task Description:-

In a Hadoop cluster, find how to contribute limited/ specific amount of storage as slave to the cluster ?

Hint:- Linux partitions

Prerequisite:- Configure one Datanode and one Masternode.

We have to perform following steps :-

  1. Create one hard disk and attached it to the data node.
  2. Create partition.
  3. Again configure the data node.
  4. Check storage shared by data node to name node.

Implementation:-

Step 1:- Create one hard disk.

Now I am going to check it through terminal. So open the terminal of the data node and run this command which is given below.

Command:-

fdisk -l

Here we can see that the hard disk is attached to the data node.

No alt text provided for this image

First step is done successfully now move to the step2.

Step 2:- Create partition:-

For creating partition run this command which given below.

Command:-

fdisk /dev/xvdf

Here I am going to use some options.

  1. Create new partition:- n
  2. Primary partition:- p
  3. Partition number:- 1(by default)
  4. First sector:- 2048(by default)
  5. Last sector:- 1G (it's depend on you how much space you want in my case it's 1G)
  6. Save this partition:- w

Here our partition is done successfully.

Format the created partition

There are so many ways for formatting the partition I am going to use ext4 and after mentioning the format type we have to tell which partition we want to format and command to format the partition is given below.

command:-

mkfs.ext4 /dev/xvdf

No alt text provided for this image

Mount that partition

For mounting the partition we have to first create directory and the mount it to that directory. Run the command given below.

command to create directory:-

mkdir /datanode

command to mount it:-

mount /dev/xvdf  /datanode

No alt text provided for this image

Here the step 2 is successfully done now move to the step 3

Step 3:- Configure the data node.

We have to just configure the hdfs-site.xml file of data node and give the directory name which we are created above (in my case it's /datanode)

No alt text provided for this image

Here step 3 is successfully done now we have to move to the step 4.

Step 4:- Check storage shared by data node to the master node.

Now we have to check that how much storage is shared. So run one command either on data node or master node and command is given below.

command:-

hadoop dfsadmin -report

Here we can see that the configured capacity is 975.9 MB, which is almost 1 GB and in this way we can contribute specific amount of storage as slave to the cluster.

No alt text provided for this image

Here my task is completed successfully.


要查看或添加评论,请登录

Hritik Kumar的更多文章

  • Arth-Task: 22

    Arth-Task: 22

    Task Description?? ??? Research on use-cases of AWS SQS and create a blog, Article elaborating how it works. Hello…

  • ARTH TASK 14.3

    ARTH TASK 14.3

    Task Description?? ?? 14.3 Create an ansible Playbook which will dynamically load the variable file named the same as…

  • ARTH Team Task 1

    ARTH Team Task 1

    Task Description?? Create a menu using Python integrating all the concepts that have been taught by Vimal sir till now.…

  • Industry use cases of Neural Networks

    Industry use cases of Neural Networks

    What are Neural Networks? A neural network is a series of algorithms that endeavors to recognize underlying…

  • Industries are solving challenges using Ansible

    Industries are solving challenges using Ansible

    Task Description Create a Article, blog or Video on how industries are solving challenges using Ansible What is Ansible…

    2 条评论
  • How Kubernetes is used in Industries

    How Kubernetes is used in Industries

    What is Kubernetes ? Kubernetes is an open-source container orchestration platform that enables the operation of an…

  • AWS: Netflix Case Study

    AWS: Netflix Case Study

    We all have a dream to do some type of startup but when it comes to funding, almost all of the new startups have a…

  • Artificial Intelligence in automotive Industry

    Artificial Intelligence in automotive Industry

    What is Artificial Intelligence ? Artificial intelligence (AI) is the simulation of human intelligence processes by…

  • Hadoop Cluster Availability

    Hadoop Cluster Availability

    What is Hadoop ? Hadoop is an open-source software framework for storing data and running applications on clusters of…

    4 条评论

社区洞察

其他会员也浏览了