Member since
05-07-2018
331
Posts
45
Kudos Received
35
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
7647 | 09-12-2018 10:09 PM | |
3029 | 09-10-2018 02:07 PM | |
9918 | 09-08-2018 05:47 AM | |
3363 | 09-08-2018 12:05 AM | |
4323 | 08-15-2018 10:44 PM |
07-12-2018
09:30 PM
Hey @Shane B! It should work with avro schemas located in your local fs. Both use the same serde to deal with avro typos. Here's an example: [hive@node3 ~]$ cat user.avsc
{"namespace": "example.avro",
"type": "record",
"name": "User",
"fields": [
{"name": "name", "type": "string"},
{"name": "favorite_number", "type": ["int", "null"]},
{"name": "favorite_color", "type": ["string", "null"]}
]
}
0: jdbc:hive2://node3:10000/default> CREATE TABLE test
0: jdbc:hive2://node3:10000/default> ROW FORMAT SERDE
0: jdbc:hive2://node3:10000/default> 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
0: jdbc:hive2://node3:10000/default> STORED as AVRO
0: jdbc:hive2://node3:10000/default> TBLPROPERTIES (
0: jdbc:hive2://node3:10000/default> 'avro.schema.url'='file:///home/hive/user.avsc');
No rows affected (1.492 seconds)
0: jdbc:hive2://node3:10000/default> show create table test;
+------------------------------------------------------------------+--+
| createtab_stmt |
+------------------------------------------------------------------+--+
| CREATE TABLE `test`( |
| `name` string COMMENT '', |
| `favorite_number` int COMMENT '', |
| `favorite_color` string COMMENT '') |
| ROW FORMAT SERDE |
| 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' |
| STORED AS INPUTFORMAT |
| 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' |
| OUTPUTFORMAT |
| 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat' |
| LOCATION |
| 'hdfs://Admin-TrainingNS/apps/hive/warehouse/test' |
| TBLPROPERTIES ( |
| 'COLUMN_STATS_ACCURATE'='{\"BASIC_STATS\":\"true\"}', |
| 'avro.schema.url'='file:///home/hive/user.avsc', |
| 'numFiles'='0', |
| 'numRows'='0', |
| 'rawDataSize'='0', |
| 'totalSize'='0', |
| 'transient_lastDdlTime'='1531430559') |
+------------------------------------------------------------------+--+
20 rows selected (0.775 seconds)
Hope this helps!
... View more
07-12-2018
03:47 PM
Hello @Kumar Veerappan! In this case you need to pass a Java keystore file instead of a cert file. If you only have this cert file, then you can generate you own JKS file and import your cert into your jks. Could you try to run the following commands? keytool -genkey -alias myjks -keystore mssql.jks -storepass anypwd
keytool -delete -alias myjks -keystore mssql.jks -storepass anypwd
keytool -import -alias myjks -file /etc/pki/CA/certs/XXXXXXXXXXXXX.crt -keypass anypwd -keystore mssql.jks -storepass anypwd
sudo -u XXXXXXXX /usr/hdp/current/sqoop-client/bin/sqoop import --connect "jdbc:sqlserver://XX.XXX.XXXX.XXX:1433;database=XXXXXXXXXX;username=XXXXXXXXXX;password=XXXXXXXX;encrypt=true;trustServerCertificate=false;trustStore=/mssql.jks" --table XXXXXXXXXX --fields-terminated-by , --escaped-by \\ --enclosed-by '"' --compress -m 1 --target-dir /user/XXXXXXXXXXXX/ --append --hive-drop-import-delims -- --schema dbo --table-hints NOLOCK Hope this helps!
... View more
07-11-2018
11:37 PM
Got it @Krish E! Yeah I was going to say the same, usually dump you whole db it isn't worth to do. At least in the common cases.. If you're still intended to make the split-by, take a look at your columns and try to take another candidate as key for split-by (like BK/SK) and comment here to keep our good discussion! Otherwise, I'd kindly ask you to accept the answer, so the other HCC users can find the solution faster. And open questions according to your issue. 🙂 Hope this helps!
... View more
07-11-2018
11:25 PM
1 Kudo
Hey @cskbhatt! When you use hive transactional table it seems to be an unsupported feature by presto. https://github.com/prestodb/presto/issues/1970 https://github.com/prestodb/presto/issues/6666 Hope this helps!
... View more
07-11-2018
11:04 PM
Hi @Punit kumar! AFAIK usually 143 error code it's related to memory/GC issues. Could you enable the DEBUG mode to Yarn logs? Also, share with us what kinda job are you running and your app,map,reduce memory properties (the opts as well). And the nodemanager resources too, plz! Thanks.
... View more
07-11-2018
09:15 PM
Hello @JAy PaTel! Guess you've to change your --export-dir /user/root/input/data.csv to --export-dir /user/root/input/ Hope this helps!
... View more
07-11-2018
03:36 PM
@Krish E in this case, I guess run this sqoop job with -m 1 and break into batches wouldn't be an option to you, right? Do you have any other BusinessKey or SK? Also, we can take a look at the max/min value generated by Sqoop (bounds) and look in deep how many rows each mapper gets (you can see this through Yarn Web UI > App Master ID > Mappers > Logs). And we'll see if is it running evenly. One last thing, just in case.. came to mind now 😄 What about this command below? sqoop import -Dorg.apache.sqoop.splitter.allow_text_splitter=true \
--connect jdbc:mysql://hostname:3306/jslice_orders \
--username=** -P --table archive_orders --fields-terminated-by '|' \
--lines-terminated-by '\n' --null-non-string "\\\\N" --null-string "\\\\N" --escaped-by '\' \
--optionally-enclosed-by '\"' --map-column-java dwh_last_modified=String --hive-drop-import-delims \
--as-parquetfile -m 16 --compress --compression-codec org.apache.hadoop.io.compress.SnappyCodec --delete-target-dir \
--target-dir hdfs:///hive/warehouse/jslice_orders/archive_orders/text3/ --split-by "cast(order_number as UNSIGNED) % 16" \ --boundary-query "SELECT 0,15"
Hope this helps 🙂
... View more
07-10-2018
06:02 PM
Hmmm @Krish E, I'm not sure if I get it right, but in this case, you aren't using a primary key right? Or in fact it's a PK and sqoop is duplicating it?
... View more
07-09-2018
04:59 AM
Hi @Srinivasan Govindasamy! Are you able to connect to your kerberos database (host receiving this error)? If so, check if your /etc/krb5.conf > Realm or ambari kerberos configs match with the realm requested, as I can see they look a little bit different. TEL1.AZURE.JPNAP.CORPINTRA.NET != hiveranger/qazumjebdpXXX.corpintra.net@CORPINTRA.NET Also, check the ranger logs if you can find any issue as well 🙂 Hope this helps!
... View more
07-09-2018
04:51 AM
Hi @Michael Bronson! Could you share with us the output of these commands? jstack -l <PID_HS2> pstree -p hive Hope this helps!
... View more