You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***An Azure HDInsight (Hadoop on HDInsight) cluster**
21
+
* An Apache Hadoop cluster on HDInsight. See [Create Apache Hadoop clusters using the Azure portal](../hdinsight-hadoop-create-linux-clusters-portal.md).
Azure PowerShell provides *cmdlets* that allow you to remotely run MapReduce jobs on HDInsight. Internally, PowerShell makes REST calls to [WebHCat](https://cwiki.apache.org/confluence/display/Hive/WebHCat) (formerly called Templeton) running on the HDInsight cluster.
31
28
32
29
The following cmdlets are used when running MapReduce jobs in a remote HDInsight cluster.
33
30
34
-
***Connect-AzAccount**: Authenticates Azure PowerShell to your Azure subscription.
35
-
36
-
***New-AzHDInsightMapReduceJobDefinition**: Creates a new *job definition* by using the specified MapReduce information.
37
-
38
-
***Start-AzHDInsightJob**: Sends the job definition to HDInsight and starts the job. A *job* object is returned.
39
-
40
-
***Wait-AzHDInsightJob**: Uses the job object to check the status of the job. It waits until the job completes or the wait time is exceeded.
41
-
42
-
***Get-AzHDInsightJobOutput**: Used to retrieve the output of the job.
31
+
|Cmdlet | Description |
32
+
|---|---|
33
+
|Connect-AzAccount|Authenticates Azure PowerShell to your Azure subscription.|
34
+
|New-AzHDInsightMapReduceJobDefinition|Creates a new *job definition* by using the specified MapReduce information.|
35
+
|Start-AzHDInsightJob|Sends the job definition to HDInsight and starts the job. A *job* object is returned.|
36
+
|Wait-AzHDInsightJob|Uses the job object to check the status of the job. It waits until the job completes or the wait time is exceeded.|
37
+
|Get-AzHDInsightJobOutput|Used to retrieve the output of the job.|
43
38
44
39
The following steps demonstrate how to use these cmdlets to run a job in your HDInsight cluster.
45
40
@@ -51,7 +46,7 @@ The following steps demonstrate how to use these cmdlets to run a job in your HD
51
46
52
47
.\mapreducejob.ps1
53
48
54
-
When you run the script, you are prompted for the name of the HDInsight cluster and the cluster login. You may also be prompted to authenticate to your Azure subscription.
49
+
When you run the script, you're prompted for the name of the HDInsight cluster and the cluster login. You may also be prompted to authenticate to your Azure subscription.
55
50
56
51
3. When the job completes, you receive output similar to the following text:
57
52
@@ -79,9 +74,9 @@ To see the words and counts produced by the job, open the **output.txt** file in
79
74
> [!NOTE]
80
75
> The output files of a MapReduce job are immutable. So if you rerun this sample, you need to change the name of the output file.
81
76
82
-
## <aid="troubleshooting"></a>Troubleshooting
77
+
## Troubleshooting
83
78
84
-
If no information is returned when the job completes, view errors for the job. To view error information for this job, add the following command to the end of the **mapreducejob.ps1** file, save it, and then run it again.
79
+
If no information is returned when the job completes, view errors for the job. To view error information for this job, add the following command to the end of the **mapreducejob.ps1** file. Then save the file and rerun the script.
85
80
86
81
```powershell
87
82
# Print the output of the WordCount job.
@@ -95,17 +90,9 @@ Get-AzHDInsightJobOutput `
95
90
96
91
This cmdlet returns the information that was written to STDERR as the job runs.
97
92
98
-
## <aid="summary"></a>Summary
93
+
## Next steps
99
94
100
-
As you can see, Azure PowerShell provides an easy way to run MapReduce jobs on an HDInsight cluster, monitor the job status, and retrieve the output.
101
-
102
-
## <aid="nextsteps"></a>Next steps
103
-
104
-
For general information about MapReduce jobs in HDInsight:
95
+
As you can see, Azure PowerShell provides an easy way to run MapReduce jobs on an HDInsight cluster, monitor the job status, and retrieve the output. For information about other ways you can work with Hadoop on HDInsight:
105
96
106
97
*[Use MapReduce on HDInsight Hadoop](hdinsight-use-mapreduce.md)
107
-
108
-
For information about other ways you can work with Hadoop on HDInsight:
109
-
110
98
*[Use Apache Hive with Apache Hadoop on HDInsight](hdinsight-use-hive.md)
111
-
*[Use Apache Pig with Apache Hadoop on HDInsight](hdinsight-use-pig.md)
0 commit comments