hadoop - Hbase MuleSoft Cloudhub Connectivity -
i have connect cloudhub hbase. have trid community edition hbase connector not succeeded. tried java code , again failed. hbase team, have given master ip (10.99.x.x) , port(2181) , username (hadoop).
i have tried following options:
through java code:
public object transformmessage(mulemessage message, string outputencoding) throws transformerexception { try {
configuration conf = hbaseconfiguration.create(); //conf.set("hbase.rotdir", "/hbase"); conf.set("hbase.zookeeper.quorum", "10.99.x.x"); conf.set("hbase.zookeeper.property.clientport", "2181"); conf.set("hbase.client.retries.number", "3"); logger.info("############# config created ##########"); // create api consignment table logger.info("############# starting consignment test ##########"); // read table // creating htable instance htable table = new htable(conf, "consignment"); logger.info("############# htable instance created ##########"); // create object get = new get(bytes.tobytes("6910358750")); logger.info("############# rowkey created ##########"); // set column family queried get.addfamily(bytes.tobytes("consignment_detail")); logger.info("############# cf created ##########"); // perform , capture result in iterable result result = table.get(get); logger.info("############# result created ##########"); // print consignment data logger.info(result); logger.info(" #### ending consignment test ###"); // begining consignment item scanner api logger.info("############# starting consignmentitem test ##########"); htable table1 = new htable(conf, "consignmentitem"); logger.info("############# htable instance created ##########"); // create scan object start rowkey , end rowkey (partial // row key scan) // actual rowkey design: <consignment_id>-<trn>-<orderline> scan scan = new scan(bytes.tobytes("6910358750"),bytes.tobytes("6910358751")); logger.info("############# partial rowkeys created ##########"); // perform scan using start , stop rowkeys resultscanner scanner = table1.getscanner(scan); // iterate on result , print them (result result1 = scanner.next(); result1 != null; result1 = scanner.next()) { logger.info("printing records\n"); logger.info(result1); } return scanner; } catch (masternotrunningexception e) { logger.error("hbase connection failed! --> masternotrunningexception"); logger.error(e); } catch (zookeeperconnectionexception e) { logger.error("zookeeper connection failed! -->zookeeperconnectionexception"); logger.error(e); } catch (exception e) { logger.error("main exception found! -- exception"); logger.error(e); } return "not connected"; } above code giving below error
java.net.unknownhostexception: unknown host: ip-10-99-x-x.ap-southeast-2.compute.internal
it seems cloudhub not able find host name because cloudhub not configured dns
when tried community edition hbase connector giving following exception:
org.apache.hadoop.hbase.masternotrunningexception: retried 3 times
please suggest way... rgeards nilesh email: bit.nilesh.kumar@gmail.com
it appears configuring client try connect zookeeper quorum @ private ip address (10.99.x.x). i'll assume you've set vpc, required cloudhub worker connect private network.
your unknownhostexception implies hbase server connecting hosted on aws, defines private domain names similar 1 in error message.
so might happening this:
- mule connects zookeeper, asks hbase nodes there are, , gets
ip-10-99-x-x.ap-southeast-2.compute.internal. - mule tries connect find htable "consignment", can't resolve ip address name.
unfortunately, if what's going on, take networking changes fix it. faq in vpc discovery form says private dns:
currently don't have ability relay dns queries internal dns servers. need either use ip addresses or public dns entries. beware of connecting systems may redirect virtual ip endpoint using internal dns entry.
you use public dns , possibly elastic ip around problem, require expose hbase cluster internet.
Comments
Post a Comment