<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Tag: thrift - Recent Posts</title>
		<link>http://www.datastax.com/support-forums/tags/thrift</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Fri, 24 May 2013 22:49:58 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/tags/thrift" rel="self" type="application/rss+xml" />

		<item>
			<title>thepaul on "CQL Question"</title>
			<link>http://www.datastax.com/support-forums/topic/cql-question#post-1663</link>
			<pubDate>Tue, 17 Apr 2012 21:16:04 +0000</pubDate>
			<dc:creator>thepaul</dc:creator>
			<guid isPermaLink="false">1663@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;The version of the Thrift library in use (Thrift.php and friends) is more important, and is not necessarily the same as the version of Thrift you used to compile your interface.&#60;/p&#62;
&#60;p&#62;Are you using cassandra-pdo for your CQL queries, or some other library?  What version?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "CQL Question"</title>
			<link>http://www.datastax.com/support-forums/topic/cql-question#post-1646</link>
			<pubDate>Tue, 17 Apr 2012 08:03:57 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1646@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;We running with an interface compiled from Thrift 0.7.0
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thepaul on "CQL Question"</title>
			<link>http://www.datastax.com/support-forums/topic/cql-question#post-1629</link>
			<pubDate>Mon, 16 Apr 2012 16:41:41 +0000</pubDate>
			<dc:creator>thepaul</dc:creator>
			<guid isPermaLink="false">1629@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hmm.  I'm guessing that must be some sort of shortcoming in the PHP implementation of Thrift.  I've just tested with a query string in excess of 2^20 bytes (1 MiB) through the Python thrift interface, and it worked fine.&#60;/p&#62;
&#60;p&#62;I asked around, and it sounds like the more recent versions of PHP Thrift should have a higher maximum frame size.  What version are you using?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "CQL Question"</title>
			<link>http://www.datastax.com/support-forums/topic/cql-question#post-1628</link>
			<pubDate>Mon, 16 Apr 2012 10:00:57 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1628@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi there, we are just switching to CQL for some of our data analysis (we were using direct thrift queries) and I have a question which I'm guessing must have come up before. I have a large amount of user data in a super column so I have written a (PHP) script to read that data and push it into a wide column suitable for CQL.&#60;/p&#62;
&#60;p&#62;At the moment I have a loop that looks something like this:&#60;/p&#62;
&#60;p&#62;Read a chunk of keys from the super-column like so&#60;br /&#62;
$cCQLResult = $this-&#38;gt;ExecuteCQL($cCQLDatasource, &#34;SELECT KEY FROM PlayrUserData WHERE KEY &#38;gt;= '$StartKey' AND KEY &#38;lt; '$FinishKey'&#34;);&#60;/p&#62;
&#60;p&#62;Now for that chunk build a list of keys that I wish to write (using a thrift query into the super column)&#60;/p&#62;
&#60;p&#62;For those keys that pass a simple test write them all into a wide column family:&#60;br /&#62;
$this-&#38;gt;ExecuteCQL($cCQLDatasource, &#34;UPDATE MarketingCohortCache SET '000001.Facebook.1517061723'='1','000020.Facebook.100003474181964'='1', .. 'WHERE KEY=LapsedUser_1330560000&#34;);&#60;/p&#62;
&#60;p&#62;The problem appears to be that I am attempting to UPDATE MarketingCohortCache with a pretty long list (about 5000 keys) and it appears to be choking the thrift interface with: TSocket: Could not write 194718 bytes (the length of the Update string).&#60;/p&#62;
&#60;p&#62;Is there a recommended way to write a large quantity of data to a wide column? Do I need to loop through with multiple updates? If so how long can I let the update string get?&#60;/p&#62;
&#60;p&#62;May thanks for reading.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Marius Waldal on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-914</link>
			<pubDate>Thu, 22 Dec 2011 13:28:59 +0000</pubDate>
			<dc:creator>Marius Waldal</dc:creator>
			<guid isPermaLink="false">914@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;We have switched communication from a local cassandra to a dev server now, and here the problem is only when using JDBC connections against cassandra. If we switch to Hector, the problem does not persist.&#60;/p&#62;
&#60;p&#62;We have decided, for now, to stick with Hector for the connections from the Thrift server and use JDBC for Core operations. We will return to the JDBC issues after the system is live using Hector and everything works well.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zznate on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-880</link>
			<pubDate>Tue, 20 Dec 2011 16:23:58 +0000</pubDate>
			<dc:creator>zznate</dc:creator>
			<guid isPermaLink="false">880@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;If I am reading that correctly, every time you invoke GenericObjectPool#borrowObject you are creating a new socket instead of returning an existing socket from the pool. Is GOP#releaseObject invoked with the socket when the connection usage is finished?&#60;/p&#62;
