Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cassandra] Bump to current stable version. #1694

Closed

Conversation

brndnmtthws
Copy link
Contributor

The 2.0.0-rc2 driver has a bug
(https://datastax-oss.atlassian.net/browse/JAVA-254) which gets
triggered when querying through presto.

The exception occurs because the driver attempts to query a table that
no longer exists, and fails.

Cassandra 2.1.0 is the current stable release, so it's probably time to
catch up.

The full exception looks like this:

Query 20140919_144621_02958_k67kx failed: replicate_on_write is not a column defined in this metadata
java.lang.IllegalArgumentException: replicate_on_write is not a column defined in this metadata
    at com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:273)
    at com.datastax.driver.core.ColumnDefinitions.getFirstIdx(ColumnDefinitions.java:279)
    at com.datastax.driver.core.Row.getBool(Row.java:117)
    at com.datastax.driver.core.TableMetadata$Options.<init>(TableMetadata.java:474)
    at com.datastax.driver.core.TableMetadata.build(TableMetadata.java:107)
    at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:128)
    at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:89)
    at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:259)
    at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:214)
    at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:161)
    at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
    at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:890)
    at com.datastax.driver.core.Cluster$Manager.newSession(Cluster.java:910)
    at com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:806)
    at com.datastax.driver.core.Cluster.connect(Cluster.java:158)
    at com.facebook.presto.cassandra.CassandraSession$1.load(CassandraSession.java:95)
    at com.facebook.presto.cassandra.CassandraSession$1.load(CassandraSession.java:90)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
    at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821)
    at com.facebook.presto.cassandra.CassandraSession.getSession(CassandraSession.java:115)
    at com.facebook.presto.cassandra.CassandraSession.executeWithSession(CassandraSession.java:435)
    at com.facebook.presto.cassandra.CassandraSession.executeQuery(CassandraSession.java:124)
    at com.facebook.presto.cassandra.CassandraRecordCursor.<init>(CassandraRecordCursor.java:42)
    at com.facebook.presto.cassandra.CassandraRecordSet.cursor(CassandraRecordSet.java:55)
    at com.facebook.presto.operator.RecordProjectOperator.<init>(RecordProjectOperator.java:45)
    at com.facebook.presto.split.RecordSetDataStreamProvider.createNewDataStream(RecordSetDataStreamProvider.java:40)
    at com.facebook.presto.split.DataStreamManager.createNewDataStream(DataStreamManager.java:58)
    at com.facebook.presto.operator.AbstractScanFilterAndProjectOperator.addSplit(AbstractScanFilterAndProjectOperator.java:95)
    at com.facebook.presto.operator.Driver.processNewSource(Driver.java:251)
    at com.facebook.presto.operator.Driver.processNewSources(Driver.java:216)
    at com.facebook.presto.operator.Driver.access$300(Driver.java:52)
    at com.facebook.presto.operator.Driver$DriverLockResult.close(Driver.java:491)
    at com.facebook.presto.operator.Driver.updateSource(Driver.java:194)
    at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunnerFactory.createDriver(SqlTaskExecution.java:585)
    at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunnerFactory.access$1700(SqlTaskExecution.java:552)
    at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:673)
    at com.facebook.presto.execution.TaskExecutor$PrioritizedSplitRunner.process(TaskExecutor.java:444)
    at com.facebook.presto.execution.TaskExecutor$Runner.run(TaskExecutor.java:578)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

@facebook-github-bot
Copy link
Collaborator

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@brndnmtthws brndnmtthws force-pushed the bump-cassandra-driver branch 3 times, most recently from cb479d3 to ddb6efb Compare September 19, 2014 17:07
@brndnmtthws
Copy link
Contributor Author

There's a bug in one of the tests, so this is not ready to ship yet. I'll update the PR when it is.

@brndnmtthws brndnmtthws force-pushed the bump-cassandra-driver branch 7 times, most recently from 1964dcb to eaffc50 Compare September 20, 2014 02:04
@brndnmtthws
Copy link
Contributor Author

