[accumulo] branch 1.10 updated: Update formatter plugin version
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch 1.10 in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/1.10 by this push: new c03d770 Update formatter plugin version c03d770 is described below commit c03d770d771e7a9f7d868a9525f275b9a1b80c46 Author: Christopher Tubbs AuthorDate: Tue Sep 1 13:45:54 2020 -0400 Update formatter plugin version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c159579..b144c42 100644 --- a/pom.xml +++ b/pom.xml @@ -751,7 +751,7 @@ net.revelc.code.formatter formatter-maven-plugin - 2.11.0 + 2.12.2 ${eclipseFormatterStyle} ${maven.compiler.source}
[accumulo] branch main updated (72e8bc4 -> c997ab7)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git. from 72e8bc4 Use more precise imports for MetadataSchema (#1697) new c03d770 Update formatter plugin version new c997ab7 Merge branch '1.10' into main The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[accumulo] 01/01: Merge branch '1.10' into main
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git commit c997ab7017c6d03bed7f02384f09b41e97ff2b06 Merge: 72e8bc4 c03d770 Author: Christopher Tubbs AuthorDate: Tue Sep 1 13:50:21 2020 -0400 Merge branch '1.10' into main pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[accumulo] branch main updated: Check namespace perm for fast-failure in InputConfigurator (#1693)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new cfd8d44 Check namespace perm for fast-failure in InputConfigurator (#1693) cfd8d44 is described below commit cfd8d4481f16880e17e2f5a3247628ab9d409f88 Author: tynyttie AuthorDate: Tue Sep 1 11:54:59 2020 -0400 Check namespace perm for fast-failure in InputConfigurator (#1693) --- .../mapreduce/lib/InputConfigurator.java | 24 ++-- .../org/apache/accumulo/test/NamespacesIT.java | 26 ++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/lib/InputConfigurator.java b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/lib/InputConfigurator.java index 1e6d3e0..9155235 100644 --- a/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/lib/InputConfigurator.java +++ b/hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/lib/InputConfigurator.java @@ -67,6 +67,7 @@ import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema; import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl; import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.NamespacePermission; import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.core.util.Pair; import org.apache.accumulo.core.util.TextUtil; @@ -717,6 +718,15 @@ public class InputConfigurator extends ConfiguratorBase { } } + private static String extractNamespace(final String tableName) { +final int delimiterPos = tableName.indexOf('.'); +if (delimiterPos < 1) { + return ""; // default namespace +} else { + return tableName.substring(0, delimiterPos); +} + } + /** * Validates that the user has permissions on the requested tables * @@ -731,6 +741,7 @@ public class InputConfigurator extends ConfiguratorBase { public static void validatePermissions(Class implementingClass, Configuration conf, AccumuloClient client) throws IOException { Map inputTableConfigs = getInputTableConfigs(implementingClass, conf); + try { if (getInputTableConfigs(implementingClass, conf).isEmpty()) throw new IOException("No table set."); @@ -739,10 +750,19 @@ public class InputConfigurator extends ConfiguratorBase { String principal = ClientProperty.AUTH_PRINCIPAL.getValue(props); for (Map.Entry tableConfig : inputTableConfigs.entrySet()) { -if (!client.securityOperations().hasTablePermission(principal, tableConfig.getKey(), -TablePermission.READ)) + +final String tableName = tableConfig.getKey(); +final String namespace = extractNamespace(tableName); +final boolean hasTableRead = client.securityOperations().hasTablePermission(principal, +tableName, TablePermission.READ); +final boolean hasNamespaceRead = client.securityOperations() +.hasNamespacePermission(principal, namespace, NamespacePermission.READ); + +if (!hasTableRead && !hasNamespaceRead) { throw new IOException("Unable to access table"); +} } + for (Map.Entry tableConfigEntry : inputTableConfigs.entrySet()) { InputTableConfig tableConfig = tableConfigEntry.getValue(); if (!tableConfig.shouldUseLocalIterators()) { diff --git a/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java b/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java index 4a5eda1..c40a271 100644 --- a/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java +++ b/test/src/main/java/org/apache/accumulo/test/NamespacesIT.java @@ -964,6 +964,32 @@ public class NamespacesIT extends SharedMiniClusterBase { } @Test + public void validatePermissions() throws Exception { +// Create namespace. +c.namespaceOperations().create(namespace); + +assertTrue(c.securityOperations().hasNamespacePermission(c.whoami(), namespace, +NamespacePermission.READ)); +c.securityOperations().revokeNamespacePermission(c.whoami(), namespace, +NamespacePermission.READ); +assertFalse(c.securityOperations().hasNamespacePermission(c.whoami(), namespace, +NamespacePermission.READ)); +c.securityOperations().grantNamespacePermission(c.whoami(), namespace, +NamespacePermission.READ); +assertTrue(c.securityOperations().hasNamespacePermission(c.whoami(), namespace, +NamespacePermission.READ)); + +c.namespaceOperations().delete(namespace); + +assertSecurityException(SecurityErrorCode.NAMESPACE_DOESNT_EXIST, () -> c.securityOperations() +.hasNamespacePermission(c.whoami(), nam
[accumulo] branch main updated: Removed javadoc references to deprecated classes (#1694)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new 6942407 Removed javadoc references to deprecated classes (#1694) 6942407 is described below commit 69424078c23b13fd73a833909b9471fde9c3446e Author: cradal <20303105+cra...@users.noreply.github.com> AuthorDate: Tue Sep 1 11:34:33 2020 -0400 Removed javadoc references to deprecated classes (#1694) --- .../java/org/apache/accumulo/core/client/admin/TableOperations.java | 4 ++-- .../accumulo/core/client/admin/compaction/TooManyDeletesSelector.java | 1 - .../org/apache/accumulo/core/iterators/user/IndexedDocIterator.java | 3 +-- .../org/apache/accumulo/core/iterators/user/IntersectingIterator.java | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java index 866f4cc..ea7ce2e 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java +++ b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java @@ -674,7 +674,7 @@ public interface TableOperations { /** * Bulk import all the files in a directory into a table. Files can be created using - * {@code AccumuloFileOutputFormat} and {@link RFile#newWriter()} + * {@link RFile#newWriter()} * * @param tableName * the name of the table @@ -784,7 +784,7 @@ public interface TableOperations { /** * Bulk import the files in a directory into a table. Files can be created using - * {@code AccumuloFileOutputFormat} and {@link RFile#newWriter()}. + * {@link RFile#newWriter()}. * * This new method of bulk import examines files in the current process outside of holding a table * lock. The old bulk import method ({@link #importDirectory(String, String, String, boolean)}) diff --git a/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/TooManyDeletesSelector.java b/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/TooManyDeletesSelector.java index 1c9a419..881004c 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/TooManyDeletesSelector.java +++ b/core/src/main/java/org/apache/accumulo/core/client/admin/compaction/TooManyDeletesSelector.java @@ -56,7 +56,6 @@ import org.apache.accumulo.core.client.summary.summarizers.DeletesSummarizer; * * * Bulk files can be generated with summary information by calling - * {@code AccumuloFileOutputFormat#setSummarizers(JobConf, SummarizerConfiguration...)} or * {@link WriterOptions#withSummarizers(SummarizerConfiguration...)} * * diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/IndexedDocIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/IndexedDocIterator.java index cd92e2b..7d568fe 100644 --- a/core/src/main/java/org/apache/accumulo/core/iterators/user/IndexedDocIterator.java +++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/IndexedDocIterator.java @@ -56,8 +56,7 @@ import org.slf4j.LoggerFactory; * * row: shardID, colfam: indexColf, colqual: doctype\0docID\0info, value: doc * - * This iterator is commonly used with BatchScanner or AccumuloInputFormat, to parallelize the - * search over all shardIDs. + * This iterator is commonly used with BatchScanner to parallelize the search over all shardIDs. */ public class IndexedDocIterator extends IntersectingIterator { private static final Logger log = LoggerFactory.getLogger(IndexedDocIterator.class); diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java b/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java index a3afa4e..952d019 100644 --- a/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java +++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/IntersectingIterator.java @@ -51,8 +51,7 @@ import org.apache.hadoop.io.Text; * * row: shardID, colfam: (empty), colqual: docID * - * This iterator is commonly used with BatchScanner or AccumuloInputFormat, to parallelize the - * search over all shardIDs. + * This iterator is commonly used with BatchScanner to parallelize the search over all shardIDs. * * This iterator will *ignore* any columnFamilies passed to * {@link #seek(Range, Collection, boolean)} as it performs intersections over terms. Extending
[accumulo] branch main updated: Update Last Location. Fix #1169 (#1616)
This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new 1c0f8df Update Last Location. Fix #1169 (#1616) 1c0f8df is described below commit 1c0f8df4ebf7ecb75cde889b32fcdbcfeaf4689d Author: Jeffrey Manno AuthorDate: Tue Sep 1 11:26:15 2020 -0400 Update Last Location. Fix #1169 (#1616) --- .../java/org/apache/accumulo/server/master/state/MetaDataStateStore.java | 1 + .../java/org/apache/accumulo/test/functional/MasterAssignmentIT.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java index 6adef3d..dfbb598 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java +++ b/server/base/src/main/java/org/apache/accumulo/server/master/state/MetaDataStateStore.java @@ -66,6 +66,7 @@ class MetaDataStateStore implements TabletStateStore { for (Assignment assignment : assignments) { Mutation m = new Mutation(assignment.tablet.getMetadataEntry()); assignment.server.putLocation(m); +assignment.server.putLastLocation(m); assignment.server.clearFutureLocation(m); SuspendingTServer.clearSuspension(m); writer.addMutation(m); diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java index 69601c4..ec4b46c 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java @@ -56,7 +56,6 @@ public class MasterAssignmentIT extends AccumuloClusterHarness { UtilWaitThread.sleep(250); newTablet = getTabletLocationState(c, tableId); } while (newTablet.current == null); - assertNull(newTablet.last); assertNull(newTablet.future); // put something in it