Using the raw Thrift calls can be quite painful. It is highly recommended that unless you have a specific reason to do so, one of the high level clients available for your language be used instead. A list of clients may be found on the Client Options page.
The Java, Python, and Ruby clients are well supported. Note that currently, PHP clients tend to be problematic.