Author: elserj Date: Tue May 6 18:10:51 2014 New Revision: 1592820 URL: http://svn.apache.org/r1592820 Log: ACCUMULO-2171 Fix bad markdown formatting for code region
Modified: accumulo/site/trunk/content/1.6/examples/mapred.mdtext Modified: accumulo/site/trunk/content/1.6/examples/mapred.mdtext URL: http://svn.apache.org/viewvc/accumulo/site/trunk/content/1.6/examples/mapred.mdtext?rev=1592820&r1=1592819&r2=1592820&view=diff ============================================================================== --- accumulo/site/trunk/content/1.6/examples/mapred.mdtext (original) +++ accumulo/site/trunk/content/1.6/examples/mapred.mdtext Tue May 6 18:10:51 2014 @@ -104,7 +104,7 @@ displayed in the job's configuration whi To create a token file, use the create-token utility - $ ./bin/accumulo create-token + $ ./bin/accumulo create-token It defaults to creating a PasswordToken, but you can specify the token class with -tc (requires the fully qualified class name). Based on the token class, @@ -117,7 +117,7 @@ a file, but only the first one for each Rather than waiting for the prompts, you can specify some options when calling create-token, for example - $ ./bin/accumulo create-token -u root -p secret -f root.pw + $ ./bin/accumulo create-token -u root -p secret -f root.pw would create a token file containing a PasswordToken for user 'root' with password 'secret' and saved to 'root.pw' @@ -125,7 +125,7 @@ user 'root' with password 'secret' and s This local file needs to be uploaded to hdfs to be used with the map-reduce job. For example, if the file were 'root.pw' in the local directory: - $ hadoop fs -put root.pw root.pw + $ hadoop fs -put root.pw root.pw This would put 'root.pw' in the user's home directory in hdfs. @@ -134,21 +134,17 @@ Because the basic WordCount example uses the basic WordCount example by calling the same command as explained above except replacing the password with the token file (rather than -p, use -tf). - $ ./bin/tool.sh lib/accumulo-examples-simple.jar org.apache.accumulo.examples.simple.mapreduce.WordCount -i instance -z zookeepers --input /user/username/wc -t wordCount -u username -tf tokenfile + $ ./bin/tool.sh lib/accumulo-examples-simple.jar org.apache.accumulo.examples.simple.mapreduce.WordCount -i instance -z zookeepers --input /user/username/wc -t wordCount -u username -tf tokenfile In the above examples, username was 'root' and tokenfile was 'root.pw' However, if you don't want to use the Opts class to parse arguments, the TokenFileWordCount is an example of using the token file manually. - $ bin/tool.sh lib/accumulo-examples-simple.jar org.apache.accumulo.examples.simple.mapreduce.TokenFileWordCount instance zookeepers username tokenfile /user/username/wc wordCount + $ bin/tool.sh lib/accumulo-examples-simple.jar org.apache.accumulo.examples.simple.mapreduce.TokenFileWordCount instance zookeepers username tokenfile /user/username/wc wordCount The results should be the same as the WordCount example except that the authentication token was not stored in the configuration. It was instead stored in a file that the map-reduce job pulled into the distributed cache. (If you ran either of these on the same table right after the -WordCount example, then the resulting counts should just double.) - - - - +WordCount example, then the resulting counts should just double.) \ No newline at end of file