Created 10-23-2016 07:52 AM
Created 10-23-2016 12:35 PM
For Hive, make sure the HiveServer2 service is running (use Ambari) and then use the beeline command line shell: https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients
(Note: beeline replaces an older Hive CLI. Beeline is the preferred way moving forward).
For Pig, write your script to a file and then use pig <pigscriptFileName>
See the following for more (including passing parameters, running locally or against hadoop, etc)
http://pig.apache.org/docs/r0.16.0/
https://www.tutorialspoint.com/apache_pig/apache_pig_execution.htm
http://pig.apache.org/docs/r0.16.0/start.html#run
(For the Pig tutorials http://hortonworks.com/hadoop-tutorial/how-to-use-basic-pig-commands/ you will see pig scripts written in Pig View in Ambari. You can run these on the command line simply by placing them in their own file and run as shown above).
Let me know this is what you are looking for by accepting the answer; else let me know what gaps remain.
Created 10-23-2016 12:35 PM
For Hive, make sure the HiveServer2 service is running (use Ambari) and then use the beeline command line shell: https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients
(Note: beeline replaces an older Hive CLI. Beeline is the preferred way moving forward).
For Pig, write your script to a file and then use pig <pigscriptFileName>
See the following for more (including passing parameters, running locally or against hadoop, etc)
http://pig.apache.org/docs/r0.16.0/
https://www.tutorialspoint.com/apache_pig/apache_pig_execution.htm
http://pig.apache.org/docs/r0.16.0/start.html#run
(For the Pig tutorials http://hortonworks.com/hadoop-tutorial/how-to-use-basic-pig-commands/ you will see pig scripts written in Pig View in Ambari. You can run these on the command line simply by placing them in their own file and run as shown above).
Let me know this is what you are looking for by accepting the answer; else let me know what gaps remain.
Created 10-24-2016 01:26 PM
With the new Sandbox, you should be able to access http://localhost:8888, which will bring you to a to the Sandbox start page. I suggest clicking into the Advanced HDP page. From there you will see a link to a web-based ssh client. You could launch the Pig and Hive command lines clients from there.
Created 10-24-2016 01:57 PM
To fill out the possibilities, in addition to @bhagan access route you can use the shell of your choice and ssh via the command: ssh root@127.0.0.1 -p 2222 in which case you will be prompted for root password.