Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> use sqoopex
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MySQL [sqoopex]> create table sqoop_testgg1
-> (id INT, name VARCHAR(20));
Query OK, 0 rows affected (0.04 sec)
MySQL [sqoopex]> desc sqoop_testgg1
-> ;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id | int(11) | YES | | NULL | |
| name | varchar(20) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.00 sec)
Spilled Records=0
Failed Shuffles=0
Merged Map outputs=0
GC time elapsed (ms)=48
CPU time spent (ms)=1310
Physical memory (bytes) snapshot=219414528
Virtual memory (bytes) snapshot=3239182336
Total committed heap usage (bytes)=179306496
File Input Format Counters
Bytes Read=0
File Output Format Counters
Bytes Written=63
17/04/30 10:16:47 INFO mapreduce.ImportJobBase: Transferred 63 bytes in 19.9532
seconds (3.1574 bytes/sec)
17/04/30 10:16:47 INFO mapreduce.ImportJobBase: Retrieved 9 records.
17/04/30 10:16:47 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM
`sqoop_testgg1` AS t LIMIT 1
17/04/30 10:16:47 INFO hive.HiveImport: Loading uploaded data into Hive
Logging initialized using configuration in jar:file:/usr/hdp/2.3.4.0-
3485/hive/lib/hive-common-1.2.1.2.3.4.0-3485.jar!/hive-log4j.properties
OK
Time taken: 6.968 seconds
Loading data to table default.sqoop_testgg1
Table default.sqoop_testgg1 stats: [numFiles=1, totalSize=63]
OK
Time taken: 0.592 seconds
[manikantan20505061@ip-172-31-60-179 ~]$ hive
WARNING: Use "yarn jar" to launch YARN applications.
Logging initialized using configuration in file:/etc/hive/2.3.4.0-3485/0/hive-
log4j.properties
hive (default)> desc sqoop_testgg1
> ;
OK
id int
name string
Time taken: 1.409 seconds, Fetched: 2 row(s)
pig -x mapreduce
WARNING: Use "yarn jar" to launch YARN applications.
17/04/30 11:16:48 INFO pig.ExecTypeProvider: Trying ExecType : LOCAL
17/04/30 11:16:48 INFO pig.ExecTypeProvider: Trying ExecType : MAPREDUCE
17/04/30 11:16:48 INFO pig.ExecTypeProvider: Picked MAPREDUCE as the ExecType
2017-04-30 11:16:48,440 [main] INFO org.apache.pig.Main - Apache Pig version
0.15.0.2.3.4.0-3485 (rexported) compiled Dec 16 2015, 04:30:33
2017-04-30 11:16:48,440 [main] INFO org.apache.pig.Main - Logging error messages
to: /home/manikantan20505061/pig_1493551008437.log
2017-04-30 11:16:48,458 [main] INFO org.apache.pig.impl.util.Utils - Default
bootup file /home/manikantan20505061/.pigbootup not found
2017-04-30 11:16:48,918 [main] INFO
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to
hadoop file system at: hdfs://ip-172-31-53-48.e
c2.internal:8020
2017-04-30 11:16:49,743 [main] INFO org.apache.pig.PigServer - Pig Script ID for
the session: PIG-default-398d1adb-4df0-4b71-9b44-6b340ae4044a
2017-04-30 11:16:50,278 [main] INFO
org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service
address: http://ip-172-31-13-154.ec2.internal:818
8/ws/v1/timeline/
2017-04-30 11:16:50,278 [main] INFO org.apache.pig.backend.hadoop.ATSService -
Created ATS Hook
grunt>
runt> studentggrel = LOAD 'giripig/sudentgg' USING PigStorage(',') as ( id:int,
firstname:chararray,lastname:chararray,phone:chararray,city:chararray);
grunt>
grunt> studentggrel = LOAD 'giripig/sudentgg' USING PigStorage(',') as ( id:int,
firstname:chararray,lastname:chararray,phone:chararray,city:chararray);
Counters:
Total records written : 3
Total bytes written : 144
Spillable Memory Manager spill count : 0
Total bags proactively spilled: 0
Total records proactively spilled: 0
Job DAG:
job_1493302944662_5604
2017-04-30 12:04:00,568 [main] INFO
org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service
address: http://ip-172-31-13-154.ec2.internal:818
8/ws/v1/timeline/
2017-04-30 12:04:00,569 [main] INFO org.apache.hadoop.yarn.client.RMProxy -
Connecting to ResourceManager at ip-172-31-53-48.ec2.internal/172.31.53.48:8050
2017-04-30 12:04:00,571 [main] INFO org.apache.hadoop.mapred.ClientServiceDelegate
- Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting
to job history server
2017-04-30 12:04:00,657 [main] INFO
org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service
address: http://ip-172-31-13-154.ec2.internal:818
8/ws/v1/timeline/
2017-04-30 12:04:00,657 [main] INFO org.apache.hadoop.yarn.client.RMProxy -
Connecting to ResourceManager at ip-172-31-53-48.ec2.internal/172.31.53.48:8050
2017-04-30 12:04:00,659 [main] INFO org.apache.hadoop.mapred.ClientServiceDelegate
- Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting
to job history server
2017-04-30 12:04:00,737 [main] INFO
org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service
address: http://ip-172-31-13-154.ec2.internal:818
8/ws/v1/timeline/
2017-04-30 12:04:00,737 [main] INFO org.apache.hadoop.yarn.client.RMProxy -
Connecting to ResourceManager at ip-172-31-53-48.ec2.internal/172.31.53.48:8050
2017-04-30 12:04:00,739 [main] INFO org.apache.hadoop.mapred.ClientServiceDelegate
- Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting
to job history server
2017-04-30 12:04:00,787 [main] INFO
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher -
Success!
2017-04-30 12:04:00,789 [main] INFO org.apache.pig.data.SchemaTupleBackend - Key
[pig.schematuple] was not set... will not generate code.
2017-04-30 12:04:00,799 [main] INFO
org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to
process : 1
2017-04-30 12:04:00,799 [main] INFO
org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths
to process : 1
(1,Rajiv,Reddy,9840447884,hyderabad)
(2,sudha,Ramesh,9600055807,chennai)
(3,giriprasad,gunalan,9566222358,chennai)