sqoop import--rdbms to hdfs export--hdfs to rdbms data injection or migration import--individual tables export--- target tables exists in rdbms Sqoop Eval--to run a query on db in mysql: ---------- cltr+l to clear screen; show databases; use retail_db; show tables; list of databases sqoop-list-databases \ --connect "jdbc:mysql://ipaddress:portno" \ --username name \ --password pass list tables sqoop-list-tables \ --connect "jdbc:mysql://ip address:portno/retail_db" \ --username name \ --password pass eval: sqoop-eval \ --connect "jdbc:mysql://ip address:portno" \ --username name \ --password pass --query "select * from retail_db.customers limit 10" for oracle : orc in place of mysql to use in cloudxlab: sqoop-list-databases \ --connect "jdbc:mysql://10.142.1.2/sqoopex" \ --username sqoopuser \ --password NHkkP876rp sqoop-list-tables \ --connect "jdbc:mysql://10.142.1.2/sqoopex" \ --username sqoopuser \ --password NHkkP876rp s...
spark on yarn -------------- how to execute spark programs --interactive mode--spark-shell/pyspark/notebook-- good to analyzing submitting job- ---------------- spark-submit --production ready code. how spark execute our programs on cluster: --------------------------- follows--master slave architecture. --each application has a single driver--master process --multiple executer(cpu and memory,/jvm process) driver-- -------------- analyzing works--divide it--distribute task,schedule and monitors executer ---------- execute the code locally on that JVM each aplication has distinct driver and bunch of executer
compression techniques in hive: ---------------------------------------- -helps save storage -help process data faster -reduce i/o cost i/o cost depends on storage compression and uncompression--cost--time taken to compress and uncompression. bt compare to i/o gain--we can neglect this. 4 compression techni ------------------------ snappy lzo gzip bzip2 some optimized for storage some for speed Snappy: ------------------ -fast compression codec -size doesn not reduce drastically --mostly in project is used --optimized for speed rather than storage. --by default not splittable(json ,xml) --avro,parquet,orc,(container based)--splitapility is taken care Lzo ---------- --optimized for speed. --inherently splittable(can be use with text,json,xml) --good choice for text files --require seprate install. --snappy is faster than Lzo. Gzip -------------- optimized for storage -2.5* snappy --processing speed is slow --not splittable -used with container based files --can reduces block size -...
Comments
Post a Comment