Hive C# driver

to create new topics or reply. | New User Registration

This topic contains 1 reply, has 2 voices, and was last updated by  Yi Zhang 1 year, 8 months ago.

  • Creator
    Topic
  • #40571

    Ken Ross
    Member

    Hi guys,

    I’ve been playing around with the Microsoft Hadoop .Net SDK (http://hadoopsdk.codeplex.com/) and have the WebHDFS connection working to copy data locally from my computer into HDFS on the sandbox.

    What I’m now trying to figure out is how to connect to Hive as shown here:

    http://hadoopsdk.codeplex.com/wikipage?title=Simple%20Linq%20To%20Hive%20Query&referringTitle=LINQ%20to%20Hive

    When I try using Linq to Hive I keep getting .Net exceptions.

    When I try to simplify the code and do:


    var db = new HiveConnection(
    webHCatUri: new Uri("http://sandbox:50111"),
    userName: (string)"hue", password: "1111");

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

    I can see it running in the job tracker, but it errors out, the log looks like this:


    java.io.IOException: No FileSystem for scheme: asv
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1479)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1500)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
    at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187)
    at org.apache.hcatalog.templeton.tool.TempletonControllerJob$Watcher.(TempletonControllerJob.java:238)
    at org.apache.hcatalog.templeton.tool.TempletonControllerJob$LaunchMapper.executeWatcher(TempletonControllerJob.java:192)
    at org.apache.hcatalog.templeton.tool.TempletonControllerJob$LaunchMapper.run(TempletonControllerJob.java:163)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:763)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:363)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)

    Does anyone have any ideas on how to run a hive query from c#?

Viewing 1 replies (of 1 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #41132

    Yi Zhang
    Moderator

    Hi Ken,

    Have you tried connecting to hive through hive’s thrift api?

    Is this sandbox running on Azure? ‘the filesystem for schema: asv’ message indicates a configuration that is not pointed to hdfs filesystem schema.
    Another possibility is the doAs, which normally suggest permissions issue.

    What about trying uri of http://sandbox:50111/v1/hive

    Thanks,
    Yi

    Collapse
Viewing 1 replies (of 1 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.