Build passes now: https://gist.github.com/brndnmtthws/6274dc05d938c4abe9b6

I needed to remove the hector library, because it wasn't working as expected.

@dain dain self-assigned this Sep 20, 2014
@brndnmtthws brndnmtthws force-pushed the bump-cassandra-driver branch 6 times, most recently from 2a23dd1 to 2b75404 Compare September 24, 2014 14:12
@brndnmtthws
Copy link
Contributor Author

Looks like there was a build regression due to ed81faa. I've updated the code accordingly.

@brndnmtthws brndnmtthws force-pushed the bump-cassandra-driver branch 6 times, most recently from abedd84 to 191f6ae Compare September 24, 2014 19:33
@brndnmtthws
Copy link
Contributor Author

Rebased again on master to un-break the breakage (from 26b4c2a and 6acb314), and verified that the tests still pass.

@victorpoluceno
Copy link

👍

@brndnmtthws
Copy link
Contributor Author

Looks like this regressed again due to changes elsewhere.

Rebased on master, and fixed the small stuff.

@brndnmtthws brndnmtthws force-pushed the bump-cassandra-driver branch 2 times, most recently from e7ab401 to 0e024fe Compare October 10, 2014 17:21
@brndnmtthws
Copy link
Contributor Author

The changes from 60ff28d completely broke this PR, so I reverted that commit, reapplied the patch, and then implemented the same thing again.

@brndnmtthws
Copy link
Contributor Author

Tests pass locally.

The 2.0.0-rc2 driver has a bug
(https://datastax-oss.atlassian.net/browse/JAVA-254) which gets
triggered when querying through presto.  An exception occurs because the
driver attempts to query a table that no longer exists, and fails.

Cassandra 2.1.0 is the current stable release, so it's probably time to
catch up.  The hector library has been removed and replaced, because it
didn't seem to work correctly with C* 2.1, and the project doesn't
appear to be very active.
@brndnmtthws brndnmtthws force-pushed the bump-cassandra-driver branch 2 times, most recently from e6f3dd7 to 3cc0a36 Compare October 18, 2014 17:57
This is a redo of 60ff28d, minus the
breakage.
@brndnmtthws
Copy link
Contributor Author

Updated as per @martint's comments.

@martint
Copy link
Contributor

martint commented Oct 18, 2014

I'm seeing the following error when running the full test suite:

2014-10-19 02:01:17 WARNING An exception was thrown by a user handler while handling an exception event ([id: 0xed24c1c4, /127.0.0.1:63353 => localhost/127.0.0.1:9142] EXCEPTION: java.lang.OutOfMemoryError: unable to create new native thread)
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:714)
    at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)
    at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:110)
    at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
    at com.datastax.driver.core.Cluster$Manager.onSuspected(Cluster.java:1420)
    at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1670)
    at com.datastax.driver.core.Connection.defunct(Connection.java:265)
    at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:675)
    at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377)
    at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525)
    at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Can you try running mvn install -pl presto-cassandra -P ci on your end and see if it reproduces?

@brndnmtthws
Copy link
Contributor Author

It did indeed fail with java.lang.OutOfMemoryError when I ran that. What's more interesting, is that when I increased the heap size to 3g, it failed with this: https://gist.github.com/brndnmtthws/a1d645280943a7f2a861

This seems to only occur after many iterations. I was only able to induce it once.

@csarcom
Copy link

csarcom commented Oct 29, 2014

https://gist.github.com/csarcom/9d62deca83024ff330ae

I got this Exception on launcher start.

I tried to build bump-cassandra-driver branch too and I got a different Exeception:

https://gist.github.com/csarcom/ce94184d9fec7691fdda

Any idea?

@brndnmtthws
Copy link
Contributor Author

Hmm, that's really odd. I'm not sure what that's about. I'll take a look later today when I get a chance.

@martint
Copy link
Contributor

martint commented Oct 29, 2014

I merged this with a few minor adjustments: f198d63

We can troubleshoot the out-of-memory error later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants