This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/accumulo-website.git
The following commit(s) were added to refs/heads/asf-site by this push: new 3d66d846 Automatic Site Publish by Buildbot 3d66d846 is described below commit 3d66d8463ef52708b0957c1b891484258be1e49e Author: buildbot <us...@infra.apache.org> AuthorDate: Mon Sep 18 13:05:08 2023 +0000 Automatic Site Publish by Buildbot --- output/api/index.html | 8 +- output/docs/2.x/administration/multivolume.html | 2 +- output/docs/2.x/administration/replication.html | 40 ++--- output/docs/2.x/configuration/overview.html | 6 +- output/docs/2.x/development/summaries.html | 122 +++++++------ output/docs/2.x/getting-started/clients.html | 10 +- output/docs/2.x/getting-started/shell.html | 87 +++++----- .../2.x/getting-started/table_configuration.html | 188 ++++++++++----------- output/docs/2.x/security/authentication.html | 24 +-- output/docs/2.x/security/kerberos.html | 64 +++---- output/docs/2.x/security/permissions.html | 10 +- output/feed.xml | 4 +- output/search_data.json | 4 +- output/tour/authorizations-code/index.html | 42 ++--- output/tour/authorizations/index.html | 8 +- output/tour/basic-read-write/index.html | 20 +-- output/tour/batch-scanner-code/index.html | 12 +- output/tour/batch-scanner/index.html | 4 +- output/tour/client/index.html | 12 +- output/tour/conditional-writer-code/index.html | 8 +- output/tour/conditional-writer/index.html | 8 +- output/tour/data-model-code/index.html | 24 +-- output/tour/data-model/index.html | 6 +- output/tour/getting-started/index.html | 20 +-- output/tour/ranges-splits/index.html | 12 +- output/tour/using-iterators/index.html | 32 ++-- 26 files changed, 383 insertions(+), 394 deletions(-) diff --git a/output/api/index.html b/output/api/index.html index e1d874b3..88f066f7 100644 --- a/output/api/index.html +++ b/output/api/index.html @@ -171,14 +171,14 @@ imports in a project using Accumulo.</p> <p>For 1.x:</p> -<pre><code class="language-regex">import\s+org\.apache\.accumulo\.(.*\.(impl|thrift|crypto)\..*|(?!(core\.(client|data|security)|minicluster)\.).*) -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>import\s+org\.apache\.accumulo\.(.*\.(impl|thrift|crypto)\..*|(?!(core\.(client|data|security)|minicluster)\.).*) +</code></pre></div></div> <p>For 2.0 and later, this can be simplified, because sub-packages not intended for public API were relocated, and also altered to include the new MapReduce module:</p> -<pre><code class="language-regex">import\s+org\.apache\.accumulo\.(?!(core\.(client|data|iterators|security)|minicluster|hadoop)\.).* -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>import\s+org\.apache\.accumulo\.(?!(core\.(client|data|iterators|security)|minicluster|hadoop)\.).* +</code></pre></div></div> <p>See the <a href="/blog/2019/11/04/checkstyle-import-control.html">blog post</a> about using the checkstyle plugin for more explicit non-API detection.</p> diff --git a/output/docs/2.x/administration/multivolume.html b/output/docs/2.x/administration/multivolume.html index 0d43e71c..7c7bcb48 100644 --- a/output/docs/2.x/administration/multivolume.html +++ b/output/docs/2.x/administration/multivolume.html @@ -474,7 +474,7 @@ in its metadata. The example configuration below will replace ns1 with nsA and ns2 with nsB in Accumulo metadata. For this property to take affect, Accumulo will need to be restarted.</p> -<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code>instance.volumes.replacements=hdfs://ns1:9001 hdfs://nsA:9001, hdfs://ns2:9001 hdfs://nsB:9001 +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>instance.volumes.replacements=hdfs://ns1:9001 hdfs://nsA:9001, hdfs://ns2:9001 hdfs://nsB:9001 </code></pre></div></div> <p>Using viewfs or HA namenode, introduced in Hadoop 2, offers another option for diff --git a/output/docs/2.x/administration/replication.html b/output/docs/2.x/administration/replication.html index 4885cebc..438c7f5b 100644 --- a/output/docs/2.x/administration/replication.html +++ b/output/docs/2.x/administration/replication.html @@ -499,17 +499,17 @@ change, it can be useful to set this information using the Accumulo shell.</p> and a ZooKeeper quorum of <code class="language-plaintext highlighter-rouge">10.0.0.1,10.0.2.1,10.0.3.1</code>, invoke the following command in the shell.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@accumulo_primary> config -s -replication.peer.peer1=org.apache.accumulo.tserver.replication.AccumuloReplicaSystem,accumulo_peer,10.0.0.1,10.0.2.1,10.0.3.1 -</code></pre></div></div> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@accumulo_primary></span><span class="w"> </span>config <span class="nt">-s</span> +<span class="go">replication.peer.peer1=org.apache.accumulo.tserver.replication.AccumuloReplicaSystem,accumulo_peer,10.0.0.1,10.0.2.1,10.0.3.1 +</span></code></pre></div></div> <p>Since this is an Accumulo system, we also want to set a username and password to use when authenticating with this peer. On our peer, we make a special user which has permission to write to the tables we want to replicate data into, “replication” with a password of “password”. We then need to record this in the primary’s configuration.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@accumulo_primary> config -s replication.peer.user.peer1=replication -root@accumulo_primary> config -s replication.peer.password.peer1=password +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@accumulo_primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.user.peer1<span class="o">=</span>replication +<span class="gp">root@accumulo_primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.password.peer1<span class="o">=</span>password </code></pre></div></div> <p>Alternatively, when configuring replication on Accumulo running Kerberos, a keytab @@ -517,8 +517,8 @@ file per peer can be configured instead of a password. The provided keytabs must by the unix user running Accumulo. They keytab for a peer can be unique from the keytab used by Accumulo or any keytabs for other peers.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>accum...@example.com@accumulo_primary> config -s replication.peer.user.peer1=replicat...@example.com -accum...@example.com@accumulo_primary> config -s replication.peer.keytab.peer1=/path/to/replication.keytab +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">accum...@example.com@accumulo_primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.user.peer1<span class="o">=</span>replicat...@example.com +<span class="gp">accum...@example.com@accumulo_primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.keytab.peer1<span class="o">=</span>/path/to/replication.keytab </code></pre></div></div> <h3 id="table-configuration">Table Configuration</h3> @@ -530,8 +530,8 @@ cluster, this is a table ID. In this example, we want to enable replication on <code class="language-plaintext highlighter-rouge">my_table</code> and configure our peer <code class="language-plaintext highlighter-rouge">accumulo_peer</code> as a target, sending the data to the table with an ID of <code class="language-plaintext highlighter-rouge">2</code> in <code class="language-plaintext highlighter-rouge">accumulo_peer</code>.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@accumulo_primary> config -t my_table -s table.replication=true -root@accumulo_primary> config -t my_table -s table.replication.target.accumulo_peer=2 +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@accumulo_primary></span><span class="w"> </span>config <span class="nt">-t</span> my_table <span class="nt">-s</span> table.replication<span class="o">=</span><span class="nb">true</span> +<span class="gp">root@accumulo_primary></span><span class="w"> </span>config <span class="nt">-t</span> my_table <span class="nt">-s</span> table.replication.target.accumulo_peer<span class="o">=</span>2 </code></pre></div></div> <p>To replicate a single table on the primary to multiple peers, the second command @@ -653,11 +653,11 @@ a local node talking to another local node.</p> <p>The next series of command are to be run on the peer system. Create a user account for the primary instance called “peer”. The password for this account will need to be saved in the configuration on the primary</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@peer> createtable my_table -root@peer> createuser peer -root@peer> grant -t my_table -u peer Table.WRITE -root@peer> grant -t my_table -u peer Table.READ -root@peer> tables -l +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@peer></span><span class="w"> </span>createtable my_table +<span class="gp">root@peer></span><span class="w"> </span>createuser peer +<span class="gp">root@peer></span><span class="w"> </span>grant <span class="nt">-t</span> my_table <span class="nt">-u</span> peer Table.WRITE +<span class="gp">root@peer></span><span class="w"> </span>grant <span class="nt">-t</span> my_table <span class="nt">-u</span> peer Table.READ +<span class="gp">root@peer></span><span class="w"> </span>tables <span class="nt">-l</span> </code></pre></div></div> <p>Remember what the table ID for ‘my_table’ is. You’ll need that to configure the primary instance.</p> @@ -668,7 +668,7 @@ root@peer> tables -l <h4 id="set-up-the-table">Set up the table</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@primary> createtable my_table +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@primary></span><span class="w"> </span>createtable my_table </code></pre></div></div> <h4 id="define-the-peer-as-a-replication-peer-to-the-primary">Define the Peer as a replication peer to the Primary</h4> @@ -678,7 +678,7 @@ that we want to use, and the configuration for the <a href="https://static.javad Instance name for <code class="language-plaintext highlighter-rouge">peer</code> and the ZooKeeper quorum string. The configuration key is of the form <code class="language-plaintext highlighter-rouge">replication.peer.$peer_name</code>.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@primary> config -s replication.peer.peer=org.apache.accumulo.tserver.replication.AccumuloReplicaSystem,peer,$peer_zk_quorum +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.peer<span class="o">=</span>org.apache.accumulo.tserver.replication.AccumuloReplicaSystem,peer,<span class="nv">$peer_zk_quorum</span> </code></pre></div></div> <h4 id="set-the-authentication-credentials">Set the authentication credentials</h4> @@ -686,8 +686,8 @@ Instance name for <code class="language-plaintext highlighter-rouge">peer</code> <p>We want to use that special username and password that we created on the peer, so we have a means to write data to the table that we want to replicate to. The configuration key is of the form “replication.peer.user.$peer_name”.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@primary> config -s replication.peer.user.peer=peer -root@primary> config -s replication.peer.password.peer=peer +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.user.peer<span class="o">=</span>peer +<span class="gp">root@primary></span><span class="w"> </span>config <span class="nt">-s</span> replication.peer.password.peer<span class="o">=</span>peer </code></pre></div></div> <h4 id="enable-replication-on-the-table">Enable replication on the table</h4> @@ -700,12 +700,12 @@ is an Accumulo instance, so we want to use the <a href="https://static.javadoc.i want to replicate into. Be sure to use the correct value for $peer_table_id. The configuration key is of the form “table.replication.target.$peer_name”.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@primary> config -t my_table -s table.replication.target.peer=$peer_table_id +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@primary></span><span class="w"> </span>config <span class="nt">-t</span> my_table <span class="nt">-s</span> table.replication.target.peer<span class="o">=</span><span class="nv">$peer_table_id</span> </code></pre></div></div> <p>Finally, we can enable replication on this table.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@primary> config -t my_table -s table.replication=true +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@primary></span><span class="w"> </span>config <span class="nt">-t</span> my_table <span class="nt">-s</span> table.replication<span class="o">=</span><span class="nb">true</span> </code></pre></div></div> <h2 id="extra-considerations-for-use">Extra considerations for use</h2> diff --git a/output/docs/2.x/configuration/overview.html b/output/docs/2.x/configuration/overview.html index 4ec3abb0..67923874 100644 --- a/output/docs/2.x/configuration/overview.html +++ b/output/docs/2.x/configuration/overview.html @@ -563,8 +563,8 @@ into these warnings should be reconsidered.</p> <p>Below is an example shell output from viewing configuration for the table <code class="language-plaintext highlighter-rouge">foo</code>. Please note how <code class="language-plaintext highlighter-rouge">table.compaction.major.ratio</code> is set in multiple locations, but the value <code class="language-plaintext highlighter-rouge">1.6</code> set in the <code class="language-plaintext highlighter-rouge">table</code> scope is used because it has the highest precedence.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@accumulo-instance> config -t foo ----------+---------------------------------------------+----------------------- +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@accumulo-instance></span><span class="w"> </span>config <span class="nt">-t</span> foo +<span class="go">---------+---------------------------------------------+----------------------- SCOPE | NAME | VALUE ---------+---------------------------------------------+----------------------- default | table.bloom.enabled ....................... | false @@ -583,7 +583,7 @@ table | @override .............................. | 1.6 default | table.compaction.minor.idle ............... | 5m default | table.compaction.minor.logs.threshold ..... | 3 default | table.failures.ignore ..................... | false -</code></pre></div></div> +</span></code></pre></div></div> <div class="row mt-4"> diff --git a/output/docs/2.x/development/summaries.html b/output/docs/2.x/development/summaries.html index 29c3c31b..88547fb2 100644 --- a/output/docs/2.x/development/summaries.html +++ b/output/docs/2.x/development/summaries.html @@ -500,21 +500,20 @@ class has options for creating RFiles with embedded summary data.</p> <p>This example walks through using summarizers in the Accumulo shell. Below, a table is created and some data is inserted to summarize.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> createtable summary_test -root@uno summary_test> setauths -u root -s PI,GEO,TIME -root@uno summary_test> insert 3b503bd name last Doe -root@uno summary_test> insert 3b503bd name first John -root@uno summary_test> insert 3b503bd contact address "123 Park Ave, NY, NY" -l PI&GEO -root@uno summary_test> insert 3b503bd date birth "1/11/1942" -l PI&TIME -root@uno summary_test> insert 3b503bd date married "5/11/1962" -l PI&TIME -root@uno summary_test> insert 3b503bd contact home_phone 1-123-456-7890 -l PI -root@uno summary_test> insert d5d18dd contact address "50 Lake Shore Dr, Chicago, IL" -l PI&GEO -root@uno summary_test> insert d5d18dd name first Jane -root@uno summary_test> insert d5d18dd name last Doe -root@uno summary_test> insert d5d18dd date birth 8/15/1969 -l PI&TIME -root@uno summary_test> scan -s PI,GEO,TIME -3b503bd contact:address [PI&GEO] 123 Park Ave, NY, NY +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>createtable summary_test +<span class="gp">root@uno summary_test></span><span class="w"> </span>setauths <span class="nt">-u</span> root <span class="nt">-s</span> PI,GEO,TIME +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert 3b503bd name last Doe +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert 3b503bd name first John +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert 3b503bd contact address <span class="s2">"123 Park Ave, NY, NY"</span> <span class="nt">-l</span> PI&GEO +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert 3b503bd <span class="nb">date </span>birth <span class="s2">"1/11/1942"</span> <span class="nt">-l</span> PI&TIME +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert 3b503bd <span class="nb">date </span>married <span class="s2">"5/11/1962"</span> <span class="nt">-l</span> PI&TIME +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert 3b503bd contact home_phone 1-123-456-7890 <span class="nt">-l</span> PI +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert d5d18dd contact address <span class="s2">"50 Lake Shore Dr, Chicago, IL"</span> <span class="nt">-l</span> PI&GEO +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert d5d18dd name first Jane +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert d5d18dd name last Doe +<span class="gp">root@uno summary_test></span><span class="w"> </span>insert d5d18dd <span class="nb">date </span>birth 8/15/1969 <span class="nt">-l</span> PI&TIME +<span class="gp">root@uno summary_test></span><span class="w"> </span>scan <span class="nt">-s</span> PI,GEO,TIME +<span class="go">3b503bd contact:address [PI&GEO] 123 Park Ave, NY, NY 3b503bd contact:home_phone [PI] 1-123-456-7890 3b503bd date:birth [PI&TIME] 1/11/1942 3b503bd date:married [PI&TIME] 5/11/1962 @@ -524,11 +523,10 @@ d5d18dd contact:address [PI&GEO] 50 Lake Shore Dr, Chicago, IL d5d18dd date:birth [PI&TIME] 8/15/1969 d5d18dd name:first [] Jane d5d18dd name:last [] Doe -</code></pre></div></div> +</span></code></pre></div></div> <p>After inserting the data, summaries are requested below. No summaries are returned.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno summary_test> summaries +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno summary_test></span><span class="w"> </span>summaries </code></pre></div></div> <p>The visibility summarizer is configured below and the table is flushed. @@ -536,13 +534,12 @@ Flushing the table creates a file creating summary data in the process. The summary data returned counts how many times each column visibility occurred. The statistics with a <code class="language-plaintext highlighter-rouge">c:</code> prefix are visibilities. The others are generic statistics created by the CountingSummarizer that VisibilitySummarizer extends.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno summary_test> config -t summary_test -s table.summarizer.vis=org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer -root@uno summary_test> summaries -root@uno summary_test> flush -w -2017-02-24 19:54:46,090 [shell.Shell] INFO : Flush of table summary_test completed. -root@uno summary_test> summaries -Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {} +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno summary_test></span><span class="w"> </span>config <span class="nt">-t</span> summary_test <span class="nt">-s</span> table.summarizer.vis<span class="o">=</span>org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer +<span class="gp">root@uno summary_test></span><span class="w"> </span>summaries +<span class="gp">root@uno summary_test></span><span class="w"> </span>flush <span class="nt">-w</span> +<span class="go">2017-02-24 19:54:46,090 [shell.Shell] INFO : Flush of table summary_test completed. +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>summaries +<span class="go">Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {} File Statistics : [total:1, missing:0, extra:0, large:0] Summary Statistics : c: = 4 @@ -553,30 +550,29 @@ Summary Statistics : seen = 10 tooLong = 0 tooMany = 0 -</code></pre></div></div> - +</span></code></pre></div></div> <p>VisibilitySummarizer has an option <code class="language-plaintext highlighter-rouge">maxCounters</code> that determines the max number of column visibilities it will track. Below this option is set and compaction is forced to regenerate summary data. The new summary data only has three visibilities and now the <code class="language-plaintext highlighter-rouge">tooMany</code> statistic is 4. This is the number of visibilities that were not counted.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> root@uno summary_test> config -t summary_test -s table.summarizer.vis.opt.maxCounters=3 - root@uno summary_test> compact -w - 2017-02-24 19:54:46,267 [shell.Shell] INFO : Compacting table ... - 2017-02-24 19:54:47,127 [shell.Shell] INFO : Compaction of table summary_test completed for given range - root@uno summary_test> summaries - Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {maxCounters=3} - File Statistics : [total:1, missing:0, extra:0, large:0] - Summary Statistics : - c:PI = 1 - c:PI&GEO = 2 - c:PI&TIME = 3 - emitted = 10 - seen = 10 - tooLong = 0 - tooMany = 4 -</code></pre></div></div> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno summary_test></span><span class="w"> </span>config <span class="nt">-t</span> summary_test <span class="nt">-s</span> table.summarizer.vis.opt.maxCounters<span class="o">=</span>3 +<span class="gp">root@uno summary_test></span><span class="w"> </span>compact <span class="nt">-w</span> +<span class="go">2017-02-24 19:54:46,267 [shell.Shell] INFO : Compacting table ... +2017-02-24 19:54:47,127 [shell.Shell] INFO : Compaction of table summary_test completed for given range +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>summaries +<span class="go"> Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {maxCounters=3} + File Statistics : [total:1, missing:0, extra:0, large:0] + Summary Statistics : + c:PI = 1 + c:PI&GEO = 2 + c:PI&TIME = 3 + emitted = 10 + seen = 10 + tooLong = 0 + tooMany = 4 +</span></code></pre></div></div> <p>Another summarizer is configured below that tracks the number of deletes. Also, a compaction strategy that uses this summary data is configured. The @@ -586,18 +582,18 @@ configurable. Below a delete is added and it’s reflected in the statistics. this case there is 1 delete and 10 non-deletes, not enough to force a compaction of the tablet.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno summary_test> config -t summary_test -s table.summarizer.del=org.apache.accumulo.core.client.summary.summarizers.DeletesSummarizer -root@uno summary_test> compact -w -2017-02-24 19:54:47,282 [shell.Shell] INFO : Compacting table ... +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno summary_test></span><span class="w"> </span>config <span class="nt">-t</span> summary_test <span class="nt">-s</span> table.summarizer.del<span class="o">=</span>org.apache.accumulo.core.client.summary.summarizers.DeletesSummarizer +<span class="gp">root@uno summary_test></span><span class="w"> </span>compact <span class="nt">-w</span> +<span class="go">2017-02-24 19:54:47,282 [shell.Shell] INFO : Compacting table ... 2017-02-24 19:54:49,236 [shell.Shell] INFO : Compaction of table summary_test completed for given range -root@uno summary_test> config -t summary_test -s table.compaction.major.ratio=10 -root@uno summary_test> config -t summary_test -s table.majc.compaction.strategy=org.apache.accumulo.tserver.compaction.strategies.TooManyDeletesCompactionStrategy -root@uno summary_test> deletemany -r d5d18dd -c date -f -[DELETED] d5d18dd date:birth [PI&TIME] -root@uno summary_test> flush -w -2017-02-24 19:54:49,686 [shell.Shell] INFO : Flush of table summary_test completed. -root@uno summary_test> summaries - Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {maxCounters=3} +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>config <span class="nt">-t</span> summary_test <span class="nt">-s</span> table.compaction.major.ratio<span class="o">=</span>10 +<span class="gp">root@uno summary_test></span><span class="w"> </span>config <span class="nt">-t</span> summary_test <span class="nt">-s</span> table.majc.compaction.strategy<span class="o">=</span>org.apache.accumulo.tserver.compaction.strategies.TooManyDeletesCompactionStrategy +<span class="gp">root@uno summary_test></span><span class="w"> </span>deletemany <span class="nt">-r</span> d5d18dd <span class="nt">-c</span> <span class="nb">date</span> <span class="nt">-f</span> +<span class="go">[DELETED] d5d18dd date:birth [PI&TIME] +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>flush <span class="nt">-w</span> +<span class="go">2017-02-24 19:54:49,686 [shell.Shell] INFO : Flush of table summary_test completed. +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>summaries +<span class="go"> Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {maxCounters=3} File Statistics : [total:2, missing:0, extra:0, large:0] Summary Statistics : c:PI = 1 @@ -613,7 +609,7 @@ root@uno summary_test> summaries Summary Statistics : deletes = 1 total = 11 -</code></pre></div></div> +</span></code></pre></div></div> <p>Some more deletes are added and the table is flushed below. This results in 4 deletes and 10 non-deletes, which triggers a full compaction. A full @@ -621,14 +617,14 @@ compaction of all files is the only time when delete markers are dropped. The compaction ratio was set to 10 above to show that the number of files did not trigger the compaction. After the compaction there no deletes 6 non-deletes.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno summary_test> deletemany -r d5d18dd -f -[DELETED] d5d18dd contact:address [PI&GEO] +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno summary_test></span><span class="w"> </span>deletemany <span class="nt">-r</span> d5d18dd <span class="nt">-f</span> +<span class="go">[DELETED] d5d18dd contact:address [PI&GEO] [DELETED] d5d18dd name:first [] [DELETED] d5d18dd name:last [] -root@uno summary_test> flush -w -2017-02-24 19:54:52,800 [shell.Shell] INFO : Flush of table summary_test completed. -root@uno summary_test> summaries - Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {maxCounters=3} +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>flush <span class="nt">-w</span> +<span class="go">2017-02-24 19:54:52,800 [shell.Shell] INFO : Flush of table summary_test completed. +</span><span class="gp">root@uno summary_test></span><span class="w"> </span>summaries +<span class="go"> Summarizer : org.apache.accumulo.core.client.summary.summarizers.VisibilitySummarizer vis {maxCounters=3} File Statistics : [total:1, missing:0, extra:0, large:0] Summary Statistics : c:PI = 1 @@ -644,8 +640,8 @@ root@uno summary_test> summaries Summary Statistics : deletes = 0 total = 6 -root@uno summary_test> -</code></pre></div></div> +</span><span class="gp">root@uno summary_test></span><span class="w"> +</span></code></pre></div></div> <div class="row mt-4"> diff --git a/output/docs/2.x/getting-started/clients.html b/output/docs/2.x/getting-started/clients.html index ad5ac331..d8d968c3 100644 --- a/output/docs/2.x/getting-started/clients.html +++ b/output/docs/2.x/getting-started/clients.html @@ -524,13 +524,13 @@ of the tarball distribution): <p>If a token class is used for <code class="language-plaintext highlighter-rouge">auth.type</code>, you can create a Base64 encoded token using the <code class="language-plaintext highlighter-rouge">accumulo create-token</code> command.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ accumulo create-token -Username (aka principal): root +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>accumulo create-token +<span class="go">Username (aka principal): root the password for the principal: ****** auth.type = org.apache.accumulo.core.client.security.tokens.PasswordToken auth.principal = root auth.token = AAAAGh+LCAAAAAAAAAArTk0uSi0BAOXoolwGAAAA -</code></pre></div></div> +</span></code></pre></div></div> <h1 id="authentication">Authentication</h1> @@ -642,11 +642,11 @@ These levels are:</p> <ol> <li>The default durability of all tables can be set using <a href="/docs/2.x/configuration/server-properties#table_durability">table.durability</a>. - <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> root@uno> config -s table.durability=flush + <div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp"> root@uno></span><span class="w"> </span>config <span class="nt">-s</span> table.durability<span class="o">=</span>flush </code></pre></div> </div> </li> <li>The default durability of a table can be overriden by setting <a href="/docs/2.x/configuration/server-properties#table_durability">table.durability</a> for that table. - <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> root@uno> config -t mytable -s table.durability=sync + <div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp"> root@uno></span><span class="w"> </span>config <span class="nt">-t</span> mytable <span class="nt">-s</span> table.durability<span class="o">=</span><span class="nb">sync</span> </code></pre></div> </div> </li> <li>When creating an <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/AccumuloClient.html">AccumuloClient</a>, the default durability can be overridden using <code class="language-plaintext highlighter-rouge">withBatchWriterConfig()</code> diff --git a/output/docs/2.x/getting-started/shell.html b/output/docs/2.x/getting-started/shell.html index 4db827f4..e6cb8842 100644 --- a/output/docs/2.x/getting-started/shell.html +++ b/output/docs/2.x/getting-started/shell.html @@ -457,38 +457,34 @@ root@myinstance> <h2 id="basic-administration">Basic Administration</h2> <p>The <code class="language-plaintext highlighter-rouge">tables</code> command will list all existing tables.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance> tables -accumulo.metadata +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance></span><span class="w"> </span>tables +<span class="go">accumulo.metadata accumulo.root -</code></pre></div></div> +</span></code></pre></div></div> <p>The <code class="language-plaintext highlighter-rouge">createtable</code> command creates a new table.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance> createtable mytable -root@myinstance mytable> tables -accumulo.metadata +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance></span><span class="w"> </span>createtable mytable +<span class="gp">root@myinstance mytable></span><span class="w"> </span>tables +<span class="go">accumulo.metadata accumulo.root mytable -</code></pre></div></div> +</span></code></pre></div></div> <p>The <code class="language-plaintext highlighter-rouge">deletetable</code> command deletes a table.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance testtable> deletetable testtable -deletetable { testtable } (yes|no)? yes +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance testtable></span><span class="w"> </span>deletetable testtable +<span class="go">deletetable { testtable } (yes|no)? yes Table: [testtable] has been deleted. -</code></pre></div></div> +</span></code></pre></div></div> <p>The shell can be used to insert updates and scan tables. This is useful for inspecting tables.</p> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance mytable></span><span class="w"> </span>scan +<span class="go"> +</span><span class="gp">root@myinstance mytable></span><span class="w"> </span>insert row1 colf colq value1 +<span class="go">insert successful -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance mytable> scan - -root@myinstance mytable> insert row1 colf colq value1 -insert successful - -root@myinstance mytable> scan -row1 colf:colq [] value1 -</code></pre></div></div> +</span><span class="gp">root@myinstance mytable></span><span class="w"> </span>scan +<span class="go">row1 colf:colq [] value1 +</span></code></pre></div></div> <p>The value in brackets <code class="language-plaintext highlighter-rouge">[]</code> would be the visibility labels. Since none were used, this is empty for this row. You can use the <code class="language-plaintext highlighter-rouge">-st</code> option to scan to see the timestamp for the cell, too.</p> @@ -497,51 +493,48 @@ You can use the <code class="language-plaintext highlighter-rouge">-st</code> op <p>The <code class="language-plaintext highlighter-rouge">compact</code> command instructs Accumulo to schedule a compaction of the table during which files are consolidated and deleted entries are removed.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance mytable> compact -t mytable -07 16:13:53,201 [shell.Shell] INFO : Compaction of table mytable started for given range -</code></pre></div></div> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance mytable></span><span class="w"> </span>compact <span class="nt">-t</span> mytable +<span class="go">07 16:13:53,201 [shell.Shell] INFO : Compaction of table mytable started for given range +</span></code></pre></div></div> <p>If needed, the compaction can be canceled using <code class="language-plaintext highlighter-rouge">compact --cancel -t mytable</code>.</p> <p>The <code class="language-plaintext highlighter-rouge">flush</code> command instructs Accumulo to write all entries currently in memory for a given table to disk.</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance mytable> flush -t mytable -07 16:14:19,351 [shell.Shell] INFO : Flush of table mytable -initiated... -</code></pre></div></div> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance mytable></span><span class="w"> </span>flush <span class="nt">-t</span> mytable +<span class="go">07 16:14:19,351 [shell.Shell] INFO : Flush of table mytable initiated... +</span></code></pre></div></div> <h2 id="user-administration">User Administration</h2> <p>The Shell can be used to add, remove, and grant privileges to users.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance mytable> createuser bob -Enter new password for 'bob': ********* +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance mytable></span><span class="w"> </span>createuser bob +<span class="go">Enter new password for 'bob': ********* Please confirm new password for 'bob': ********* -root@myinstance mytable> authenticate bob -Enter current password for 'bob': ********* +</span><span class="gp">root@myinstance mytable></span><span class="w"> </span>authenticate bob +<span class="go">Enter current password for 'bob': ********* Valid -root@myinstance mytable> grant System.CREATE_TABLE -s -u bob - -root@myinstance mytable> user bob -Enter current password for 'bob': ********* +</span><span class="gp">root@myinstance mytable></span><span class="w"> </span>grant System.CREATE_TABLE <span class="nt">-s</span> <span class="nt">-u</span> bob +<span class="go"> +</span><span class="gp">root@myinstance mytable></span><span class="w"> </span>user bob +<span class="go">Enter current password for 'bob': ********* -bob@myinstance mytable> userpermissions -System permissions: System.CREATE_TABLE +</span><span class="gp">bob@myinstance mytable></span><span class="w"> </span>userpermissions +<span class="go">System permissions: System.CREATE_TABLE Table permissions (accumulo.metadata): Table.READ Table permissions (mytable): NONE -bob@myinstance mytable> createtable bobstable - -bob@myinstance bobstable> - -bob@myinstance bobstable> user root -Enter current password for 'root': ********* +</span><span class="gp">bob@myinstance mytable></span><span class="w"> </span>createtable bobstable +<span class="go"> +</span><span class="gp">bob@myinstance bobstable></span><span class="w"> +</span><span class="go"> +</span><span class="gp">bob@myinstance bobstable></span><span class="w"> </span>user root +<span class="go">Enter current password for 'root': ********* -root@myinstance bobstable> revoke System.CREATE_TABLE -s -u bob +</span><span class="gp">root@myinstance bobstable></span><span class="w"> </span>revoke System.CREATE_TABLE <span class="nt">-s</span> <span class="nt">-u</span> bob </code></pre></div></div> <div class="row mt-4"> diff --git a/output/docs/2.x/getting-started/table_configuration.html b/output/docs/2.x/getting-started/table_configuration.html index f97eae77..0509acb6 100644 --- a/output/docs/2.x/getting-started/table_configuration.html +++ b/output/docs/2.x/getting-started/table_configuration.html @@ -497,12 +497,12 @@ client.</p> <p>Constraints can be enabled by setting a table property as follows:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>user@myinstance mytable> constraint -t mytable -a com.test.ExampleConstraint com.test.AnotherConstraint - -user@myinstance mytable> constraint -l -com.test.ExampleConstraint=1 +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">user@myinstance mytable></span><span class="w"> </span>constraint <span class="nt">-t</span> mytable <span class="nt">-a</span> com.test.ExampleConstraint com.test.AnotherConstraint +<span class="go"> +</span><span class="gp">user@myinstance mytable></span><span class="w"> </span>constraint <span class="nt">-l</span> +<span class="go">com.test.ExampleConstraint=1 com.test.AnotherConstraint=2 -</code></pre></div></div> +</span></code></pre></div></div> <p>Currently, there are no general-purpose constraints provided with the Accumulo distribution. New constraints can be created by writing a Java class that implements @@ -610,11 +610,11 @@ given date. The default is to return the one most recent version.</p> <p>The version policy can be changed by changing the VersioningIterator options for a table as follows:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>user@myinstance mytable> config -t mytable -s table.iterator.scan.vers.opt.maxVersions=3 - -user@myinstance mytable> config -t mytable -s table.iterator.minc.vers.opt.maxVersions=3 - -user@myinstance mytable> config -t mytable -s table.iterator.majc.vers.opt.maxVersions=3 +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">user@myinstance mytable></span><span class="w"> </span>config <span class="nt">-t</span> mytable <span class="nt">-s</span> table.iterator.scan.vers.opt.maxVersions<span class="o">=</span>3 +<span class="go"> +</span><span class="gp">user@myinstance mytable></span><span class="w"> </span>config <span class="nt">-t</span> mytable <span class="nt">-s</span> table.iterator.minc.vers.opt.maxVersions<span class="o">=</span>3 +<span class="go"> +</span><span class="gp">user@myinstance mytable></span><span class="w"> </span>config <span class="nt">-t</span> mytable <span class="nt">-s</span> table.iterator.majc.vers.opt.maxVersions<span class="o">=</span>3 </code></pre></div></div> <p>When a table is created, by default it’s configured to use the @@ -660,32 +660,32 @@ by writing a Java class that extends the <a href="https://static.javadoc.io/org. amount of time from the present. The following example sets a table to delete everything inserted over 30 seconds ago:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>user@myinstance> createtable filtertest - -user@myinstance filtertest> setiter -t filtertest -scan -minc -majc -p 10 -n myfilter -ageoff -AgeOffFilter removes entries with timestamps more than <ttl> milliseconds old -----------> set org.apache.accumulo.core.iterators.user.AgeOffFilter parameter negate, default false - keeps k/v that pass accept method, true rejects k/v that pass accept method: -----------> set org.apache.accumulo.core.iterators.user.AgeOffFilter parameter ttl, time to - live (milliseconds): 30000 -----------> set org.apache.accumulo.core.iterators.user.AgeOffFilter parameter currentTime, if set, - use the given value as the absolute time in milliseconds as the current time of day: - -user@myinstance filtertest> - -user@myinstance filtertest> scan - -user@myinstance filtertest> insert foo a b c - -user@myinstance filtertest> scan -foo a:b [] c - -user@myinstance filtertest> sleep 4 - -user@myinstance filtertest> scan - -user@myinstance filtertest> -</code></pre></div></div> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">user@myinstance></span><span class="w"> </span>createtable filtertest +<span class="go"> +</span><span class="gp">user@myinstance filtertest></span><span class="w"> </span>setiter <span class="nt">-t</span> filtertest <span class="nt">-scan</span> <span class="nt">-minc</span> <span class="nt">-majc</span> <span class="nt">-p</span> 10 <span class="nt">-n</span> myfilter <span class="nt">-ageoff</span> +<span class="gp">AgeOffFilter removes entries with timestamps more than <ttl></span><span class="w"> </span>milliseconds old +<span class="gp">----------></span><span class="w"> </span><span class="nb">set </span>org.apache.accumulo.core.iterators.user.AgeOffFilter parameter negate, default <span class="nb">false</span> +<span class="go"> keeps k/v that pass accept method, true rejects k/v that pass accept method: +</span><span class="gp">----------></span><span class="w"> </span><span class="nb">set </span>org.apache.accumulo.core.iterators.user.AgeOffFilter parameter ttl, <span class="nb">time </span>to +<span class="go"> live (milliseconds): 30000 +</span><span class="gp">----------></span><span class="w"> </span><span class="nb">set </span>org.apache.accumulo.core.iterators.user.AgeOffFilter parameter currentTime, <span class="k">if </span><span class="nb">set</span>, +<span class="go"> use the given value as the absolute time in milliseconds as the current time of day: + +</span><span class="gp">user@myinstance filtertest></span><span class="w"> +</span><span class="go"> +</span><span class="gp">user@myinstance filtertest></span><span class="w"> </span>scan +<span class="go"> +</span><span class="gp">user@myinstance filtertest></span><span class="w"> </span>insert foo a b c +<span class="go"> +</span><span class="gp">user@myinstance filtertest></span><span class="w"> </span>scan +<span class="go">foo a:b [] c + +</span><span class="gp">user@myinstance filtertest></span><span class="w"> </span><span class="nb">sleep </span>4 +<span class="go"> +</span><span class="gp">user@myinstance filtertest></span><span class="w"> </span>scan +<span class="go"> +</span><span class="gp">user@myinstance filtertest></span><span class="w"> +</span></code></pre></div></div> <p>To see the iterator settings for a table, use:</p> @@ -735,25 +735,25 @@ rowID1 colfA colqA 20100102 1 <p>Combiners can be enabled for a table using the setiter command in the shell. Below is an example.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@a14 perDayCounts> setiter -t perDayCounts -p 10 -scan -minc -majc -n daycount - -class org.apache.accumulo.core.iterators.user.SummingCombiner +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@a14 perDayCounts></span><span class="w"> </span>setiter <span class="nt">-t</span> perDayCounts <span class="nt">-p</span> 10 <span class="nt">-scan</span> <span class="nt">-minc</span> <span class="nt">-majc</span> <span class="nt">-n</span> daycount +<span class="go"> -class org.apache.accumulo.core.iterators.user.SummingCombiner TypedValueCombiner can interpret Values as a variety of number encodings (VLong, Long, or String) before combining -----------> set SummingCombiner parameter columns, - <col fam>[:<col qual>]{,<col fam>[:<col qual>]} : day -----------> set SummingCombiner parameter type, <VARNUM|LONG|STRING>: STRING - -root@a14 perDayCounts> insert foo day 20080101 1 -root@a14 perDayCounts> insert foo day 20080101 1 -root@a14 perDayCounts> insert foo day 20080103 1 -root@a14 perDayCounts> insert bar day 20080101 1 -root@a14 perDayCounts> insert bar day 20080101 1 - -root@a14 perDayCounts> scan -bar day:20080101 [] 2 +</span><span class="gp">----------></span><span class="w"> </span><span class="nb">set </span>SummingCombiner parameter columns, +<span class="gp"> <col fam></span><span class="o">[</span>:<col qual>]<span class="o">{</span>,<col fam>[:<col qual>]<span class="o">}</span> : day +<span class="gp">----------></span><span class="w"> </span><span class="nb">set </span>SummingCombiner parameter <span class="nb">type</span>, <VARNUM|LONG|STRING>: STRING +<span class="go"> +</span><span class="gp">root@a14 perDayCounts></span><span class="w"> </span>insert foo day 20080101 1 +<span class="gp">root@a14 perDayCounts></span><span class="w"> </span>insert foo day 20080101 1 +<span class="gp">root@a14 perDayCounts></span><span class="w"> </span>insert foo day 20080103 1 +<span class="gp">root@a14 perDayCounts></span><span class="w"> </span>insert bar day 20080101 1 +<span class="gp">root@a14 perDayCounts></span><span class="w"> </span>insert bar day 20080101 1 +<span class="go"> +</span><span class="gp">root@a14 perDayCounts></span><span class="w"> </span>scan +<span class="go">bar day:20080101 [] 2 foo day:20080101 [] 2 foo day:20080103 [] 1 -</code></pre></div></div> +</span></code></pre></div></div> <p>Accumulo includes some useful Combiners out of the box. To find these look in the <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/iterators/user/package-summary.html">org.apache.accumulo.core.iterators.user</a> package.</p> @@ -890,30 +890,30 @@ created, only the user that created the clone can read and write to it.</p> <p>In the following example we see that data inserted after the clone operation is not visible in the clone.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@a14> createtable people - -root@a14 people> insert 890435 name last Doe -root@a14 people> insert 890435 name first John - -root@a14 people> clonetable people test - -root@a14 people> insert 890436 name first Jane -root@a14 people> insert 890436 name last Doe - -root@a14 people> scan -890435 name:first [] John +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@a14></span><span class="w"> </span>createtable people +<span class="go"> +</span><span class="gp">root@a14 people></span><span class="w"> </span>insert 890435 name last Doe +<span class="gp">root@a14 people></span><span class="w"> </span>insert 890435 name first John +<span class="go"> +</span><span class="gp">root@a14 people></span><span class="w"> </span>clonetable people <span class="nb">test</span> +<span class="go"> +</span><span class="gp">root@a14 people></span><span class="w"> </span>insert 890436 name first Jane +<span class="gp">root@a14 people></span><span class="w"> </span>insert 890436 name last Doe +<span class="go"> +</span><span class="gp">root@a14 people></span><span class="w"> </span>scan +<span class="go">890435 name:first [] John 890435 name:last [] Doe 890436 name:first [] Jane 890436 name:last [] Doe -root@a14 people> table test - -root@a14 test> scan -890435 name:first [] John +</span><span class="gp">root@a14 people></span><span class="w"> </span>table <span class="nb">test</span> +<span class="go"> +</span><span class="gp">root@a14 test></span><span class="w"> </span>scan +<span class="go">890435 name:first [] John 890435 name:last [] Doe -root@a14 test> -</code></pre></div></div> +</span><span class="gp">root@a14 test></span><span class="w"> +</span></code></pre></div></div> <p>The du command in the shell shows how much space a table is using in HDFS. This command can also show how much overlapping space two cloned tables have in @@ -923,37 +923,37 @@ inserted into cic and its flushed, du shows the two tables still share 428M but cic has 226 bytes to itself. Finally, table cic is compacted and then du shows that each table uses 428M.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@a14> du ci - 428,482,573 [ci] - -root@a14> clonetable ci cic - -root@a14> du ci cic - 428,482,573 [ci, cic] - -root@a14> table cic - -root@a14 cic> insert r1 cf1 cq1 v1 -root@a14 cic> insert r1 cf1 cq2 v2 -root@a14 cic> insert r1 cf1 cq3 v3 - -root@a14 cic> flush -t cic -w -27 15:00:13,908 [shell.Shell] INFO : Flush of table cic completed. - -root@a14 cic> du ci cic - 428,482,573 [ci, cic] +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@a14></span><span class="w"> </span><span class="nb">du </span>ci +<span class="go"> 428,482,573 [ci] + +</span><span class="gp">root@a14></span><span class="w"> </span>clonetable ci cic +<span class="go"> +</span><span class="gp">root@a14></span><span class="w"> </span><span class="nb">du </span>ci cic +<span class="go"> 428,482,573 [ci, cic] + +</span><span class="gp">root@a14></span><span class="w"> </span>table cic +<span class="go"> +</span><span class="gp">root@a14 cic></span><span class="w"> </span>insert r1 cf1 cq1 v1 +<span class="gp">root@a14 cic></span><span class="w"> </span>insert r1 cf1 cq2 v2 +<span class="gp">root@a14 cic></span><span class="w"> </span>insert r1 cf1 cq3 v3 +<span class="go"> +</span><span class="gp">root@a14 cic></span><span class="w"> </span>flush <span class="nt">-t</span> cic <span class="nt">-w</span> +<span class="go">27 15:00:13,908 [shell.Shell] INFO : Flush of table cic completed. + +</span><span class="gp">root@a14 cic></span><span class="w"> </span><span class="nb">du </span>ci cic +<span class="go"> 428,482,573 [ci, cic] 226 [cic] -root@a14 cic> compact -t cic -w -27 15:00:35,871 [shell.Shell] INFO : Compacting table ... +</span><span class="gp">root@a14 cic></span><span class="w"> </span>compact <span class="nt">-t</span> cic <span class="nt">-w</span> +<span class="go">27 15:00:35,871 [shell.Shell] INFO : Compacting table ... 27 15:03:03,303 [shell.Shell] INFO : Compaction of table cic completed for given range -root@a14 cic> du ci cic - 428,482,573 [ci] +</span><span class="gp">root@a14 cic></span><span class="w"> </span><span class="nb">du </span>ci cic +<span class="go"> 428,482,573 [ci] 428,482,612 [cic] -root@a14 cic> -</code></pre></div></div> +</span><span class="gp">root@a14 cic></span><span class="w"> +</span></code></pre></div></div> <h2 id="exporting-tables">Exporting Tables</h2> diff --git a/output/docs/2.x/security/authentication.html b/output/docs/2.x/security/authentication.html index 887d1d4a..11a9e832 100644 --- a/output/docs/2.x/security/authentication.html +++ b/output/docs/2.x/security/authentication.html @@ -467,10 +467,10 @@ a password. This <code class="language-plaintext highlighter-rouge">root</code> <p>Users can be created in the shell:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> createuser bob -Enter new password for 'bob': **** +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>createuser bob +<span class="go">Enter new password for 'bob': **** Please confirm new password for 'bob': **** -</code></pre></div></div> +</span></code></pre></div></div> <p>In the Java API using <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/admin/SecurityOperations.html">SecurityOperations</a>:</p> @@ -484,10 +484,10 @@ or when they log in to the <a href="/docs/2.x/getting-started/shell">Accumulo sh <p>Authentication can also be tested in the shell:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@myinstance mytable> authenticate bob -Enter current password for 'bob': **** +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@myinstance mytable></span><span class="w"> </span>authenticate bob +<span class="go">Enter current password for 'bob': **** Valid -</code></pre></div></div> +</span></code></pre></div></div> <p>In the Java API using <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/admin/SecurityOperations.html">SecurityOperations</a>:</p> @@ -498,10 +498,10 @@ Valid <p>A user’s password can be changed in the shell:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> passwd -u bob -Enter current password for 'root': ****** +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>passwd <span class="nt">-u</span> bob +<span class="go">Enter current password for 'root': ****** Enter new password for 'bob': *** -</code></pre></div></div> +</span></code></pre></div></div> <p>In the Java API using <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/admin/SecurityOperations.html">SecurityOperations</a>:</p> @@ -512,9 +512,9 @@ Enter new password for 'bob': *** <p>Users can be removed in the shell:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> dropuser bob -dropuser { bob } (yes|no)? yes -</code></pre></div></div> +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>dropuser bob +<span class="go">dropuser { bob } (yes|no)? yes +</span></code></pre></div></div> <p>In the Java API using <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/admin/SecurityOperations.html">SecurityOperations</a>:</p> diff --git a/output/docs/2.x/security/kerberos.html b/output/docs/2.x/security/kerberos.html index 258a2dd0..e4f138e9 100644 --- a/output/docs/2.x/security/kerberos.html +++ b/output/docs/2.x/security/kerberos.html @@ -691,16 +691,16 @@ prompted for a password you can just hit return, since it won’t be used.</li> <li>Start the Accumulo cluster</li> </ol> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ accumulo-cluster stop -... -$ accumulo init --reset-security -Running against secured HDFS +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>accumulo-cluster stop +<span class="c">... +</span><span class="gp">$</span><span class="w"> </span>accumulo init <span class="nt">--reset-security</span> +<span class="go">Running against secured HDFS Principal (user) to grant administrative privileges to : acculumo_ad...@example.com Enter initial password for accumulo_ad...@example.com (this may not be applicable for your security setup): Confirm initial password for accumulo_ad...@example.com: -$ accumulo-cluster start -... -</code></pre></div></div> +</span><span class="gp">$</span><span class="w"> </span>accumulo-cluster start +<span class="c">... +</span></code></pre></div></div> <h4 id="verifying-secure-access">Verifying secure access</h4> @@ -768,11 +768,11 @@ users with the system permission are allowed to obtain delegation tokens. It is to configure confidentiality with SASL, using the <code class="language-plaintext highlighter-rouge">rpc.sasl.qop=auth-conf</code> configuration property, to ensure that prying eyes cannot view the <code class="language-plaintext highlighter-rouge">DelegationToken</code> as it passes over the network.</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Check a user's permissions -admin@REALM@accumulo> userpermissions -u user@REALM - -# Grant the DELEGATION_TOKEN system permission to a user -admin@REALM@accumulo> grant System.DELEGATION_TOKEN -s -u user@REALM +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>Check a user<span class="s1">'s permissions +</span><span class="gp">admin@REALM@accumulo></span><span class="w"> </span><span class="s1">userpermissions -u user@REALM +</span><span class="go"> +</span><span class="gp">#</span><span class="w"> </span>Grant the DELEGATION_TOKEN system permission to a user +<span class="gp">admin@REALM@accumulo></span><span class="w"> </span>grant System.DELEGATION_TOKEN <span class="nt">-s</span> <span class="nt">-u</span> user@REALM </code></pre></div></div> <h3 id="clients">Clients</h3> @@ -793,14 +793,14 @@ to authenticate with Accumulo, access HDFS, etc.</p> <p>The user can verify the state of their local credentials cache by using the command <code class="language-plaintext highlighter-rouge">klist</code>.</p> -<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>klist -Ticket cache: FILE:/tmp/krb5cc_123 +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>klist +<span class="go">Ticket cache: FILE:/tmp/krb5cc_123 Default principal: u...@example.com Valid starting Expires Service principal 01/07/2015 11:56:35 01/08/2015 11:56:35 krbtgt/example....@example.com - renew <span class="k">until </span>01/14/2015 11:56:35 -</code></pre></div></div> + renew until 01/14/2015 11:56:35 +</span></code></pre></div></div> <h4 id="configuration">Configuration</h4> @@ -827,31 +827,31 @@ interact with the system.</p> <p>While this example logs in via <code class="language-plaintext highlighter-rouge">kinit</code> with a password, any login method that caches Kerberos tickets should work.</p> -<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>kinit accumulo_ad...@example.com -Password <span class="k">for </span>accumulo_ad...@example.com: <span class="k">******************************</span> -<span class="nv">$ </span>accumulo shell - +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>kinit accumulo_ad...@example.com +<span class="go">Password for accumulo_ad...@example.com: ****************************** +</span><span class="gp">$</span><span class="w"> </span>accumulo shell +<span class="go"> Shell - Apache Accumulo Interactive Shell - - version: 1.7.2 - instance name: MYACCUMULO -- instance <span class="nb">id</span>: 483b9038-889f-4b2d-b72b-dfa2bb5dbd07 +- instance id: 483b9038-889f-4b2d-b72b-dfa2bb5dbd07 - -- <span class="nb">type</span> <span class="s1">'help'</span> <span class="k">for </span>a list of available commands +- type 'help' for a list of available commands - -accumulo_ad...@example.com@MYACCUMULO> userpermissions -System permissions: System.GRANT, System.CREATE_TABLE, System.DROP_TABLE, System.ALTER_TABLE, System.CREATE_USER, System.DROP_USER, System.ALTER_USER, System.SYSTEM, System.CREATE_NAMESPACE, System.DROP_NAMESPACE, System.ALTER_NAMESPACE, System.OBTAIN_DELEGATION_TOKEN +</span><span class="gp">accumulo_ad...@example.com@MYACCUMULO></span><span class="w"> </span>userpermissions +<span class="go">System permissions: System.GRANT, System.CREATE_TABLE, System.DROP_TABLE, System.ALTER_TABLE, System.CREATE_USER, System.DROP_USER, System.ALTER_USER, System.SYSTEM, System.CREATE_NAMESPACE, System.DROP_NAMESPACE, System.ALTER_NAMESPACE, System.OBTAIN_DELEGATION_TOKEN -Namespace permissions <span class="o">(</span>accumulo<span class="o">)</span>: Namespace.READ, Namespace.ALTER_TABLE +Namespace permissions (accumulo): Namespace.READ, Namespace.ALTER_TABLE -Table permissions <span class="o">(</span>accumulo.metadata<span class="o">)</span>: Table.READ, Table.ALTER_TABLE -Table permissions <span class="o">(</span>accumulo.replication<span class="o">)</span>: Table.READ -Table permissions <span class="o">(</span>accumulo.root<span class="o">)</span>: Table.READ, Table.ALTER_TABLE +Table permissions (accumulo.metadata): Table.READ, Table.ALTER_TABLE +Table permissions (accumulo.replication): Table.READ +Table permissions (accumulo.root): Table.READ, Table.ALTER_TABLE -accumulo_ad...@example.com@MYACCUMULO> quit -<span class="nv">$ </span>kdestroy -<span class="err">$</span> -</code></pre></div></div> +</span><span class="gp">accumulo_ad...@example.com@MYACCUMULO></span><span class="w"> </span>quit +<span class="gp">$</span><span class="w"> </span>kdestroy +<span class="gp">$</span><span class="w"> +</span></code></pre></div></div> <h4 id="delegationtokens-with-mapreduce">DelegationTokens with MapReduce</h4> diff --git a/output/docs/2.x/security/permissions.html b/output/docs/2.x/security/permissions.html index 5039ec1f..71ff2f8b 100644 --- a/output/docs/2.x/security/permissions.html +++ b/output/docs/2.x/security/permissions.html @@ -453,7 +453,7 @@ <p>Users can be granted permissions in the shell:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> grant System.CREATE_TABLE -s -u bob +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>grant System.CREATE_TABLE <span class="nt">-s</span> <span class="nt">-u</span> bob </code></pre></div></div> <p>Or in the Java API using <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/admin/SecurityOperations.html">SecurityOperations</a>:</p> @@ -465,21 +465,21 @@ <p>Permissions can be listed for a user in the shell:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> userpermissions -u bob -System permissions: System.CREATE_TABLE, System.DROP_TABLE +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>userpermissions <span class="nt">-u</span> bob +<span class="go">System permissions: System.CREATE_TABLE, System.DROP_TABLE Namespace permissions (accumulo): Namespace.READ Table permissions (accumulo.metadata): Table.READ Table permissions (accumulo.replication): Table.READ Table permissions (accumulo.root): Table.READ -</code></pre></div></div> +</span></code></pre></div></div> <h2 id="revoking-permissions">Revoking permissions</h2> <p>Permissions can be revoked for a user in the shell</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@uno> revoke System.CREATE_TABLE -s -u bob +<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">root@uno></span><span class="w"> </span>revoke System.CREATE_TABLE <span class="nt">-s</span> <span class="nt">-u</span> bob </code></pre></div></div> <p>Or in the Java API using <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/client/admin/SecurityOperations.html">SecurityOperations</a>:</p> diff --git a/output/feed.xml b/output/feed.xml index 08d61e56..2ecc3537 100644 --- a/output/feed.xml +++ b/output/feed.xml @@ -6,8 +6,8 @@ </description> <link>https://accumulo.apache.org/</link> <atom:link href="https://accumulo.apache.org/feed.xml" rel="self" type="application/rss+xml"/> - <pubDate>Fri, 15 Sep 2023 12:51:13 +0000</pubDate> - <lastBuildDate>Fri, 15 Sep 2023 12:51:13 +0000</lastBuildDate> + <pubDate>Mon, 18 Sep 2023 13:05:01 +0000</pubDate> + <lastBuildDate>Mon, 18 Sep 2023 13:05:01 +0000</lastBuildDate> <generator>Jekyll v4.3.2</generator> diff --git a/output/search_data.json b/output/search_data.json index fc36b642..befa192e 100644 --- a/output/search_data.json +++ b/output/search_data.json @@ -163,7 +163,7 @@ "docs-2-x-development-summaries": { "title": "Summary Statistics", - "content": "OverviewAccumulo has the ability to generate summary statistics about data in a tableusing user defined functions. Currently, these statistics are only generated fordata written to files. Data recently written to Accumulo that is still inmemory will not contribute to summary statistics.This feature can be used to inform a user about what data is in their table.Summary statistics can also be used by compaction strategies to make decisionsabout which files to compact.Su [...] + "content": "OverviewAccumulo has the ability to generate summary statistics about data in a tableusing user defined functions. Currently, these statistics are only generated fordata written to files. Data recently written to Accumulo that is still inmemory will not contribute to summary statistics.This feature can be used to inform a user about what data is in their table.Summary statistics can also be used by compaction strategies to make decisionsabout which files to compact.Su [...] "url": " /docs/2.x/development/summaries", "categories": "development" }, @@ -205,7 +205,7 @@ "docs-2-x-getting-started-shell": { "title": "Accumulo Shell", - "content": "Accumulo provides a simple shell that can be used to examine the contents andconfiguration settings of tables, insert/update/delete values, and changeconfiguration settings.The shell can be started by the following command:accumulo shell -u [username]The shell will prompt for the corresponding password to the username specifiedand then display the following prompt:Shell - Apache Accumulo Interactive Shell-- version: 2.1.2- instance name: myinstance- instance id: 0000000 [...] + "content": "Accumulo provides a simple shell that can be used to examine the contents andconfiguration settings of tables, insert/update/delete values, and changeconfiguration settings.The shell can be started by the following command:accumulo shell -u [username]The shell will prompt for the corresponding password to the username specifiedand then display the following prompt:Shell - Apache Accumulo Interactive Shell-- version: 2.1.2- instance name: myinstance- instance id: 0000000 [...] "url": " /docs/2.x/getting-started/shell", "categories": "getting-started" }, diff --git a/output/tour/authorizations-code/index.html b/output/tour/authorizations-code/index.html index a4f3deb9..b53326b0 100644 --- a/output/tour/authorizations-code/index.html +++ b/output/tour/authorizations-code/index.html @@ -154,30 +154,30 @@ <p>For this example, it is best to start with a clean slate. So, if the “GothamPD” table currently exists, let’s delete and begin fresh.</p> -<pre><code class="language-commandline">client.tableOperations().delete("GothamPD"); -client.securityOperations().dropLocalUser("commissioner"); -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().delete("GothamPD"); +jshell> client.securityOperations().dropLocalUser("commissioner"); +</code></pre></div></div> <p>Create a table called “GothamPD”.</p> -<pre><code class="language-commandline">jshell> client.tableOperations().create("GothamPD"); -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().create("GothamPD"); +</code></pre></div></div> <p>Create a “secretId” authorization & visibility</p> -<pre><code class="language-commandline">jshell> String secretId = "secretId"; +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> String secretId = "secretId"; secretId ==> "secretId" jshell> Authorizations auths = new Authorizations(secretId); auths ==> secretId jshell> ColumnVisibility colVis = new ColumnVisibility(secretId); colVis ==> [secretId] -</code></pre> +</code></pre></div></div> <p>Create a user with the “secretId” authorization and grant the commissioner read permissions on our table</p> -<pre><code class="language-commandline">jshell> client.securityOperations().createLocalUser("commissioner", new PasswordToken("gordonrocks")); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.securityOperations().createLocalUser("commissioner", new PasswordToken("gordonrocks")); jshell> client.securityOperations().changeUserAuthorizations("commissioner", auths); jshell> client.securityOperations().grantTablePermission("commissioner", "GothamPD", TablePermission.READ); -</code></pre> +</code></pre></div></div> <p>Create three Mutation objects, securing the proper columns.</p> -<pre><code class="language-commandline">jshell> Mutation mutation1 = new Mutation("id0001"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> Mutation mutation1 = new Mutation("id0001"); mutation1 ==> org.apache.accumulo.core.data.Mutation@1 jshell> mutation1.put("hero", "alias", "Batman"); jshell> mutation1.put("hero", "name", colVis, "Bruce Wayne"); @@ -194,21 +194,21 @@ mutation3 ==> org.apache.accumulo.core.data.Mutation@1 jshell> mutation3.put("villain", "alias", "Joker"); jshell> mutation3.put("villain", "name", "Unknown"); jshell> mutation3.put("villain", "wearsCape?", "false"); -</code></pre> +</code></pre></div></div> <p>Create a BatchWriter to the GothamPD table and add your mutations to it. Once the BatchWriter is closed the data will be available to scans.</p> -<pre><code class="language-commandline">jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { ...> writer.addMutation(mutation1); ...> writer.addMutation(mutation2); ...> writer.addMutation(mutation3); ...> } -</code></pre> +</code></pre></div></div> <p>Now let’s scan.</p> -<pre><code class="language-commandline">jshell> try (ScannerBase scan = client.createScanner("GothamPD", Authorizations.EMPTY)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (ScannerBase scan = client.createScanner("GothamPD", Authorizations.EMPTY)) { ...> System.out.println("Gotham Police Department Persons of Interest:"); ...> for (Map.Entry<Key, Value> entry : scan) { ...> System.out.printf("Key : %-50s Value : %s\n", entry.getKey(), entry.getValue()); @@ -222,14 +222,14 @@ Key : id0002 hero:wearsCape? [] 1654783465209 false Value : true Key : id0003 villain:alias [] 1654783465209 false Value : Joker Key : id0003 villain:name [] 1654783465209 false Value : Unknown Key : id0003 villain:wearsCape? [] 1654783465209 false Value : false -</code></pre> +</code></pre></div></div> <p>Note that the default root user can no longer see the name for the two hero’s since they are protected with the <code class="language-plaintext highlighter-rouge">secretId</code> authorization.</p> <p>Let’s add the <code class="language-plaintext highlighter-rouge">auths</code> authorization to the default root user and scan again.</p> -<pre><code class="language-commandline"> jshell> try (ScannerBase scan = client.createScanner("GothamPD", auths)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> jshell> try (ScannerBase scan = client.createScanner("GothamPD", auths)) { ...> System.out.println("Gotham Police Department Persons of Interest:"); ...> for (Map.Entry<Key, Value> entry : scan) ...> System.out.printf("Key : %-50s Value : %s\n", entry.getKey(), entry.getValue()); @@ -254,14 +254,14 @@ Gotham Police Department Persons of Interest: | at TabletScanClientService$Client.startScan (TabletScanClientService.java:89) | at ThriftScanner.scan (ThriftScanner.java:483) | ... -</code></pre> +</code></pre></div></div> <p>This results in an error since the root user doesn’t have the authorizations we tried to pass to the Scanner</p> <p>Now, create a second client for the commissioner user and output all the rows visible to them. Make sure to pass the proper authorizations.</p> -<pre><code class="language-commandline">jshell> try (AccumuloClient commishClient = Accumulo.newClient().from(client.properties()).as("commissioner", "gordonrocks").build()) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (AccumuloClient commishClient = Accumulo.newClient().from(client.properties()).as("commissioner", "gordonrocks").build()) { ...> try (ScannerBase scan = commishClient.createScanner("GothamPD", auths)) { ...> System.out.println("Gotham Police Department Persons of Interest:"); ...> for (Map.Entry<Key, Value> entry : scan) { @@ -269,11 +269,11 @@ Make sure to pass the proper authorizations.</p> ...> } ...> } ...> } -</code></pre> +</code></pre></div></div> <p>The solution above will print (timestamp will differ):</p> -<pre><code class="language-commandline">Gotham Police Department Persons of Interest: +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Gotham Police Department Persons of Interest: Key : id0001 hero:alias [] 1654106385737 false Value : Batman Key : id0001 hero:name [secretId] 1654106385737 false Value : Bruce Wayne Key : id0001 hero:wearsCape? [] 1654106385737 false Value : true @@ -283,7 +283,7 @@ Key : id0002 hero:wearsCape? [] 1654106385737 false Value : true Key : id0003 villain:alias [] 1654106385737 false Value : Joker Key : id0003 villain:name [] 1654106385737 false Value : Unknown Key : id0003 villain:wearsCape? [] 1654106385737 false Value : false -</code></pre> +</code></pre></div></div> </div> diff --git a/output/tour/authorizations/index.html b/output/tour/authorizations/index.html index e49650df..b6b8f0d0 100644 --- a/output/tour/authorizations/index.html +++ b/output/tour/authorizations/index.html @@ -168,7 +168,7 @@ the proper authorizations can read their names.</p> <p>Create a “secretId” authorization & visibility.</p> -<pre><code class="language-commandline">jshell> String secretId = "secretId"; +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> String secretId = "secretId"; secretId ==> "secretId" jshell> Authorizations auths = new Authorizations(secretId); @@ -176,14 +176,14 @@ auths ==> secretId jshell> ColumnVisibility colVis = new ColumnVisibility(secretId); colVis ==> [secretId] -</code></pre> +</code></pre></div></div> <p>Create a user with the “secretId” authorization and grant read permissions on our table.</p> -<pre><code class="language-commandline">jshell> client.securityOperations().createLocalUser("commissioner", new PasswordToken("gordonrocks")); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.securityOperations().createLocalUser("commissioner", new PasswordToken("gordonrocks")); jshell> client.securityOperations().changeUserAuthorizations("commissioner", auths); jshell> client.securityOperations().grantTablePermission("commissioner", "GothamPD", TablePermission.READ); -</code></pre> +</code></pre></div></div> <p>The <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/data/Mutation.html">Mutation</a> API allows you to set the <code class="language-plaintext highlighter-rouge">secretId</code> visibility on a column. Find the proper method for setting a column visibility in the Mutation API and modify the code so the <code class="language-plaintext highlighter-rouge">colVis</code> variable created diff --git a/output/tour/basic-read-write/index.html b/output/tour/basic-read-write/index.html index df2bf6e5..0efdbd1d 100644 --- a/output/tour/basic-read-write/index.html +++ b/output/tour/basic-read-write/index.html @@ -158,29 +158,29 @@ key/value pairs.</p> <p>Let’s create a table called “GothamPD”.</p> <p>At the JShell prompt, enter the following:</p> -<pre><code class="language-commandline">jshell> client.tableOperations().create("GothamPD"); -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().create("GothamPD"); +</code></pre></div></div> <p>Accumulo uses Mutation objects to hold all changes to a row in a table. Each row has a unique row ID.</p> -<pre><code class="language-commandline">jshell> Mutation mutation1 = new Mutation("id0001"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> Mutation mutation1 = new Mutation("id0001"); mutation1 ==> org.apache.accumulo.core.data.Mutation@1 -</code></pre> +</code></pre></div></div> <p>Create key/value pairs for Batman. Put them in the “hero” family.</p> -<pre><code class="language-commandline">jshell> mutation1.put("hero","alias", "Batman"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> mutation1.put("hero","alias", "Batman"); jshell> mutation1.put("hero","name", "Bruce Wayne"); jshell> mutation1.put("hero","wearsCape?", "true"); -</code></pre> +</code></pre></div></div> <p>Create a BatchWriter to the GothamPD table and add your mutation to it. Try-with-resources will close for us.</p> -<pre><code class="language-commandline">jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { ...> writer.addMutation(mutation1); ...> } -</code></pre> +</code></pre></div></div> <p>Read and print all rows of the “GothamPD” table.</p> <p>Note that within the JShell environment, references to Scanner are ambiguous since it matches both @@ -189,7 +189,7 @@ be resolved by either using the fully qualified name for the Scanner, or more ea base class, <code class="language-plaintext highlighter-rouge">ScannerBase</code>, in place of <code class="language-plaintext highlighter-rouge">Scanner</code> (this should generally only be required when within the JShell environment).</p> -<pre><code class="language-commandline">jshell> try (ScannerBase scan = client.createScanner("GothamPD", Authorizations.EMPTY)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (ScannerBase scan = client.createScanner("GothamPD", Authorizations.EMPTY)) { ...> System.out.println("Gotham Police Department Persons of Interest:"); ...> for(Map.Entry<Key, Value> entry : scan) { ...> System.out.printf("Key : %-50s Value : %s\n", entry.getKey(), entry.getValue()); @@ -199,7 +199,7 @@ Gotham Police Department Persons of Interest: Key : id0001 hero:alias [] 1654274195071 false Value : Batman Key : id0001 hero:name [] 1654274195071 false Value : Bruce Wayne Key : id0001 hero:wearsCape? [] 1654274195071 false Value : true -</code></pre> +</code></pre></div></div> <p>Be aware the timestamps will differ for you.</p> diff --git a/output/tour/batch-scanner-code/index.html b/output/tour/batch-scanner-code/index.html index 1ea2ae70..627b333e 100644 --- a/output/tour/batch-scanner-code/index.html +++ b/output/tour/batch-scanner-code/index.html @@ -153,12 +153,12 @@ <p>Create a table called “GothamBatch”.</p> -<pre><code class="language-commandline">jshell> client.tableOperations().create("GothamBatch"); -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().create("GothamBatch"); +</code></pre></div></div> <p>Generate 10,000 rows of villain data</p> -<pre><code class="language-commandline">jshell> try (BatchWriter writer = client.createBatchWriter("GothamBatch")) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (BatchWriter writer = client.createBatchWriter("GothamBatch")) { ...> for (int i = 0; i < 10_000; i++) { ...> Mutation m = new Mutation(String.format("id%04d", i)); ...> m.put("villain", "alias", "henchman" + i); @@ -167,10 +167,10 @@ ...> writer.addMutation(m); ...> } ...> } -</code></pre> +</code></pre></div></div> <p>Create a BatchScanner with 5 query threads</p> -<pre><code class="language-commandline">jshell> try (BatchScanner batchScanner = client.createBatchScanner("GothamBatch", Authorizations.EMPTY, 5)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (BatchScanner batchScanner = client.createBatchScanner("GothamBatch", Authorizations.EMPTY, 5)) { ...> ...> // Create a collection of 2 sample ranges and set it to the batchScanner ...> List<Range> ranges = new ArrayList<Range>(); @@ -188,7 +188,7 @@ ---> Double average = batchScanner.stream().map(Map.Entry::getValue).map(Value::toString).mapToLong(Long::valueOf).average().getAsDouble(); ---> System.out.println("The average years of service of " + villianCount + " villians is " + average); ...> } -</code></pre> +</code></pre></div></div> <p>Running the solution above should print output similar to below:</p> diff --git a/output/tour/batch-scanner/index.html b/output/tour/batch-scanner/index.html index 3b4efe3d..483e5820 100644 --- a/output/tour/batch-scanner/index.html +++ b/output/tour/batch-scanner/index.html @@ -156,7 +156,7 @@ sorted order. A <a href="https://static.javadoc.io/org.apache.accumulo/accumulo- <p>For this exercise, we need to generate a bunch of data to test BatchScanner. Execute the code below to create our data set.</p> -<pre><code class="language-commandline">jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { ...> for (int i = 0; i < 10_000; i++) { ...> Mutation m = new Mutation(String.format("id%04d", i)); ...> m.put("villain", "alias", "henchman" + i); @@ -165,7 +165,7 @@ to create our data set.</p> ...> writer.addMutation(m); ...> } ...> } -</code></pre> +</code></pre></div></div> <p>We want to calculate the average years of service from a sample of 2000 villains. A BatchScanner would be good for this task because we don’t need the returned keys to be sorted. Follow these steps to diff --git a/output/tour/client/index.html b/output/tour/client/index.html index f6b270d1..0f9f5c1f 100644 --- a/output/tour/client/index.html +++ b/output/tour/client/index.html @@ -162,24 +162,24 @@ will illustrate how to create a new client.</p> The properties used to create the client can be viewed in the file contained in the <code class="language-plaintext highlighter-rouge">clientPropUrl</code> variable.</p> -<pre><code class="language-commandline">jshell> /vars +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> /vars | URL clientPropUrl = file:<path_to_accumulo-client.properties file> -</code></pre> +</code></pre></div></div> <p>Let’s start by using table operations to list the default tables and instance operations to get the instance ID.</p> -<pre><code class="language-commandline">jshell> client.tableOperations().list().forEach(System.out::println); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().list().forEach(System.out::println); accumulo.metadata accumulo.replication accumulo.root -</code></pre> +</code></pre></div></div> <p>Now let’s retrieve the instance ID.</p> -<pre><code class="language-commandline">jshell> System.out.println(client.instanceOperations().getInstanceID()); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> System.out.println(client.instanceOperations().getInstanceID()); 8b9839f7-cdc6-44ca-b527-43db45acc79f -</code></pre> +</code></pre></div></div> <p>Different types of operations are accessed by their respective methods on the client:</p> diff --git a/output/tour/conditional-writer-code/index.html b/output/tour/conditional-writer-code/index.html index cb940f65..1287565f 100644 --- a/output/tour/conditional-writer-code/index.html +++ b/output/tour/conditional-writer-code/index.html @@ -151,7 +151,7 @@ <div id="tour-content"> <p>Below is a solution to the exercise.</p> -<pre><code class="language-commandline">jshell> boolean setAddress(AccumuloClient client, String id, String expectedAddr, String newAddr) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> boolean setAddress(AccumuloClient client, String id, String expectedAddr, String newAddr) { ...> try (ConditionalWriter writer = client.createConditionalWriter("GothamPD", new ConditionalWriterConfig())) { ...> Condition condition = new Condition("location", "home"); ...> if (expectedAddr != null) { @@ -164,13 +164,13 @@ ...> throw new RuntimeException(); ...> } ...> } -</code></pre> +</code></pre></div></div> <p>The following output shows running the example with a conditional writer. Threads retry when conditional mutations are rejected. The final address has all three modifications.</p> -<pre><code class="language-commandline">jshell> concurrent_writes() +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> concurrent_writes() GothamPD table already exists...proceeding... Thread 52 attempting change ' 1007 Mountain Dr, Gotham, New York ' -> '1007 Mountain Dr, Gotham, New York' Thread 91 attempting change ' 1007 Mountain Dr, Gotham, New York ' -> ' 1007 Mountain Dr, Gotham, NY ' @@ -178,7 +178,7 @@ Thread 90 attempting change ' 1007 Mountain Dr, Gotham, New York ' -> ' Thread 90 attempting change '1007 Mountain Dr, Gotham, New York' -> '1007 Mountain Dr, Gotham, New York' Thread 91 attempting change '1007 Mountain Dr, Gotham, New York' -> '1007 Mountain Dr, Gotham, NY' Final address : '1007 Mountain Dr, Gotham, NY' -</code></pre> +</code></pre></div></div> </div> diff --git a/output/tour/conditional-writer/index.html b/output/tour/conditional-writer/index.html index 1ee139ef..11bc0402 100644 --- a/output/tour/conditional-writer/index.html +++ b/output/tour/conditional-writer/index.html @@ -187,7 +187,7 @@ always makes the update, even when the value has changed since it was read.</p> <p>To simplify, we will create several small methods to illustrate the issue.</p> -<pre><code class="language-commandline">jshell> String getAddress(AccumuloClient client, String id) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> String getAddress(AccumuloClient client, String id) { ...> try (org.apache.accumulo.core.client.Scanner scan = new IsolatedScanner(client.createScanner("GothamPD", Authorizations.EMPTY))) { ...> scan.setRange(Range.exact(id, "location", "home")); ...> for (Map.Entry<Key, Value> entry : scan) { @@ -246,20 +246,20 @@ jshell> void concurrent_writes() throws Exception { ...> } | created method concurrent_writes() -</code></pre> +</code></pre></div></div> <p>The following is one of a few possible outputs. Notice that only the modification of <code class="language-plaintext highlighter-rouge">Drive</code> to <code class="language-plaintext highlighter-rouge">Dr</code> shows up in the final output. The other modifications were lost.</p> -<pre><code class="language-commandline">jshell> concurrent_writes() +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> concurrent_writes() GothamPD table already exists...proceeding... Thread 52 attempting change ' 1007 Mountain Drive, Gotham, New York ' -> ' 1007 Mountain Drive, Gotham, NY ' Thread 38 attempting change ' 1007 Mountain Drive, Gotham, New York ' -> '1007 Mountain Drive, Gotham, New York' Thread 53 attempting change ' 1007 Mountain Drive, Gotham, New York ' -> ' 1007 Mountain Dr, Gotham, New York ' Final address : ' 1007 Mountain Dr, Gotham, New York ' -</code></pre> +</code></pre></div></div> <p>To fix this example, make the following changes in <code class="language-plaintext highlighter-rouge">setAddress()</code> to use a ConditionalWriter.</p> diff --git a/output/tour/data-model-code/index.html b/output/tour/data-model-code/index.html index 239bdfc6..1cf0d0b7 100644 --- a/output/tour/data-model-code/index.html +++ b/output/tour/data-model-code/index.html @@ -151,50 +151,50 @@ <div id="tour-content"> <p>Below is the solution for the complete exercise.</p> -<pre><code class="language-commandline">jshell> client.tableOperations().create("GothamPD"); -</code></pre> +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().create("GothamPD"); +</code></pre></div></div> <p>Create a row for Batman</p> -<pre><code class="language-commandline">jshell> Mutation mutation1 = new Mutation("id0001"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> Mutation mutation1 = new Mutation("id0001"); mutation1 ==> org.apache.accumulo.core.data.Mutation@1 jshell> mutation1.put("hero","alias", "Batman"); jshell> mutation1.put("hero","name", "Bruce Wayne"); jshell> mutation1.put("hero","wearsCape?", "true"); -</code></pre> +</code></pre></div></div> <p>Create a row for Robin</p> -<pre><code class="language-commandline">jshell> Mutation mutation2 = new Mutation("id0002"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> Mutation mutation2 = new Mutation("id0002"); mutation2 ==> org.apache.accumulo.core.data.Mutation@1 jshell> mutation2.put("hero","alias", "Robin"); jshell> mutation2.put("hero","name", "Dick Grayson"); jshell> mutation2.put("hero","wearsCape?", "true"); -</code></pre> +</code></pre></div></div> <p>Create a row for Joker</p> -<pre><code class="language-commandline">jshell> Mutation mutation3 = new Mutation("id0003"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> Mutation mutation3 = new Mutation("id0003"); mutation3 ==> org.apache.accumulo.core.data.Mutation@1 jshell> mutation3.put("villain","alias", "Joker"); jshell> mutation3.put("villain","name", "Unknown"); jshell> mutation3.put("villain","wearsCape?", "false"); -</code></pre> +</code></pre></div></div> <p>Create a BatchWriter to the GothamPD table and add your mutations to it. Once the BatchWriter is closed by the try-with-resources, data will be available to scans.</p> -<pre><code class="language-commandline">jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (BatchWriter writer = client.createBatchWriter("GothamPD")) { ...> writer.addMutation(mutation1); ...> writer.addMutation(mutation2); ...> writer.addMutation(mutation3); ...> } -</code></pre> +</code></pre></div></div> <p>Read and print all rows of the “GothamPD” table. Try-with-resources will close for us.</p> <p>Note: A Scanner is an extension of <code class="language-plaintext highlighter-rouge">java.lang.Iterable</code> so it will traverse through the table.</p> -<pre><code class="language-commandline">jshell> try (ScannerBase scan = client.createScanner("GothamPD", Authorizations.EMPTY)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (ScannerBase scan = client.createScanner("GothamPD", Authorizations.EMPTY)) { ...> System.out.println("Gotham Police Department Persons of Interest:"); ...> for (Map.Entry<Key, Value> entry : scan) { ...> System.out.printf("Key : %-50s Value : %s\n", entry.getKey(), entry.getValue()); @@ -210,7 +210,7 @@ Key : id0002 hero:wearsCape? [] 1511306370025 false Value : true Key : id0003 villain:alias [] 1511306370025 false Value : Joker Key : id0003 villain:name [] 1511306370025 false Value : Unknown Key : id0003 villain:wearsCape? [] 1511306370025 false Value : false -</code></pre> +</code></pre></div></div> <p>Timestamps will differ.</p> diff --git a/output/tour/data-model/index.html b/output/tour/data-model/index.html index b5b73559..d5c92346 100644 --- a/output/tour/data-model/index.html +++ b/output/tour/data-model/index.html @@ -185,9 +185,9 @@ into a few different parts, as seen in the image below.</p> column as the family, qualifier, and visibility.</p> <p>Take a closer look at the Mutation object created in the first exercise:</p> -<pre><code class="language-commandline">Mutation mutation1 = new Mutation("id0001"); -mutation1.put("hero","alias", "Batman"); -</code></pre> +<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">Mutation</span> <span class="n">mutation1</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Mutation</span><span class="o">(</span><span class="s">"id0001"</span><span class="o">);</span> +<span class="n">mutation1</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="s">"hero"</span><span class="o">,</span><span class="s">"alias"</span><span class="o">,</span> <span class="s">"Batman"</span><span class="o">);</span> +</code></pre></div></div> <p>It can be broken down as follows: <br /></p> <table> diff --git a/output/tour/getting-started/index.html b/output/tour/getting-started/index.html index 63d9a748..0f1a8ca3 100644 --- a/output/tour/getting-started/index.html +++ b/output/tour/getting-started/index.html @@ -155,13 +155,13 @@ Accumulo cluster you can use <a href="https://github.com/apache/fluo-uno">fluo-u <p>Once you have an instance up and running, start the Accumulo JShell interface by typing the command below. The ‘$’ represents the system prompt.</p> -<pre><code class="language-commandline">$ accumulo jshell -</code></pre> +<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>accumulo jshell +</code></pre></div></div> <p>This will present you with a Java JShell interface with the required Accumulo libraries pre-loaded and a working Accumulo <code class="language-plaintext highlighter-rouge">client</code> object.</p> -<pre><code class="language-commandline">Preparing JShell for Apache Accumulo +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Preparing JShell for Apache Accumulo Use 'client' to interact with Accumulo @@ -169,13 +169,13 @@ Use 'client' to interact with Accumulo | For an introduction type: /help intro jshell> -</code></pre> +</code></pre></div></div> <p>JShell has a few commands that can be helpful.</p> <p><code class="language-plaintext highlighter-rouge">/imports</code> lists the currently loaded imports in the JShell session.</p> -<pre><code class="language-commandline">jshell> /imports +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> /imports | import java.io.* | import java.math.* | import java.net.* @@ -207,14 +207,14 @@ jshell> | import org.apache.accumulo.hadoop.mapreduce.* | import org.apache.accumulo.hadoop.mapreduce.partition.* | import org.apache.hadoop.io.Text -</code></pre> +</code></pre></div></div> <p><code class="language-plaintext highlighter-rouge">/vars</code> will display all currently defined variables.</p> -<pre><code class="language-commandline">jshell> /vars +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> /vars | URL clientPropUrl = file:<path_to_accumulo_dir>/conf/accumulo-client.properties | AccumuloClient client = org.apache.accumulo.core.clientImpl.ClientContext@7cbee484 -</code></pre> +</code></pre></div></div> <p><code class="language-plaintext highlighter-rouge">/list</code> displays all user defined code snippets.</p> @@ -226,7 +226,7 @@ jshell> <p>For example:</p> -<pre><code class="language-commandline">jshell> var x = 12; +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> var x = 12; x ==> 12 jshell> var y = 23; @@ -264,7 +264,7 @@ jshell> /list 4 jshell> /4 add(4,5); $8 ==> 9 -</code></pre> +</code></pre></div></div> <p>Ok, let’s go!</p> diff --git a/output/tour/ranges-splits/index.html b/output/tour/ranges-splits/index.html index c358aa99..7abbf25e 100644 --- a/output/tour/ranges-splits/index.html +++ b/output/tour/ranges-splits/index.html @@ -151,16 +151,16 @@ <div id="tour-content"> <p>A <a href="https://static.javadoc.io/org.apache.accumulo/accumulo-core/2.1.2/org/apache/accumulo/core/data/Range.html">Range</a> is a specified group of <code class="language-plaintext highlighter-rouge">Key</code>s. There are many ways to create a <code class="language-plaintext highlighter-rouge">Range</code>. Here are a few examples:</p> -<pre><code class="language-commandline">Range r1 = new Range(startKey, endKey); // Creates a range from startKey inclusive to endKey inclusive. -Range r2 = new Range(row); // Creates a range that covers an entire row. -Range r3 = new Range(startRow, endRow); // Creates a range from startRow inclusive to endRow inclusive. -</code></pre> +<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">Range</span> <span class="n">r1</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Range</span><span class="o">(</span><span class="n">startKey</span><span class="o">,</span> <span class="n">endKey</span><span class="o">);</span> <span class="c1">// Creates a range from startKey inclusive to endKey inclusive.</span> +<span class="nc">Range</span> <span class="n">r2</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Range</span><span class="o">(</span><span class="n">row</span><span class="o">);</span> <span class="c1">// Creates a range that covers an entire row.</span> +<span class="nc">Range</span> <span class="n">r3</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Range</span><span class="o">(</span><span class="n">startRow</span><span class="o">,</span> <span class="n">endRow</span><span class="o">);</span> <span class="c1">// Creates a range from startRow inclusive to endRow inclusive.</span> +</code></pre></div></div> <p>A <code class="language-plaintext highlighter-rouge">Scanner</code> by default will scan all <code class="language-plaintext highlighter-rouge">Key</code>’s in a table but this can be inefficient. It is a good practice to set a range on a Scanner.</p> -<pre><code class="language-commandline">scanner.setRange(new Range("id0000", "id0010")); // returns rows from id0000 to id0010 -</code></pre> +<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">scanner</span><span class="o">.</span><span class="na">setRange</span><span class="o">(</span><span class="k">new</span> <span class="nc">Range</span><span class="o">(</span><span class="s">"id0000"</span><span class="o">,</span> <span class="s">"id0010"</span><span class="o">));</span> <span class="c1">// returns rows from id0000 to id0010</span> +</code></pre></div></div> <p>As your data grows larger, Accumulo will split tables into smaller pieces called <code class="language-plaintext highlighter-rouge">Tablet</code>’s which can be distributed across multiple Tablet Servers. By default, a table will get split into <code class="language-plaintext highlighter-rouge">Tablet</code>s on diff --git a/output/tour/using-iterators/index.html b/output/tour/using-iterators/index.html index 9630ea9f..a4fe6ac7 100644 --- a/output/tour/using-iterators/index.html +++ b/output/tour/using-iterators/index.html @@ -155,7 +155,7 @@ aggregation operations on data during scans and during compactions.</p> <p>Let’s begin by adding some data for our hero’s recording recent crime-stopping statistics.</p> -<pre><code class="language-commandlne">jshell> client.tableOperations().create("GothamCrimeStats"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> client.tableOperations().create("GothamCrimeStats"); jshell> Mutation mutation1 = new Mutation("id0001"); mutation1 ==> org.apache.accumulo.core.data.Mutation@1 @@ -179,17 +179,17 @@ jshell> try (BatchWriter writer = client.createBatchWriter("GothamCrimeStats" ...> writer.addMutation(mutation1); ...> writer.addMutation(mutation2); ...> } -</code></pre> +</code></pre></div></div> <p>Let’s scan to see the data.</p> -<pre><code class="language-commandline">jshell> try (ScannerBase scan = client.createScanner("GothamCrimeStats", Authorizations.EMPTY)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (ScannerBase scan = client.createScanner("GothamCrimeStats", Authorizations.EMPTY)) { ...> System.out.println("Gotham Police Department Crime Statistics:"); ...> for(Map.Entry<Key, Value> entry : scan) { ...> System.out.printf("Key : %-52s Value : %s\n", entry.getKey(), entry.getValue()); ...> } ...> } -</code></pre> +</code></pre></div></div> <p>You may notice a problem. We only see the latest entry. That is due to the <code class="language-plaintext highlighter-rouge">versioningIterator</code> which is applied to all tables by default. It filters out all but the latest entry @@ -200,13 +200,13 @@ a set number of past entries to display). The iterator is named <code class="lan <p>To simplify, we will import some additional packages to save some typing.</p> -<pre><code class="language-commandline">jshell> import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; jshell> client.tableOperations().removeIterator("GothamCrimeStats", "vers", EnumSet.allOf(IteratorScope.class)); -</code></pre> +</code></pre></div></div> <p>Now let’s scan again.</p> -<pre><code class="language-commandline">jshell> try (ScannerBase scan = client.createScanner("GothamCrimeStats", Authorizations.EMPTY)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try (ScannerBase scan = client.createScanner("GothamCrimeStats", Authorizations.EMPTY)) { ...> System.out.println("Gotham Police Department Crime Statistics:"); ...> for(Map.Entry<Key, Value> entry : scan) { ...> System.out.printf("Key : %-52s Value : %s\n", entry.getKey(), entry.getValue()); @@ -221,31 +221,31 @@ Key : id0002 hero:alias [] 1654697915769 false Value : Robin Key : id0002 hero:villainsCaptured [] 1654697915769 false Value : 2 Key : id0002 hero:villainsCaptured [] 1654697915769 false Value : 0 Key : id0002 hero:villainsCaptured [] 1654697915769 false Value : 1 -</code></pre> +</code></pre></div></div> <p>You will now see ALL entries added to the table.</p> <p>Instead of seeing a daily history, let’s instead keep a running total of captured villains. A <code class="language-plaintext highlighter-rouge">summingcombiner</code> can be used to accomplish this.</p> -<pre><code class="language-commandline">jshell> import org.apache.accumulo.core.iterators.user.SummingCombiner; +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> import org.apache.accumulo.core.iterators.user.SummingCombiner; jshell> import org.apache.accumulo.core.iterators.LongCombiner -</code></pre> +</code></pre></div></div> <p>Create an IteratorSetting object. Set the encoding type and indicate the columns to be summed. Also, it is a good idea to check for any iterator conflicts prior to attaching the iterator to the table.</p> -<pre><code class="language-commandline">jshell> IteratorSetting scSetting = new IteratorSetting(30, "sum", SummingCombiner.class); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> IteratorSetting scSetting = new IteratorSetting(30, "sum", SummingCombiner.class); jshell> LongCombiner.setEncodingType(scSetting, LongCombiner.Type.STRING); jshell> scSetting.addOption("columns", "hero:villainsCaptured"); jshell> client.tableOperations().checkIteratorConflicts("GothamCrimeStats", scSetting, EnumSet.allOf(IteratorScope.class)); jshell> client.tableOperations().attachIterator("GothamCrimeStats", scSetting); -</code></pre> +</code></pre></div></div> <p>Let’s scan again and see what results we get.</p> -<pre><code class="language-commandline">jshell> try ( org.apache.accumulo.core.client.Scanner scan = client.createScanner("GothamCrimeStats", Authorizations.EMPTY)) { +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> try ( org.apache.accumulo.core.client.Scanner scan = client.createScanner("GothamCrimeStats", Authorizations.EMPTY)) { ...> for(Map.Entry<Key, Value> entry : scan) { ...> System.out.printf("Key : %-52s Value : %s\n", entry.getKey(), entry.getValue()); ...> } @@ -254,11 +254,11 @@ Key : id0001 hero:alias [] 1654699186182 false Value : Batman Key : id0001 hero:villainsCaptured [] 1654699186182 false Value : 8 Key : id0002 hero:alias [] 1654699186182 false Value : Robin Key : id0002 hero:villainsCaptured [] 1654699186182 false Value : 3 -</code></pre> +</code></pre></div></div> <p>Adding additional statistics will result in a continual update of the relevant statistic.</p> -<pre><code class="language-commandline">jshell> mutation1 = new Mutation("id0001"); +<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>jshell> mutation1 = new Mutation("id0001"); jshell> mutation1.put("hero", "villainsCaptured", "4"); jshell> mutation2 = new Mutation("id0002"); jshell> mutation2.put("hero", "villainsCaptured", "2"); @@ -277,7 +277,7 @@ Key : id0001 hero:alias [] 1654779673027 false Value : Batman Key : id0001 hero:villainsCaptured [] 1654780041402 false Value : 12 Key : id0002 hero:alias [] 1654779673027 false Value : Robin Key : id0002 hero:villainsCaptured [] 1654780041402 false Value : 5 -</code></pre> +</code></pre></div></div> </div>