&#60;p&#62;This really just sounds like a misunderstanding with the commons-pooling API. I would suggest a look at DBCP in commons (which uses commons pooling for vanilla JDBC usage for some extra examples with a similar use case.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Marius Waldal on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-877</link>
			<pubDate>Tue, 20 Dec 2011 07:51:20 +0000</pubDate>
			<dc:creator>Marius Waldal</dc:creator>
			<guid isPermaLink="false">877@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;The TSocket is wrapped by TTransport. The socket is created like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
    TTransport createTSocket(final String host, final int port) {&#60;br /&#62;
        final TSocket tsocket = new TSocket(host, port, socketTimeout);&#60;br /&#62;
        try {&#60;br /&#62;
            tsocket.getSocket().setKeepAlive(false);&#60;br /&#62;
        } catch (SocketException ex) {&#60;br /&#62;
            logger.warn(&#34;failed to disable keepalive&#34;);&#60;br /&#62;
        }&#60;br /&#62;
        return tsocket;    }&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This is done inside TSocketFactory; a class creating TSockets based on a UriManager for managing multiple hosts, and the makeObject() method here is used by GenericObjectPool.borrowObject()&#60;/p&#62;
&#60;p&#62;Was this answering your question?&#60;/p&#62;
&#60;p&#62;Thanks for the sidenote. I will take this up with our other developers. And looking forward to the jdbc-conn-pool !
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zznate on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-872</link>
			<pubDate>Mon, 19 Dec 2011 21:20:51 +0000</pubDate>
			<dc:creator>zznate</dc:creator>
			<guid isPermaLink="false">872@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;How are you constructing the underlying TSocket implementation and with which Transport (if any) are you wrapping said TSocket?&#60;/p&#62;
&#60;p&#62;ie. the call to DataSource#getConnection() should hit a pool who's contents have been constructed thusly:&#60;/p&#62;
&#60;p&#62; ttps://github.com/rantav/hector/blob/master/core/src/main/java/me/prettyprint/cassandra/connection/client/HThriftClient.java#L123-146&#60;/p&#62;
&#60;p&#62;Side note: after extensive testing in hector over a year ago, we *ripped out* commons pooling due to poor concurrency characteristics with lots of threads. YMMV though, as we had specific general-purpose targets for which we were aiming.&#60;/p&#62;
&#60;p&#62;Oh, it's not quite ready for prime-time, but we will be offering &#60;a href=&#34;https://github.com/riptano/jdbc-conn-pool&#34; rel=&#34;nofollow&#34;&#62;https://github.com/riptano/jdbc-conn-pool&#60;/a&#62; shortly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Marius Waldal on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-871</link>
			<pubDate>Mon, 19 Dec 2011 21:05:33 +0000</pubDate>
			<dc:creator>Marius Waldal</dc:creator>
			<guid isPermaLink="false">871@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;@zznate Thanks for answering.&#60;/p&#62;
&#60;p&#62;The TServer is not managing the connections itself. It uses our Core module, which has a Spring-configured datasource that extends org.apache.tomcat.jdbc.pool.DataSource.&#60;br /&#62;
maxActive is set to 50, and we see during startup that this is read by the server. However, it seems that the connections are never returned when used by the server module, although this is not a problem when Core itself uses it for import and calculation.&#60;/p&#62;
&#60;p&#62;The TServer is using an org.apache.commons.pool.impl.GenericObjectPool for its workers, but as far as we can tell, this is not the pool that eats threads.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zznate on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-868</link>
			<pubDate>Mon, 19 Dec 2011 17:20:21 +0000</pubDate>
			<dc:creator>zznate</dc:creator>
			<guid isPermaLink="false">868@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;What pooling library are you using?&#60;/p&#62;
&#60;p&#62;Do you have any examples of how you are using TServer to construct and manage connections? It sounds like you are just creating new connections instead of returning existing ones. I can't really speculate further than that without more information.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Marius Waldal on "JDBC pool eating connections when using Thrift server"</title>
			<link>http://www.datastax.com/support-forums/topic/jdbc-pool-eating-connections-when-using-thrift-server#post-867</link>
			<pubDate>Mon, 19 Dec 2011 13:34:11 +0000</pubDate>
			<dc:creator>Marius Waldal</dc:creator>
			<guid isPermaLink="false">867@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Ok guys, we are at a loss here and hoping you may shed some light on this total show stopper!&#60;/p&#62;
&#60;p&#62;We are using CQL v. 1.0.5 and are experiencing problems using jdbc pooling from a thrift server.&#60;/p&#62;
&#60;p&#62;In our Core module, we have import jobs and calculation jobs using the thread pool without problems, reading and writing tens of thousands of records lightning fast.&#60;/p&#62;
&#60;p&#62;However; we are also using a Server module (based on org.apache.thrift.server.TServer) which is in turn using the same code from Core for connections to Cassandra. When we use this server, it seems connections are not released and reused, but the pool is constantly growing until reaching a roof at &#38;lt;16.000 connections, after which we get a&#60;br /&#62;
Error in thread &#34;Thread-3&#34;&#60;br /&#62;
message on the server, and a timeout on the client.&#60;/p&#62;
&#60;p&#62;What beats us is why this works fine when running the import and calculation jobs, but not when the same dao classes are used from the server (imported as a maven artifact). &#60;/p&#62;
&#60;p&#62;Any ideas whatsoever would be greatly appreciated!&#60;/p&#62;
&#60;p&#62;Cheers&#60;br /&#62;
Marius
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
