0

Sorry in advance if this is something simple I just can not find the solution on google. I am getting started with setting up C# code to connect to an HBASE/Hadoop server.

I have found some examples to start the code/connection. https://thrift.apache.org/tutorial/csharp

I downloaded the nuget package for Thrift and that works. I am starting at the very beginning and the issue is that for this line below:

 Calculator.Client client = new Calculator.Client(protocol);

Gets error (type/namespace can not be found.. etc).

Where/how do I add the reference to this class? I can not find it anywhere and my google searching is not successful

Thank You.

JensG
  • 13,148
  • 4
  • 45
  • 55
Brad
  • 3,454
  • 3
  • 27
  • 50

1 Answers1

0

The tutorial says it at step 2:

2.Generated the tutorial.thrift and shared.thrift files as discussed here.

 thrift -r --gen csharp tutorial.thrift

This will leave you with a gen-csharp folder containing the files you are looking for.

JensG
  • 13,148
  • 4
  • 45
  • 55
  • Thanks, I will have to look at that, but I would think there would be a somewhere I could just download the .dll instead of having to go through all that to just get the .dll for the function I need. I have the .dlls for the thrift language from .nuget, but for that part I need to go through all that, seems like I could download it from somewhere. – Brad Jan 13 '17 at 14:46
  • Thank you, that appears to be what I am missing, I am getting Out Of Memory issues now, but that is not involved with my initial question. I would think there would just be a simple place to download these files and not need to go through all this. – Brad Jan 13 '17 at 15:32
  • @Brad: For sure it would be cool if we could have a web site that offers a download for every task we have to do, but that will not happen. With regard to Thrift (or SOAP, or REST, etc): If someone offers a precompiled assembly for your use case, then you are lucky. But quite often, that will not be the case, because the whole idea behind having an **language-independent, platform-independent API contract** (the `*.thift` IDL file) is to **enable** as many clients as possible to use a certain API. Prebuilding stuff for 20+ languages in N versions on M platforms is typically not a part of that. – JensG Jan 13 '17 at 16:11