accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-3922 more verbose proxy documentation
Date Fri, 26 Jun 2015 15:39:28 GMT
ACCUMULO-3922 more verbose proxy documentation

The proxy client is very useful for implementing secure client access.
Because of this use case, I would like to make the documentation a bit
more verbose.  Including some of the Java code snippets.

Signed-off-by: Josh Elser <elserj@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d9e81aa9
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d9e81aa9
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d9e81aa9

Branch: refs/heads/master
Commit: d9e81aa939ae19c2ecfdddf6f99c8be22707ceb8
Parents: e3652a2
Author: Charles Ott <charlieott@gmail.com>
Authored: Thu Jun 25 14:46:01 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Jun 26 11:24:32 2015 -0400

----------------------------------------------------------------------
 docs/src/main/asciidoc/chapters/clients.txt | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d9e81aa9/docs/src/main/asciidoc/chapters/clients.txt
----------------------------------------------------------------------
diff --git a/docs/src/main/asciidoc/chapters/clients.txt b/docs/src/main/asciidoc/chapters/clients.txt
index 3f85074..8d545ef 100644
--- a/docs/src/main/asciidoc/chapters/clients.txt
+++ b/docs/src/main/asciidoc/chapters/clients.txt
@@ -271,6 +271,9 @@ An example of the BatchScanner can be found at
 
 The proxy API allows the interaction with Accumulo with languages other than Java.
 A proxy server is provided in the codebase and a client can further be generated.
+The proxy API can also be used instead of the traditional ZooKeeperInstance class to
+provide a single TCP port in which clients can be securely routed through a firewall,
+without requiring access to all tablet servers in the cluster.
 
 ==== Prequisites
 
@@ -349,8 +352,22 @@ Next, add some data:
 // first, create a writer on the server
 String writer = client.createWriter(token, "myTable", new WriterOptions());
 
+//rowid
+ByteBuffer rowid = ByteBuffer.wrap("UUID".getBytes());
+
+//mutation like class
+ColumnUpdate cu = new ColumnUpdate();
+cu.setColFamily("MyFamily".getBytes());
+cu.setColQualifier("MyQualifier".getBytes());
+cu.setColVisibility("VisLabel".getBytes());
+cu.setValue("Some Value.".getBytes());
+
+List<ColumnUpdate> updates = new ArrayList<ColumnUpdate>();
+updates.add(cu);
+
 // build column updates
-Map<ByteBuffer, List<ColumnUpdate> cells> cellsToUpdate = //...
+Map<ByteBuffer, List<ColumnUpdate>> cellsToUpdate = new HashMap<ByteBuffer,
List<ColumnUpdate>>();
+cellsToUpdate.put(rowid, updates);
 
 // send updates to the server
 client.updateAndFlush(writer, "myTable", cellsToUpdate);


Mime
View raw message