Why Watch keyword is used in zookeeper

0 votes

Hi,

I am not able to understand the concept of Watch keyword in zookeeeper, how it is going to make any change?

May 28, 2019 in Big Data Hadoop by Naina

edited May 28, 2019 by Gitika 204 views

1 answer to this question.

0 votes

Hey,

Watches show a notification when the specified znode or znode’s children data changes. You can set a watch only to get command:-

Syntax:-

get /path [watch] 1

Sample:-

get /FirstZnode 1

Output:-

[zk: localhost:2181(CONNECTED) 1] get /FirstZnode 1
“Myfirstzookeeper-app”
cZxid = 0x7f
ctime = Tue Sep 29 16:15:47 IST 2015
mZxid = 0x7f
mtime = Tue Sep 29 16:15:47 IST 2015
pZxid = 0x7f
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 22
numChildren = 0

The output is similar to normal get command, but it will wait for znode changes in the background.

answered May 28, 2019 by Gitika
• 65,850 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Why Get DATA keyword has been used in zookeeper?

Hey, It returns the associated data of the ...READ MORE

answered May 28, 2019 in Big Data Hadoop by Gitika
• 65,850 points
213 views
0 votes
1 answer

Why CLI is used in Scoop?

CLI is Command Line Client which is ...READ MORE

answered Apr 11, 2019 in Big Data Hadoop by Gitika
• 65,850 points
200 views
0 votes
1 answer

Why tuple keywords is used in pig?

Hey, A tuple is a set of field, ...READ MORE

answered May 6, 2019 in Big Data Hadoop by Gitika
• 65,850 points
300 views
0 votes
1 answer

Why JOIN operator is used in pig?

Hey, In Apache pig, JOIN operator is used ...READ MORE

answered May 7, 2019 in Big Data Hadoop by Gitika
• 65,850 points
394 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
8,618 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
1,521 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
76,054 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
3,306 views
0 votes
1 answer

Why CREATE EXTERNAL keyword is used in Hive?

Hey, The create external keyword is used to create a ...READ MORE

answered May 15, 2019 in Big Data Hadoop by Gitika
• 65,850 points
329 views
0 votes
1 answer

Why Count keyword is used in HBase?

Hey, An aggregate function that returns the number ...READ MORE

answered May 24, 2019 in Big Data Hadoop by Gitika
• 65,850 points
200 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP