Review Board 1.7.22


Accumulo proxy source 11/13/12

Review Request #8039 - Created Nov. 13, 2012 and discarded

Chris McCubbin
Reviewers
accumulo
accumulo
Patch submitted by Chris McCubbin to add thrift proxy to Accumulo, second version

 
/trunk/proxy/README
New File

    
   
1
This is the draft version of a thrift proxy server to interact with the Accumulo database.

    
   
2

   

    
   
3
1. Building

    
   
4

   

    
   
5
To compile, you must first install Thrift 0.9.0. This maven project uses the thrift maven plugin and will not function if thrift is not installed.

    
   
6

   

    
   
7
After thrift is installed, compile the project with:

    
   
8
mvn clean install

    
   
9
This will compile the thrift and java files and create a shaded jar file.

    
   
10

   

    
   
11
2. Proxy Server Execution

    
   
12

   

    
   
13
Please note that the proxy can only function correctly when connected to an Accumulo 1.5 instance, or when run standalone in the Mock configuration.

    
   
14
To run the server, edit the configuration file with parameters suited for your Accumulo installation. If you wish to instead use an in-memory Mock instance, set:

    
   
15
org.apache.accumulo.proxy.ProxyServer.useMockInstance=true

    
   
16
This option will override any "real" Accumulo instance information.

    
   
17

   

    
   
18
Once the properties file is configured correctly, run this command:

    
   
19
java -cp target/accumulo-proxy-1.5.0-SNAPSHOT-jar-with-dependencies.jar org.apache.accumulo.proxy.ProxyHarness -p proxy.properties

    
   
20

   

    
   
21
3. Clients

    
   
22

   

    
   
23
An example java client is incuded with this distribution in the class TestProxyClient. Also the unit tests included show how to use the proxy. Normal Accumulo APIs are emulated whereever possible.

    
   
24

   

    
   
25
Additional client examples can be found in the examples directory. These clients are tested and function, however, the setup for each language is beyond the scope of this document currently.

    
   
26

   

    
   
27
In general, to create a client for a new language one must compile the proxy.thrift API (along with the accumulo core data.thrift API) to the language of choice. Then one includes the resulting generated code along with the thrift core library for that language to use the proxy.

    
   
28

   

    
   
29
As a note, many of the clients here assume "secret" is your root password. Protip: to make the examples work, change this code to your password, do not change your root password to "secret".
/trunk/proxy/pom.xml
New File
 
/trunk/proxy/proxy.properties
New File
 
/trunk/proxy/examples/python/README
New File
 
/trunk/proxy/examples/python/TestClient.py
New File
 
/trunk/proxy/examples/python/proxy/AccumuloProxy.py
New File
 
/trunk/proxy/examples/python/proxy/AccumuloProxy-remote
New File
 
/trunk/proxy/examples/python/proxy/__init__.py
New File
 
/trunk/proxy/examples/python/proxy/constants.py
New File
 
/trunk/proxy/examples/python/proxy/ttypes.py
New File
 
/trunk/proxy/examples/ruby/README
New File
 
/trunk/proxy/examples/ruby/accumulo_proxy.rb
New File
 
/trunk/proxy/examples/ruby/proxy_constants.rb
New File
 
/trunk/proxy/examples/ruby/proxy_types.rb
New File
 
/trunk/proxy/examples/ruby/test_client.rb
New File
 
/trunk/proxy/examples/ruby/thrift.rb
New File
 
/trunk/proxy/src/main/java/org/apache/accumulo/proxy/ProxyHarness.java
New File
 
/trunk/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
New File
 
/trunk/proxy/src/main/java/org/apache/accumulo/proxy/TestProxyClient.java
New File
 
/trunk/proxy/src/main/java/org/apache/accumulo/proxy/Util.java
New File
 
  1. /trunk/proxy/README: Loading...
  2. /trunk/proxy/pom.xml: Loading...
  3. /trunk/proxy/proxy.properties: Loading...
  4. /trunk/proxy/examples/python/README: Loading...
  5. /trunk/proxy/examples/python/TestClient.py: Loading...
  6. /trunk/proxy/examples/python/proxy/AccumuloProxy.py: Loading...
  7. /trunk/proxy/examples/python/proxy/AccumuloProxy-remote: Loading...
  8. /trunk/proxy/examples/python/proxy/__init__.py: Loading...
  9. /trunk/proxy/examples/python/proxy/constants.py: Loading...
  10. /trunk/proxy/examples/python/proxy/ttypes.py: Loading...
  11. /trunk/proxy/examples/ruby/README: Loading...
  12. /trunk/proxy/examples/ruby/accumulo_proxy.rb: Loading...
  13. /trunk/proxy/examples/ruby/proxy_constants.rb: Loading...
  14. /trunk/proxy/examples/ruby/proxy_types.rb: Loading...
  15. /trunk/proxy/examples/ruby/test_client.rb: Loading...
  16. /trunk/proxy/examples/ruby/thrift.rb: Loading...
  17. /trunk/proxy/src/main/java/org/apache/accumulo/proxy/ProxyHarness.java: Loading...
  18. /trunk/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java: Loading...
  19. /trunk/proxy/src/main/java/org/apache/accumulo/proxy/TestProxyClient.java: Loading...
  20. /trunk/proxy/src/main/java/org/apache/accumulo/proxy/Util.java: Loading...
This diff has been split across 2 pages: 1 2 >