I haven't touched C# for a decade. After a brief search, I found: http://stackoverflow.com/questions/17843749/apache-thrift-client-run-time-issues-in-c-sharp
Can you take a look at the answer to see if it is relevant ? Cheers On Fri, Jan 13, 2017 at 11:10 AM, jeff saremi <jeffsar...@hotmail.com> wrote: > The result is the same. OutofMemoryException. > > I again ran my C++ client to make sure nothing wierd is going on server > side. > I found the thrift compiler here: http://www-us.apache.org/dist/ > thrift/0.9.3/ > > I regenerated all files and deleted all old ones. > > Here's a sample of a generated file for you to see that 0.9.3 is used: > > > /** > * Autogenerated by Thrift Compiler (0.9.3) > * > * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING > * @generated > */ > using System; > using System.Collections; > using System.Collections.Generic; > using System.Text; > using System.IO; > using Thrift; > using Thrift.Collections; > using System.Runtime.Serialization; > using Thrift.Protocol; > using Thrift.Transport; > > public partial class Hbase { > public interface Iface { > > > > ________________________________ > From: jeff saremi <jeffsar...@hotmail.com> > Sent: Friday, January 13, 2017 10:39 AM > To: user@hbase.apache.org > Subject: Re: HBase Thrift Client for C#: OutofMemoryException > > > oh i see. sure i'll do that and report back. > > > ________________________________ > From: Ted Yu <yuzhih...@gmail.com> > Sent: Friday, January 13, 2017 10:32 AM > To: user@hbase.apache.org > Subject: Re: HBase Thrift Client for C#: OutofMemoryException > > I am not sure about compatibility between thrift 0.10.0 and 0.9.3 > > Is it possible for you to locate 0.9.3 thrift compiler and try again ? > > On Fri, Jan 13, 2017 at 10:27 AM, jeff saremi <jeffsar...@hotmail.com> > wrote: > > > 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 > Apache Download Mirrors<http://www.apache.org/ > dyn/closer.cgi?path=/thrift/0.10.0/thrift-0.10.0.exe> > www.apache.org > Home page of The Apache Software Foundation > > > > > > > > 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 > > > > > >