Guest User

Untitled

a guest
Oct 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. $:.push('../gen-rb')
  2.  
  3. require 'thrift'
  4. require 'nimbus'
  5.  
  6. begin
  7. transport = Thrift::BufferedTransport.new(Thrift::Socket.new('nimbus.example.com', 6627))
  8. protocol = Thrift::BinaryProtocol.new(transport)
  9. client = Nimbus::Client.new(protocol)
  10.  
  11. transport.open()
  12. summary = client.getClusterInfo()
  13. transport.close()
  14.  
  15. rescue Thrift::Exception => tx
  16. print 'Thrift::Exception: ', tx.message, "\n"
  17. end
Add Comment
Please, Sign In to add comment