Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code block languages #407

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _docs-2/administration/multivolume.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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.

```xml
```
instance.volumes.replacements=hdfs://ns1:9001 hdfs://nsA:9001, hdfs://ns2:9001 hdfs://nsB:9001
```

Expand Down
20 changes: 10 additions & 10 deletions _docs-2/administration/replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To configure a peer with the name `peer1` which is an Accumulo system with an in
and a ZooKeeper quorum of `10.0.0.1,10.0.2.1,10.0.3.1`, invoke the following
command in the shell.

```
```console
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
```
Expand All @@ -83,7 +83,7 @@ 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.

```
```console
root@accumulo_primary> config -s replication.peer.user.peer1=replication
root@accumulo_primary> config -s replication.peer.password.peer1=password
```
Expand All @@ -93,7 +93,7 @@ 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.

```
```console
accumulo@EXAMPLE.COM@accumulo_primary> config -s replication.peer.user.peer1=replication@EXAMPLE.COM
accumulo@EXAMPLE.COM@accumulo_primary> config -s replication.peer.keytab.peer1=/path/to/replication.keytab
```
Expand All @@ -107,7 +107,7 @@ cluster, this is a table ID. In this example, we want to enable replication on
`my_table` and configure our peer `accumulo_peer` as a target, sending
the data to the table with an ID of `2` in `accumulo_peer`.

```
```console
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
```
Expand Down Expand Up @@ -225,7 +225,7 @@ The rest of the configuration is dynamic and is best configured on the fly (in Z
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

```
```console
root@peer> createtable my_table
root@peer> createuser peer
root@peer> grant -t my_table -u peer Table.WRITE
Expand All @@ -241,7 +241,7 @@ Next, configure the primary instance.

#### Set up the table

```
```console
root@primary> createtable my_table
```

Expand All @@ -252,7 +252,7 @@ that we want to use, and the configuration for the [AccumuloReplicaSystem]. In t
Instance name for `peer` and the ZooKeeper quorum string. The configuration key is of the form
`replication.peer.$peer_name`.

```
```console
root@primary> config -s replication.peer.peer=org.apache.accumulo.tserver.replication.AccumuloReplicaSystem,peer,$peer_zk_quorum
```

Expand All @@ -261,7 +261,7 @@ root@primary> config -s replication.peer.peer=org.apache.accumulo.tserver.replic
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".

```
```console
root@primary> config -s replication.peer.user.peer=peer
root@primary> config -s replication.peer.password.peer=peer
```
Expand All @@ -276,13 +276,13 @@ The configuration for the AccumuloReplicaSystem is the table ID for the table on
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".

```
```console
root@primary> config -t my_table -s table.replication.target.peer=$peer_table_id
```

Finally, we can enable replication on this table.

```
```console
root@primary> config -t my_table -s table.replication=true
```

Expand Down
2 changes: 1 addition & 1 deletion _docs-2/configuration/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Accumulo's current configuration can be viewed in the shell using the `config` c
Below is an example shell output from viewing configuration for the table `foo`. Please note how `table.compaction.major.ratio`
is set in multiple locations, but the value `1.6` set in the `table` scope is used because it has the highest precedence.

```
```console
root@accumulo-instance> config -t foo
---------+---------------------------------------------+-----------------------
SCOPE | NAME | VALUE
Expand Down
126 changes: 64 additions & 62 deletions _docs-2/development/summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,80 +71,82 @@ class has options for creating RFiles with embedded summary data.

This example walks through using summarizers in the Accumulo shell. Below, a
table is created and some data is inserted to summarize.

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
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
3b503bd name:first [] John
3b503bd name:last [] Doe
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
```console
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
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
3b503bd name:first [] John
3b503bd name:last [] Doe
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
```

After inserting the data, summaries are requested below. No summaries are returned.

root@uno summary_test> summaries
```console
root@uno summary_test> summaries
```

The visibility summarizer is configured below and the table is flushed.
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 `c:` prefix are visibilities. The others are generic
statistics created by the CountingSummarizer that VisibilitySummarizer extends.

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 {}
File Statistics : [total:1, missing:0, extra:0, large:0]
Summary Statistics :
c: = 4
c:PI = 1
c:PI&GEO = 2
c:PI&TIME = 3
emitted = 10
seen = 10
tooLong = 0
tooMany = 0

```console
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 {}
File Statistics : [total:1, missing:0, extra:0, large:0]
Summary Statistics :
c: = 4
c:PI = 1
c:PI&GEO = 2
c:PI&TIME = 3
emitted = 10
seen = 10
tooLong = 0
tooMany = 0
```
VisibilitySummarizer has an option `maxCounters` 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 `tooMany` statistic is 4. This is the number of
visibilities that were not counted.

```
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
```console
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
```

Another summarizer is configured below that tracks the number of deletes. Also,
Expand All @@ -155,7 +157,7 @@ configurable. Below a delete is added and it's reflected in the statistics. In
this case there is 1 delete and 10 non-deletes, not enough to force a
compaction of the tablet.

```
```console
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 ...
Expand Down Expand Up @@ -191,7 +193,7 @@ 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.

```
```console
root@uno summary_test> deletemany -r d5d18dd -f
[DELETED] d5d18dd contact:address [PI&GEO]
[DELETED] d5d18dd name:first []
Expand Down
6 changes: 3 additions & 3 deletions _docs-2/getting-started/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ If an [accumulo-client.properties] file or a Java Properties object is used to c

If a token class is used for `auth.type`, you can create a Base64 encoded token using the `accumulo create-token` command.

```
```console
$ accumulo create-token
Username (aka principal): root
the password for the principal: ******
Expand Down Expand Up @@ -187,11 +187,11 @@ These levels are:
Durability can be set in multiple ways:

1. The default durability of all tables can be set using [table.durability].
```
```console
root@uno> config -s table.durability=flush
```
2. The default durability of a table can be overriden by setting [table.durability] for that table.
```
```console
root@uno> config -t mytable -s table.durability=sync
```
3. When creating an [AccumuloClient], the default durability can be overridden using `withBatchWriterConfig()`
Expand Down
61 changes: 33 additions & 28 deletions _docs-2/getting-started/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,38 @@ and then display the following prompt:
## Basic Administration

The `tables` command will list all existing tables.

root@myinstance> tables
accumulo.metadata
accumulo.root
```console
root@myinstance> tables
accumulo.metadata
accumulo.root
```

The `createtable` command creates a new table.

root@myinstance> createtable mytable
root@myinstance mytable> tables
accumulo.metadata
accumulo.root
mytable
```console
root@myinstance> createtable mytable
root@myinstance mytable> tables
accumulo.metadata
accumulo.root
mytable
```

The `deletetable` command deletes a table.

root@myinstance testtable> deletetable testtable
deletetable { testtable } (yes|no)? yes
Table: [testtable] has been deleted.
```console
root@myinstance testtable> deletetable testtable
deletetable { testtable } (yes|no)? yes
Table: [testtable] has been deleted.
```

The shell can be used to insert updates and scan tables. This is useful for inspecting tables.
```console
root@myinstance mytable> scan

root@myinstance mytable> scan

root@myinstance mytable> insert row1 colf colq value1
insert successful
root@myinstance mytable> insert row1 colf colq value1
insert successful

root@myinstance mytable> scan
row1 colf:colq [] value1
root@myinstance mytable> scan
row1 colf:colq [] value1
```

The value in brackets `[]` would be the visibility labels. Since none were used, this is empty for this row.
You can use the `-st` option to scan to see the timestamp for the cell, too.
Expand All @@ -64,24 +68,25 @@ You can use the `-st` option to scan to see the timestamp for the cell, too.

The `compact` command instructs Accumulo to schedule a compaction of the table during which
files are consolidated and deleted entries are removed.

root@myinstance mytable> compact -t mytable
07 16:13:53,201 [shell.Shell] INFO : Compaction of table mytable started for given range
```console
root@myinstance mytable> compact -t mytable
07 16:13:53,201 [shell.Shell] INFO : Compaction of table mytable started for given range
```

If needed, the compaction can be canceled using `compact --cancel -t mytable`.

The `flush` command instructs Accumulo to write all entries currently in memory for a given table
to disk.

root@myinstance mytable> flush -t mytable
07 16:14:19,351 [shell.Shell] INFO : Flush of table mytable
initiated...
```console
root@myinstance mytable> flush -t mytable
07 16:14:19,351 [shell.Shell] INFO : Flush of table mytable initiated...
```

## User Administration

The Shell can be used to add, remove, and grant privileges to users.

```
```console
root@myinstance mytable> createuser bob
Enter new password for 'bob': *********
Please confirm new password for 'bob': *********
Expand Down
Loading