http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/c0655661/user_manual_1.3-incubating/examples/constraints.html ---------------------------------------------------------------------- diff --git a/user_manual_1.3-incubating/examples/constraints.html b/user_manual_1.3-incubating/examples/constraints.html deleted file mode 100644 index d156943..0000000 --- a/user_manual_1.3-incubating/examples/constraints.html +++ /dev/null @@ -1,228 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<!-- - 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. ---> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css" rel="stylesheet" integrity="sha384-awusxf8AUojygHf2+joICySzB780jVvQaVCAt1clU3QsyAitLGul28Qxb2r1e5g+" crossorigin="anonymous"> -<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.css"> -<link href="/css/accumulo.css" rel="stylesheet" type="text/css"> - -<title>Constraints Example</title> - -<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.js"></script> -<script> - // show location of canonical site if not currently on the canonical site - $(function() { - var host = window.location.host; - if (typeof host !== 'undefined' && host !== 'accumulo.apache.org') { - $('#non-canonical').show(); - } - }); - - $(function() { - // decorate section headers with anchors - return $("h2, h3, h4, h5, h6").each(function(i, el) { - var $el, icon, id; - $el = $(el); - id = $el.attr('id'); - icon = '<i class="fa fa-link"></i>'; - if (id) { - return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon)); - } - }); - }); - - // configure Google Analytics - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - if (ga.hasOwnProperty('loaded') && ga.loaded === true) { - ga('create', 'UA-50934829-1', 'apache.org'); - ga('send', 'pageview'); - } -</script> - -</head> -<body style="padding-top: 100px"> - - <nav class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a href="/"><img id="nav-logo" alt="Apache Accumulo" class="img-responsive" src="/images/accumulo-logo.png" width="200"/></a> - </div> - <div class="collapse navbar-collapse" id="navbar-items"> - <ul class="nav navbar-nav"> - <li class="nav-link"><a href="/downloads">Download</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-header">1.8.0 Release (Latest)</li> - <li><a href="/release_notes/1.8.0">Release Notes</a></li> - <li><a href="/1.8/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.8/apidocs">Javadoc</a></li> - <li><a href="/1.8/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.7.2 Release</li> - <li><a href="/release_notes/1.7.2">Release Notes</a></li> - <li><a href="/1.7/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.7/apidocs">Javadoc</a></li> - <li><a href="/1.7/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.6.6 Release</li> - <li><a href="/release_notes/1.6.6">Release Notes</a></li> - <li><a href="/1.6/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.6/apidocs">Javadoc</a></li> - <li><a href="/1.6/examples">Examples</a></li> - <li class="divider"></li> - <li><a href="/notable_features">Features</a></li> - <li><a href="/release_notes">Release Notes Archive</a></li> - <li><a href="/old_documentation">Documentation Archive</a></li> - <li><a href="/screenshots">Screenshots</a></li> - <li><a href="/papers">Papers & Presentations</a></li> - <li><a href="/glossary">Glossary</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Community<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="/get_involved">Get Involved</a></li> - <li><a href="/mailing_list">Mailing Lists</a></li> - <li><a href="/people">People</a></li> - <li><a href="/news">News Archive</a></li> - <li><a href="/projects">Community Projects</a></li> - <li><a href="/thanks">Thanks</a></li> - <li class="divider"></li> - <li class="dropdown-header">Governance</li> - <li><a href="/bylaws">Bylaws</a></li> - <li><a href="/governance/consensusBuilding">Consensus Building</a></li> - <li><a href="/governance/lazyConsensus">Lazy Consensus</a></li> - <li><a href="/governance/releasing">Releasing</a></li> - <li><a href="/governance/voting">Voting</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Development<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://issues.apache.org/jira/browse/ACCUMULO">Issue Tracker <i class="fa fa-external-link"></i></a></li> - <li><a href="https://github.com/apache/accumulo/pulls">Pull Requests <i class="fa fa-external-link"></i></a></li> - <li><a href="https://builds.apache.org/view/A/view/Accumulo">Jenkins Builds <i class="fa fa-external-link"></i></a></li> - <li><a href="https://travis-ci.org/apache/accumulo">TravisCI Builds <i class="fa fa-external-link"></i></a></li> - <li class="divider"></li> - <li class="dropdown-header">Guides</li> - <li><a href="/source">Source & Guide</a></li> - <li><a href="/git">Git Workflow</a></li> - <li><a href="/versioning">Versioning</a></li> - <li><a href="/contrib">Contrib Projects</a></li> - <li><a href="/rb">Review Board</a></li> - <li><a href="/releasing">Making Releases</a></li> - <li><a href="/verifying_releases">Verifying Releases</a></li> - </ul> - </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apache Software Foundation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://www.apache.org">Apache Homepage <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/licenses/LICENSE-2.0">License <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/sponsorship">Sponsorship <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/security">Security <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/thanks">Thanks <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct <i class="fa fa-external-link"></i></a></li> - </ul> - </li> - </ul> - </div> - </div> -</nav> - - - <div class="container"> - <div class="row"> - <div class="col-md-12"> - - <div id="non-canonical" style="display: none; background-color: #F0E68C; padding-left: 1em;"> - Visit the official site at: <a href="https://accumulo.apache.org">https://accumulo.apache.org</a> - </div> - <div id="content"> - - <h1 class="title">Constraints Example</h1> - - <p>This an example of how to create a table with constraints. Below a table is -create with two example constraints. One constraints does not allow non alpha -numeric keys. The other constraint does not allow non numeric values. Two -inserts that violate these constraints are attempted and denied. The scan at -the end shows the inserts were not allowed.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo shell -u username -p pass - -Shell - Apache Accumulo Interactive Shell -- -- version: 1.3.x-incubating -- instance name: instance -- instance id: 00000000-0000-0000-0000-000000000000 -- -- type 'help' for a list of available commands -- -username@instance> createtable testConstraints -username@instance testConstraints> config -t testConstraints -s table.constraint.1=org.apache.accumulo.examples.constraints.NumericValueConstraint -username@instance testConstraints> config -t testConstraints -s table.constraint.2=org.apache.accumulo.examples.constraints.AlphaNumKeyConstrain -username@instance testConstraints> insert r1 cf1 cq1 1111 -username@instance testConstraints> insert r1 cf1 cq1 ABC - Constraint Failures: - ConstraintViolationSummary(constrainClass:org.apache.accumulo.examples.constraints.NumericValueConstraint, violationCode:1, violationDescription:Value is not numeric, numberOfViolatingMutations:1) -username@instance testConstraints> insert r1! cf1 cq1 ABC - Constraint Failures: - ConstraintViolationSummary(constrainClass:org.apache.accumulo.examples.constraints.NumericValueConstraint, violationCode:1, violationDescription:Value is not numeric, numberOfViolatingMutations:1) - ConstraintViolationSummary(constrainClass:org.apache.accumulo.examples.constraints.AlphaNumKeyConstraint, violationCode:1, violationDescription:Row was not alpha numeric, numberOfViolatingMutations:1) -username@instance testConstraints> scan -r1 cf1:cq1 [] 1111 -username@instance testConstraints> -</code></pre> -</div> - - </div> - - -<footer> - - <p><a href="https://www.apache.org"><img src="/images/feather-small.gif" alt="Apache Software Foundation" id="asf-logo" height="100" /></a></p> - - <p>Copyright © 2011-2016 The Apache Software Foundation. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> - -</footer> - - - </div> - </div> - </div> -</body> -</html>
http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/c0655661/user_manual_1.3-incubating/examples/dirlist.html ---------------------------------------------------------------------- diff --git a/user_manual_1.3-incubating/examples/dirlist.html b/user_manual_1.3-incubating/examples/dirlist.html deleted file mode 100644 index d484dc8..0000000 --- a/user_manual_1.3-incubating/examples/dirlist.html +++ /dev/null @@ -1,247 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<!-- - 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. ---> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css" rel="stylesheet" integrity="sha384-awusxf8AUojygHf2+joICySzB780jVvQaVCAt1clU3QsyAitLGul28Qxb2r1e5g+" crossorigin="anonymous"> -<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.css"> -<link href="/css/accumulo.css" rel="stylesheet" type="text/css"> - -<title>File System Archive</title> - -<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.js"></script> -<script> - // show location of canonical site if not currently on the canonical site - $(function() { - var host = window.location.host; - if (typeof host !== 'undefined' && host !== 'accumulo.apache.org') { - $('#non-canonical').show(); - } - }); - - $(function() { - // decorate section headers with anchors - return $("h2, h3, h4, h5, h6").each(function(i, el) { - var $el, icon, id; - $el = $(el); - id = $el.attr('id'); - icon = '<i class="fa fa-link"></i>'; - if (id) { - return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon)); - } - }); - }); - - // configure Google Analytics - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - if (ga.hasOwnProperty('loaded') && ga.loaded === true) { - ga('create', 'UA-50934829-1', 'apache.org'); - ga('send', 'pageview'); - } -</script> - -</head> -<body style="padding-top: 100px"> - - <nav class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a href="/"><img id="nav-logo" alt="Apache Accumulo" class="img-responsive" src="/images/accumulo-logo.png" width="200"/></a> - </div> - <div class="collapse navbar-collapse" id="navbar-items"> - <ul class="nav navbar-nav"> - <li class="nav-link"><a href="/downloads">Download</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-header">1.8.0 Release (Latest)</li> - <li><a href="/release_notes/1.8.0">Release Notes</a></li> - <li><a href="/1.8/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.8/apidocs">Javadoc</a></li> - <li><a href="/1.8/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.7.2 Release</li> - <li><a href="/release_notes/1.7.2">Release Notes</a></li> - <li><a href="/1.7/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.7/apidocs">Javadoc</a></li> - <li><a href="/1.7/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.6.6 Release</li> - <li><a href="/release_notes/1.6.6">Release Notes</a></li> - <li><a href="/1.6/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.6/apidocs">Javadoc</a></li> - <li><a href="/1.6/examples">Examples</a></li> - <li class="divider"></li> - <li><a href="/notable_features">Features</a></li> - <li><a href="/release_notes">Release Notes Archive</a></li> - <li><a href="/old_documentation">Documentation Archive</a></li> - <li><a href="/screenshots">Screenshots</a></li> - <li><a href="/papers">Papers & Presentations</a></li> - <li><a href="/glossary">Glossary</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Community<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="/get_involved">Get Involved</a></li> - <li><a href="/mailing_list">Mailing Lists</a></li> - <li><a href="/people">People</a></li> - <li><a href="/news">News Archive</a></li> - <li><a href="/projects">Community Projects</a></li> - <li><a href="/thanks">Thanks</a></li> - <li class="divider"></li> - <li class="dropdown-header">Governance</li> - <li><a href="/bylaws">Bylaws</a></li> - <li><a href="/governance/consensusBuilding">Consensus Building</a></li> - <li><a href="/governance/lazyConsensus">Lazy Consensus</a></li> - <li><a href="/governance/releasing">Releasing</a></li> - <li><a href="/governance/voting">Voting</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Development<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://issues.apache.org/jira/browse/ACCUMULO">Issue Tracker <i class="fa fa-external-link"></i></a></li> - <li><a href="https://github.com/apache/accumulo/pulls">Pull Requests <i class="fa fa-external-link"></i></a></li> - <li><a href="https://builds.apache.org/view/A/view/Accumulo">Jenkins Builds <i class="fa fa-external-link"></i></a></li> - <li><a href="https://travis-ci.org/apache/accumulo">TravisCI Builds <i class="fa fa-external-link"></i></a></li> - <li class="divider"></li> - <li class="dropdown-header">Guides</li> - <li><a href="/source">Source & Guide</a></li> - <li><a href="/git">Git Workflow</a></li> - <li><a href="/versioning">Versioning</a></li> - <li><a href="/contrib">Contrib Projects</a></li> - <li><a href="/rb">Review Board</a></li> - <li><a href="/releasing">Making Releases</a></li> - <li><a href="/verifying_releases">Verifying Releases</a></li> - </ul> - </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apache Software Foundation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://www.apache.org">Apache Homepage <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/licenses/LICENSE-2.0">License <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/sponsorship">Sponsorship <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/security">Security <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/thanks">Thanks <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct <i class="fa fa-external-link"></i></a></li> - </ul> - </li> - </ul> - </div> - </div> -</nav> - - - <div class="container"> - <div class="row"> - <div class="col-md-12"> - - <div id="non-canonical" style="display: none; background-color: #F0E68C; padding-left: 1em;"> - Visit the official site at: <a href="https://accumulo.apache.org">https://accumulo.apache.org</a> - </div> - <div id="content"> - - <h1 class="title">File System Archive</h1> - - <p>This example shows how to use Accumulo to store a file system history. It has three classes:</p> - -<ul> - <li>Ingest.java - Recursively lists the files and directories under a given path, ingests their names and file info (not the file data!) into an Accumulo table, and indexes the file names in a separate table.</li> - <li>QueryUtil.java - Provides utility methods for getting the info for a file, listing the contents of a directory, and performing single wild card searches on file or directory names.</li> - <li>Viewer.java - Provides a GUI for browsing the file system information stored in Accumulo.</li> - <li>FileCountMR.java - Runs MR over the file system information and writes out counts to an Accumulo table.</li> - <li>FileCount.java - Accomplishes the same thing as FileCountMR, but in a different way. Computes recursive counts and stores them back into table.</li> - <li>StringArraySummation.java - Aggregates counts for the FileCountMR reducer.</li> -</ul> - -<p>To begin, ingest some data with Ingest.java.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.dirlist.Ingest instance zookeepers username password direxample dirindex exampleVis /local/user1/workspace -</code></pre> -</div> - -<p>Note that running this example will create tables direxample and dirindex in Accumulo that you should delete when you have completed the example. -If you modify a file or add new files in the directory ingested (e.g. /local/user1/workspace), you can run Ingest again to add new information into the Accumulo tables.</p> - -<p>To browse the data ingested, use Viewer.java. Be sure to give the âusernameâ user the authorizations to see the data.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.dirlist.Viewer instance zookeepers username password direxample exampleVis /local/user1/workspace -</code></pre> -</div> - -<p>To list the contents of specific directories, use QueryUtil.java.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.dirlist.QueryUtil instance zookeepers username password direxample exampleVis /local/user1 -$ ./bin/accumulo org.apache.accumulo.examples.dirlist.QueryUtil instance zookeepers username password direxample exampleVis /local/user1/workspace -</code></pre> -</div> - -<p>To perform searches on file or directory names, also use QueryUtil.java. Search terms must contain no more than one wild card and cannot contain â/â. -<em>Note</em> these queries run on the <em>dirindex</em> table instead of the direxample table.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.dirlist.QueryUtil instance zookeepers username password dirindex exampleVis filename -search -$ ./bin/accumulo org.apache.accumulo.examples.dirlist.QueryUtil instance zookeepers username password dirindex exampleVis 'filename*' -search -$ ./bin/accumulo org.apache.accumulo.examples.dirlist.QueryUtil instance zookeepers username password dirindex exampleVis '*jar' -search -$ ./bin/accumulo org.apache.accumulo.examples.dirlist.QueryUtil instance zookeepers username password dirindex exampleVis filename*jar -search -</code></pre> -</div> - -<p>To count the number of direct children (directories and files) and descendants (children and childrenâs descendents, directories and files), run the FileCountMR over the direxample table. -The results can be written back to the same table.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/tool.sh lib/accumulo-examples-*[^c].jar org.apache.accumulo.examples.dirlist.FileCountMR instance zookeepers username password direxample direxample exampleVis exampleVis -</code></pre> -</div> - -<p>Alternatively, you can also run FileCount.java.</p> - - </div> - - -<footer> - - <p><a href="https://www.apache.org"><img src="/images/feather-small.gif" alt="Apache Software Foundation" id="asf-logo" height="100" /></a></p> - - <p>Copyright © 2011-2016 The Apache Software Foundation. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> - -</footer> - - - </div> - </div> - </div> -</body> -</html> http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/c0655661/user_manual_1.3-incubating/examples/filter.html ---------------------------------------------------------------------- diff --git a/user_manual_1.3-incubating/examples/filter.html b/user_manual_1.3-incubating/examples/filter.html deleted file mode 100644 index 8810cea..0000000 --- a/user_manual_1.3-incubating/examples/filter.html +++ /dev/null @@ -1,291 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<!-- - 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. ---> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css" rel="stylesheet" integrity="sha384-awusxf8AUojygHf2+joICySzB780jVvQaVCAt1clU3QsyAitLGul28Qxb2r1e5g+" crossorigin="anonymous"> -<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.css"> -<link href="/css/accumulo.css" rel="stylesheet" type="text/css"> - -<title>Filter Example</title> - -<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.js"></script> -<script> - // show location of canonical site if not currently on the canonical site - $(function() { - var host = window.location.host; - if (typeof host !== 'undefined' && host !== 'accumulo.apache.org') { - $('#non-canonical').show(); - } - }); - - $(function() { - // decorate section headers with anchors - return $("h2, h3, h4, h5, h6").each(function(i, el) { - var $el, icon, id; - $el = $(el); - id = $el.attr('id'); - icon = '<i class="fa fa-link"></i>'; - if (id) { - return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon)); - } - }); - }); - - // configure Google Analytics - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - if (ga.hasOwnProperty('loaded') && ga.loaded === true) { - ga('create', 'UA-50934829-1', 'apache.org'); - ga('send', 'pageview'); - } -</script> - -</head> -<body style="padding-top: 100px"> - - <nav class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a href="/"><img id="nav-logo" alt="Apache Accumulo" class="img-responsive" src="/images/accumulo-logo.png" width="200"/></a> - </div> - <div class="collapse navbar-collapse" id="navbar-items"> - <ul class="nav navbar-nav"> - <li class="nav-link"><a href="/downloads">Download</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-header">1.8.0 Release (Latest)</li> - <li><a href="/release_notes/1.8.0">Release Notes</a></li> - <li><a href="/1.8/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.8/apidocs">Javadoc</a></li> - <li><a href="/1.8/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.7.2 Release</li> - <li><a href="/release_notes/1.7.2">Release Notes</a></li> - <li><a href="/1.7/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.7/apidocs">Javadoc</a></li> - <li><a href="/1.7/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.6.6 Release</li> - <li><a href="/release_notes/1.6.6">Release Notes</a></li> - <li><a href="/1.6/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.6/apidocs">Javadoc</a></li> - <li><a href="/1.6/examples">Examples</a></li> - <li class="divider"></li> - <li><a href="/notable_features">Features</a></li> - <li><a href="/release_notes">Release Notes Archive</a></li> - <li><a href="/old_documentation">Documentation Archive</a></li> - <li><a href="/screenshots">Screenshots</a></li> - <li><a href="/papers">Papers & Presentations</a></li> - <li><a href="/glossary">Glossary</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Community<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="/get_involved">Get Involved</a></li> - <li><a href="/mailing_list">Mailing Lists</a></li> - <li><a href="/people">People</a></li> - <li><a href="/news">News Archive</a></li> - <li><a href="/projects">Community Projects</a></li> - <li><a href="/thanks">Thanks</a></li> - <li class="divider"></li> - <li class="dropdown-header">Governance</li> - <li><a href="/bylaws">Bylaws</a></li> - <li><a href="/governance/consensusBuilding">Consensus Building</a></li> - <li><a href="/governance/lazyConsensus">Lazy Consensus</a></li> - <li><a href="/governance/releasing">Releasing</a></li> - <li><a href="/governance/voting">Voting</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Development<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://issues.apache.org/jira/browse/ACCUMULO">Issue Tracker <i class="fa fa-external-link"></i></a></li> - <li><a href="https://github.com/apache/accumulo/pulls">Pull Requests <i class="fa fa-external-link"></i></a></li> - <li><a href="https://builds.apache.org/view/A/view/Accumulo">Jenkins Builds <i class="fa fa-external-link"></i></a></li> - <li><a href="https://travis-ci.org/apache/accumulo">TravisCI Builds <i class="fa fa-external-link"></i></a></li> - <li class="divider"></li> - <li class="dropdown-header">Guides</li> - <li><a href="/source">Source & Guide</a></li> - <li><a href="/git">Git Workflow</a></li> - <li><a href="/versioning">Versioning</a></li> - <li><a href="/contrib">Contrib Projects</a></li> - <li><a href="/rb">Review Board</a></li> - <li><a href="/releasing">Making Releases</a></li> - <li><a href="/verifying_releases">Verifying Releases</a></li> - </ul> - </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apache Software Foundation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://www.apache.org">Apache Homepage <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/licenses/LICENSE-2.0">License <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/sponsorship">Sponsorship <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/security">Security <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/thanks">Thanks <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct <i class="fa fa-external-link"></i></a></li> - </ul> - </li> - </ul> - </div> - </div> -</nav> - - - <div class="container"> - <div class="row"> - <div class="col-md-12"> - - <div id="non-canonical" style="display: none; background-color: #F0E68C; padding-left: 1em;"> - Visit the official site at: <a href="https://accumulo.apache.org">https://accumulo.apache.org</a> - </div> - <div id="content"> - - <h1 class="title">Filter Example</h1> - - <p>This is a simple filter example. It uses the AgeOffFilter that is provided as -part of the core package org.apache.accumulo.core.iterators.filter. Filters are used by -the FilteringIterator to select desired key/value pairs (or weed out undesired -ones). Filters implement the org.apache.accumulo.core.iterators.iterators.filter.Filter interface which -contains a method accept(Key k, Value v). This method returns true if the key, -value pair are to be delivered and false if they are to be ignored.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>username@instance> createtable filtertest -username@instance filtertest> setiter -t filtertest -scan -p 10 -n myfilter -filter -FilteringIterator uses Filters to accept or reject key/value pairs -----------> entering options: <filterPriorityNumber> <ageoff|regex|filterClass> -----------> set org.apache.accumulo.core.iterators.FilteringIterator option (<name> <value>, hit enter to skip): 0 ageoff -----------> set org.apache.accumulo.core.iterators.FilteringIterator option (<name> <value>, hit enter to skip): -AgeOffFilter removes entries with timestamps more than <ttl> milliseconds old -----------> set org.apache.accumulo.core.iterators.filter.AgeOffFilter parameter currentTime, if set, use the given value as the absolute time in milliseconds as the current time of day: -----------> set org.apache.accumulo.core.iterators.filter.AgeOffFilter parameter ttl, time to live (milliseconds): 30000 -username@instance filtertest> - -username@instance filtertest> scan -username@instance filtertest> insert foo a b c -username@instance filtertest> scan -foo a:b [] c -</code></pre> -</div> - -<p>⦠wait 30 seconds â¦</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>username@instance filtertest> scan -username@instance filtertest> -</code></pre> -</div> - -<p>Note the absence of the entry inserted more than 30 seconds ago. Since the -scope was set to âscanâ, this means the entry is still in Accumulo, but is -being filtered out at query time. To delete entries from Accumulo based on -the ages of their timestamps, AgeOffFilters should be set up for the âmincâ -and âmajcâ scopes, as well.</p> - -<p>To force an ageoff in the persisted data, after setting up the ageoff iterator -on the âmincâ and âmajcâ scopes you can flush and compact your table. This will -happen automatically as a background operation on any table that is being -actively written to, but these are the commands to force compaction:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>username@instance filtertest> setiter -t filtertest -scan -minc -majc -p 10 -n myfilter -filter -FilteringIterator uses Filters to accept or reject key/value pairs -----------> entering options: <filterPriorityNumber> <ageoff|regex|filterClass> -----------> set org.apache.accumulo.core.iterators.FilteringIterator option (<name> <value>, hit enter to skip): 0 ageoff -----------> set org.apache.accumulo.core.iterators.FilteringIterator option (<name> <value>, hit enter to skip): -AgeOffFilter removes entries with timestamps more than <ttl> milliseconds old -----------> set org.apache.accumulo.core.iterators.filter.AgeOffFilter parameter currentTime, if set, use the given value as the absolute time in milliseconds as the current time of day: -----------> set org.apache.accumulo.core.iterators.filter.AgeOffFilter parameter ttl, time to live (milliseconds): 30000 -username@instance filtertest> - -username@instance filtertest> flush -t filtertest -08 11:13:55,745 [shell.Shell] INFO : Flush of table filtertest initiated... -username@instance filtertest> compact -t filtertest -08 11:14:10,800 [shell.Shell] INFO : Compaction of table filtertest scheduled for 20110208111410EST -username@instance filtertest> -</code></pre> -</div> - -<p>After the compaction runs, the newly created files will not contain any data that should be aged off, and the -Accumulo garbage collector will remove the old files.</p> - -<p>To see the iterator settings for a table, use:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>username@instance filtertest> config -t filtertest -f iterator ----------+------------------------------------------+---------------------------------------------------------- -SCOPE | NAME | VALUE ----------+------------------------------------------+---------------------------------------------------------- -table | table.iterator.majc.myfilter .............. | 10,org.apache.accumulo.core.iterators.FilteringIterator -table | table.iterator.majc.myfilter.opt.0 ........ | org.apache.accumulo.core.iterators.filter.AgeOffFilter -table | table.iterator.majc.myfilter.opt.0.ttl .... | 30000 -table | table.iterator.majc.vers .................. | 20,org.apache.accumulo.core.iterators.VersioningIterator -table | table.iterator.majc.vers.opt.maxVersions .. | 1 -table | table.iterator.minc.myfilter .............. | 10,org.apache.accumulo.core.iterators.FilteringIterator -table | table.iterator.minc.myfilter.opt.0 ........ | org.apache.accumulo.core.iterators.filter.AgeOffFilter -table | table.iterator.minc.myfilter.opt.0.ttl .... | 30000 -table | table.iterator.minc.vers .................. | 20,org.apache.accumulo.core.iterators.VersioningIterator -table | table.iterator.minc.vers.opt.maxVersions .. | 1 -table | table.iterator.scan.myfilter .............. | 10,org.apache.accumulo.core.iterators.FilteringIterator -table | table.iterator.scan.myfilter.opt.0 ........ | org.apache.accumulo.core.iterators.filter.AgeOffFilter -table | table.iterator.scan.myfilter.opt.0.ttl .... | 30000 -table | table.iterator.scan.vers .................. | 20,org.apache.accumulo.core.iterators.VersioningIterator -table | table.iterator.scan.vers.opt.maxVersions .. | 1 ----------+------------------------------------------+---------------------------------------------------------- -username@instance filtertest> -</code></pre> -</div> - -<p>If you would like to apply multiple filters, this can be done using a single -iterator. Just continue adding entries during the -âset org.apache.accumulo.core.iterators.FilteringIterator optionâ step. -Make sure to order the filterPriorityNumbers in the order you would like -the filters to be applied.</p> - - </div> - - -<footer> - - <p><a href="https://www.apache.org"><img src="/images/feather-small.gif" alt="Apache Software Foundation" id="asf-logo" height="100" /></a></p> - - <p>Copyright © 2011-2016 The Apache Software Foundation. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> - -</footer> - - - </div> - </div> - </div> -</body> -</html> http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/c0655661/user_manual_1.3-incubating/examples/helloworld.html ---------------------------------------------------------------------- diff --git a/user_manual_1.3-incubating/examples/helloworld.html b/user_manual_1.3-incubating/examples/helloworld.html deleted file mode 100644 index b72965b..0000000 --- a/user_manual_1.3-incubating/examples/helloworld.html +++ /dev/null @@ -1,246 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<!-- - 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. ---> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css" rel="stylesheet" integrity="sha384-awusxf8AUojygHf2+joICySzB780jVvQaVCAt1clU3QsyAitLGul28Qxb2r1e5g+" crossorigin="anonymous"> -<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.css"> -<link href="/css/accumulo.css" rel="stylesheet" type="text/css"> - -<title>Hello World Example</title> - -<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.js"></script> -<script> - // show location of canonical site if not currently on the canonical site - $(function() { - var host = window.location.host; - if (typeof host !== 'undefined' && host !== 'accumulo.apache.org') { - $('#non-canonical').show(); - } - }); - - $(function() { - // decorate section headers with anchors - return $("h2, h3, h4, h5, h6").each(function(i, el) { - var $el, icon, id; - $el = $(el); - id = $el.attr('id'); - icon = '<i class="fa fa-link"></i>'; - if (id) { - return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon)); - } - }); - }); - - // configure Google Analytics - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - if (ga.hasOwnProperty('loaded') && ga.loaded === true) { - ga('create', 'UA-50934829-1', 'apache.org'); - ga('send', 'pageview'); - } -</script> - -</head> -<body style="padding-top: 100px"> - - <nav class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a href="/"><img id="nav-logo" alt="Apache Accumulo" class="img-responsive" src="/images/accumulo-logo.png" width="200"/></a> - </div> - <div class="collapse navbar-collapse" id="navbar-items"> - <ul class="nav navbar-nav"> - <li class="nav-link"><a href="/downloads">Download</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-header">1.8.0 Release (Latest)</li> - <li><a href="/release_notes/1.8.0">Release Notes</a></li> - <li><a href="/1.8/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.8/apidocs">Javadoc</a></li> - <li><a href="/1.8/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.7.2 Release</li> - <li><a href="/release_notes/1.7.2">Release Notes</a></li> - <li><a href="/1.7/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.7/apidocs">Javadoc</a></li> - <li><a href="/1.7/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.6.6 Release</li> - <li><a href="/release_notes/1.6.6">Release Notes</a></li> - <li><a href="/1.6/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.6/apidocs">Javadoc</a></li> - <li><a href="/1.6/examples">Examples</a></li> - <li class="divider"></li> - <li><a href="/notable_features">Features</a></li> - <li><a href="/release_notes">Release Notes Archive</a></li> - <li><a href="/old_documentation">Documentation Archive</a></li> - <li><a href="/screenshots">Screenshots</a></li> - <li><a href="/papers">Papers & Presentations</a></li> - <li><a href="/glossary">Glossary</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Community<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="/get_involved">Get Involved</a></li> - <li><a href="/mailing_list">Mailing Lists</a></li> - <li><a href="/people">People</a></li> - <li><a href="/news">News Archive</a></li> - <li><a href="/projects">Community Projects</a></li> - <li><a href="/thanks">Thanks</a></li> - <li class="divider"></li> - <li class="dropdown-header">Governance</li> - <li><a href="/bylaws">Bylaws</a></li> - <li><a href="/governance/consensusBuilding">Consensus Building</a></li> - <li><a href="/governance/lazyConsensus">Lazy Consensus</a></li> - <li><a href="/governance/releasing">Releasing</a></li> - <li><a href="/governance/voting">Voting</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Development<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://issues.apache.org/jira/browse/ACCUMULO">Issue Tracker <i class="fa fa-external-link"></i></a></li> - <li><a href="https://github.com/apache/accumulo/pulls">Pull Requests <i class="fa fa-external-link"></i></a></li> - <li><a href="https://builds.apache.org/view/A/view/Accumulo">Jenkins Builds <i class="fa fa-external-link"></i></a></li> - <li><a href="https://travis-ci.org/apache/accumulo">TravisCI Builds <i class="fa fa-external-link"></i></a></li> - <li class="divider"></li> - <li class="dropdown-header">Guides</li> - <li><a href="/source">Source & Guide</a></li> - <li><a href="/git">Git Workflow</a></li> - <li><a href="/versioning">Versioning</a></li> - <li><a href="/contrib">Contrib Projects</a></li> - <li><a href="/rb">Review Board</a></li> - <li><a href="/releasing">Making Releases</a></li> - <li><a href="/verifying_releases">Verifying Releases</a></li> - </ul> - </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apache Software Foundation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://www.apache.org">Apache Homepage <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/licenses/LICENSE-2.0">License <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/sponsorship">Sponsorship <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/security">Security <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/thanks">Thanks <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct <i class="fa fa-external-link"></i></a></li> - </ul> - </li> - </ul> - </div> - </div> -</nav> - - - <div class="container"> - <div class="row"> - <div class="col-md-12"> - - <div id="non-canonical" style="display: none; background-color: #F0E68C; padding-left: 1em;"> - Visit the official site at: <a href="https://accumulo.apache.org">https://accumulo.apache.org</a> - </div> - <div id="content"> - - <h1 class="title">Hello World Example</h1> - - <p>This tutorial uses the following Java classes, which can be found in org.apache.accumulo.examples.helloworld in the accumulo-examples module:</p> - -<ul> - <li>InsertWithBatchWriter.java - Inserts 10K rows (50K entries) into accumulo with each row having 5 entries</li> - <li>InsertWithOutputFormat.java - Example of inserting data in MapReduce</li> - <li>ReadData.java - Reads all data between two rows</li> -</ul> - -<p>Log into the accumulo shell:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo shell -u username -p password -</code></pre> -</div> - -<p>Create a table called âhellotableâ:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>username@instance> createtable hellotable -</code></pre> -</div> - -<p>Launch a Java program that inserts data with a BatchWriter:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.helloworld.InsertWithBatchWriter instance zookeepers hellotable username password -</code></pre> -</div> - -<p>Alternatively, the same data can be inserted using MapReduce writers:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.helloworld.InsertWithOutputFormat instance zookeepers hellotable username password -</code></pre> -</div> - -<p>On the accumulo status page at the URL below (where âmasterâ is replaced with the name or IP of your accumulo master), you should see 50K entries</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>http://master:50095/ -</code></pre> -</div> - -<p>To view the entries, use the shell to scan the table:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>username@instance> table hellotable -username@instance hellotable> scan -</code></pre> -</div> - -<p>You can also use a Java class to scan the table:</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo org.apache.accumulo.examples.helloworld.ReadData instance zookeepers hellotable username password row_0 row_1001 -</code></pre> -</div> - - </div> - - -<footer> - - <p><a href="https://www.apache.org"><img src="/images/feather-small.gif" alt="Apache Software Foundation" id="asf-logo" height="100" /></a></p> - - <p>Copyright © 2011-2016 The Apache Software Foundation. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> - -</footer> - - - </div> - </div> - </div> -</body> -</html> http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/c0655661/user_manual_1.3-incubating/examples/index.html ---------------------------------------------------------------------- diff --git a/user_manual_1.3-incubating/examples/index.html b/user_manual_1.3-incubating/examples/index.html deleted file mode 100644 index 5cad2e6..0000000 --- a/user_manual_1.3-incubating/examples/index.html +++ /dev/null @@ -1,238 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<!-- - 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. ---> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css" rel="stylesheet" integrity="sha384-awusxf8AUojygHf2+joICySzB780jVvQaVCAt1clU3QsyAitLGul28Qxb2r1e5g+" crossorigin="anonymous"> -<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.css"> -<link href="/css/accumulo.css" rel="stylesheet" type="text/css"> - -<title>Examples</title> - -<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.js"></script> -<script> - // show location of canonical site if not currently on the canonical site - $(function() { - var host = window.location.host; - if (typeof host !== 'undefined' && host !== 'accumulo.apache.org') { - $('#non-canonical').show(); - } - }); - - $(function() { - // decorate section headers with anchors - return $("h2, h3, h4, h5, h6").each(function(i, el) { - var $el, icon, id; - $el = $(el); - id = $el.attr('id'); - icon = '<i class="fa fa-link"></i>'; - if (id) { - return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon)); - } - }); - }); - - // configure Google Analytics - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - if (ga.hasOwnProperty('loaded') && ga.loaded === true) { - ga('create', 'UA-50934829-1', 'apache.org'); - ga('send', 'pageview'); - } -</script> - -</head> -<body style="padding-top: 100px"> - - <nav class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a href="/"><img id="nav-logo" alt="Apache Accumulo" class="img-responsive" src="/images/accumulo-logo.png" width="200"/></a> - </div> - <div class="collapse navbar-collapse" id="navbar-items"> - <ul class="nav navbar-nav"> - <li class="nav-link"><a href="/downloads">Download</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-header">1.8.0 Release (Latest)</li> - <li><a href="/release_notes/1.8.0">Release Notes</a></li> - <li><a href="/1.8/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.8/apidocs">Javadoc</a></li> - <li><a href="/1.8/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.7.2 Release</li> - <li><a href="/release_notes/1.7.2">Release Notes</a></li> - <li><a href="/1.7/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.7/apidocs">Javadoc</a></li> - <li><a href="/1.7/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.6.6 Release</li> - <li><a href="/release_notes/1.6.6">Release Notes</a></li> - <li><a href="/1.6/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.6/apidocs">Javadoc</a></li> - <li><a href="/1.6/examples">Examples</a></li> - <li class="divider"></li> - <li><a href="/notable_features">Features</a></li> - <li><a href="/release_notes">Release Notes Archive</a></li> - <li><a href="/old_documentation">Documentation Archive</a></li> - <li><a href="/screenshots">Screenshots</a></li> - <li><a href="/papers">Papers & Presentations</a></li> - <li><a href="/glossary">Glossary</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Community<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="/get_involved">Get Involved</a></li> - <li><a href="/mailing_list">Mailing Lists</a></li> - <li><a href="/people">People</a></li> - <li><a href="/news">News Archive</a></li> - <li><a href="/projects">Community Projects</a></li> - <li><a href="/thanks">Thanks</a></li> - <li class="divider"></li> - <li class="dropdown-header">Governance</li> - <li><a href="/bylaws">Bylaws</a></li> - <li><a href="/governance/consensusBuilding">Consensus Building</a></li> - <li><a href="/governance/lazyConsensus">Lazy Consensus</a></li> - <li><a href="/governance/releasing">Releasing</a></li> - <li><a href="/governance/voting">Voting</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Development<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://issues.apache.org/jira/browse/ACCUMULO">Issue Tracker <i class="fa fa-external-link"></i></a></li> - <li><a href="https://github.com/apache/accumulo/pulls">Pull Requests <i class="fa fa-external-link"></i></a></li> - <li><a href="https://builds.apache.org/view/A/view/Accumulo">Jenkins Builds <i class="fa fa-external-link"></i></a></li> - <li><a href="https://travis-ci.org/apache/accumulo">TravisCI Builds <i class="fa fa-external-link"></i></a></li> - <li class="divider"></li> - <li class="dropdown-header">Guides</li> - <li><a href="/source">Source & Guide</a></li> - <li><a href="/git">Git Workflow</a></li> - <li><a href="/versioning">Versioning</a></li> - <li><a href="/contrib">Contrib Projects</a></li> - <li><a href="/rb">Review Board</a></li> - <li><a href="/releasing">Making Releases</a></li> - <li><a href="/verifying_releases">Verifying Releases</a></li> - </ul> - </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apache Software Foundation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://www.apache.org">Apache Homepage <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/licenses/LICENSE-2.0">License <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/sponsorship">Sponsorship <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/security">Security <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/thanks">Thanks <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct <i class="fa fa-external-link"></i></a></li> - </ul> - </li> - </ul> - </div> - </div> -</nav> - - - <div class="container"> - <div class="row"> - <div class="col-md-12"> - - <div id="non-canonical" style="display: none; background-color: #F0E68C; padding-left: 1em;"> - Visit the official site at: <a href="https://accumulo.apache.org">https://accumulo.apache.org</a> - </div> - <div id="content"> - - <h1 class="title">Examples</h1> - - <p>Each README in the examples directory highlights the use of particular features of Apache Accumulo.</p> - -<p>Before running any of the examples, the following steps must be performed.</p> - -<ol> - <li> - <p>Install and run Accumulo via the instructions found in $ACCUMULO_HOME/README. -Remember the instance name. It will be referred to as âinstanceâ throughout the examples. -A comma-separated list of zookeeper servers will be referred to as âzookeepersâ.</p> - </li> - <li> - <p>Create an Accumulo user (see the <a href="/user_manual_1.3-incubating/Accumulo_Shell.html#User_Administration">user manual</a>), or use the root user. -The Accumulo user name will be referred to as âusernameâ with password âpasswordâ throughout the examples.</p> - </li> -</ol> - -<p>In all commands, you will need to replace âinstanceâ, âzookeepersâ, âusernameâ, and âpasswordâ with the values you set for your Accumulo instance.</p> - -<p>Commands intended to be run in bash are prefixed by â$â. These are always assumed to be run from the $ACCUMULO_HOME directory.</p> - -<p>Commands intended to be run in the Accumulo shell are prefixed by â>â.</p> - -<p><a href="aggregation.html">aggregation</a></p> - -<p><a href="batch.html">batch</a></p> - -<p><a href="bloom.html">bloom</a></p> - -<p><a href="bulkIngest.html">bulkIngest</a></p> - -<p><a href="constraints.html">constraints</a></p> - -<p><a href="dirlist.html">dirlist</a></p> - -<p><a href="filter.html">filter</a></p> - -<p><a href="helloworld.html">helloworld</a></p> - -<p><a href="mapred.html">mapred</a></p> - -<p><a href="shard.html">shard</a></p> - - - </div> - - -<footer> - - <p><a href="https://www.apache.org"><img src="/images/feather-small.gif" alt="Apache Software Foundation" id="asf-logo" height="100" /></a></p> - - <p>Copyright © 2011-2016 The Apache Software Foundation. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> - -</footer> - - - </div> - </div> - </div> -</body> -</html> http://git-wip-us.apache.org/repos/asf/accumulo-website/blob/c0655661/user_manual_1.3-incubating/examples/mapred.html ---------------------------------------------------------------------- diff --git a/user_manual_1.3-incubating/examples/mapred.html b/user_manual_1.3-incubating/examples/mapred.html deleted file mode 100644 index ae50d76..0000000 --- a/user_manual_1.3-incubating/examples/mapred.html +++ /dev/null @@ -1,271 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<!-- - 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. ---> -<meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/paper/bootstrap.min.css" rel="stylesheet" integrity="sha384-awusxf8AUojygHf2+joICySzB780jVvQaVCAt1clU3QsyAitLGul28Qxb2r1e5g+" crossorigin="anonymous"> -<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> -<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.css"> -<link href="/css/accumulo.css" rel="stylesheet" type="text/css"> - -<title>MapReduce Example</title> - -<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-2.2.3/dt-1.10.12/datatables.min.js"></script> -<script> - // show location of canonical site if not currently on the canonical site - $(function() { - var host = window.location.host; - if (typeof host !== 'undefined' && host !== 'accumulo.apache.org') { - $('#non-canonical').show(); - } - }); - - $(function() { - // decorate section headers with anchors - return $("h2, h3, h4, h5, h6").each(function(i, el) { - var $el, icon, id; - $el = $(el); - id = $el.attr('id'); - icon = '<i class="fa fa-link"></i>'; - if (id) { - return $el.append($("<a />").addClass("header-link").attr("href", "#" + id).html(icon)); - } - }); - }); - - // configure Google Analytics - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - if (ga.hasOwnProperty('loaded') && ga.loaded === true) { - ga('create', 'UA-50934829-1', 'apache.org'); - ga('send', 'pageview'); - } -</script> - -</head> -<body style="padding-top: 100px"> - - <nav class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-items"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a href="/"><img id="nav-logo" alt="Apache Accumulo" class="img-responsive" src="/images/accumulo-logo.png" width="200"/></a> - </div> - <div class="collapse navbar-collapse" id="navbar-items"> - <ul class="nav navbar-nav"> - <li class="nav-link"><a href="/downloads">Download</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Documentation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li class="dropdown-header">1.8.0 Release (Latest)</li> - <li><a href="/release_notes/1.8.0">Release Notes</a></li> - <li><a href="/1.8/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.8/apidocs">Javadoc</a></li> - <li><a href="/1.8/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.7.2 Release</li> - <li><a href="/release_notes/1.7.2">Release Notes</a></li> - <li><a href="/1.7/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.7/apidocs">Javadoc</a></li> - <li><a href="/1.7/examples">Examples</a></li> - <li class="divider"></li> - <li class="dropdown-header">1.6.6 Release</li> - <li><a href="/release_notes/1.6.6">Release Notes</a></li> - <li><a href="/1.6/accumulo_user_manual">User Manual</a></li> - <li><a href="/1.6/apidocs">Javadoc</a></li> - <li><a href="/1.6/examples">Examples</a></li> - <li class="divider"></li> - <li><a href="/notable_features">Features</a></li> - <li><a href="/release_notes">Release Notes Archive</a></li> - <li><a href="/old_documentation">Documentation Archive</a></li> - <li><a href="/screenshots">Screenshots</a></li> - <li><a href="/papers">Papers & Presentations</a></li> - <li><a href="/glossary">Glossary</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Community<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="/get_involved">Get Involved</a></li> - <li><a href="/mailing_list">Mailing Lists</a></li> - <li><a href="/people">People</a></li> - <li><a href="/news">News Archive</a></li> - <li><a href="/projects">Community Projects</a></li> - <li><a href="/thanks">Thanks</a></li> - <li class="divider"></li> - <li class="dropdown-header">Governance</li> - <li><a href="/bylaws">Bylaws</a></li> - <li><a href="/governance/consensusBuilding">Consensus Building</a></li> - <li><a href="/governance/lazyConsensus">Lazy Consensus</a></li> - <li><a href="/governance/releasing">Releasing</a></li> - <li><a href="/governance/voting">Voting</a></li> - </ul> - </li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Development<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://issues.apache.org/jira/browse/ACCUMULO">Issue Tracker <i class="fa fa-external-link"></i></a></li> - <li><a href="https://github.com/apache/accumulo/pulls">Pull Requests <i class="fa fa-external-link"></i></a></li> - <li><a href="https://builds.apache.org/view/A/view/Accumulo">Jenkins Builds <i class="fa fa-external-link"></i></a></li> - <li><a href="https://travis-ci.org/apache/accumulo">TravisCI Builds <i class="fa fa-external-link"></i></a></li> - <li class="divider"></li> - <li class="dropdown-header">Guides</li> - <li><a href="/source">Source & Guide</a></li> - <li><a href="/git">Git Workflow</a></li> - <li><a href="/versioning">Versioning</a></li> - <li><a href="/contrib">Contrib Projects</a></li> - <li><a href="/rb">Review Board</a></li> - <li><a href="/releasing">Making Releases</a></li> - <li><a href="/verifying_releases">Verifying Releases</a></li> - </ul> - </li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apache Software Foundation<span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="https://www.apache.org">Apache Homepage <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/licenses/LICENSE-2.0">License <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/sponsorship">Sponsorship <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/security">Security <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/thanks">Thanks <i class="fa fa-external-link"></i></a></li> - <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct <i class="fa fa-external-link"></i></a></li> - </ul> - </li> - </ul> - </div> - </div> -</nav> - - - <div class="container"> - <div class="row"> - <div class="col-md-12"> - - <div id="non-canonical" style="display: none; background-color: #F0E68C; padding-left: 1em;"> - Visit the official site at: <a href="https://accumulo.apache.org">https://accumulo.apache.org</a> - </div> - <div id="content"> - - <h1 class="title">MapReduce Example</h1> - - <p>This example uses mapreduce and accumulo to compute word counts for a set of -documents. This is accomplished using a map-only mapreduce job and a -accumulo table with aggregators.</p> - -<p>To run this example you will need a directory in HDFS containing text files. -The accumulo readme will be used to show how to run this example.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ hadoop fs -copyFromLocal $ACCUMULO_HOME/README /user/username/wc/Accumulo.README -$ hadoop fs -ls /user/username/wc -Found 1 items --rw-r--r-- 2 username supergroup 9359 2009-07-15 17:54 /user/username/wc/Accumulo.README -</code></pre> -</div> - -<p>The first part of running this example is to create a table with aggregation -for the column family count.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo shell -u username -p password -Shell - Apache Accumulo Interactive Shell -- version: 1.3.x-incubating -- instance name: instance -- instance id: 00000000-0000-0000-0000-000000000000 -- -- type 'help' for a list of available commands -- -username@instance> createtable wordCount -a count=org.apache.accumulo.core.iterators.aggregation.StringSummation -username@instance wordCount> quit -</code></pre> -</div> - -<p>After creating the table, run the word count map reduce job.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>[user1@instance accumulo]$ bin/tool.sh lib/accumulo-examples-*[^c].jar org.apache.accumulo.examples.mapreduce.WordCount instance zookeepers /user/user1/wc wordCount -u username -p password - -11/02/07 18:20:11 INFO input.FileInputFormat: Total input paths to process : 1 -11/02/07 18:20:12 INFO mapred.JobClient: Running job: job_201102071740_0003 -11/02/07 18:20:13 INFO mapred.JobClient: map 0% reduce 0% -11/02/07 18:20:20 INFO mapred.JobClient: map 100% reduce 0% -11/02/07 18:20:22 INFO mapred.JobClient: Job complete: job_201102071740_0003 -11/02/07 18:20:22 INFO mapred.JobClient: Counters: 6 -11/02/07 18:20:22 INFO mapred.JobClient: Job Counters -11/02/07 18:20:22 INFO mapred.JobClient: Launched map tasks=1 -11/02/07 18:20:22 INFO mapred.JobClient: Data-local map tasks=1 -11/02/07 18:20:22 INFO mapred.JobClient: FileSystemCounters -11/02/07 18:20:22 INFO mapred.JobClient: HDFS_BYTES_READ=10487 -11/02/07 18:20:22 INFO mapred.JobClient: Map-Reduce Framework -11/02/07 18:20:22 INFO mapred.JobClient: Map input records=255 -11/02/07 18:20:22 INFO mapred.JobClient: Spilled Records=0 -11/02/07 18:20:22 INFO mapred.JobClient: Map output records=1452 -</code></pre> -</div> - -<p>After the map reduce job completes, query the accumulo table to see word -counts.</p> - -<div class="highlighter-rouge"><pre class="highlight"><code>$ ./bin/accumulo shell -u username -p password -username@instance> table wordCount -username@instance wordCount> scan -b the -the count:20080906 [] 75 -their count:20080906 [] 2 -them count:20080906 [] 1 -then count:20080906 [] 1 -there count:20080906 [] 1 -these count:20080906 [] 3 -this count:20080906 [] 6 -through count:20080906 [] 1 -time count:20080906 [] 3 -time. count:20080906 [] 1 -to count:20080906 [] 27 -total count:20080906 [] 1 -tserver, count:20080906 [] 1 -tserver.compaction.major.concurrent.max count:20080906 [] 1 -... -</code></pre> -</div> - - </div> - - -<footer> - - <p><a href="https://www.apache.org"><img src="/images/feather-small.gif" alt="Apache Software Foundation" id="asf-logo" height="100" /></a></p> - - <p>Copyright © 2011-2016 The Apache Software Foundation. Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> - -</footer> - - - </div> - </div> - </div> -</body> -</html>
