From b4b89786efbcd1de510c6daafd72848a50dfe403 Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Wed, 10 Jun 2026 13:13:49 -0500 Subject: [PATCH 1/4] Updating commands in spark, reservations, terasort, and uniquecols --- docs/reservations.md | 6 +++--- docs/terasort.md | 2 +- docs/uniquecols.md | 20 ++++++++++---------- spark/README.md | 5 +++-- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/reservations.md b/docs/reservations.md index 4ce6672..0e31d7a 100644 --- a/docs/reservations.md +++ b/docs/reservations.md @@ -25,14 +25,14 @@ and trent to reserve room06 on 20140101. Bob ends up getting the reservation and everyone else is put on a wait list. The example code will take any string for what, when and who. - $ /path/to/accumulo org.apache.accumulo.server.util.ListInstances + $ accumulo inst list-instances Instance Name | Instance ID | Master ---------------------+--------------------------------------+------------------------------- | 9f8f2a97-432f-4e66-b153-861e2a1ca246 | localhost:9999 - $ /path/to/accumulo shell -u root -p secret -e "createnamespace examples" - $ /path/to/accumulo shell -u root -p secret -e "createtable examples.ars" + $ accumulo shell --user root --password secret --execute-command "createnamespace examples" + $ accumulo shell --user root --password secret --execute-command "createtable examples.ars" $ ./bin/runex reservations.ARS >connect localhost root secret examples.ars connected diff --git a/docs/terasort.md b/docs/terasort.md index 5539883..3ff7829 100644 --- a/docs/terasort.md +++ b/docs/terasort.md @@ -23,7 +23,7 @@ hadoop terasort benchmark. First, make sure the 'examples' namespace exists. If it already exists, the error message can be ignored. - $ accumulo shell -u root -p secret -e 'createnamespace examples' + $ accumulo shell --user root --password secret --execute-command 'createnamespace examples' This example is run with arguments describing the amount of data: diff --git a/docs/uniquecols.md b/docs/uniquecols.md index 7441fa2..b081d5e 100644 --- a/docs/uniquecols.md +++ b/docs/uniquecols.md @@ -24,7 +24,7 @@ Create a table and add rows that all have identical column family and column qualifiers. ``` -$ /path/to/accumulo shell -u username -p secret +$ accumulo shell --user root --password secret username@instance> createnamespace examples username@instance> createtable examples.unique username@instance examples.unique> insert row1 fam1 qual1 v1 @@ -58,15 +58,15 @@ will be spread among various `part-r-xxxxx` files. Go back to the shell and add some additional entries. ```text -$ /path/to/accumulo shell -u username -p secret -username@instance> table unique -username@instance example.unique> insert row1 fam2 qual2 v2 -username@instance example.unique> insert row1 fam3 qual2 v2 -username@instance example.unique> insert row1 fam2 qual2 v2 -username@instance example.unique> insert row2 fam2 qual2 v2 -username@instance example.unique> insert row3 fam2 qual2 v2 -username@instance example.unique> insert row3 fam3 qual3 v2 -username@instance example.unique> insert row3 fam3 qual4 v2 +$ accumulo shell --user root --password secret +username@instance> table examples.unique +username@instance examples.unique> insert row1 fam2 qual2 v2 +username@instance examples.unique> insert row1 fam3 qual2 v2 +username@instance examples.unique> insert row1 fam2 qual2 v2 +username@instance examples.unique> insert row2 fam2 qual2 v2 +username@instance examples.unique> insert row3 fam2 qual2 v2 +username@instance examples.unique> insert row3 fam3 qual3 v2 +username@instance examples.unique> insert row3 fam3 qual4 v2 ``` Re-running the command will now find any additional unique column values. diff --git a/spark/README.md b/spark/README.md index af19029..0709c47 100644 --- a/spark/README.md +++ b/spark/README.md @@ -36,9 +36,10 @@ a Spark application that does following: bulk import to Accumulo table 2. **Batchwriter** - Creates a `BatchWriter` in Spark code to write to the table. -This application can be run using the command: +This application can be run using the following commands: - ./run.sh batch /path/to/accumulo-client.properties + $ cd /path/to/accumulo-examples/spark + $ ./run.sh batch /path/to/accumulo-client.properties Change `batch` to `bulk` to use Bulk import method. From e4a24888f7464407d4f1e80e91a30a7087f8aafe Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Fri, 10 Jul 2026 15:07:04 -0500 Subject: [PATCH 2/4] updating imports for erroring ITs --- src/test/java/org/apache/accumulo/examples/ExamplesIT.java | 2 +- .../apache/accumulo/examples/filedata/ChunkInputStreamIT.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/accumulo/examples/ExamplesIT.java b/src/test/java/org/apache/accumulo/examples/ExamplesIT.java index 7de11a0..3c4c792 100644 --- a/src/test/java/org/apache/accumulo/examples/ExamplesIT.java +++ b/src/test/java/org/apache/accumulo/examples/ExamplesIT.java @@ -70,11 +70,11 @@ import org.apache.accumulo.examples.shard.Index; import org.apache.accumulo.examples.shard.Query; import org.apache.accumulo.examples.shard.Reverse; -import org.apache.accumulo.harness.AccumuloClusterHarness; import org.apache.accumulo.minicluster.MemoryUnit; import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.TestIngest; import org.apache.accumulo.test.TestIngest.IngestParams; +import org.apache.accumulo.test.harness.AccumuloClusterHarness; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; diff --git a/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputStreamIT.java b/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputStreamIT.java index d709a90..fa5ba09 100644 --- a/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputStreamIT.java +++ b/src/test/java/org/apache/accumulo/examples/filedata/ChunkInputStreamIT.java @@ -41,8 +41,8 @@ import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.security.ColumnVisibility; -import org.apache.accumulo.harness.AccumuloClusterHarness; import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl; +import org.apache.accumulo.test.harness.AccumuloClusterHarness; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text; import org.junit.jupiter.api.AfterEach; From 135f04d6f76eae0ad652c2306debd5d324c0e79a Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Mon, 13 Jul 2026 10:33:28 -0500 Subject: [PATCH 3/4] code review updates --- docs/reservations.md | 4 ++-- docs/terasort.md | 2 +- docs/uniquecols.md | 2 +- spark/README.md | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/reservations.md b/docs/reservations.md index 0e31d7a..022ac20 100644 --- a/docs/reservations.md +++ b/docs/reservations.md @@ -31,8 +31,8 @@ for what, when and who. ---------------------+--------------------------------------+------------------------------- | 9f8f2a97-432f-4e66-b153-861e2a1ca246 | localhost:9999 - $ accumulo shell --user root --password secret --execute-command "createnamespace examples" - $ accumulo shell --user root --password secret --execute-command "createtable examples.ars" + $ accumulo shell --user --password -e "createnamespace examples" + $ accumulo shell --user --password -e "createtable examples.ars" $ ./bin/runex reservations.ARS >connect localhost root secret examples.ars connected diff --git a/docs/terasort.md b/docs/terasort.md index 3ff7829..d1f5161 100644 --- a/docs/terasort.md +++ b/docs/terasort.md @@ -23,7 +23,7 @@ hadoop terasort benchmark. First, make sure the 'examples' namespace exists. If it already exists, the error message can be ignored. - $ accumulo shell --user root --password secret --execute-command 'createnamespace examples' + $ accumulo shell --user --password -e 'createnamespace examples' This example is run with arguments describing the amount of data: diff --git a/docs/uniquecols.md b/docs/uniquecols.md index b081d5e..504425d 100644 --- a/docs/uniquecols.md +++ b/docs/uniquecols.md @@ -24,7 +24,7 @@ Create a table and add rows that all have identical column family and column qualifiers. ``` -$ accumulo shell --user root --password secret +$ accumulo shell --user --password username@instance> createnamespace examples username@instance> createtable examples.unique username@instance examples.unique> insert row1 fam1 qual1 v1 diff --git a/spark/README.md b/spark/README.md index 0709c47..6887f2c 100644 --- a/spark/README.md +++ b/spark/README.md @@ -36,9 +36,8 @@ a Spark application that does following: bulk import to Accumulo table 2. **Batchwriter** - Creates a `BatchWriter` in Spark code to write to the table. -This application can be run using the following commands: +This application can be run using the command: - $ cd /path/to/accumulo-examples/spark $ ./run.sh batch /path/to/accumulo-client.properties Change `batch` to `bulk` to use Bulk import method. From 55f995d7b3a4376ef4180802f60999e5e1c34913 Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Tue, 14 Jul 2026 12:05:24 -0500 Subject: [PATCH 4/4] Making all username password commands consistent --- docs/bloom.md | 2 +- docs/combiner.md | 2 +- docs/compactionStrategy.md | 14 +++++++------- docs/deleteKeyValuePair.md | 6 +++--- docs/dirlist.md | 2 +- docs/helloworld.md | 2 +- docs/isolation.md | 2 +- docs/uniquecols.md | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/bloom.md b/docs/bloom.md index b5961d7..0cc42ef 100644 --- a/docs/bloom.md +++ b/docs/bloom.md @@ -49,7 +49,7 @@ likely contain entries for the query, all files will be interrogated. You can verify the table has three or more r-files by looking in HDFS. To look in HDFS you will need the table ID, which can be found with the following shell command. - $ accumulo shell --user root --password secret -e 'tables -l' + $ accumulo shell --user --password -e 'tables -l' accumulo.metadata => !0 accumulo.root => +r examples.bloom_test1 => 2 diff --git a/docs/combiner.md b/docs/combiner.md index 3def8c4..2cd013b 100644 --- a/docs/combiner.md +++ b/docs/combiner.md @@ -25,7 +25,7 @@ This is a simple combiner example. Before running it, follow the available to Accumulo. Restart your Accumulo instance to ensure the jar is picked up by the servers. - $ accumulo shell -u root + $ accumulo shell -u Enter current password for 'username'@'instance': *** Shell - Apache Accumulo Interactive Shell diff --git a/docs/compactionStrategy.md b/docs/compactionStrategy.md index cbc7f15..404c2ef 100644 --- a/docs/compactionStrategy.md +++ b/docs/compactionStrategy.md @@ -97,12 +97,12 @@ If needed, `chop` compactions can be configured also. Generate some data and files in order to test the strategy: $ ./bin/runex client.SequentialBatchWriter -t examples.test1 --start 0 --num 1000 --size 50 - $ accumulo shell --user root --password secret -e "flush -t examples.test1" + $ accumulo shell --user --password -e "flush -t examples.test1" $ ./bin/runex client.SequentialBatchWriter -t examples.test1 --start 0 --num 2000 --size 50 - $ accumulo shell --user root --password secret -e "flush -t examples.test1" + $ accumulo shell --user --password -e "flush -t examples.test1" - $ accumulo shell --user root --password secret -e "compact -t examples.test1 -w" + $ accumulo shell --user --password -e "compact -t examples.test1 -w" View the `tserver` log in /logs for the compaction and find the name of the `rfile` that was compacted for your table. Print info about this file using the `rfile-info` tool. Replace the TableID with @@ -123,15 +123,15 @@ Meta block : RFile.index Continue to add additional data. $ ./bin/runex client.SequentialBatchWriter -t examples.test1 --start 0 --num 1000000 --size 50 - $ accumulo shell --user root --password secret -e "flush -t examples.test1" + $ accumulo shell --user --password -e "flush -t examples.test1" $ ./bin/runex client.SequentialBatchWriter -t examples.test1 --start 1000000 --num 1000000 --size 50 - $ accumulo shell --user root --password secret -e "flush -t examples.test1" + $ accumulo shell --user --password -e "flush -t examples.test1" $ ./bin/runex client.SequentialBatchWriter -t examples.test1 --start 2000000 --num 1000000 --size 50 - $ accumulo shell --user root --password secret -e "flush -t examples.test1" + $ accumulo shell --user --password -e "flush -t examples.test1" - $ accumulo shell --user root --password secret -e "compact -t examples.test1 -w" + $ accumulo shell --user --password -e "compact -t examples.test1 -w" Again, view the tserver log in /logs for the compaction and find the name of the `rfile` that was compacted for your table. Print info about this file using the `rfile-info` tool: diff --git a/docs/deleteKeyValuePair.md b/docs/deleteKeyValuePair.md index a312946..9eda831 100644 --- a/docs/deleteKeyValuePair.md +++ b/docs/deleteKeyValuePair.md @@ -19,7 +19,7 @@ limitations under the License. This example shows how Accumulo internals handle removing a key-value pair ``` -$ accumulo shell --user root --password secret +$ accumulo shell --user --password username@instance> createnamespace examples username@instance> createtable examples.deleteKeyValuePair username@instance examples.deleteKeyValuePair> insert 567890 name first Joe @@ -88,7 +88,7 @@ Meta block : RFile.index Delete a key-value pair and view a newly created RFile to verify the deletion flag is true. ``` -$ accumulo shell --user root --password secret +$ accumulo shell --user --password username@instance> table examples.deleteKeyValuePair username@instance examples.deleteKeyValuePair> delete 567890 name first username@instance examples.deleteKeyValuePair> flush -w @@ -129,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'. ``` -$ accumulo shell --user root --password secret +$ accumulo shell --user --password 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 diff --git a/docs/dirlist.md b/docs/dirlist.md index 9f80e90..1fafdfb 100644 --- a/docs/dirlist.md +++ b/docs/dirlist.md @@ -39,7 +39,7 @@ If you modify a file or add new files in the directory ingested (e.g. /local/use To browse the data ingested, use Viewer.java. Be sure to give the "username" user the authorizations to see the data (in this case, run - $ accumulo shell -u root -e 'setauths -u root -s exampleVis' + $ accumulo shell -u -e 'setauths -u -s exampleVis' then run the Viewer: diff --git a/docs/helloworld.md b/docs/helloworld.md index da52171..84ee97b 100644 --- a/docs/helloworld.md +++ b/docs/helloworld.md @@ -31,7 +31,7 @@ name or IP address of your server. http://localhost:9995/ -To view the entries, use the shell (run `accumulo shell --user root --password secret` to access it) to scan the table: +To view the entries, use the shell (run `accumulo shell --user --password ` to access it) to scan the table: username@instance> table examples.hellotable username@instance examples.hellotable> scan diff --git a/docs/isolation.md b/docs/isolation.md index 67927e5..aa2b87d 100644 --- a/docs/isolation.md +++ b/docs/isolation.md @@ -31,7 +31,7 @@ Below, Interference Test is run without isolation enabled for 5000 iterations and it reports problems. - $ accumulo shell --user root --password secret --execute-command 'createnamespace examples' + $ accumulo shell --user --password -e 'createnamespace examples' $ ./bin/runex isolation.InterferenceTest -t examples.isotest --iterations 50000 ERROR Columns in row 053 had multiple values [53, 4553] ERROR Columns in row 061 had multiple values [561, 61] diff --git a/docs/uniquecols.md b/docs/uniquecols.md index 504425d..48dc02a 100644 --- a/docs/uniquecols.md +++ b/docs/uniquecols.md @@ -58,7 +58,7 @@ will be spread among various `part-r-xxxxx` files. Go back to the shell and add some additional entries. ```text -$ accumulo shell --user root --password secret +$ accumulo shell --user --password username@instance> table examples.unique username@instance examples.unique> insert row1 fam2 qual2 v2 username@instance examples.unique> insert row1 fam3 qual2 v2