Users Online

· Guests Online: 99

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

HBase Tutorials for Beginners

  1. Problem Statement: Master server initializes but region servers not initializes
  • The Communication between Master and region servers through their IP addresses. Like the way Master is going to listen that region servers are running or having the IP address of 127.0.0.1. The IP address 127.0.0.1 which is the local host and resolves to the master server own local host.

Cause:

  • In dual communication between region servers and master, region server continuously informs Master server about their IP addresses are 127.0.0.1. 

Solution:

  • Have to remove master server name node from local host that is present in hosts file
  • Host file location /etc/hosts

What to change:

Open /etc./hosts and go to this location

127.0.0.1 fully.qualified.regionservernameregionservernamelocalhost.localdomain localhost

: : 1 localhost3.localdomain3 localdomain3

Modify the above configuration like below (remove region server name as highlighted above)

127.0.0.1 localhost.localdomainlocalhost

: : 1 localhost3.localdomain3 localdomain3

  1. Problem Statement: Couldn't find my address: XYZ in list of Zookeeper quorum servers

Cause:

  • ZooKeeper server was not able to start, and it will throw an error like .xyz in the name of the server.
  • HBase attempts to start a ZooKeeper server on some machine but at the same time machine is not able to find itself the quorum configuration i.e. present in HBase.zookeeper.quorum configuration file.

Solution:-

  • Have to replace the host name with a hostname that is presented in the error message
  • Suppose we are having DNS server then we can set the below configurations in HBase-site.xml.
    • HBase.zookeeper.dns.interface
    • HBase.zookeeper.dns.nameserver
  1. Problem Statement: Created Root Directory for HBase through Hadoop DFS
  • Master says that you need to run the HBase migrations script.
  • Upon running that, the HBase migrations script respond like no files in root directory.

Cause:

  • Creation of new directory for HBase using Hadoop Distributed file system
  • Here HBase expects two possibilities

    1) Root directory not to exist

    2) HBase previous running instance initialized before

Solution:

  • Make conformity the HBase root directory does not currently exist or has been initialized by a previous run of HBase instance.
  • As a part of solution, we have to follow steps

    Step 1) Using Hadoop dfs to delete the HBase root directory 

    Step 2) HBase creates and initializes the directory by itself 

  1. Problem statement: Zookeeper session expired events

Cause:

  • HMaster or HRegion servers shutting down by throwing Exceptions
  • If we observe logs, we can find out the actual exceptions that thrown

The following shows the exception thrown because of Zookeeper expired event

The highlighted events are some of the exceptions occurred in log file

Log files code as display below:

WARN org.apache.zookeeper.ClientCnxn: Exception

closing session 0x278bd16a96000f to sun.nio.ch.SelectionKeyImpl@355811ec

java.io.IOException: TIMED OUT

at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:906)

WARN org.apache.hadoop.hbase.util.Sleeper: We slept 79410ms, ten times longer than scheduled: 5000

INFO org.apache.zookeeper.ClientCnxn: Attempting connection to server hostname/IP:PORT

INFO org.apache.zookeeper.ClientCnxn: Priming connection to java.nio.channels.SocketChannel[connected local=/IP:PORT remote=hostname/IP:PORT]

INFO org.apache.zookeeper.ClientCnxn: Server connection successful

WARN org.apache.zookeeper.ClientCnxn: Exception closing session 0x278bd16a96000d to sun.nio.ch.SelectionKeyImpl@3544d65e

java.io.IOException: Session Expired

at org.apache.zookeeper.ClientCnxn$SendThread.readConnectResult(ClientCnxn.java:589)

at org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:709)

at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:945)

ERROR org.apache.hadoop.hbase.regionserver.HRegionServer: ZooKeeper session expired

Solution:

  • The default RAM size is 1 GB. For doing long running imports, we have maintained RAM capacity more than 1 GB.
  • Have to increase the session timeout for Zookeeper.
  • For increasing session time out of Zookeeper, we have to modify the following property in "hbase-site.xml" that present in hbase /conf folder path.
  • The default session timeout is 60 seconds. We can change it to 120 seconds as mentioned below
<property>
    <name> zookeeper.session.timeout </name>
    <value>1200000</value>
</property>
<property>
    <name> hbase.zookeeper.property.tickTime </name>
    <value>6000</value>
</property>

 

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.79 seconds
10,832,856 unique visits