mirror of
https://github.com/apache/sqoop.git
synced 2025-05-06 16:30:45 +08:00
SQOOP-2150: Sqoop2: Kite 1.0 don't allow dashes to be used in dataset names
(Jarek Jarcec Cecho via Gwen Shapira)
This commit is contained in:
parent
b9d70d077a
commit
5de04df61a
@ -159,7 +159,7 @@ public void mergeDataset(String uri) {
|
|||||||
*/
|
*/
|
||||||
public static String suggestTemporaryDatasetUri(String uri) {
|
public static String suggestTemporaryDatasetUri(String uri) {
|
||||||
if (uri.startsWith("dataset:hdfs:")) {
|
if (uri.startsWith("dataset:hdfs:")) {
|
||||||
return uri + TEMPORARY_DATASET_PREFIX + UUID.randomUUID();
|
return uri + TEMPORARY_DATASET_PREFIX + UUID.randomUUID().toString().replace("-", "");
|
||||||
} else {
|
} else {
|
||||||
throw new SqoopException(
|
throw new SqoopException(
|
||||||
KiteConnectorError.GENERIC_KITE_CONNECTOR_0000, uri);
|
KiteConnectorError.GENERIC_KITE_CONNECTOR_0000, uri);
|
||||||
|
@ -48,6 +48,7 @@ KiteDatasetExecutor getExecutor(String uri, Schema schema,
|
|||||||
// not able to pass the temporary dataset uri to KiteToDestroyer. So we
|
// not able to pass the temporary dataset uri to KiteToDestroyer. So we
|
||||||
// delegate KiteDatasetExecutor to manage name convention for datasets.
|
// delegate KiteDatasetExecutor to manage name convention for datasets.
|
||||||
uri = KiteDatasetExecutor.suggestTemporaryDatasetUri(uri);
|
uri = KiteDatasetExecutor.suggestTemporaryDatasetUri(uri);
|
||||||
|
LOG.info("Generated temporary dataset URI: " + uri);
|
||||||
Dataset<GenericRecord> dataset =
|
Dataset<GenericRecord> dataset =
|
||||||
KiteDatasetExecutor.createDataset(uri, schema, format);
|
KiteDatasetExecutor.createDataset(uri, schema, format);
|
||||||
return new KiteDatasetExecutor(dataset);
|
return new KiteDatasetExecutor(dataset);
|
||||||
|
Loading…
Reference in New Issue
Block a user