accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1442987 - in /accumulo/trunk/proxy/examples: python/TestClient.py ruby/test_client.rb
Date Wed, 06 Feb 2013 14:31:48 GMT
Author: ecn
Date: Wed Feb  6 14:31:47 2013
New Revision: 1442987

URL: http://svn.apache.org/viewvc?rev=1442987&view=rev
Log:
ACCUMULO-1046 fix the examples

Modified:
    accumulo/trunk/proxy/examples/python/TestClient.py
    accumulo/trunk/proxy/examples/ruby/test_client.rb

Modified: accumulo/trunk/proxy/examples/python/TestClient.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/examples/python/TestClient.py?rev=1442987&r1=1442986&r2=1442987&view=diff
==============================================================================
--- accumulo/trunk/proxy/examples/python/TestClient.py (original)
+++ accumulo/trunk/proxy/examples/python/TestClient.py Wed Feb  6 14:31:47 2013
@@ -30,7 +30,7 @@ protocol = TCompactProtocol.TCompactProt
 client = AccumuloProxy.Client(protocol)
 transport.open()
 
-login = PrincipalToken("root","secret")
+login = client.login(UserPass('root', 'secret'))
 
 print client.listTables(login)
 

Modified: accumulo/trunk/proxy/examples/ruby/test_client.rb
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/examples/ruby/test_client.rb?rev=1442987&r1=1442986&r2=1442987&view=diff
==============================================================================
--- accumulo/trunk/proxy/examples/ruby/test_client.rb (original)
+++ accumulo/trunk/proxy/examples/ruby/test_client.rb Wed Feb  6 14:31:47 2013
@@ -24,13 +24,12 @@ socket = Thrift::Socket.new(server, 4242
 transport = Thrift::FramedTransport.new(socket)
 proto = Thrift::CompactProtocol.new(transport)
 proxy = AccumuloProxy::Client.new(proto)
-login = PrincipalToken.new({'principal' => 'root', 'token' => 'secret'})
 
 # open up the connect
 transport.open()
 
 # Test if the server is up
-proxy.ping(login)
+login = proxy.login(UserPass.new('username' => 'root', 'password' => 'secret'))
 
 # print out a table list
 puts "List of tables: #{proxy.listTables(login).inspect}"



Mime
View raw message