Home Forums Hive / HCatalog Hive C# driver

This topic contains 1 reply, has 2 voices, and was last updated by  Yi Zhang 1 year 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 logged in to reply to this topic.

  • 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)