5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-02 19:01:27 +08:00
Commit Graph

192 Commits

Author SHA1 Message Date
Andrew Bayer
b22904cbfe SQOOP-133. Removing shim layer mechanism.
This change removes the ShimLoader and various Shim classes such as CDH3Shim
etc. It introduces a couple of new classes - ConfigurationConstants and
ConfigurationHelper - that provide a unique place for articulating interface
related details such as configuration keys that can likely change from version
to version of Hadoop.

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149994 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:22 +00:00
Andrew Bayer
df738df6c1 SQOOP-125. Allow user to specify database type.
This fix allows the user to optionally specify the connection
manager class to be used, instead of inferring it from the
connection string.

From: Ahmed Radwan <ahmed@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149993 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:21 +00:00
Andrew Bayer
b794959457 SQOOP-131. Hive import using free form query.
This change fixes a problem that prevented users from importing into Hive
data extracted using a free form query.

From: Ahmed Radwan <ahmed@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149992 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:21 +00:00
Andrew Bayer
bf0deb178e SQOOP-128. Allow custom export writers to cleanup.
This change allows customized ExportRecordWriters the opportunity to execute
code after the last commit is performed and before the database connection
is closed.

(Guy le Mar via Arvind Prabhakar)

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149991 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:21 +00:00
Andrew Bayer
5dd36c62da SQOOP-114. Fix for NPE.
This is a fix for a case of malformed command line arguments,
where the tool name is correct, the option is also correct,
but the value of the option is missing.

From: Ahmed Radwan <ahmed@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149990 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:20 +00:00
Andrew Bayer
e3638e8ce0 SQOOP-37. Escape table and column names for Hive.
Hive allows the use of keywords as column and table names as long as they are
escaped using back-ticks. This change makes Sqoop always escape table and
column names using back-ticks thereby allowing Sqoop to work with Hive tables
that use keywords for either the table name or column names.

(Lars Francke via arvind)

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149989 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:20 +00:00
Andrew Bayer
00821910b3 SQOOP-119. TextSplitter creates incorrect bounds.
The TextSplitter implementation used when creating splits on top
of String based columns, has a bug in its logic which causes
the bounds for splits to be created incorrectly. This results
in the import of duplicate data. This change fixes the TextSplitter
in order to ensure that the bound checks are created correctly.

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149988 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:20 +00:00
Andrew Bayer
574835eb5a SQOOP-97. Remove mysql-connector-j from Sqoop.
This change removes the MySQL JDBC driver distribution that was
bundled with Sqoop previously. This is done to make sure that the
Sqoop distribution is completely Apache 2.0 compliant.

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149987 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:19 +00:00
Andrew Bayer
683c04d10d SQOOP-108. Automatically obtain HBase and ZK deps.
Users currently need to specify hbase.home and zk.home in build.properties.
This change helps automatically resolve these dependencies by downloading
release tarballs. Would be best to do this via SQOOP-101 but the hbase and
zk maven layout currently has some issues that are painful to workaround
in ivy.

Reason: Improvement
Author: Eli Collins via Arvind Prabhakar

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149986 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:19 +00:00
Andrew Bayer
81608e42b6 SQOOP-110. Allow empty strings to represent NULL.
This change modifies the ClassWriter implementation to provide
support for interpeting empty strings as NULL values for datatypes
other than String. For String datatype, an explicit string 'null'
is interpreted as NULL value and empty string is not. This is
because certain databases distinguish between NULL and empty
strings.

The clone implementation generated by ClassWriter has also been
modified to make it more defensive against the presence of NULL
values.

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149985 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:19 +00:00
Andrew Bayer
6da167490e SQOOP-99. CDH3Shim mapped to Hadoop 0.20.3.
Current CDH3 build includes version 0.20.3 of Hadoop which is now
mapped to CDH3Shim loader. Apart from that, this change includes
a change in build.xml and OracleUtils test class that allows the
ability to override connect string for Oracle tests.

