How should I connect Hadoop in C#?

0 votes

I want to connect Hadoop in c# using HDInsight. I have created a cluster in AZURE and it was created successfully. and also I enabled remote desktop connection in it. When I entered the credentials in C# and execute the job then I get the connection error. I am confused about providing the parameters. 

In this code, the last line gives the exception -  And the exception message is - One or more errors occured.

var hadoop = Hadoop.Connect(new Uri("https://clustername.azurehdinsight.net"), "admin", "");
//I have set remote desktop password

var config = new HadoopJobConfiguration();



                config.InputPath = "input/CodeFiles";
                config.OutputFolder = "output/CodeFiles";
                var result = hadoop.MapReduceJob.ExecuteJob<NamespaceCounterJob>();
Aug 7, 2018 in Big Data Hadoop by Frankie
• 9,810 points
284 views

1 answer to this question.

0 votes

The Uri should be your Cluster Name, not Username, like:

var hadoop = Hadoop.Connect(new Uri("https://clustername.azurehdinsight.net"), "username", "password");
var config = new HadoopJobConfiguration();

            config.InputPath = "input/CodeFiles";
            config.OutputFolder = "output/CodeFiles";
            var result = hadoop.MapReduceJob.ExecuteJob<NamespaceCounterJob>();

The cluster name is shown at the top of the detail page in the Azure portal for your cluster. Also, you don't need to enable RDP to use this method, it's actually the username set for "Hadoop Services" in the configuration tab of the cluster. Launching a job in this manner makes use of the WebHCat/Templeton endpoint, so RDP is not required.

I hope this helps you :)

answered Aug 7, 2018 by Neha
• 6,280 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How can I get the respective Bitcoin value for an input in USD when using c#

Simply make call to server and parse ...READ MORE

answered Mar 25, 2018 in Big Data Hadoop by charlie_brown
• 7,720 points
58 views
0 votes
1 answer

How do I print hadoop properties in command line?

You can use the following command to get ...READ MORE

answered Apr 6, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
197 views
0 votes
1 answer
0 votes
1 answer

How do I print hadoop properties in command line?

You can dump Hadoop config by running: $ ...READ MORE

answered Aug 23, 2018 in Big Data Hadoop by Frankie
• 9,810 points
136 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,670 points
2,641 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,670 points
275 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
13,198 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
972 views
0 votes
1 answer

How to create a project for the first time in Hadoop.?

If you want to learn Hadoop framework ...READ MORE

answered Jul 26, 2018 in Big Data Hadoop by Neha
• 6,280 points
69 views
0 votes
1 answer

How do I install cloudera Hadoop without internet connection?

You can do that by selecting the ...READ MORE

answered Dec 12, 2018 in Big Data Hadoop by Neha
• 6,280 points
277 views