accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1433081 - /accumulo/trunk/docs/examples/README.client
Date Mon, 14 Jan 2013 19:51:03 GMT
Author: ecn
Date: Mon Jan 14 19:51:02 2013
New Revision: 1433081

URL: http://svn.apache.org/viewvc?rev=1433081&view=rev
Log:
ACCUMULO-282 document the simplest client examples

Added:
    accumulo/trunk/docs/examples/README.client

Added: accumulo/trunk/docs/examples/README.client
URL: http://svn.apache.org/viewvc/accumulo/trunk/docs/examples/README.client?rev=1433081&view=auto
==============================================================================
--- accumulo/trunk/docs/examples/README.client (added)
+++ accumulo/trunk/docs/examples/README.client Mon Jan 14 19:51:02 2013
@@ -0,0 +1,73 @@
+Title: Apache Accumulo Client Examples
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+This documents how you run the simplest java examples.
+
+Using the accumulo command, you can run the simple client examples by providing their 
+class name, and enough arguments to find your accumulo instance.  For example,
+the Flush class will flush a table:
+
+    $ PACKAGE=org.apache.accumulo.examples.simple.client
+    $ bin/accumulo $PACKAGE.Flush -u root -p mypassword -i instance -z zookeeper -t trace
+
+The very simple RowOperations class demonstrates how to read and write rows using the BatchWriter
+and Scanner:
+
+    $ bin/accumulo $PACKAGE.RowOperations -u root -p mypassword -i instance -z zookeeper

+    2013-01-14 14:45:24,738 [client.RowOperations] INFO : This is everything
+    2013-01-14 14:45:24,744 [client.RowOperations] INFO : Key: row1 column:1 [] 1358192724640
false Value: This is the value for this key
+    2013-01-14 14:45:24,744 [client.RowOperations] INFO : Key: row1 column:2 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,744 [client.RowOperations] INFO : Key: row1 column:3 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,744 [client.RowOperations] INFO : Key: row1 column:4 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,746 [client.RowOperations] INFO : Key: row2 column:1 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,746 [client.RowOperations] INFO : Key: row2 column:2 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,746 [client.RowOperations] INFO : Key: row2 column:3 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,746 [client.RowOperations] INFO : Key: row2 column:4 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,747 [client.RowOperations] INFO : Key: row3 column:1 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,747 [client.RowOperations] INFO : Key: row3 column:2 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,747 [client.RowOperations] INFO : Key: row3 column:3 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,747 [client.RowOperations] INFO : Key: row3 column:4 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,756 [client.RowOperations] INFO : This is row1 and row3
+    2013-01-14 14:45:24,757 [client.RowOperations] INFO : Key: row1 column:1 [] 1358192724640
false Value: This is the value for this key
+    2013-01-14 14:45:24,757 [client.RowOperations] INFO : Key: row1 column:2 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,757 [client.RowOperations] INFO : Key: row1 column:3 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,757 [client.RowOperations] INFO : Key: row1 column:4 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,761 [client.RowOperations] INFO : Key: row3 column:1 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,761 [client.RowOperations] INFO : Key: row3 column:2 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,761 [client.RowOperations] INFO : Key: row3 column:3 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,761 [client.RowOperations] INFO : Key: row3 column:4 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,765 [client.RowOperations] INFO : This is just row3
+    2013-01-14 14:45:24,769 [client.RowOperations] INFO : Key: row3 column:1 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,770 [client.RowOperations] INFO : Key: row3 column:2 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,770 [client.RowOperations] INFO : Key: row3 column:3 [] 1358192724642
false Value: This is the value for this key
+    2013-01-14 14:45:24,770 [client.RowOperations] INFO : Key: row3 column:4 [] 1358192724642
false Value: This is the value for this key
+
+To create a table, write to it and read from it:
+
+    $ bin/accumulo $PACKAGE.ReadWriteExample -u root -p mypassword -i instance -z zookeeper
--createtable --create --read 
+    hello%00; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%01; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%02; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%03; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%04; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%05; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%06; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%07; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%08; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+    hello%09; datatypes:xml [LEVEL1|GROUP1] 1358192329450 false -> world
+



Mime
View raw message