5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-17 01:11:07 +08:00

SQOOP-2172: Sqoop2: Move ErrorCode's sub-class from sqoop-core to sqoop-common

(Richard Zhou via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2015-03-05 18:33:28 -08:00
parent b835c69a6e
commit dedd84a4af
31 changed files with 32 additions and 12 deletions

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.sqoop.audit; package org.apache.sqoop.error.code;
import org.apache.sqoop.common.ErrorCode; import org.apache.sqoop.common.ErrorCode;

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.sqoop.connector; package org.apache.sqoop.error.code;
import org.apache.sqoop.common.ErrorCode; import org.apache.sqoop.common.ErrorCode;

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.sqoop.core; package org.apache.sqoop.error.code;
import org.apache.sqoop.common.ErrorCode; import org.apache.sqoop.common.ErrorCode;

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.sqoop.driver; package org.apache.sqoop.error.code;
import org.apache.sqoop.common.ErrorCode; import org.apache.sqoop.common.ErrorCode;

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.sqoop.repository; package org.apache.sqoop.error.code;
import org.apache.sqoop.common.ErrorCode; import org.apache.sqoop.common.ErrorCode;

View File

@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.apache.sqoop.security; package org.apache.sqoop.error.code;
import org.apache.sqoop.common.ErrorCode; import org.apache.sqoop.common.ErrorCode;

View File

@ -23,6 +23,7 @@
import org.apache.sqoop.core.Reconfigurable; import org.apache.sqoop.core.Reconfigurable;
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener; import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener;
import org.apache.sqoop.error.code.AuditLoggerError;
import org.apache.sqoop.utils.ClassUtils; import org.apache.sqoop.utils.ClassUtils;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -23,6 +23,7 @@
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.PropertyConfigurator;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.AuditLoggerError;
public class FileAuditLogger extends AuditLogger { public class FileAuditLogger extends AuditLogger {

View File

@ -26,6 +26,7 @@
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.connector.spi.SqoopConnector; import org.apache.sqoop.connector.spi.SqoopConnector;
import org.apache.sqoop.core.ConfigurationConstants; import org.apache.sqoop.core.ConfigurationConstants;
import org.apache.sqoop.error.code.ConnectorError;
import org.apache.sqoop.model.ConfigUtils; import org.apache.sqoop.model.ConfigUtils;
import org.apache.sqoop.model.MConnector; import org.apache.sqoop.model.MConnector;
import org.apache.sqoop.model.MFromConfig; import org.apache.sqoop.model.MFromConfig;

View File

@ -35,6 +35,7 @@
import org.apache.sqoop.core.Reconfigurable; import org.apache.sqoop.core.Reconfigurable;
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener; import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener;
import org.apache.sqoop.error.code.ConnectorError;
import org.apache.sqoop.model.MConnector; import org.apache.sqoop.model.MConnector;
import org.apache.sqoop.repository.Repository; import org.apache.sqoop.repository.Repository;
import org.apache.sqoop.repository.RepositoryManager; import org.apache.sqoop.repository.RepositoryManager;

View File

@ -20,6 +20,7 @@
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.core.ConfigurationConstants; import org.apache.sqoop.core.ConfigurationConstants;
import org.apache.sqoop.error.code.ConnectorError;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

View File

@ -31,6 +31,8 @@
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.CoreError;
import static org.apache.sqoop.core.ConfigurationConstants.PROPERTIES_PROVIDER_SLEEP; import static org.apache.sqoop.core.ConfigurationConstants.PROPERTIES_PROVIDER_SLEEP;
public class PropertiesConfigurationProvider implements ConfigurationProvider { public class PropertiesConfigurationProvider implements ConfigurationProvider {

View File

@ -28,6 +28,7 @@
import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.PropertyConfigurator;
import org.apache.sqoop.common.MapContext; import org.apache.sqoop.common.MapContext;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.CoreError;
/** /**
* Configuration manager that loads Sqoop configuration. * Configuration manager that loads Sqoop configuration.

View File

@ -31,6 +31,7 @@
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener; import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener;
import org.apache.sqoop.driver.configuration.JobConfiguration; import org.apache.sqoop.driver.configuration.JobConfiguration;
import org.apache.sqoop.error.code.DriverError;
import org.apache.sqoop.job.etl.Destroyer; import org.apache.sqoop.job.etl.Destroyer;
import org.apache.sqoop.job.etl.DestroyerContext; import org.apache.sqoop.job.etl.DestroyerContext;
import org.apache.sqoop.job.etl.Initializer; import org.apache.sqoop.job.etl.Initializer;

View File

@ -23,6 +23,7 @@
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.RepositoryError;
import org.apache.sqoop.model.MConfig; import org.apache.sqoop.model.MConfig;
import org.apache.sqoop.model.MConfigUpdateEntityType; import org.apache.sqoop.model.MConfigUpdateEntityType;
import org.apache.sqoop.model.MConnector; import org.apache.sqoop.model.MConnector;

View File

@ -25,6 +25,7 @@
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.common.MapContext; import org.apache.sqoop.common.MapContext;
import org.apache.sqoop.error.code.RepositoryError;
public final class JdbcRepositoryContext { public final class JdbcRepositoryContext {

View File

@ -35,6 +35,7 @@
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.common.MapContext; import org.apache.sqoop.common.MapContext;
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.error.code.RepositoryError;
import org.apache.sqoop.utils.ClassUtils; import org.apache.sqoop.utils.ClassUtils;

View File

@ -26,6 +26,7 @@
import org.apache.log4j.LogManager; import org.apache.log4j.LogManager;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.RepositoryError;
public class JdbcRepositoryTransaction implements RepositoryTransaction { public class JdbcRepositoryTransaction implements RepositoryTransaction {

View File

@ -30,6 +30,7 @@
import org.apache.sqoop.connector.spi.SqoopConnector; import org.apache.sqoop.connector.spi.SqoopConnector;
import org.apache.sqoop.driver.Driver; import org.apache.sqoop.driver.Driver;
import org.apache.sqoop.driver.DriverUpgrader; import org.apache.sqoop.driver.DriverUpgrader;
import org.apache.sqoop.error.code.RepositoryError;
import org.apache.sqoop.json.DriverBean; import org.apache.sqoop.json.DriverBean;
import org.apache.sqoop.model.ConfigUtils; import org.apache.sqoop.model.ConfigUtils;
import org.apache.sqoop.model.MConfig; import org.apache.sqoop.model.MConfig;

View File

@ -25,6 +25,7 @@
import org.apache.sqoop.core.Reconfigurable; import org.apache.sqoop.core.Reconfigurable;
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener; import org.apache.sqoop.core.SqoopConfiguration.CoreConfigurationListener;
import org.apache.sqoop.error.code.RepositoryError;
import org.apache.sqoop.utils.ClassUtils; import org.apache.sqoop.utils.ClassUtils;
public class RepositoryManager implements Reconfigurable { public class RepositoryManager implements Reconfigurable {

View File

@ -18,6 +18,7 @@
package org.apache.sqoop.security; package org.apache.sqoop.security;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.SecurityError;
import org.apache.sqoop.utils.ClassUtils; import org.apache.sqoop.utils.ClassUtils;
/** /**

View File

@ -20,6 +20,7 @@
import java.util.Properties; import java.util.Properties;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.error.code.CoreError;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -31,6 +31,7 @@
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.connector.ConnectorManager; import org.apache.sqoop.connector.ConnectorManager;
import org.apache.sqoop.connector.spi.SqoopConnector; import org.apache.sqoop.connector.spi.SqoopConnector;
import org.apache.sqoop.error.code.DriverError;
import org.apache.sqoop.model.MJob; import org.apache.sqoop.model.MJob;
import org.apache.sqoop.model.MLink; import org.apache.sqoop.model.MLink;
import org.apache.sqoop.model.MSubmission; import org.apache.sqoop.model.MSubmission;

View File

@ -47,6 +47,7 @@
import org.apache.sqoop.connector.spi.SqoopConnector; import org.apache.sqoop.connector.spi.SqoopConnector;
import org.apache.sqoop.driver.Driver; import org.apache.sqoop.driver.Driver;
import org.apache.sqoop.driver.DriverUpgrader; import org.apache.sqoop.driver.DriverUpgrader;
import org.apache.sqoop.error.code.RepositoryError;
import org.apache.sqoop.json.DriverBean; import org.apache.sqoop.json.DriverBean;
import org.apache.sqoop.model.ConfigUtils; import org.apache.sqoop.model.ConfigUtils;
import org.apache.sqoop.model.ConfigurationClass; import org.apache.sqoop.model.ConfigurationClass;

View File

@ -24,6 +24,7 @@
import org.apache.sqoop.core.PropertiesConfigurationProvider; import org.apache.sqoop.core.PropertiesConfigurationProvider;
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.core.TestUtils; import org.apache.sqoop.core.TestUtils;
import org.apache.sqoop.error.code.RepositoryError;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.Test; import org.testng.annotations.Test;

View File

@ -26,7 +26,7 @@
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.security.AuthenticationHandler; import org.apache.sqoop.security.AuthenticationHandler;
import org.apache.sqoop.security.SecurityConstants; import org.apache.sqoop.security.SecurityConstants;
import org.apache.sqoop.security.SecurityError; import org.apache.sqoop.error.code.SecurityError;
import java.io.IOException; import java.io.IOException;

View File

@ -22,7 +22,7 @@
import org.apache.hadoop.security.token.delegation.web.HttpUserGroupInformation; import org.apache.hadoop.security.token.delegation.web.HttpUserGroupInformation;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.security.AuthenticationProvider; import org.apache.sqoop.security.AuthenticationProvider;
import org.apache.sqoop.security.SecurityError; import org.apache.sqoop.error.code.SecurityError;
public class DefaultAuthenticationProvider extends AuthenticationProvider { public class DefaultAuthenticationProvider extends AuthenticationProvider {

View File

@ -29,7 +29,7 @@
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.core.SqoopConfiguration; import org.apache.sqoop.core.SqoopConfiguration;
import org.apache.sqoop.security.SecurityConstants; import org.apache.sqoop.security.SecurityConstants;
import org.apache.sqoop.security.SecurityError; import org.apache.sqoop.error.code.SecurityError;
import javax.servlet.FilterConfig; import javax.servlet.FilterConfig;
import javax.servlet.ServletException; import javax.servlet.ServletException;

View File

@ -28,7 +28,7 @@
import org.apache.sqoop.model.MRole; import org.apache.sqoop.model.MRole;
import org.apache.sqoop.security.AuthorizationHandler; import org.apache.sqoop.security.AuthorizationHandler;
import org.apache.sqoop.security.AuthorizationManager; import org.apache.sqoop.security.AuthorizationManager;
import org.apache.sqoop.security.SecurityError; import org.apache.sqoop.error.code.SecurityError;
import org.apache.sqoop.server.RequestContext; import org.apache.sqoop.server.RequestContext;
import org.apache.sqoop.server.RequestHandler; import org.apache.sqoop.server.RequestHandler;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;

View File

@ -30,7 +30,7 @@
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.common.SqoopProtocolConstants; import org.apache.sqoop.common.SqoopProtocolConstants;
import org.apache.sqoop.common.SqoopResponseCode; import org.apache.sqoop.common.SqoopResponseCode;
import org.apache.sqoop.core.CoreError; import org.apache.sqoop.error.code.CoreError;
import org.apache.sqoop.json.JsonBean; import org.apache.sqoop.json.JsonBean;
@SuppressWarnings("serial") @SuppressWarnings("serial")

View File

@ -21,7 +21,7 @@
import org.apache.sqoop.common.Direction; import org.apache.sqoop.common.Direction;
import org.apache.sqoop.common.SqoopException; import org.apache.sqoop.common.SqoopException;
import org.apache.sqoop.connector.hdfs.configuration.ToFormat; import org.apache.sqoop.connector.hdfs.configuration.ToFormat;
import org.apache.sqoop.driver.DriverError; import org.apache.sqoop.error.code.DriverError;
import org.apache.sqoop.model.MLink; import org.apache.sqoop.model.MLink;
import org.apache.sqoop.model.MConfigList; import org.apache.sqoop.model.MConfigList;
import org.apache.sqoop.model.MJob; import org.apache.sqoop.model.MJob;