Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6E8332009F9 for ; Mon, 23 May 2016 09:44:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6D10E160A2B; Mon, 23 May 2016 07:44:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 777D9160A0F for ; Mon, 23 May 2016 09:44:45 +0200 (CEST) Received: (qmail 794 invoked by uid 500); 23 May 2016 07:44:44 -0000 Mailing-List: contact commits-help@sentry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sentry.apache.org Delivered-To: mailing list commits@sentry.apache.org Received: (qmail 784 invoked by uid 99); 23 May 2016 07:44:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 May 2016 07:44:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7B64BDFBE6; Mon, 23 May 2016 07:44:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: colin@apache.org To: commits@sentry.apache.org Date: Mon, 23 May 2016 07:44:44 -0000 Message-Id: <0ebc288958dd44f29cb9ce204b055356@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] sentry git commit: SENTRY-1289: Move exception to sentry-core-common module (Colin Ma, reviewed by Dapeng Sun) archived-at: Mon, 23 May 2016 07:44:47 -0000 Repository: sentry Updated Branches: refs/heads/master 6c453a098 -> f6f730c32 http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java index a3053ff..04e7ea9 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyProcessor.java @@ -27,17 +27,18 @@ import java.util.Map; import java.util.Set; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.Authorizable; import org.apache.sentry.core.common.utils.SentryConstants; +import org.apache.sentry.core.common.exception.SentrySiteConfigurationException; import org.apache.sentry.core.model.db.AccessConstants; import org.apache.sentry.core.common.utils.KeyValue; import org.apache.sentry.provider.common.AuthorizationComponent; -import org.apache.sentry.provider.db.SentryAccessDeniedException; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryInvalidInputException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; -import org.apache.sentry.provider.db.SentryThriftAPIMismatchException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryInvalidInputException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryThriftAPIMismatchException; import org.apache.sentry.provider.db.generic.service.persistent.PrivilegeObject; import org.apache.sentry.provider.db.generic.service.persistent.PrivilegeObject.Builder; import org.apache.sentry.provider.db.generic.service.persistent.SentryStoreLayer; @@ -47,7 +48,6 @@ import org.apache.sentry.provider.db.service.model.MSentryGMPrivilege; import org.apache.sentry.provider.db.service.model.MSentryRole; import org.apache.sentry.provider.db.service.persistent.CommitContext; import org.apache.sentry.provider.db.service.thrift.PolicyStoreConstants; -import org.apache.sentry.provider.db.service.thrift.SentryConfigurationException; import org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor; import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig; import org.apache.sentry.service.thrift.ServiceConstants.ThriftConstants; @@ -145,22 +145,22 @@ public class SentryGenericPolicyProcessor implements SentryGenericPolicyService. return true; } - public static SentryStoreLayer createStore(Configuration conf) throws SentryConfigurationException { + public static SentryStoreLayer createStore(Configuration conf) throws SentrySiteConfigurationException { SentryStoreLayer storeLayer = null; String store = conf.get(PolicyStoreConstants.SENTRY_GENERIC_POLICY_STORE, PolicyStoreConstants.SENTRY_GENERIC_POLICY_STORE_DEFAULT); if (Strings.isNullOrEmpty(store)) { - throw new SentryConfigurationException("sentry.generic.policy.store can not be empty"); + throw new SentrySiteConfigurationException("sentry.generic.policy.store can not be empty"); } try { storeLayer = createInstance(store, conf, SentryStoreLayer.class); } catch (Exception e) { - throw new SentryConfigurationException("Create sentryStore error: " + e.getMessage(), e); + throw new SentrySiteConfigurationException("Create sentryStore error: " + e.getMessage(), e); } return storeLayer; } - public static List createHandlers(Configuration conf) throws SentryConfigurationException { + public static List createHandlers(Configuration conf) throws SentrySiteConfigurationException { List handlers = Lists.newArrayList(); Iterable notificationHandlers = Splitter.onPattern("[\\s,]").trimResults() @@ -170,7 +170,7 @@ public class SentryGenericPolicyProcessor implements SentryGenericPolicyService. handlers.add(createInstance(notificationHandler, conf, NotificationHandler.class)); } } catch (Exception e) { - throw new SentryConfigurationException("Create notificationHandlers error: " + e.getMessage(), e); + throw new SentrySiteConfigurationException("Create notificationHandlers error: " + e.getMessage(), e); } return handlers; } http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClient.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClient.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClient.java index bf87d8b..11cdee7 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClient.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClient.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.ActiveRoleSet; import org.apache.sentry.core.common.Authorizable; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java index 744dcd7..ee6cdf7 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericServiceClientDefaultImpl.java @@ -31,7 +31,7 @@ import org.apache.hadoop.security.SaslRpcServer; import org.apache.hadoop.security.SaslRpcServer.AuthMethod; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.security.UserGroupInformation; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.ActiveRoleSet; import org.apache.sentry.core.common.Authorizable; import org.apache.sentry.core.model.db.AccessConstants; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryConfigToolSolr.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryConfigToolSolr.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryConfigToolSolr.java index 479add6..404adb8 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryConfigToolSolr.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/generic/tools/SentryConfigToolSolr.java @@ -26,7 +26,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.security.UserGroupInformation; import org.apache.sentry.core.common.Action; -import org.apache.sentry.core.common.SentryConfigurationException; +import org.apache.sentry.core.common.exception.SentryConfigurationException; import org.apache.sentry.core.common.utils.KeyValue; import org.apache.sentry.core.common.utils.SentryConstants; import org.apache.sentry.core.model.search.SearchPrivilegeModel; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java index 2a3bdfb..49459bd 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java @@ -46,21 +46,21 @@ import javax.jdo.Transaction; import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.utils.SentryConstants; +import org.apache.sentry.core.common.exception.SentrySiteConfigurationException; import org.apache.sentry.core.model.db.AccessConstants; import org.apache.sentry.core.model.db.DBModelAuthorizable.AuthorizableType; -import org.apache.sentry.provider.db.SentryAccessDeniedException; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryGrantDeniedException; -import org.apache.sentry.provider.db.SentryInvalidInputException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryGrantDeniedException; +import org.apache.sentry.core.common.exception.SentryInvalidInputException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.provider.db.service.model.MSentryGroup; import org.apache.sentry.provider.db.service.model.MSentryPrivilege; import org.apache.sentry.provider.db.service.model.MSentryRole; import org.apache.sentry.provider.db.service.model.MSentryUser; import org.apache.sentry.provider.db.service.model.MSentryVersion; -import org.apache.sentry.provider.db.service.thrift.SentryConfigurationException; import org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor; import org.apache.sentry.provider.db.service.thrift.TSentryActiveRoleSet; import org.apache.sentry.provider.db.service.thrift.TSentryAuthorizable; @@ -128,7 +128,7 @@ public class SentryStore { private Thread privCleanerThread = null; public SentryStore(Configuration conf) throws SentryNoSuchObjectException, - SentryAccessDeniedException, SentryConfigurationException, IOException { + SentryAccessDeniedException, SentrySiteConfigurationException, IOException { commitSequenceId = 0; this.conf = conf; Properties prop = new Properties(); @@ -146,7 +146,7 @@ public class SentryStore { if(passTmp != null) { pass = new String(passTmp); } else { - throw new SentryConfigurationException("Error reading " + ServerConfig.SENTRY_STORE_JDBC_PASS); + throw new SentrySiteConfigurationException("Error reading " + ServerConfig.SENTRY_STORE_JDBC_PASS); } String driverName = conf.get(ServerConfig.SENTRY_STORE_JDBC_DRIVER, http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java index 7b98dc9..223cc87 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreSchemaInfo.java @@ -26,7 +26,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; public class SentryStoreSchemaInfo { private static final String SQL_FILE_EXTENSION = ".sql"; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryConfigurationException.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryConfigurationException.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryConfigurationException.java deleted file mode 100644 index 0e5ad32..0000000 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryConfigurationException.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.sentry.provider.db.service.thrift; - -import org.apache.sentry.SentryUserException; - -public class SentryConfigurationException extends SentryUserException { - private static final long serialVersionUID = 1298632655835L; - public SentryConfigurationException(String msg) { - super(msg); - } - public SentryConfigurationException(String msg, Throwable t) { - super(msg, t); - } -} http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java index 46f4785..1e72b74 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.ActiveRoleSet; import org.apache.sentry.core.common.Authorizable; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java index b43f88b..1039e6e 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClientDefaultImpl.java @@ -34,7 +34,7 @@ import org.apache.hadoop.security.SaslRpcServer; import org.apache.hadoop.security.SaslRpcServer.AuthMethod; import org.apache.hadoop.security.SecurityUtil; import org.apache.hadoop.security.UserGroupInformation; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.ActiveRoleSet; import org.apache.sentry.core.common.Authorizable; import org.apache.sentry.core.model.db.AccessConstants; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java index bc453c3..3de1f65 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java @@ -29,18 +29,19 @@ import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; +import org.apache.sentry.core.common.exception.SentrySiteConfigurationException; import org.apache.sentry.core.model.db.AccessConstants; import org.apache.sentry.provider.common.GroupMappingService; import org.apache.sentry.core.common.utils.PolicyFileConstants; -import org.apache.sentry.provider.common.SentryGroupNotFoundException; -import org.apache.sentry.provider.db.SentryAccessDeniedException; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryInvalidInputException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryGroupNotFoundException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryInvalidInputException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.provider.db.SentryPolicyStorePlugin; import org.apache.sentry.provider.db.SentryPolicyStorePlugin.SentryPluginException; -import org.apache.sentry.provider.db.SentryThriftAPIMismatchException; +import org.apache.sentry.core.common.exception.SentryThriftAPIMismatchException; import org.apache.sentry.provider.db.log.entity.JsonLogEntity; import org.apache.sentry.provider.db.log.entity.JsonLogEntityFactory; import org.apache.sentry.provider.db.log.util.Constants; @@ -167,7 +168,7 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface { @VisibleForTesting static List createHandlers(Configuration conf) - throws SentryConfigurationException { + throws SentrySiteConfigurationException { List handlers = Lists.newArrayList(); Iterable notificationHandlers = Splitter.onPattern("[\\s,]").trimResults() .omitEmptyStrings().split(conf.get(PolicyStoreServerConfig.NOTIFICATION_HANDLERS, "")); @@ -176,11 +177,11 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface { try { clazz = Class.forName(notificationHandler); if (!NotificationHandler.class.isAssignableFrom(clazz)) { - throw new SentryConfigurationException("Class " + notificationHandler + " is not a " + + throw new SentrySiteConfigurationException("Class " + notificationHandler + " is not a " + NotificationHandler.class.getName()); } } catch (ClassNotFoundException e) { - throw new SentryConfigurationException("Value " + notificationHandler + + throw new SentrySiteConfigurationException("Value " + notificationHandler + " is not a class", e); } Preconditions.checkNotNull(clazz, "Error class cannot be null"); @@ -188,7 +189,7 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface { Constructor constructor = clazz.getConstructor(Configuration.class); handlers.add((NotificationHandler)constructor.newInstance(conf)); } catch (Exception e) { - throw new SentryConfigurationException("Error attempting to create " + notificationHandler, e); + throw new SentrySiteConfigurationException("Error attempting to create " + notificationHandler, e); } } return handlers; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java index 77655a2..d75e24b 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/tools/SentrySchemaTool.java @@ -47,9 +47,9 @@ import org.apache.commons.io.output.NullOutputStream; import org.apache.hadoop.conf.Configuration; import org.apache.hive.beeline.BeeLine; import org.apache.sentry.Command; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; +import org.apache.sentry.core.common.exception.SentrySiteConfigurationException; import org.apache.sentry.provider.db.service.persistent.SentryStoreSchemaInfo; -import org.apache.sentry.provider.db.service.thrift.SentryConfigurationException; import org.apache.sentry.provider.db.tools.SentrySchemaHelper.NestedScriptParser; import org.apache.sentry.service.thrift.SentryService; import org.apache.sentry.service.thrift.ServiceConstants; @@ -91,7 +91,7 @@ public class SentrySchemaTool { if(passTmp != null) { passWord = new String(passTmp); } else { - throw new SentryConfigurationException("Error reading " + ServiceConstants.ServerConfig.SENTRY_STORE_JDBC_PASS); + throw new SentrySiteConfigurationException("Error reading " + ServiceConstants.ServerConfig.SENTRY_STORE_JDBC_PASS); } try { http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ConnectionDeniedException.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ConnectionDeniedException.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ConnectionDeniedException.java deleted file mode 100644 index 02c5eb3..0000000 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ConnectionDeniedException.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.sentry.service.thrift; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.UnsupportedCallbackException; - -public class ConnectionDeniedException extends UnsupportedCallbackException { - - private static final long serialVersionUID = 653174214903923178L; - private String connectionPrincipal; - - public ConnectionDeniedException(Callback callback, String message, String connectionPrincipal) { - super(callback, message); - this.connectionPrincipal = connectionPrincipal; - } - - public String getConnectionPrincipal() { - return connectionPrincipal; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/GSSCallback.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/GSSCallback.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/GSSCallback.java index 38eb4be..b668b95 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/GSSCallback.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/GSSCallback.java @@ -26,6 +26,7 @@ import javax.security.sasl.AuthorizeCallback; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.SaslRpcServer; +import org.apache.sentry.core.common.exception.ConnectionDeniedException; import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig; public class GSSCallback extends SaslRpcServer.SaslGssCallbackHandler { http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java index a58fa41..d97a07e 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HAClientInvocationHandler.java @@ -25,7 +25,7 @@ import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.SecurityUtil; import org.apache.curator.x.discovery.ServiceInstance; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.provider.db.service.persistent.HAContext; import org.apache.sentry.provider.db.service.persistent.ServiceManager; import org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java index c466839..a35bf1d 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/PoolClientInvocationHandler.java @@ -25,7 +25,7 @@ import org.apache.commons.pool2.impl.AbandonedConfig; import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient; import org.apache.sentry.service.thrift.ServiceConstants.ClientConfig; import org.apache.thrift.transport.TTransportException; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Status.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Status.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Status.java index ed541d0..e9cc411 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Status.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/Status.java @@ -22,12 +22,12 @@ import java.io.StringWriter; import javax.annotation.Nullable; -import org.apache.sentry.SentryUserException; -import org.apache.sentry.provider.db.SentryAccessDeniedException; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryInvalidInputException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; -import org.apache.sentry.provider.db.SentryThriftAPIMismatchException; +import org.apache.sentry.core.common.exception.SentryUserException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryInvalidInputException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryThriftAPIMismatchException; import org.apache.sentry.service.thrift.ServiceConstants.ThriftConstants; /** http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestDelegateSentryStore.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestDelegateSentryStore.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestDelegateSentryStore.java index cfcbbd1..1ab5f03 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestDelegateSentryStore.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestDelegateSentryStore.java @@ -22,8 +22,8 @@ import static org.junit.Assert.fail; import java.util.Set; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.provider.file.PolicyFile; import org.junit.Before; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestPrivilegeOperatePersistence.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestPrivilegeOperatePersistence.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestPrivilegeOperatePersistence.java index deefefa..799d5ef 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestPrivilegeOperatePersistence.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/persistent/TestPrivilegeOperatePersistence.java @@ -26,7 +26,7 @@ import java.util.List; import com.google.common.collect.Lists; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.Authorizable; import org.apache.sentry.core.common.BitFieldAction; import org.apache.sentry.core.common.BitFieldActionFactory; @@ -34,7 +34,7 @@ import org.apache.sentry.core.model.search.Collection; import org.apache.sentry.core.model.search.Field; import org.apache.sentry.core.model.search.SearchConstants; import org.apache.sentry.core.model.sqoop.SqoopActionConstant; -import org.apache.sentry.provider.db.SentryGrantDeniedException; +import org.apache.sentry.core.common.exception.SentryGrantDeniedException; import org.apache.sentry.provider.db.generic.service.persistent.PrivilegeObject.Builder; import org.apache.sentry.provider.file.PolicyFile; import org.apache.sentry.service.thrift.ServiceConstants; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericPolicyProcessor.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericPolicyProcessor.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericPolicyProcessor.java index cc0b28e..11dd5e2 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericPolicyProcessor.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericPolicyProcessor.java @@ -26,14 +26,15 @@ import java.util.*; import org.apache.hadoop.conf.Configuration; import org.apache.sentry.core.common.Authorizable; +import org.apache.sentry.core.common.exception.SentrySiteConfigurationException; import org.apache.sentry.core.model.search.Collection; import org.apache.sentry.core.model.search.Field; import org.apache.sentry.core.model.search.SearchConstants; import org.apache.sentry.provider.common.GroupMappingService; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryGrantDeniedException; -import org.apache.sentry.provider.db.SentryInvalidInputException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryGrantDeniedException; +import org.apache.sentry.core.common.exception.SentryInvalidInputException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.provider.db.generic.service.persistent.PrivilegeObject; import org.apache.sentry.provider.db.generic.service.persistent.SentryStoreLayer; import org.apache.sentry.provider.db.generic.service.persistent.PrivilegeObject.Builder; @@ -41,7 +42,6 @@ import org.apache.sentry.provider.db.service.model.MSentryGMPrivilege; import org.apache.sentry.provider.db.service.model.MSentryRole; import org.apache.sentry.provider.db.service.persistent.CommitContext; import org.apache.sentry.provider.db.service.thrift.PolicyStoreConstants; -import org.apache.sentry.provider.db.service.thrift.SentryConfigurationException; import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig; import org.apache.sentry.service.thrift.Status; import org.apache.sentry.service.thrift.TSentryResponseStatus; @@ -323,14 +323,14 @@ public class TestSentryGenericPolicyProcessor extends org.junit.Assert { assertEquals(1, response5.getPrivilegesMapByAuth().size()); } - @Test(expected=SentryConfigurationException.class) + @Test(expected=SentrySiteConfigurationException.class) public void testConfigCannotCreateNotificationHandler() throws Exception { Configuration conf = new Configuration(); conf.set(PolicyStoreConstants.SENTRY_GENERIC_POLICY_NOTIFICATION,"junk"); SentryGenericPolicyProcessor.createHandlers(conf); } - @Test(expected=SentryConfigurationException.class) + @Test(expected=SentrySiteConfigurationException.class) public void testConfigCannotCreateSentryStore() throws Exception { Configuration conf = new Configuration(); conf.set(PolicyStoreConstants.SENTRY_GENERIC_POLICY_STORE,"junk"); http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericServiceIntegration.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericServiceIntegration.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericServiceIntegration.java index e230505..b59d172 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericServiceIntegration.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/service/thrift/TestSentryGenericServiceIntegration.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.common.ActiveRoleSet; import org.apache.sentry.core.common.Authorizable; import org.apache.sentry.core.model.search.Collection; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryConfigToolSolr.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryConfigToolSolr.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryConfigToolSolr.java index 84543fb..d199d20 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryConfigToolSolr.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryConfigToolSolr.java @@ -36,7 +36,7 @@ import org.apache.commons.io.FileUtils; import org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceIntegrationBase; import org.apache.sentry.provider.db.generic.service.thrift.TSentryRole; import org.apache.sentry.provider.db.generic.service.thrift.TSentryPrivilege; -import org.apache.sentry.core.common.SentryConfigurationException; +import org.apache.sentry.core.common.exception.SentryConfigurationException; import org.junit.After; import org.junit.Before; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java index f35cdb1..7db5426 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellKafka.java @@ -21,7 +21,7 @@ package org.apache.sentry.provider.db.generic.tools; import com.google.common.collect.Sets; import com.google.common.io.Files; import org.apache.commons.io.FileUtils; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.model.kafka.validator.KafkaPrivilegeValidator; import org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceIntegrationBase; import org.apache.sentry.provider.db.generic.service.thrift.TSentryPrivilege; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellSolr.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellSolr.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellSolr.java index 0c5c711..d4e26e8 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellSolr.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/generic/tools/TestSentryShellSolr.java @@ -34,7 +34,7 @@ import java.util.Iterator; import java.util.Set; import org.apache.commons.io.FileUtils; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceIntegrationBase; import org.apache.sentry.provider.db.generic.service.thrift.TSentryRole; import org.apache.sentry.provider.db.generic.service.thrift.TSentryPrivilege; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java index ddd42c5..5d17538 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java @@ -31,9 +31,9 @@ import org.apache.hadoop.security.alias.CredentialProvider; import org.apache.hadoop.security.alias.CredentialProviderFactory; import org.apache.hadoop.security.alias.UserProvider; import org.apache.sentry.core.model.db.AccessConstants; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryGrantDeniedException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryGrantDeniedException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.provider.db.service.model.MSentryPrivilege; import org.apache.sentry.provider.db.service.model.MSentryRole; import org.apache.sentry.provider.db.service.thrift.TSentryActiveRoleSet; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryVersion.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryVersion.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryVersion.java index 3e2f64f..a8e8a03 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryVersion.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryVersion.java @@ -23,7 +23,7 @@ import static org.junit.Assert.assertEquals; import java.io.File; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig; import org.junit.Before; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyStoreProcessor.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyStoreProcessor.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyStoreProcessor.java index 28c2971..04d92dd 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyStoreProcessor.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryPolicyStoreProcessor.java @@ -17,10 +17,11 @@ */ package org.apache.sentry.provider.db.service.thrift; +import org.apache.sentry.core.common.exception.SentrySiteConfigurationException; import org.junit.Assert; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.provider.db.SentryThriftAPIMismatchException; +import org.apache.sentry.core.common.exception.SentryThriftAPIMismatchException; import org.apache.sentry.provider.db.service.thrift.PolicyStoreConstants.PolicyStoreServerConfig; import org.apache.sentry.service.thrift.ServiceConstants; import org.junit.Before; @@ -34,18 +35,18 @@ public class TestSentryPolicyStoreProcessor { public void setup() { conf = new Configuration(false); } - @Test(expected=SentryConfigurationException.class) + @Test(expected=SentrySiteConfigurationException.class) public void testConfigNotNotificationHandler() throws Exception { conf.set(PolicyStoreServerConfig.NOTIFICATION_HANDLERS, Object.class.getName()); SentryPolicyStoreProcessor.createHandlers(conf); } - @Test(expected=SentryConfigurationException.class) + @Test(expected=SentrySiteConfigurationException.class) public void testConfigCannotCreateNotificationHandler() throws Exception { conf.set(PolicyStoreServerConfig.NOTIFICATION_HANDLERS, ExceptionInConstructorNotificationHandler.class.getName()); SentryPolicyStoreProcessor.createHandlers(conf); } - @Test(expected=SentryConfigurationException.class) + @Test(expected=SentrySiteConfigurationException.class) public void testConfigNotAClassNotificationHandler() throws Exception { conf.set(PolicyStoreServerConfig.NOTIFICATION_HANDLERS, "junk"); SentryPolicyStoreProcessor.createHandlers(conf); http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceClientPool.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceClientPool.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceClientPool.java index 8dc5e34..fe4164d 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceClientPool.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceClientPool.java @@ -30,7 +30,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.service.thrift.SentryServiceFactory; import org.apache.sentry.service.thrift.SentryServiceIntegrationBase; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java index 6186106..a05521f 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java @@ -36,7 +36,7 @@ import org.apache.sentry.core.model.db.AccessURI; import org.apache.sentry.core.model.db.Database; import org.apache.sentry.core.model.db.Server; import org.apache.sentry.core.model.db.Table; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.service.thrift.SentryServiceIntegrationBase; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceWithInvalidMsgSize.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceWithInvalidMsgSize.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceWithInvalidMsgSize.java index 09f3d8e..15eab15 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceWithInvalidMsgSize.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceWithInvalidMsgSize.java @@ -19,7 +19,7 @@ package org.apache.sentry.provider.db.service.thrift; import com.google.common.collect.Sets; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.service.thrift.SentryServiceClientFactory; import org.apache.sentry.service.thrift.SentryServiceFactory; import org.apache.sentry.service.thrift.SentryServiceIntegrationBase; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentrySchemaTool.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentrySchemaTool.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentrySchemaTool.java index cb62c13..68abf27 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentrySchemaTool.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentrySchemaTool.java @@ -21,7 +21,7 @@ package org.apache.sentry.provider.db.tools; import java.io.File; import org.apache.hadoop.conf.Configuration; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.provider.db.service.persistent.SentryStoreSchemaInfo; import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig; import org.junit.Before; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentryShellHive.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentryShellHive.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentryShellHive.java index d8fea90..81059c5 100644 --- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentryShellHive.java +++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/tools/TestSentryShellHive.java @@ -31,7 +31,7 @@ import java.util.Iterator; import java.util.Set; import org.apache.commons.io.FileUtils; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.provider.db.service.thrift.TSentryPrivilege; import org.apache.sentry.provider.db.service.thrift.TSentryRole; import org.apache.sentry.service.thrift.SentryServiceIntegrationBase; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java index 35cb3c7..dec47c2 100644 --- a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java +++ b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java @@ -29,7 +29,7 @@ import org.apache.hadoop.fs.Path; import org.apache.sentry.core.common.utils.SentryConstants; import org.apache.sentry.provider.common.GroupMappingService; import org.apache.sentry.core.common.utils.PolicyFileConstants; -import org.apache.sentry.provider.common.SentryGroupNotFoundException; +import org.apache.sentry.core.common.exception.SentryGroupNotFoundException; import org.apache.shiro.config.Ini; import org.apache.shiro.config.Ini.Section; import org.slf4j.Logger; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java index 2a64621..00648da 100644 --- a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java +++ b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java @@ -32,7 +32,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.sentry.core.common.ActiveRoleSet; import org.apache.sentry.core.common.Authorizable; -import org.apache.sentry.core.common.SentryConfigurationException; +import org.apache.sentry.core.common.exception.SentryConfigurationException; import org.apache.sentry.policy.common.PrivilegeUtils; import org.apache.sentry.core.common.validator.PrivilegeValidator; import org.apache.sentry.core.common.validator.PrivilegeValidatorContext; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestLocalGroupMapping.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestLocalGroupMapping.java b/sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestLocalGroupMapping.java index c5345bc..bf2eb10 100644 --- a/sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestLocalGroupMapping.java +++ b/sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestLocalGroupMapping.java @@ -23,7 +23,7 @@ import java.util.Set; import org.apache.commons.io.FileUtils; import org.apache.hadoop.fs.Path; -import org.apache.sentry.provider.common.SentryGroupNotFoundException; +import org.apache.sentry.core.common.exception.SentryGroupNotFoundException; import org.junit.After; import org.junit.Assert; import org.junit.Before; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/sentry/SentryIndexAuthorizationSingletonTest.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/sentry/SentryIndexAuthorizationSingletonTest.java b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/sentry/SentryIndexAuthorizationSingletonTest.java index 30a849a..c294cf3 100644 --- a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/sentry/SentryIndexAuthorizationSingletonTest.java +++ b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/sentry/SentryIndexAuthorizationSingletonTest.java @@ -23,7 +23,7 @@ import java.util.Set; import org.apache.commons.collections.CollectionUtils; import org.apache.sentry.core.model.search.SearchModelAction; -import org.apache.sentry.provider.common.SentryGroupNotFoundException; +import org.apache.sentry.core.common.exception.SentryGroupNotFoundException; import org.apache.solr.cloud.CloudDescriptor; import org.apache.solr.common.SolrException; import org.apache.solr.common.params.ModifiableSolrParams; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java index 32d0a61..22d4cf8 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java @@ -28,7 +28,7 @@ import java.sql.Statement; import java.util.ArrayList; import java.util.List; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.tests.e2e.hive.AbstractTestWithStaticConfiguration; import org.junit.Before; import org.junit.BeforeClass; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java index 06967bd..a7c0a0c 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java @@ -32,15 +32,12 @@ import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; -import java.util.Set; -import org.apache.sentry.provider.db.SentryAccessDeniedException; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; -import org.apache.sentry.provider.db.SentryNoSuchObjectException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryNoSuchObjectException; import org.apache.sentry.tests.e2e.hive.AbstractTestWithStaticConfiguration; -import org.junit.After; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbConnections.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbConnections.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbConnections.java index 49fb182..f3bca9c 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbConnections.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbConnections.java @@ -22,8 +22,8 @@ import static org.junit.Assert.*; import java.sql.Connection; import java.sql.Statement; -import org.apache.sentry.provider.db.SentryAccessDeniedException; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; import org.apache.sentry.provider.file.PolicyFile; import org.apache.sentry.tests.e2e.hive.AbstractTestWithStaticConfiguration; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java index d9f30e0..a0450af 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbEndToEnd.java @@ -26,7 +26,7 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.provider.file.PolicyFile; import org.apache.sentry.tests.e2e.hive.AbstractTestWithStaticConfiguration; import org.junit.Before; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbSentryOnFailureHookLoading.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbSentryOnFailureHookLoading.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbSentryOnFailureHookLoading.java index 8cb04f7..212c465 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbSentryOnFailureHookLoading.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbSentryOnFailureHookLoading.java @@ -29,7 +29,7 @@ import org.junit.Assert; import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.sentry.binding.hive.conf.HiveAuthzConf; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.tests.e2e.hive.DummySentryOnFailureHook; import org.apache.sentry.tests.e2e.hive.hiveserver.HiveServerFactory; import org.junit.After; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java index 65ece8f..c67910a 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithGrantOption.java @@ -26,7 +26,7 @@ import org.junit.Assert; import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.sentry.binding.hive.conf.HiveAuthzConf; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.tests.e2e.hive.AbstractTestWithStaticConfiguration; import org.apache.sentry.tests.e2e.hive.DummySentryOnFailureHook; import org.apache.sentry.tests.e2e.hive.hiveserver.HiveServerFactory; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithHAGrantOption.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithHAGrantOption.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithHAGrantOption.java index 6c4d93f..53cbd00 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithHAGrantOption.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestPrivilegeWithHAGrantOption.java @@ -26,7 +26,7 @@ import org.junit.Assert; import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.sentry.binding.hive.conf.HiveAuthzConf; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.tests.e2e.hive.DummySentryOnFailureHook; import org.apache.sentry.tests.e2e.hive.hiveserver.HiveServerFactory; import org.junit.Assume; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/ha/TestHaEnd2End.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/ha/TestHaEnd2End.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/ha/TestHaEnd2End.java index 6ad70cf..07d74b5 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/ha/TestHaEnd2End.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/ha/TestHaEnd2End.java @@ -23,7 +23,7 @@ import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; -import org.apache.sentry.provider.db.SentryAccessDeniedException; +import org.apache.sentry.core.common.exception.SentryAccessDeniedException; import org.apache.sentry.provider.file.PolicyFile; import org.apache.sentry.service.thrift.HAClientInvocationHandler; import org.apache.sentry.tests.e2e.hive.AbstractTestWithStaticConfiguration; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java index c3a5379..1606b6d 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegration.java @@ -68,7 +68,7 @@ import org.apache.sentry.binding.hive.SentryHiveAuthorizationTaskFactoryImpl; import org.apache.sentry.binding.hive.conf.HiveAuthzConf; import org.apache.sentry.hdfs.PathsUpdate; import org.apache.sentry.hdfs.SentryAuthorizationProvider; -import org.apache.sentry.provider.db.SentryAlreadyExistsException; +import org.apache.sentry.core.common.exception.SentryAlreadyExistsException; import org.apache.sentry.provider.db.SimpleDBProviderBackend; import org.apache.sentry.provider.file.LocalGroupResourceAuthorizationProvider; import org.apache.sentry.provider.file.PolicyFile; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestConfigTool.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestConfigTool.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestConfigTool.java index ac0a9cd..6531560 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestConfigTool.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestConfigTool.java @@ -30,7 +30,7 @@ import java.util.Set; import org.apache.sentry.binding.hive.authz.SentryConfigTool; import org.apache.sentry.binding.hive.conf.HiveAuthzConf; -import org.apache.sentry.core.common.SentryConfigurationException; +import org.apache.sentry.core.common.exception.SentryConfigurationException; import org.apache.sentry.core.common.Subject; import org.apache.sentry.provider.file.PolicyFile; import org.junit.Before; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/SentryPolicyProviderForDb.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/SentryPolicyProviderForDb.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/SentryPolicyProviderForDb.java index c3e0b17..875e9aa 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/SentryPolicyProviderForDb.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/metastore/SentryPolicyProviderForDb.java @@ -26,7 +26,7 @@ import java.util.Collection; import java.util.Map.Entry; import java.util.Set; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.core.model.db.AccessConstants; import org.apache.sentry.core.model.db.DBModelAction; import org.apache.sentry.core.model.db.DBModelAuthorizable; http://git-wip-us.apache.org/repos/asf/sentry/blob/f6f730c3/sentry-tests/sentry-tests-solr/src/test/java/org/apache/sentry/tests/e2e/solr/db/integration/AbstractSolrSentryTestWithDbProvider.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-solr/src/test/java/org/apache/sentry/tests/e2e/solr/db/integration/AbstractSolrSentryTestWithDbProvider.java b/sentry-tests/sentry-tests-solr/src/test/java/org/apache/sentry/tests/e2e/solr/db/integration/AbstractSolrSentryTestWithDbProvider.java index 11f93d5..ccea82e 100644 --- a/sentry-tests/sentry-tests-solr/src/test/java/org/apache/sentry/tests/e2e/solr/db/integration/AbstractSolrSentryTestWithDbProvider.java +++ b/sentry-tests/sentry-tests-solr/src/test/java/org/apache/sentry/tests/e2e/solr/db/integration/AbstractSolrSentryTestWithDbProvider.java @@ -35,7 +35,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.net.NetUtils; import org.apache.hadoop.security.UserGroupInformation; -import org.apache.sentry.SentryUserException; +import org.apache.sentry.core.common.exception.SentryUserException; import org.apache.sentry.binding.solr.HdfsTestUtil; import org.apache.sentry.binding.solr.conf.SolrAuthzConf.AuthzConfVars; import org.apache.sentry.core.common.Action;