将光标移到/点击文章中的句子上,可以查看译文。      显示繁体中文内容    显示简体中文内容

How to connect Hive to asp.net project
如何将配置单元连接到 ASP.NET 项目

0 0

Hi i'm very new to Hadoop.

I have installed Microsoft HDInsight to my local system. now i want to connect to hive and HBase but for HIVE connection i have to specify Connection string, port, username, password.

But i'm not able to figure out how i will get this value. i have tried with localhost and 8085 as a port but this doesn't work. i also done it by giving localhost IP and my system IP too.

Please help with this and let me know how i should proceed for HBase connectivity

时间: 原作者:

0 0

Your best bet is probably to use Microsoft's Hive SDK (also available on nuget as Microsoft.Hadoop.Hive )

There is a great sample on how to connect and run a Linq-to-Hive query at http://hadoopsdk.codeplex.com/wikipage?title=Simple%20Linq%20To%20Hive%20Query&referringTitle=LINQ%20to%20Hive

This used the WebHcat API to submit your query to Hive, and will work against an HDInsights cluster in the Azure cloud (hence the need to provide a storage key to get the results back again).

If you're only interested in using the local copy you can adapt the example to exclude the storage account credentials.


var db = new HiveConnection(
 webHCatUri: new Uri("http://localhost:50111"),
 userName: (string)"hadoop", password: (string) null);

var result = db.ExecuteHiveQuery("select * from w3c");
result.Wait();


works against a base install of HDInsight Preview.

原作者:
...