sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject sqoop git commit: SQOOP-2150: Sqoop2: Kite 1.0 don't allow dashes to be used in dataset names
Date Sun, 01 Mar 2015 06:32:14 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 b9d70d077 -> 5de04df61


SQOOP-2150: Sqoop2: Kite 1.0 don't allow dashes to be used in dataset names

(Jarek Jarcec Cecho via Gwen Shapira)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/5de04df6
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/5de04df6
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/5de04df6

Branch: refs/heads/sqoop2
Commit: 5de04df61a752bff395f67c7a206e55a1ada5ad6
Parents: b9d70d0
Author: Gwen Shapira <cshapi@gmail.com>
Authored: Sat Feb 28 22:31:25 2015 -0800
Committer: Gwen Shapira <cshapi@gmail.com>
Committed: Sat Feb 28 22:31:25 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/sqoop/connector/kite/KiteDatasetExecutor.java  | 2 +-
 .../src/main/java/org/apache/sqoop/connector/kite/KiteLoader.java  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/5de04df6/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteDatasetExecutor.java
----------------------------------------------------------------------
diff --git a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteDatasetExecutor.java
b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteDatasetExecutor.java
index cf8b627..8a7bda4 100644
--- a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteDatasetExecutor.java
+++ b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteDatasetExecutor.java
@@ -159,7 +159,7 @@ public class KiteDatasetExecutor {
    */
   public static String suggestTemporaryDatasetUri(String uri) {
     if (uri.startsWith("dataset:hdfs:")) {
-      return uri + TEMPORARY_DATASET_PREFIX + UUID.randomUUID();
+      return uri + TEMPORARY_DATASET_PREFIX + UUID.randomUUID().toString().replace("-", "");
     } else {
       throw new SqoopException(
           KiteConnectorError.GENERIC_KITE_CONNECTOR_0000, uri);

http://git-wip-us.apache.org/repos/asf/sqoop/blob/5de04df6/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteLoader.java
----------------------------------------------------------------------
diff --git a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteLoader.java
b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteLoader.java
index 1710969..57790a1 100644
--- a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteLoader.java
+++ b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteLoader.java
@@ -48,6 +48,7 @@ public class KiteLoader extends Loader<LinkConfiguration, ToJobConfiguration>
{
     // not able to pass the temporary dataset uri to KiteToDestroyer. So we
     // delegate KiteDatasetExecutor to manage name convention for datasets.
     uri = KiteDatasetExecutor.suggestTemporaryDatasetUri(uri);
+    LOG.info("Generated temporary dataset URI: " + uri);
     Dataset<GenericRecord> dataset =
         KiteDatasetExecutor.createDataset(uri, schema, format);
     return new KiteDatasetExecutor(dataset);


Mime
View raw message