hadoop - Multiple datanode configuration in Pseudo-distributed mode
I am newbie in hadoop. I have setup hadoop - Pseudo-distributed mode in single machine. My hdfs-site.xml configuration as default:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode</value>
</property>
After run:
hdfs namenode -format
start-all.sh
jps
I have one namenode and one datanode.
I want to have multiple datanode on this machine and I try to config at this advice: stackoverflow and my config:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-1</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9870</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9090</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-2</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9871</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9091</value>
</property>
And I gain zero datanode. Any help would be greatly appreciated.
hadoop datanode
add a comment |
I am newbie in hadoop. I have setup hadoop - Pseudo-distributed mode in single machine. My hdfs-site.xml configuration as default:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode</value>
</property>
After run:
hdfs namenode -format
start-all.sh
jps
I have one namenode and one datanode.
I want to have multiple datanode on this machine and I try to config at this advice: stackoverflow and my config:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-1</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9870</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9090</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-2</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9871</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9091</value>
</property>
And I gain zero datanode. Any help would be greatly appreciated.
hadoop datanode
add a comment |
I am newbie in hadoop. I have setup hadoop - Pseudo-distributed mode in single machine. My hdfs-site.xml configuration as default:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode</value>
</property>
After run:
hdfs namenode -format
start-all.sh
jps
I have one namenode and one datanode.
I want to have multiple datanode on this machine and I try to config at this advice: stackoverflow and my config:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-1</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9870</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9090</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-2</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9871</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9091</value>
</property>
And I gain zero datanode. Any help would be greatly appreciated.
hadoop datanode
I am newbie in hadoop. I have setup hadoop - Pseudo-distributed mode in single machine. My hdfs-site.xml configuration as default:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode</value>
</property>
After run:
hdfs namenode -format
start-all.sh
jps
I have one namenode and one datanode.
I want to have multiple datanode on this machine and I try to config at this advice: stackoverflow and my config:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-1</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9870</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9090</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop/yarn_data/hdfs/datanode-2</value>
<name>dfs.datanode.address</name>
<value>0.0.0.0:9871</value>
<name>dfs.datanode.http.address</name>
<value>0.0.0.0:9091</value>
</property>
And I gain zero datanode. Any help would be greatly appreciated.
hadoop datanode
hadoop datanode
edited Nov 14 '18 at 4:18
cricket_007
81.5k1142111
81.5k1142111
asked Nov 14 '18 at 4:14
Huy TruongHuy Truong
83
83
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Key part of that linked answer is you got to maintain different configurations for each datanode instance
You cannot put two <name>
and <value>
sections as part of the same XML file
You are required to have two separate config files, one for each datanode.
However, I
m not completely sure it is possible to have two HADOOP_CONF_DIR
variables for unique Hadoop processes. There might be a way to do hadoop --config /some/path datanode
, but start-dfs
is just hiding that way to run a datanode away from you
That being said, assuming you have export HADOOP_CONF_DIR=/etc/hadoop
and ls $HADOOP_CONF_DIR/hdfs-site.xml
is working, then you can try the following in its own terminal
mkdir /etc/hadoop2
cp /etc/hadoop/* /etc/hadoop2/
# EDIT the new hdfs-site.xml file
hadoop --config /etc/hadoop2 datanode
I would recommend just using two separate virtual machines, because that'll more closely match a real-world scenario
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293102%2fhadoop-multiple-datanode-configuration-in-pseudo-distributed-mode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Key part of that linked answer is you got to maintain different configurations for each datanode instance
You cannot put two <name>
and <value>
sections as part of the same XML file
You are required to have two separate config files, one for each datanode.
However, I
m not completely sure it is possible to have two HADOOP_CONF_DIR
variables for unique Hadoop processes. There might be a way to do hadoop --config /some/path datanode
, but start-dfs
is just hiding that way to run a datanode away from you
That being said, assuming you have export HADOOP_CONF_DIR=/etc/hadoop
and ls $HADOOP_CONF_DIR/hdfs-site.xml
is working, then you can try the following in its own terminal
mkdir /etc/hadoop2
cp /etc/hadoop/* /etc/hadoop2/
# EDIT the new hdfs-site.xml file
hadoop --config /etc/hadoop2 datanode
I would recommend just using two separate virtual machines, because that'll more closely match a real-world scenario
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
|
show 2 more comments
Key part of that linked answer is you got to maintain different configurations for each datanode instance
You cannot put two <name>
and <value>
sections as part of the same XML file
You are required to have two separate config files, one for each datanode.
However, I
m not completely sure it is possible to have two HADOOP_CONF_DIR
variables for unique Hadoop processes. There might be a way to do hadoop --config /some/path datanode
, but start-dfs
is just hiding that way to run a datanode away from you
That being said, assuming you have export HADOOP_CONF_DIR=/etc/hadoop
and ls $HADOOP_CONF_DIR/hdfs-site.xml
is working, then you can try the following in its own terminal
mkdir /etc/hadoop2
cp /etc/hadoop/* /etc/hadoop2/
# EDIT the new hdfs-site.xml file
hadoop --config /etc/hadoop2 datanode
I would recommend just using two separate virtual machines, because that'll more closely match a real-world scenario
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
|
show 2 more comments
Key part of that linked answer is you got to maintain different configurations for each datanode instance
You cannot put two <name>
and <value>
sections as part of the same XML file
You are required to have two separate config files, one for each datanode.
However, I
m not completely sure it is possible to have two HADOOP_CONF_DIR
variables for unique Hadoop processes. There might be a way to do hadoop --config /some/path datanode
, but start-dfs
is just hiding that way to run a datanode away from you
That being said, assuming you have export HADOOP_CONF_DIR=/etc/hadoop
and ls $HADOOP_CONF_DIR/hdfs-site.xml
is working, then you can try the following in its own terminal
mkdir /etc/hadoop2
cp /etc/hadoop/* /etc/hadoop2/
# EDIT the new hdfs-site.xml file
hadoop --config /etc/hadoop2 datanode
I would recommend just using two separate virtual machines, because that'll more closely match a real-world scenario
Key part of that linked answer is you got to maintain different configurations for each datanode instance
You cannot put two <name>
and <value>
sections as part of the same XML file
You are required to have two separate config files, one for each datanode.
However, I
m not completely sure it is possible to have two HADOOP_CONF_DIR
variables for unique Hadoop processes. There might be a way to do hadoop --config /some/path datanode
, but start-dfs
is just hiding that way to run a datanode away from you
That being said, assuming you have export HADOOP_CONF_DIR=/etc/hadoop
and ls $HADOOP_CONF_DIR/hdfs-site.xml
is working, then you can try the following in its own terminal
mkdir /etc/hadoop2
cp /etc/hadoop/* /etc/hadoop2/
# EDIT the new hdfs-site.xml file
hadoop --config /etc/hadoop2 datanode
I would recommend just using two separate virtual machines, because that'll more closely match a real-world scenario
edited Nov 14 '18 at 5:37
answered Nov 14 '18 at 4:18
cricket_007cricket_007
81.5k1142111
81.5k1142111
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
|
show 2 more comments
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
Hi @cricket_007, can you give me more detail or any tutorial?
– Huy Truong
Nov 14 '18 at 4:23
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
What are you planning to gain from running more than one datanode? You are on a single machine already, so replication doesnt do anything
– cricket_007
Nov 14 '18 at 4:27
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Yes but I want to test distributed feature, datanode behavior and how namenode store its metadata, fsimage ...
– Huy Truong
Nov 14 '18 at 4:32
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
Nothing is "distributed" until you cross over a non-local network interface. And the FSImage still works with one datanode
– cricket_007
Nov 14 '18 at 4:33
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
How about this tutor: (bigdata.wordpress.com/2010/05/27/…)
– Huy Truong
Nov 14 '18 at 4:40
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293102%2fhadoop-multiple-datanode-configuration-in-pseudo-distributed-mode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown