Skip to content
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
11 changes: 6 additions & 5 deletions docs/combiner.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ This tutorial uses the following Java class, which can be found in org.apache.ac

* [StatsCombiner.java] - a combiner that calculates max, min, sum, and count

This is a simple combiner example. To build this example run maven and then
copy the produced jar into the accumulo lib dir. This is already done in the
tar distribution.
This is a simple combiner example. Before running it, follow the
[setup instructions](../README.md#setup-instructions) so the examples jar is
available to Accumulo. Restart your Accumulo instance to ensure the jar is
picked up by the servers.

$ bin/accumulo shell -u username
$ accumulo shell -u root
Enter current password for 'username'@'instance': ***

Shell - Apache Accumulo Interactive Shell
-
- version: 2.1.0-SNAPSHOT
- version: 4.0.0-SNAPSHOT
- instance name: instance
- instance id: 00000000-0000-0000-0000-000000000000
-
Expand Down
23 changes: 13 additions & 10 deletions docs/deleteKeyValuePair.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
This example shows how Accumulo internals handle removing a key-value pair

```
$ /path/to/accumulo shell -u username -p secret
$ accumulo shell --user root --password secret
username@instance> createnamespace examples
username@instance> createtable examples.deleteKeyValuePair
username@instance examples.deleteKeyValuePair> insert 567890 name first Joe
Expand Down Expand Up @@ -53,13 +53,14 @@ Scan accumulo.metadata table to see the list of RFiles Accumulo is currently usi

```
username@instance examples.deleteKeyValuePair> scan -t accumulo.metadata -c file -r 1t<
1t< file:hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007em.rf
1t< file:{"path":"hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007em.rf","startRow":"","endRow":""} [] 311,3

```

View the contents of RFile and verify each key-value pair's deletion flag is false.

```
$ /path/to/accumulo rfile-info -d hdfs://localhost/accumulo/tables/1t/default_tablet/F00007em.rf
$ accumulo file rfile-info -d hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007em.rf
RFile Version : 8

Locality group : <DEFAULT>
Expand Down Expand Up @@ -87,20 +88,21 @@ Meta block : RFile.index
Delete a key-value pair and view a newly created RFile to verify the deletion flag is true.

```
$ /path/to/accumulo shell -u username -p secret
$ accumulo shell --user root --password secret
username@instance> table examples.deleteKeyValuePair
username@instance examples.deleteKeyValuePair> delete 567890 name first
username@instance examples.deleteKeyValuePair> flush -w
```

```
username@instance examples.deleteKeyValuePair> scan -t accumulo.metadata -c file -r 1t<
1t< file:hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007em.rf
1t< file:hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007fq.rf
1t< file:{"path":"hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007em.rf","startRow":"","endRow":""} [] 311,3
1t< file:{"path":"hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007fg.rf","startRow":"","endRow":""} [] 230,1

```

```
$ /path/to/accumulo rfile-info -d hdfs://localhost/accumulo/tables/1t/default_tablet/F00007fq.rf
$ accumulo file rfile-info -d hdfs://localhost:8020/accumulo/tables/1t/default_tablet/F00007fq.rf
RFile Version : 8

Locality group : <DEFAULT>
Expand All @@ -127,7 +129,7 @@ Meta block : RFile.index
Compact the RFiles and verify the key-value pair was removed. The new RFile will start with 'A'.

```
$ /path/to/accumulo shell -u username -p secret
$ accumulo shell --user root --password secret
username@instance> compact -t examples.deleteKeyValuePair -w
2019-04-17 08:17:15,468 [shell.Shell] INFO : Compacting table ...
2019-04-17 08:17:16,143 [shell.Shell] INFO : Compaction of table examples.deleteKeyValuePair
Expand All @@ -136,11 +138,12 @@ completed for given range

```
username@instance> scan -t accumulo.metadata -c file -r 1t<
lt< file:hdfs://localhost:8020/accumulo/tables/1t/default_tablet/A00007g1.rf
1t< file:{"path":"hdfs://localhost:8020/accumulo/tables/1t/default_tablet/A00007g1.rf","startRow":"","endRow":""} [] 293,2

```

```
$ /path/to/accumulo rfile-info -v hdfs://localhost/accumulo/tables/1t/default_tablet/A00007g1.rf
$ accumulo file rfile-info -v hdfs://localhost:8020/accumulo/tables/1t/default_tablet/A00007g1.rf
RFile Version : 8

Locality group : <DEFAULT>
Expand Down
Loading