[jira] [Commented] (SQOOP-3134) Add option to configure Avro schema output file name with (import + --as-avrodatafile)
[ https://issues.apache.org/jira/browse/SQOOP-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16809951#comment-16809951 ] Daniel Voros commented on SQOOP-3134: - Submitted PR: https://github.com/apache/sqoop/pull/78 > Add option to configure Avro schema output file name with (import + > --as-avrodatafile) > --- > > Key: SQOOP-3134 > URL: https://issues.apache.org/jira/browse/SQOOP-3134 > Project: Sqoop > Issue Type: Improvement >Reporter: Markus Kemper >Assignee: Daniel Voros >Priority: Major > Attachments: SQOOP-3134.1.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Please consider adding an option to configure the Avro schema output file > name that is created with Sqoop (import + --as-avrodatafile), example cases > below. > {noformat} > # > # STEP 01 - Create Data > # > export MYCONN=jdbc:mysql://mysql.cloudera.com:3306/db_coe > export MYUSER=sqoop > export MYPSWD=cloudera > sqoop list-tables --connect $MYCONN --username $MYUSER --password $MYPSWD > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "drop table t1" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "create table t1 (c1 int, c2 date, c3 varchar(10))" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "insert into t1 values (1, current_date, 'some data')" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1" > - > | c1 | c2 | c3 | > - > | 1 | 2017-02-13 | some data | > - > # > # STEP 02 - Import + --table + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table > t1 --target-dir /user/root/t1 --delete-target-dir --num-mappers 1 > --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Transferred 413 bytes in > 20.6988 seconds (19.9529 bytes/sec) > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Retrieved 1 records. > > -rw-r--r-- 1 root root 492 Feb 13 12:14 ./t1.avsc < want option to > configure this file name > -rw-r--r-- 1 root root 12462 Feb 13 12:14 ./t1.java > # > # STEP 03 - Import + --query + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1 where \$CONDITIONS" --split-by c1 --target-dir > /user/root/t1 --delete-target-dir --num-mappers 1 --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Transferred 448 bytes in > 25.2757 seconds (17.7245 bytes/sec) > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Retrieved 1 records. > ~ > -rw-r--r-- 1 root root 527 Feb 13 12:16 ./AutoGeneratedSchema.avsc < > want option to configure this file name > -rw-r--r-- 1 root root 12590 Feb 13 12:16 ./QueryResult.java > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SQOOP-3134) Add option to configure Avro schema output file name with (import + --as-avrodatafile)
[ https://issues.apache.org/jira/browse/SQOOP-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16808645#comment-16808645 ] Daniel Voros commented on SQOOP-3134: - Tests have passed for this patch: https://travis-ci.org/dvoros/sqoop/builds/515049441 > Add option to configure Avro schema output file name with (import + > --as-avrodatafile) > --- > > Key: SQOOP-3134 > URL: https://issues.apache.org/jira/browse/SQOOP-3134 > Project: Sqoop > Issue Type: Improvement >Reporter: Markus Kemper >Assignee: Eric Lin >Priority: Major > Attachments: SQOOP-3134.1.patch > > > Please consider adding an option to configure the Avro schema output file > name that is created with Sqoop (import + --as-avrodatafile), example cases > below. > {noformat} > # > # STEP 01 - Create Data > # > export MYCONN=jdbc:mysql://mysql.cloudera.com:3306/db_coe > export MYUSER=sqoop > export MYPSWD=cloudera > sqoop list-tables --connect $MYCONN --username $MYUSER --password $MYPSWD > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "drop table t1" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "create table t1 (c1 int, c2 date, c3 varchar(10))" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "insert into t1 values (1, current_date, 'some data')" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1" > - > | c1 | c2 | c3 | > - > | 1 | 2017-02-13 | some data | > - > # > # STEP 02 - Import + --table + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table > t1 --target-dir /user/root/t1 --delete-target-dir --num-mappers 1 > --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Transferred 413 bytes in > 20.6988 seconds (19.9529 bytes/sec) > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Retrieved 1 records. > > -rw-r--r-- 1 root root 492 Feb 13 12:14 ./t1.avsc < want option to > configure this file name > -rw-r--r-- 1 root root 12462 Feb 13 12:14 ./t1.java > # > # STEP 03 - Import + --query + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1 where \$CONDITIONS" --split-by c1 --target-dir > /user/root/t1 --delete-target-dir --num-mappers 1 --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Transferred 448 bytes in > 25.2757 seconds (17.7245 bytes/sec) > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Retrieved 1 records. > ~ > -rw-r--r-- 1 root root 527 Feb 13 12:16 ./AutoGeneratedSchema.avsc < > want option to configure this file name > -rw-r--r-- 1 root root 12590 Feb 13 12:16 ./QueryResult.java > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SQOOP-3134) Add option to configure Avro schema output file name with (import + --as-avrodatafile)
[ https://issues.apache.org/jira/browse/SQOOP-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16807898#comment-16807898 ] Daniel Voros commented on SQOOP-3134: - [~ericlin] I've attached the change I had in mind. Would you mind if I were to take this over? > Add option to configure Avro schema output file name with (import + > --as-avrodatafile) > --- > > Key: SQOOP-3134 > URL: https://issues.apache.org/jira/browse/SQOOP-3134 > Project: Sqoop > Issue Type: Improvement >Reporter: Markus Kemper >Assignee: Eric Lin >Priority: Major > Attachments: SQOOP-3134.1.patch > > > Please consider adding an option to configure the Avro schema output file > name that is created with Sqoop (import + --as-avrodatafile), example cases > below. > {noformat} > # > # STEP 01 - Create Data > # > export MYCONN=jdbc:mysql://mysql.cloudera.com:3306/db_coe > export MYUSER=sqoop > export MYPSWD=cloudera > sqoop list-tables --connect $MYCONN --username $MYUSER --password $MYPSWD > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "drop table t1" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "create table t1 (c1 int, c2 date, c3 varchar(10))" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "insert into t1 values (1, current_date, 'some data')" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1" > - > | c1 | c2 | c3 | > - > | 1 | 2017-02-13 | some data | > - > # > # STEP 02 - Import + --table + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table > t1 --target-dir /user/root/t1 --delete-target-dir --num-mappers 1 > --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Transferred 413 bytes in > 20.6988 seconds (19.9529 bytes/sec) > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Retrieved 1 records. > > -rw-r--r-- 1 root root 492 Feb 13 12:14 ./t1.avsc < want option to > configure this file name > -rw-r--r-- 1 root root 12462 Feb 13 12:14 ./t1.java > # > # STEP 03 - Import + --query + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1 where \$CONDITIONS" --split-by c1 --target-dir > /user/root/t1 --delete-target-dir --num-mappers 1 --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Transferred 448 bytes in > 25.2757 seconds (17.7245 bytes/sec) > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Retrieved 1 records. > ~ > -rw-r--r-- 1 root root 527 Feb 13 12:16 ./AutoGeneratedSchema.avsc < > want option to configure this file name > -rw-r--r-- 1 root root 12590 Feb 13 12:16 ./QueryResult.java > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SQOOP-3134) Add option to configure Avro schema output file name with (import + --as-avrodatafile)
[ https://issues.apache.org/jira/browse/SQOOP-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16807883#comment-16807883 ] Daniel Voros commented on SQOOP-3134: - Just ran into this. Instead of introducing a new option, this could probably also be controlled with {{--class-name}}. It would only need a small change in the code path changed by SQOOP-2783 to also check for {{className == null}}. > Add option to configure Avro schema output file name with (import + > --as-avrodatafile) > --- > > Key: SQOOP-3134 > URL: https://issues.apache.org/jira/browse/SQOOP-3134 > Project: Sqoop > Issue Type: Improvement >Reporter: Markus Kemper >Assignee: Eric Lin >Priority: Major > > Please consider adding an option to configure the Avro schema output file > name that is created with Sqoop (import + --as-avrodatafile), example cases > below. > {noformat} > # > # STEP 01 - Create Data > # > export MYCONN=jdbc:mysql://mysql.cloudera.com:3306/db_coe > export MYUSER=sqoop > export MYPSWD=cloudera > sqoop list-tables --connect $MYCONN --username $MYUSER --password $MYPSWD > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "drop table t1" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "create table t1 (c1 int, c2 date, c3 varchar(10))" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "insert into t1 values (1, current_date, 'some data')" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1" > - > | c1 | c2 | c3 | > - > | 1 | 2017-02-13 | some data | > - > # > # STEP 02 - Import + --table + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table > t1 --target-dir /user/root/t1 --delete-target-dir --num-mappers 1 > --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Transferred 413 bytes in > 20.6988 seconds (19.9529 bytes/sec) > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Retrieved 1 records. > > -rw-r--r-- 1 root root 492 Feb 13 12:14 ./t1.avsc < want option to > configure this file name > -rw-r--r-- 1 root root 12462 Feb 13 12:14 ./t1.java > # > # STEP 03 - Import + --query + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1 where \$CONDITIONS" --split-by c1 --target-dir > /user/root/t1 --delete-target-dir --num-mappers 1 --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Transferred 448 bytes in > 25.2757 seconds (17.7245 bytes/sec) > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Retrieved 1 records. > ~ > -rw-r--r-- 1 root root 527 Feb 13 12:16 ./AutoGeneratedSchema.avsc < > want option to configure this file name > -rw-r--r-- 1 root root 12590 Feb 13 12:16 ./QueryResult.java > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SQOOP-3134) Add option to configure Avro schema output file name with (import + --as-avrodatafile)
[ https://issues.apache.org/jira/browse/SQOOP-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15999808#comment-15999808 ] Eric Lin commented on SQOOP-3134: - [~markuskem...@me.com], Is there any specific reason you want to do this? I can check if I can get this implemented. But I would like understand the intension. Thanks > Add option to configure Avro schema output file name with (import + > --as-avrodatafile) > --- > > Key: SQOOP-3134 > URL: https://issues.apache.org/jira/browse/SQOOP-3134 > Project: Sqoop > Issue Type: Improvement >Reporter: Markus Kemper > > Please consider adding an option to configure the Avro schema output file > name that is created with Sqoop (import + --as-avrodatafile), example cases > below. > {noformat} > # > # STEP 01 - Create Data > # > export MYCONN=jdbc:mysql://mysql.cloudera.com:3306/db_coe > export MYUSER=sqoop > export MYPSWD=cloudera > sqoop list-tables --connect $MYCONN --username $MYUSER --password $MYPSWD > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "drop table t1" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "create table t1 (c1 int, c2 date, c3 varchar(10))" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "insert into t1 values (1, current_date, 'some data')" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1" > - > | c1 | c2 | c3 | > - > | 1 | 2017-02-13 | some data | > - > # > # STEP 02 - Import + --table + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table > t1 --target-dir /user/root/t1 --delete-target-dir --num-mappers 1 > --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Transferred 413 bytes in > 20.6988 seconds (19.9529 bytes/sec) > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Retrieved 1 records. > > -rw-r--r-- 1 root root 492 Feb 13 12:14 ./t1.avsc < want option to > configure this file name > -rw-r--r-- 1 root root 12462 Feb 13 12:14 ./t1.java > # > # STEP 03 - Import + --query + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1 where \$CONDITIONS" --split-by c1 --target-dir > /user/root/t1 --delete-target-dir --num-mappers 1 --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Transferred 448 bytes in > 25.2757 seconds (17.7245 bytes/sec) > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Retrieved 1 records. > ~ > -rw-r--r-- 1 root root 527 Feb 13 12:16 ./AutoGeneratedSchema.avsc < > want option to configure this file name > -rw-r--r-- 1 root root 12590 Feb 13 12:16 ./QueryResult.java > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (SQOOP-3134) Add option to configure Avro schema output file name with (import + --as-avrodatafile)
[ https://issues.apache.org/jira/browse/SQOOP-3134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15864368#comment-15864368 ] Markus Kemper commented on SQOOP-3134: -- Linking SQOOP-2783 > Add option to configure Avro schema output file name with (import + > --as-avrodatafile) > --- > > Key: SQOOP-3134 > URL: https://issues.apache.org/jira/browse/SQOOP-3134 > Project: Sqoop > Issue Type: Improvement >Reporter: Markus Kemper > > Please consider adding an option to configure the Avro schema output file > name that is created with Sqoop (import + --as-avrodatafile), example cases > below. > {noformat} > # > # STEP 01 - Create Data > # > export MYCONN=jdbc:mysql://mysql.cloudera.com:3306/db_coe > export MYUSER=sqoop > export MYPSWD=cloudera > sqoop list-tables --connect $MYCONN --username $MYUSER --password $MYPSWD > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "drop table t1" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "create table t1 (c1 int, c2 date, c3 varchar(10))" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "insert into t1 values (1, current_date, 'some data')" > sqoop eval --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1" > - > | c1 | c2 | c3 | > - > | 1 | 2017-02-13 | some data | > - > # > # STEP 02 - Import + --table + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table > t1 --target-dir /user/root/t1 --delete-target-dir --num-mappers 1 > --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Transferred 413 bytes in > 20.6988 seconds (19.9529 bytes/sec) > 17/02/13 12:14:52 INFO mapreduce.ImportJobBase: Retrieved 1 records. > > -rw-r--r-- 1 root root 492 Feb 13 12:14 ./t1.avsc < want option to > configure this file name > -rw-r--r-- 1 root root 12462 Feb 13 12:14 ./t1.java > # > # STEP 03 - Import + --query + --as-avrodatafile > # > sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --query > "select * from t1 where \$CONDITIONS" --split-by c1 --target-dir > /user/root/t1 --delete-target-dir --num-mappers 1 --as-avrodatafile > ls -l ./* > Output: > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Transferred 448 bytes in > 25.2757 seconds (17.7245 bytes/sec) > 17/02/13 12:16:58 INFO mapreduce.ImportJobBase: Retrieved 1 records. > ~ > -rw-r--r-- 1 root root 527 Feb 13 12:16 ./AutoGeneratedSchema.avsc < > want option to configure this file name > -rw-r--r-- 1 root root 12590 Feb 13 12:16 ./QueryResult.java > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)