5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-04 00:30:00 +08:00
Commit Graph

185 Commits

Author SHA1 Message Date
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
Andrew Bayer
6efcec0da2 SQOOP-41. Add support for incremental imports.
Modify ImportTool, SessionTool, to support incremental imports.
Add TestIncrementalImport to unit test incremental imports.
SqoopOptions now implements Cloneable.
SQOOP-44. Bugfix in ClassWriter: fix NPE if the case of column names specified
with --columns do not match the case reported by the database.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149944 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:07 +00:00
Andrew Bayer
41cee93c40 SQOOP-35. Bundle job dependencies via DistributedCache.
Sqoop, shim, JDBC driver, and $SQOOP_HOME/lib/*.jar are now all
placed in the DistributedCache for each job.
Removes generation of the 'lib/' subdir in generated jar files.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149943 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:06 +00:00
Andrew Bayer
09d4d46d34 SQOOP-46. Sqoop 'verbose' mode shows too much IPC chatter.
Adds a parent logger for the 'com.cloudera.sqoop' package.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149942 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:06 +00:00
Andrew Bayer
1a5f52f063 SQOOP-24. Copy o.a.h.mapreduce.lib.db classes into Sqoop.
Copy DataDrivenDBInputFormat, its dependencies, and tests into Sqoop
in the com.cloudera.sqoop.mapreduce.db package.
Reformatted code to match Sqoop style guide and eliminate findbugs warnings.
Changed existing Sqoop code to use this implementation rather than Hadoop's.
Modified TestDataDrivenDBInputFormat to use mem-only hsqldb to prevent
Hudson race condition.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149941 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:05 +00:00
Andrew Bayer
06b94587af SQOOP-39. (SIP-6) Session Management API.
Added SessionStorage API.
Added SessonData API.
Added SessionStorageFactory.
Added SessionTool for create/delete/execute/show/list operations on sessions.
SqoopOptions can read and write all "sticky" state to a Properties instance.
Added HsqldbSessionStorage to implement SessionStorage API.
Added AutoHsqldbStorage to auto-instantiate a local metastore for the user.
Added client metastore connection parameters to sqoop-site.xml.
Added metastore tool (MetastoreTool).
Added HsqldbMetaStore for standalone metastore instance.
Added metastore properties to sqoop-default.xml.
Added TestSessions unit tests of session API.
Renamed conf/sqoop-default.xml to conf/sqoop-site-template.xml.
Added conf/.gitignore for sqoop-site.xml.

Tests run:

Tested all metastore operations on an import session.
Tested that ~/.sqoop/-based storage will be auto-created by the metastore.
Tested that 'sqoop metastore'-based metastores can be connected to
by external clients.
Tested that 'sqoop metastore --shutdown' will gracefully shut down a running
metastore instance.
Tested that passwords are not stored in the metastore by default, and the
user is prompted for the password when executing that saved session.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149940 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:05 +00:00
Andrew Bayer
0f35d54f21 SQOOP-15. Do not assume that Job.getCounters() returns non-null.
If jobs are already retired, display a useful message on how to
enable the completed job store and suppress performance counter
usage, rather than crashing with a NullPointerException.

From: Aaron Kimball <aaron@cloudera.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1149939 13f79535-47bb-0310-9956-ffa450edef68
2011-07-22 20:04:05 +00:00
Andrew Bayer
0fcbcd759a SQOOP-10. Provide a useful error message when a Java compiler cannot be found.
From: Aaron Kimball <aaron@cloudera.com>

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