I used the following thrift compiler. I did not see any mentions of versions. http://www.apache.org/dyn/closer.cgi?path=/thrift/0.10.0/thrift-0.10.0.exe
Here's the stack trace. I am running ANYCPU platform: private string ReadStringBody(int size) { byte[] buf = new byte[size]; size = 1213486160 at Thrift.Protocol.TBinaryProtocol.ReadStringBody(Int32 size) in D:\repos\thrift\lib\csharp\src\Protocol\TBinaryProtocol.cs:line 383 at Thrift.Protocol.TBinaryProtocol.ReadMessageBegin() in D:\repos\thrift\lib\csharp\src\Protocol\TBinaryProtocol.cs:line 239 at Hbase.Client.recv_getTableNames() in D:\Projects\HBaseThrift\Hbase.cs:line 1418 at Hbase.Client.getTableNames() in D:\Projects\HBaseThrift\Hbase.cs:line 1391 at DemoClient.Main(String[] args) in D:\Projects\HBaseThriftClient\DemoClient.cs:line 97 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() ________________________________ From: Ted Yu <yuzhih...@gmail.com> Sent: Friday, January 13, 2017 10:00 AM To: user@hbase.apache.org Subject: Re: HBase Thrift Client for C#: OutofMemoryException Which thrift version did you use to generate c# code ? hbase uses 0.9.3 Can you pastebin the whole stack trace for the exception ? I assume you run your code on 64-bit machine. Cheers On Fri, Jan 13, 2017 at 9:53 AM, jeff saremi <jeffsar...@hotmail.com> wrote: > I have cloned the latest thrift and hbase code. Used thrift generator to > generate c# code from > hbase-thrift\src\main\resources\org\apache\hadoop\hbase\thrift. > Then created a single VS solution with the generated code, the thrift lib > for c# (thrift\lib\csharp\src\Thrift.csproj) and i also added a > DemoClient (hbase-examples) converted from c++ to c#. When I run that I > keep getting OutofMemoryException with not a lot of other useful > information. I have done the same process for C++ and the democlient code > from hbase-examples runs with no issues at all. > > > here's the client code: > > TTransport socket = new TSocket(args[0], Convert.ToInt32(args[1])); > TTransport transport = new TBufferedTransport((TStreamTransport)socket); > TProtocol protocol = new TBinaryProtocol(transport); > Hbase.Client client = new Hbase.Client(protocol); > List<byte[]> tables = client.getTableNames(); > > The last line is where the exception is thrown. thanks >