From: Arvind Prabhakar <arvind@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149984 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:18 +00:00
Andrew Bayer
8527e7b458 Increment version number and prev.git.hash after branching for release.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149983 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:18 +00:00
Andrew Bayer
118bad1424 SQOOP-62. Fix failing Oracle compatibility tests.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149982 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:18 +00:00
Andrew Bayer
d1206e1238 SQOOP-94. COMPILING.txt does not mention all dependencies.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149981 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:17 +00:00
Andrew Bayer
3509b7941e SQOOP-90. Tool to merge datasets imported via incremental import.
Adds 'merge' tool.
Adds MergeJob, Merge*Mapper, MergeReducer.
Merge-specific arguments added to SqoopOptions, BaseSqoopTool.
Add TestMerge to test that this tool functions as expected.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149980 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:17 +00:00
Andrew Bayer
ea716f5426 SQOOP-89. Support multiple output files in ManagerCompatTestCase.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149979 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:17 +00:00
Andrew Bayer
c7b1ddb708 SQOOP-88. Parameterize pre-table-import validity checks in SqlManager.
Adds SqlManager.checkTableImportOptions() method called by importTable().

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149978 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:17 +00:00
Andrew Bayer
1a63734c0d SQOOP-86. Release note generation requires python 2.5.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149977 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:16 +00:00
Andrew Bayer
09c6fe1ef8 SQOOP-85. Additional documentation build adjustments.
Disable XML validation under CentOS for more targets.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149976 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:16 +00:00
Andrew Bayer
56e3553f40 SQOOP-81. Creation of /tmp/sqoop/compile is not multi-user friendly.
Create nonce dirs as /tmp/sqoop-${user.name}/compile.
Remove unused compilation directories at end of execution.
Do not memoize nonce compilation directory names in metastore.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149975 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:16 +00:00
Andrew Bayer
899216e175 SQOOP-84. Fix documentation build error under CentOS.
Disable xmlto validation on CentOS.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149974 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:16 +00:00
Andrew Bayer
2ba041796e SQOOP-80. bin/configure-sqoop improperly escapes shell variable names.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149973 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:15 +00:00
Andrew Bayer
1632e9e1dc SQOOP-79. Add scripts to start/stop metastore in background, use pidfiles.
Added start-metastore.sh and stop-metastore.sh scripts, which start and stop
the metastore silently.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149972 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:15 +00:00
Andrew Bayer
f4f0197174 SQOOP-78. Consolidate web-based documentation and tarball documentation.
Eliminates "webdocs" target from build, merged with "docs" target.
Web-based format for document delivery is used for local documentation as well.
Links to release notes, API documentation added to documentation homepage.
Release notes are generated for non-SNAPSHOT builds as part of "package" step.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149971 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:15 +00:00
Andrew Bayer
f88bfe27a2 SQOOP-60. Include SIP-6 document in source repository.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149970 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:15 +00:00
Andrew Bayer
5cc48f3051 SQOOP-51. Document driver jar installation process.
Updated the "supported databases" section of the user guide to reflect the
current driver installation process.
Updated "support" section of the user guide to mention current issue tracker.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149969 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:14 +00:00
Andrew Bayer
d656663a14 SQOOP-42. Document saved jobs, metastore, and incremental imports.
Added manual pages and user guide sections for sqoop-job and sqoop-metastore.
Updated sqoop-import documentation to describe incremental imports.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149968 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:14 +00:00
Andrew Bayer
36f93eac1d SQOOP-77. Rename saved sessions to saved jobs.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149967 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:13 +00:00
Andrew Bayer
e825dc560c SQOOP-75. Allow configuration of ManagerFactories through a configuration subdirectory.
Files in conf/managers.d/ are treated as configuration files that specify
classes for sqoop.connection.factories. If this property is unset, these
files are processed in order.
ClassLoaderStack no longer attempts to load a jar if the test class is
already available with the current set of ClassLoaders.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149966 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:13 +00:00
Andrew Bayer
4abb414829 SQOOP-76. Add automated release note generation script.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149965 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:13 +00:00
Andrew Bayer
beb0b2e1c2 SQOOP-47. NPE if --append is specified with HBase import target.
AppendUtils checks for missing append source and exits gracefully.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149964 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:13 +00:00
Andrew Bayer
66c753c2e7 SQOOP-72. sqoop-eval should use PreparedStatement.execute().
Modify sqoop-eval to use generic execute() instead of
executeQuery()/executeUpdate().
The --update argument to sqoop-eval is unnecessary and has been removed.
Modify ResultSetPrinter to properly display left border on output.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149963 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:12 +00:00
Andrew Bayer
57141e1fc7 SQOOP-38. Direct PostgreSQL import only works when providing a port.
From: Lars Francke <lars.francke@gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149962 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:12 +00:00
Andrew Bayer
1f7635e1d1 SQOOP-36. Redistribute mysql-connector-j with Sqoop.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149961 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:12 +00:00
Andrew Bayer
5c088f32ec SQOOP-73. Generated records should handle more boolean value formats.
Add BooleanParser to parse more strings than Boolean.valueOf() does.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149960 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:11 +00:00
Andrew Bayer
11124da4ba SQOOP-40. SqoopOptions should use annotations to bind fields to properties.
Added @StoredAsProperty annotation.
Modified SqoopOptions to use this for all scalar fields.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149959 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:11 +00:00
Andrew Bayer
7f53d52f4f SQOOP-69. Improve data accessible to ManagerFactory.accept().
Added ManagerFactory.accept(SessionData) API to allow ManagerFactory
to inspect the chosen SqoopTool.
Deprecated ManagerFactory.accept(SqoopOptions).

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149958 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:11 +00:00
Andrew Bayer
402a2cd61a SQOOP-68. Delimiters in strings are not escaped properly.
Use escape character to protect delimiters if enclosing character is
unavailable.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149957 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:10 +00:00
Andrew Bayer
16a4d0f002 SQOOP-66. Jar for ConnManager class is not included in job payload.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149956 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:10 +00:00
Andrew Bayer
ac43ae8d76 SQOOP-65. Refactor some utilities out of MySQLExportMapper.
getLocalWorkPath() moved into c.c.s.util.TaskId.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149955 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:10 +00:00
Andrew Bayer
1749a84f68 SQOOP-64. Refactor named FIFO creation into standalone utility.
Add com.cloudera.sqoop.io.NamedFifo class to represent named FIFO objects.
Added TestNamedFifo as unit test.
MySQLExportMapper now uses this utility.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149954 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:10 +00:00
Andrew Bayer
6a9eef446b SQOOP-63. JobBase classes unnecessarily create ConnManagers.
ImportJobContext and ExportJobContext now contain references to the
already-instantiated ConnManager. JobBase subclasses should no
longer use a ConnFactory, but should use the existing ConnManager.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149953 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:09 +00:00
Andrew Bayer
692ee04f14 SQOOP-59. 'sqoop eval' should support DDL/DML operations.
Added --update argument to sqoop-eval tool, which runs
the user's statement in update mode rather than select mode.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149952 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:09 +00:00
Andrew Bayer
e3fb49775d SQOOP-56. Improve parameterization of ManagerCompatTestCase.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149951 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:09 +00:00
Andrew Bayer
87d0dab003 SQOOP-52. Stop TestHBaseImport from timing out.
Restart MiniHBaseCluster between each test to prevent triggering
livelock at end of test battery.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149950 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:08 +00:00
Andrew Bayer
bf92ba41dd SQOOP-55. BaseSqoopTestCase.createTableWithColTypes() calls close() twice.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149949 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:08 +00:00
Andrew Bayer
7b6163851d SQOOP-54. Allow per-manager configuration of isolation level for metadata queries.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149948 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:08 +00:00
Andrew Bayer
777fef13e7 SQOOP-45. If compilation dir is unspecified, use a nonce directory.
.class and .jar generation occurs in a per-process anonymous
directory. Generation of .java files now occurs in the bin directory;
.java files are moved to the src directory after compilation.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149947 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:08 +00:00
Andrew Bayer
15c1ba7241 SQOOP-53. Build test jar and publish to maven.
Sqoop now builds a sqoop-test-(version).jar file.
Added "jar-all" target to build.xml to build all artifacts.
Default ant target switched to "jar-all".
mvn-install, mvn-deploy updated deploy to deploy all main, test, and shim jars.
Added source jar artifacts to maven installation/deploy process.
Fixed build dependency bugs in generated poms.
Added Sqoop pom template; generating from ivy.xml was over-broad.
write-version-info.sh generates correct directory hierarchy in build/src/.
bin/sqoop and bin/configure-sqoop tweaked to account for multiple sqoop-* jars
in the $SQOOP_HOME directory.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149946 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:07 +00:00
Andrew Bayer
a7358e3585 SQOOP-6. Job completion percentage is inaccurate.
From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149945 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:07 +00:00