hbase/hbase-server
Apekshit Sharma e7e660d5b2 HBASE-14734 Prevent BindException when setting up MiniKdc.
Port for kdc service gets selected in the constructor, but we bind to it later in MiniKdc.start()-->MiniKdc.initKDCServer() --> KdcServer.start(). In meantime, some other service can capture the port which results in BindException. The solution here is to catch the exception and retry.

Testing methodology:
- Used python and intellij.
- breakpoint on kdc.start(1), in catch block(2) and just after catch block(3).
- used python to bind to the selected port on breakpoint 1 --> run the program --> stops at breakpoint 2 (catch block)
- On breakpoint 1 and after 2 failures, close the port --> run the program --> skips catch block and goes to breakpoint 3.

Change-Id: I4e06e69819d1ec9a0a7fa471bf017f3a72c75cb3
2016-09-21 16:44:14 -07:00
..
src HBASE-14734 Prevent BindException when setting up MiniKdc. 2016-09-21 16:44:14 -07:00
pom.xml HBASE-16321 ensure no findbugs-jsr305 2016-08-05 14:08:50 -05:00