Author: kturner
Date: Fri Apr  4 21:08:45 2014
New Revision: 1584912

URL: http://svn.apache.org/r1584912
Log:
ACCUMULO-2396 fixed code block

Modified:
    accumulo/site/trunk/content/release_notes/1.6.0.mdtext

Modified: accumulo/site/trunk/content/release_notes/1.6.0.mdtext
URL: 
http://svn.apache.org/viewvc/accumulo/site/trunk/content/release_notes/1.6.0.mdtext?rev=1584912&r1=1584911&r2=1584912&view=diff
==============================================================================
--- accumulo/site/trunk/content/release_notes/1.6.0.mdtext (original)
+++ accumulo/site/trunk/content/release_notes/1.6.0.mdtext Fri Apr  4 21:08:45 
2014
@@ -56,14 +56,14 @@ One of the key elements of the Big Table
 
 Accumulo only sorts data lexicographically.  Getting something like a pair of 
(<string>,<integer>) to sort correctly in Accumulo is tricky.  Its tricky 
because you only want to compare the integers if the strings are equal.  Its 
possible to make this sort properly in Accumulo if the data is encoded 
properly, but that's the tricky part.  To make this easier 
[ACCUMULO-1336][ACCUMULO-1336] added Lexicoders to the Accumulo API.  
Lexicoders provide an easy way to serialize data so that it sorts properly 
lexicographically.  Below is a simple example.
 
- > PairLexicoder plex = new PairLexicoder(new StringLexicoder(), new 
IntegerLexicoder());
- > byte[] ba1 = plex.encode(new ComparablePair<String, Integer>("b",1));
- > byte[] ba2 = plex.encode(new ComparablePair<String, Integer>("aa",1));
- > byte[] ba3 = plex.encode(new ComparablePair<String, Integer>("a",2));
- > byte[] ba4 = plex.encode(new ComparablePair<String, Integer>("a",1)); 
- > byte[] ba5 = plex.encode(new ComparablePair<String, Integer>("aa",-3));
- >
- > //sorting ba1,ba2,ba3,ba4, and ba5 lexicographically will result in the 
same order as sorting the ComparablePairs
+       PairLexicoder plex = new PairLexicoder(new StringLexicoder(), new 
IntegerLexicoder());
+       byte[] ba1 = plex.encode(new ComparablePair<String, Integer>("b",1));
+       byte[] ba2 = plex.encode(new ComparablePair<String, Integer>("aa",1));
+       byte[] ba3 = plex.encode(new ComparablePair<String, Integer>("a",2));
+       byte[] ba4 = plex.encode(new ComparablePair<String, Integer>("a",1)); 
+       byte[] ba5 = plex.encode(new ComparablePair<String, Integer>("aa",-3));
+
+       //sorting ba1,ba2,ba3,ba4, and ba5 lexicographically will result in the 
same order as sorting the ComparablePairs
 
 ### Multi-table Accumulo input format
 


Reply via email to