When Storm developers want to share data across multiple bolts or cache a large amount of state information in a single bolt, one of the common choices is to use HBase. In a unsecured HDP cluster, the related code in the HBase Bolt is very intuitive:
However, in a Kerberized HDP cluster, we need to configure lots of information in our code to enable secured connection. First, we need to configure storm keytab and principal for the hbase client in storm bolt. For example, in the myTopology.java code:
Map<String, Object> mapHbase = new HashMap<String,Object>();
Config conf = new Config();
StormSubmitter.submitTopology("myTopology", conf, builder.createTopology());
Second, in the hbase bolt, we need to use the keytabs information to set up secured connection.