From c46508f413b748a0e9d7bbe3a43b253ef8d43dfc Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Thu, 4 Jun 2026 09:45:49 -0500 Subject: [PATCH 1/6] Updated commands in Classpath Example that were outdated --- docs/classpath.md | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/docs/classpath.md b/docs/classpath.md index e12df09..ef66b66 100644 --- a/docs/classpath.md +++ b/docs/classpath.md @@ -19,30 +19,16 @@ limitations under the License. This example shows how to use per table classpaths. The example leverages a test jar which contains a Filter that suppresses rows containing "foo". The example shows copying the FooFilter.jar into HDFS and then making an Accumulo -table reference that jar. For this example, a directory, `/user1/lib`, is -assumed to exist in HDFS. - -Create `/user1/lib` in HDFS if it does not exist. - - hadoop fs -mkdir -p /user1/lib - -Execute the following command in the shell. Note that the `FooFilter.jar` -is located within the Accumulo source distribution. - - $ hadoop fs -copyFromLocal /path/to/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar /user1/lib - -Execute following in Accumulo shell to setup classpath context - - root@uno> config -s general.vfs.context.classpath.cx1=hdfs://:/user1/lib/[^.].*.jar - +table reference that jar. For this example. + Create a namespace and table root@uno> createnamespace examples root@uno> createtable examples.nofoo -The following command makes this table use the configured classpath context +The following command makes this table use the configured classpath context to `FooFilter.jar` - root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=cx1 + root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar The following command configures an iterator that's in FooFilter.jar @@ -66,7 +52,8 @@ use cx1. root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter 2013-05-03 12:49:35,943 [shell.Shell] ERROR: org.apache.accumulo.shell.ShellCommandException: Command could not be initialized (Unable to load org.apache.accumulo.test.FooFilter; class not found.) - root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=cx1 + root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=file:///github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar + root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter Filter accepts or rejects each Key/Value pair ----------> set FooFilter parameter negate, default false keeps k/v that pass accept method, true rejects k/v that pass accept method: false From 7c2145d9824ff52cfb410d43087ef19861ebb221 Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Thu, 4 Jun 2026 09:51:45 -0500 Subject: [PATCH 2/6] Fixing text --- docs/classpath.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/classpath.md b/docs/classpath.md index ef66b66..b213542 100644 --- a/docs/classpath.md +++ b/docs/classpath.md @@ -17,10 +17,8 @@ limitations under the License. # Apache Accumulo Classpath Example This example shows how to use per table classpaths. The example leverages a -test jar which contains a Filter that suppresses rows containing "foo". The -example shows copying the FooFilter.jar into HDFS and then making an Accumulo -table reference that jar. For this example. - +test jar which contains a Filter that suppresses rows containing "foo". + Create a namespace and table root@uno> createnamespace examples From ab8a9939b2c483404269f4314c500b00bab8da7c Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Thu, 4 Jun 2026 11:04:46 -0500 Subject: [PATCH 3/6] Updates made from comments --- docs/classpath.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/classpath.md b/docs/classpath.md index b213542..63b45f6 100644 --- a/docs/classpath.md +++ b/docs/classpath.md @@ -17,7 +17,9 @@ limitations under the License. # Apache Accumulo Classpath Example This example shows how to use per table classpaths. The example leverages a -test jar which contains a Filter that suppresses rows containing "foo". +test jar which contains a Filter that suppresses rows containing "foo". The +example shows configuring a table to reference the jar using the built-in +URL-based context class loader. Create a namespace and table @@ -26,7 +28,7 @@ Create a namespace and table The following command makes this table use the configured classpath context to `FooFilter.jar` - root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar + root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///path/to/github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar The following command configures an iterator that's in FooFilter.jar @@ -43,14 +45,14 @@ The commands below show the filter is working. root@uno examples.nofoo> Below, an attempt is made to add the FooFilter to a table that's not configured -to use the classpath context cx1. This fails until the table is configured to -use cx1. +to use the jar URL as its classpath context. This fails until the table is configured to +use the jar URL. root@uno examples.nofoo> createtable examples.nofootwo root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter 2013-05-03 12:49:35,943 [shell.Shell] ERROR: org.apache.accumulo.shell.ShellCommandException: Command could not be initialized (Unable to load org.apache.accumulo.test.FooFilter; class not found.) - root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=file:///github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar + root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=file:///path/to/github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter Filter accepts or rejects each Key/Value pair From c360e3553d3c7407b2e807f49914e574a5960c0f Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Thu, 4 Jun 2026 11:25:42 -0500 Subject: [PATCH 4/6] More updates from comments --- docs/classpath.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/classpath.md b/docs/classpath.md index 63b45f6..6caafcd 100644 --- a/docs/classpath.md +++ b/docs/classpath.md @@ -19,14 +19,15 @@ limitations under the License. This example shows how to use per table classpaths. The example leverages a test jar which contains a Filter that suppresses rows containing "foo". The example shows configuring a table to reference the jar using the built-in -URL-based context class loader. +URL-based context class loader. Note that the `FooFilter.jar` +is located within the Accumulo source distribution. Create a namespace and table root@uno> createnamespace examples root@uno> createtable examples.nofoo -The following command makes this table use the configured classpath context to `FooFilter.jar` +The following command makes this table use the jar URL as its class loader context. root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///path/to/github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar From 77e2f0d8ba3472a835db00401d631d3cd865b706 Mon Sep 17 00:00:00 2001 From: Amanda Villarreal Date: Thu, 4 Jun 2026 11:58:49 -0500 Subject: [PATCH 5/6] Remvoing github from directories --- docs/classpath.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/classpath.md b/docs/classpath.md index 6caafcd..8428cc6 100644 --- a/docs/classpath.md +++ b/docs/classpath.md @@ -29,7 +29,7 @@ Create a namespace and table The following command makes this table use the jar URL as its class loader context. - root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///path/to/github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar + root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///path/to/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar The following command configures an iterator that's in FooFilter.jar @@ -53,7 +53,7 @@ use the jar URL. root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter 2013-05-03 12:49:35,943 [shell.Shell] ERROR: org.apache.accumulo.shell.ShellCommandException: Command could not be initialized (Unable to load org.apache.accumulo.test.FooFilter; class not found.) - root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=file:///path/to/github/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar + root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=file:///path/to/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter Filter accepts or rejects each Key/Value pair From 379104ded3de81ee97b8989cf1247d74395e3485 Mon Sep 17 00:00:00 2001 From: Dom Garguilo Date: Fri, 5 Jun 2026 12:43:44 -0400 Subject: [PATCH 6/6] Small wording tweaks --- docs/classpath.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/classpath.md b/docs/classpath.md index 8428cc6..2b43d7c 100644 --- a/docs/classpath.md +++ b/docs/classpath.md @@ -18,16 +18,16 @@ limitations under the License. This example shows how to use per table classpaths. The example leverages a test jar which contains a Filter that suppresses rows containing "foo". The -example shows configuring a table to reference the jar using the built-in -URL-based context class loader. Note that the `FooFilter.jar` -is located within the Accumulo source distribution. +example shows configuring a table to load classes from the jar using the +URL-based context class loader. Note that the `FooFilter.jar` is located within +the Accumulo source distribution. Create a namespace and table root@uno> createnamespace examples root@uno> createtable examples.nofoo -The following command makes this table use the jar URL as its class loader context. +The following command configures the table to load classes from the jar URL. root@uno examples.nofoo> config -t examples.nofoo -s table.class.loader.context=file:///path/to/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar @@ -46,17 +46,15 @@ The commands below show the filter is working. root@uno examples.nofoo> Below, an attempt is made to add the FooFilter to a table that's not configured -to use the jar URL as its classpath context. This fails until the table is configured to -use the jar URL. +to load classes from the jar URL. This fails until the table is configured with +the jar URL. root@uno examples.nofoo> createtable examples.nofootwo root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter 2013-05-03 12:49:35,943 [shell.Shell] ERROR: org.apache.accumulo.shell.ShellCommandException: Command could not be initialized (Unable to load org.apache.accumulo.test.FooFilter; class not found.) root@uno examples.nofootwo> config -t examples.nofootwo -s table.class.loader.context=file:///path/to/accumulo/test/src/main/resources/org/apache/accumulo/test/FooFilter.jar - root@uno examples.nofootwo> setiter -n foofilter -p 10 -scan -minc -majc -class org.apache.accumulo.test.FooFilter Filter accepts or rejects each Key/Value pair ----------> set FooFilter parameter negate, default false keeps k/v that pass accept method, true rejects k/v that pass accept method: false -