Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. try {
  2. String instanceName = "tcri";
  3. String zooServers = "10.57.19.131";
  4. Instance inst = new ZooKeeperInstance(instanceName, zooServers);
  5.  
  6. AuthenticationToken authToken = new PasswordToken("password");
  7.  
  8. System.out.println("Starting connection...");
  9. Connector conn = inst.getConnector("root", authToken);
  10. } catch (Exception e) {
  11. System.out.println(e);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement