hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Helmling (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12943) Set sun.net.inetaddr.ttl in HBase
Date Mon, 18 Apr 2016 19:22:25 GMT

    [ https://issues.apache.org/jira/browse/HBASE-12943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15246374#comment-15246374
] 

Gary Helmling commented on HBASE-12943:
---------------------------------------

Recent versions of JDK 7 and 8 that I've seen only set this to "forever" when a SecurityManager
is in use.  Otherwise the default seems to be 30 seconds:
{quote}
#
# The Java-level namelookup cache policy for successful lookups:
#
# any negative value: caching forever
# any positive value: the number of seconds to cache an address for
# zero: do not cache
#
# default value is forever (FOREVER). For security reasons, this
# caching is made forever when a security manager is set. When a security
# manager is not set, the default behavior in this implementation
# is to cache for 30 seconds.
#
# NOTE: setting this to anything other than the default value can have
#       serious security implications. Do not set it unless
#       you are sure you are not exposed to DNS spoofing attack.
#
#networkaddress.cache.ttl=-1
{quote}

Given this, the overhead in added lookups from HBASE-13067 can be pretty severe.  Should we
set {{networkadress.cache.ttl}} to a longer value in HBase, or maybe consider changing the
default setting for {{hbase.resolve.hostnames.on.failure}}?  As far as I can see, HBASE-13067
is otherwise triggering a hostname lookup on every call, not just on failure.

> Set sun.net.inetaddr.ttl in HBase
> ---------------------------------
>
>                 Key: HBASE-12943
>                 URL: https://issues.apache.org/jira/browse/HBASE-12943
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Liu Shaohui
>            Assignee: Liu Shaohui
>             Fix For: 2.0.0, 1.3.0, 1.2.2
>
>         Attachments: 12943-1-master.txt
>
>
> The default value of config: sun.net.inetaddr.ttl is -1 and the java processes will cache
the mapping of hostname to ip address  forever, See: http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
> But things go wrong when a regionserver with same hostname and different ip address rejoins
the hbase cluster. The HMaster will get wrong ip address of the regionserver from this cache
and every region assignment to this regionserver will be blocked for a time because the HMaster
can't communicate with the regionserver.
> A tradeoff is to set the sun.net.inetaddr.ttl to 10m or 1h and make the wrong cache expired.
> Suggestions are welcomed. Thanks~



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message