[Solved-1 Solution] Configuring pig relation with Hadoop ?
How to configuring pig relation with Hadoop ?
Follow the below steps for configuring pig:
- 1. Extract the tart file
- 2. Add pig bin directory to the PATH variable
- 3. We also need to configure the JAVA_HOME variable.
Pig can run in two modes:
- 1. Local mode.
- In this mode Hadoop cluster is not used at all. All processes run in single JVM and files are read from the local filesystem. To run Pig in local mode, use the command:
- 2. MapReduce Mode.
- In this mode Pig converts scripts to MapReduce jobs and run them on Hadoop cluster. It is the default mode.
- Cluster can be local or remote. Pig uses the HADOOP_MAPRED_HOME environment variable to find Hadoop installation on local machine
- If we want to connect to remote cluster, its necessary to specify cluster parameters in the pig.properties file.
Example for MRv1
We can also specify remote cluster address at the command line:
- Hence, we can install Pig to any machine and connect to remote cluster. Pig includes Hadoop client, there is no need toinstall Hadoop to use Pig.