Closed SalocinDotTEN closed 12 years ago
Can you print_r($GLOBALS['THRIFT_AUTOLOAD'])
just prior to creating the ColumnFamily object and past the results here?
Hi Tyler Hobbs! Thanks for replying. Here is the print_r...
Array ( [cassandra\column] => cassandra/cassandra.Column.php [cassandra\supercolumn] => cassandra/cassandra.SuperColumn.php [cassandra\countercolumn] => cassandra/cassandra.CounterColumn.php [cassandra\countersupercolumn] => cassandra/cassandra.CounterSuperColumn.php [cassandra\columnorsupercolumn] => cassandra/cassandra.ColumnOrSuperColumn.php [cassandra\notfoundexception] => cassandra/cassandra.NotFoundException.php [cassandra\invalidrequestexception] => cassandra/cassandra.InvalidRequestException.php [cassandra\unavailableexception] => cassandra/cassandra.UnavailableException.php [cassandra\timedoutexception] => cassandra/cassandra.TimedOutException.php [cassandra\authenticationexception] => cassandra/cassandra.AuthenticationException.php [cassandra\authorizationexception] => cassandra/cassandra.AuthorizationException.php [cassandra\schemadisagreementexception] => cassandra/cassandra.SchemaDisagreementException.php [cassandra\columnparent] => cassandra/cassandra.ColumnParent.php [cassandra\columnpath] => cassandra/cassandra.ColumnPath.php [cassandra\slicerange] => cassandra/cassandra.SliceRange.php [cassandra\slicepredicate] => cassandra/cassandra.SlicePredicate.php [cassandra\indexexpression] => cassandra/cassandra.IndexExpression.php [cassandra\indexclause] => cassandra/cassandra.IndexClause.php [cassandra\keyrange] => cassandra/cassandra.KeyRange.php [cassandra\keyslice] => cassandra/cassandra.KeySlice.php [cassandra\keycount] => cassandra/cassandra.KeyCount.php [cassandra\deletion] => cassandra/cassandra.Deletion.php [cassandra\mutation] => cassandra/cassandra.Mutation.php [cassandra\endpointdetails] => cassandra/cassandra.EndpointDetails.php [cassandra\tokenrange] => cassandra/cassandra.TokenRange.php [cassandra\authenticationrequest] => cassandra/cassandra.AuthenticationRequest.php [cassandra\columndef] => cassandra/cassandra.ColumnDef.php [cassandra\cfdef] => cassandra/cassandra.CfDef.php [cassandra\ksdef] => cassandra/cassandra.KsDef.php [cassandra\cqlrow] => cassandra/cassandra.CqlRow.php [cassandra\cqlmetadata] => cassandra/cassandra.CqlMetadata.php [cassandra\cqlresult] => cassandra/cassandra.CqlResult.php [cassandra\cqlpreparedresult] => cassandra/cassandra.CqlPreparedResult.php [cassandra\cassandra_login_args] => cassandra/cassandra.Cassandra_login_args.php [cassandra\cassandra_login_result] => cassandra/cassandra.Cassandra_login_result.php [cassandra\cassandra_set_keyspace_args] => cassandra/cassandra.Cassandra_set_keyspace_args.php [cassandra\cassandra_set_keyspace_result] => cassandra/cassandra.Cassandra_set_keyspace_result.php [cassandra\cassandra_get_args] => cassandra/cassandra.Cassandra_get_args.php [cassandra\cassandra_get_result] => cassandra/cassandra.Cassandra_get_result.php [cassandra\cassandra_get_slice_args] => cassandra/cassandra.Cassandra_get_slice_args.php [cassandra\cassandra_get_slice_result] => cassandra/cassandra.Cassandra_get_slice_result.php [cassandra\cassandra_get_count_args] => cassandra/cassandra.Cassandra_get_count_args.php [cassandra\cassandra_get_count_result] => cassandra/cassandra.Cassandra_get_count_result.php [cassandra\cassandra_multiget_slice_args] => cassandra/cassandra.Cassandra_multiget_slice_args.php [cassandra\cassandra_multiget_slice_result] => cassandra/cassandra.Cassandra_multiget_slice_result.php [cassandra\cassandra_multiget_count_args] => cassandra/cassandra.Cassandra_multiget_count_args.php [cassandra\cassandra_multiget_count_result] => cassandra/cassandra.Cassandra_multiget_count_result.php [cassandra\cassandra_get_range_slices_args] => cassandra/cassandra.Cassandra_get_range_slices_args.php [cassandra\cassandra_get_range_slices_result] => cassandra/cassandra.Cassandra_get_range_slices_result.php [cassandra\cassandra_get_paged_slice_args] => cassandra/cassandra.Cassandra_get_paged_slice_args.php [cassandra\cassandra_get_paged_slice_result] => cassandra/cassandra.Cassandra_get_paged_slice_result.php [cassandra\cassandra_get_indexed_slices_args] => cassandra/cassandra.Cassandra_get_indexed_slices_args.php [cassandra\cassandra_get_indexed_slices_result] => cassandra/cassandra.Cassandra_get_indexed_slices_result.php [cassandra\cassandra_insert_args] => cassandra/cassandra.Cassandra_insert_args.php [cassandra\cassandra_insert_result] => cassandra/cassandra.Cassandra_insert_result.php [cassandra\cassandra_add_args] => cassandra/cassandra.Cassandra_add_args.php [cassandra\cassandra_add_result] => cassandra/cassandra.Cassandra_add_result.php [cassandra\cassandra_remove_args] => cassandra/cassandra.Cassandra_remove_args.php [cassandra\cassandra_remove_result] => cassandra/cassandra.Cassandra_remove_result.php [cassandra\cassandra_remove_counter_args] => cassandra/cassandra.Cassandra_remove_counter_args.php [cassandra\cassandra_remove_counter_result] => cassandra/cassandra.Cassandra_remove_counter_result.php [cassandra\cassandra_batch_mutate_args] => cassandra/cassandra.Cassandra_batch_mutate_args.php [cassandra\cassandra_batch_mutate_result] => cassandra/cassandra.Cassandra_batch_mutate_result.php [cassandra\cassandra_truncate_args] => cassandra/cassandra.Cassandra_truncate_args.php [cassandra\cassandra_truncate_result] => cassandra/cassandra.Cassandra_truncate_result.php [cassandra\cassandra_describe_schema_versions_args] => cassandra/cassandra.Cassandra_describe_schema_versions_args.php [cassandra\cassandra_describe_schema_versions_result] => cassandra/cassandra.Cassandra_describe_schema_versions_result.php [cassandra\cassandra_describe_keyspaces_args] => cassandra/cassandra.Cassandra_describe_keyspaces_args.php [cassandra\cassandra_describe_keyspaces_result] => cassandra/cassandra.Cassandra_describe_keyspaces_result.php [cassandra\cassandra_describe_cluster_name_args] => cassandra/cassandra.Cassandra_describe_cluster_name_args.php [cassandra\cassandra_describe_cluster_name_result] => cassandra/cassandra.Cassandra_describe_cluster_name_result.php [cassandra\cassandra_describe_version_args] => cassandra/cassandra.Cassandra_describe_version_args.php [cassandra\cassandra_describe_version_result] => cassandra/cassandra.Cassandra_describe_version_result.php [cassandra\cassandra_describe_ring_args] => cassandra/cassandra.Cassandra_describe_ring_args.php [cassandra\cassandra_describe_ring_result] => cassandra/cassandra.Cassandra_describe_ring_result.php [cassandra\cassandra_describe_partitioner_args] => cassandra/cassandra.Cassandra_describe_partitioner_args.php [cassandra\cassandra_describe_partitioner_result] => cassandra/cassandra.Cassandra_describe_partitioner_result.php [cassandra\cassandra_describe_snitch_args] => cassandra/cassandra.Cassandra_describe_snitch_args.php [cassandra\cassandra_describe_snitch_result] => cassandra/cassandra.Cassandra_describe_snitch_result.php [cassandra\cassandra_describe_keyspace_args] => cassandra/cassandra.Cassandra_describe_keyspace_args.php [cassandra\cassandra_describe_keyspace_result] => cassandra/cassandra.Cassandra_describe_keyspace_result.php [cassandra\cassandra_describe_splits_args] => cassandra/cassandra.Cassandra_describe_splits_args.php [cassandra\cassandra_describe_splits_result] => cassandra/cassandra.Cassandra_describe_splits_result.php [cassandra\cassandra_system_add_column_family_args] => cassandra/cassandra.Cassandra_system_add_column_family_args.php [cassandra\cassandra_system_add_column_family_result] => cassandra/cassandra.Cassandra_system_add_column_family_result.php [cassandra\cassandra_system_drop_column_family_args] => cassandra/cassandra.Cassandra_system_drop_column_family_args.php [cassandra\cassandra_system_drop_column_family_result] => cassandra/cassandra.Cassandra_system_drop_column_family_result.php [cassandra\cassandra_system_add_keyspace_args] => cassandra/cassandra.Cassandra_system_add_keyspace_args.php [cassandra\cassandra_system_add_keyspace_result] => cassandra/cassandra.Cassandra_system_add_keyspace_result.php [cassandra\cassandra_system_drop_keyspace_args] => cassandra/cassandra.Cassandra_system_drop_keyspace_args.php [cassandra\cassandra_system_drop_keyspace_result] => cassandra/cassandra.Cassandra_system_drop_keyspace_result.php [cassandra\cassandra_system_update_keyspace_args] => cassandra/cassandra.Cassandra_system_update_keyspace_args.php [cassandra\cassandra_system_update_keyspace_result] => cassandra/cassandra.Cassandra_system_update_keyspace_result.php [cassandra\cassandra_system_update_column_family_args] => cassandra/cassandra.Cassandra_system_update_column_family_args.php [cassandra\cassandra_system_update_column_family_result] => cassandra/cassandra.Cassandra_system_update_column_family_result.php [cassandra\cassandra_execute_cql_query_args] => cassandra/cassandra.Cassandra_execute_cql_query_args.php [cassandra\cassandra_execute_cql_query_result] => cassandra/cassandra.Cassandra_execute_cql_query_result.php [cassandra\cassandra_prepare_cql_query_args] => cassandra/cassandra.Cassandra_prepare_cql_query_args.php [cassandra\cassandra_prepare_cql_query_result] => cassandra/cassandra.Cassandra_prepare_cql_query_result.php [cassandra\cassandra_execute_prepared_cql_query_args] => cassandra/cassandra.Cassandra_execute_prepared_cql_query_args.php [cassandra\cassandra_execute_prepared_cql_query_result] => cassandra/cassandra.Cassandra_execute_prepared_cql_query_result.php [cassandra\cassandra_set_cql_version_args] => cassandra/cassandra.Cassandra_set_cql_version_args.php [cassandra\cassandra_set_cql_version_result] => cassandra/cassandra.Cassandra_set_cql_version_result.php [cassandra\cassandraclient] => cassandra/cassandra.Cassandra.client.php )
What version of php are you running? Are you using Zend or anything?
I am running it through command line, so I am not sure if the Zend influences it in any way...
Here is php -v ...
PHP 5.3.2-1ubuntu4.15 with Suhosin-Patch (cli) (built: May 4 2012 00:38:52) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans
Are you using an older version of the compiled C extension (thrift_protocol.so), maybe?
Hi,
I have recompiled the Thrift C extension from this phpcassa version and it is still not working. :)
Can you try running one of the example scipts directly? Just do 'php examples/basic.php' from the top-level phpcassa directory.
If that has the same error, what version of Ubuntu are you running?
Hi Tyler,
The error message seems to be very different now: -
PHP Fatal error: Class '\cassandra\Cassandra_login_result' not found in [..]/lib/thrift/packages/cassandra/cassandra.Cassandra.client.php on line 46
PHP Stack trace:
PHP 1. {main}() [..]/examples/basic.php:0
PHP 2. phpcassa\SystemManager->__construct() [..]/examples/basic.php:25
PHP 3. phpcassa\Connection\ConnectionWrapper->__construct() [..]/lib/phpcassa/SystemManager.php:36
PHP 4. cassandra\CassandraClient->login() [..]/lib/phpcassa/Connection/ConnectionWrapper.php:57
PHP 5. cassandra\CassandraClient->recv_login() [..]/lib/thrift/packages/cassandra/cassandra.Cassandra.client.php:22
PHP 6. thrift_protocol_read_binary() [..]/lib/thrift/packages/cassandra/cassandra.Cassandra.client.php:46
Fatal error: Class '\cassandra\Cassandra_login_result' not found in [..]/lib/thrift/packages/cassandra/cassandra.Cassandra.client.php on line 46
Call Stack:
0.0002 337564 1. {main}() [..]/examples/basic.php:0
0.0039 885572 2. phpcassa\SystemManager->__construct() [..]/examples/basic.php:25
0.0056 1148764 3. phpcassa\Connection\ConnectionWrapper->__construct() [..]/lib/phpcassa/SystemManager.php:36
0.0115 1993736 4. cassandra\CassandraClient->login() [..]/lib/phpcassa/Connection/ConnectionWrapper.php:57
0.0117 2006904 5. cassandra\CassandraClient->recv_login() [..]/lib/thrift/packages/cassandra/cassandra.Cassandra.client.php:22
0.0117 2007096 6. thrift_protocol_read_binary() [..]/lib/thrift/packages/cassandra/cassandra.Cassandra.client.php:46
I am using Ubuntu Server 10.04.4 LTS
I'll have to try to reproduce this on Ubuntu 10.04. Is there anything else unusual about your configuration?
Hi Tyler. Alright sure. :-)
I don't see anything else unusual about my configuration. Besides having 4 nodes.
Okay, I can reproduce this on Ubuntu 10.04. It appears that the problem only occurs when the Thrift C extension is installed and enabled. For now, you might try disabling it. I'll try to figure out why it's breaking.
Okay, that should fix it. Please let me know if that doesn't work for you. It should work with the C extension installed.
Hmm, I am not quite sure though. This error keeps appearing..
I am getting another message: -
PHP Fatal error: Uncaught exception 'TApplicationException' with message 'Required field 'reversed' was not found in serialized data! Struct: SliceRange(start:80 01 00 01 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 00 0B 00 01 00 00 00 07 35 34 32 36 36 5F 30 0C 00 02 0B 00 03 00 00 00 08 63 6C 69 63 6B 73 44 42 00 0C 00 03 0C 00 02 0B 00 01 00 00 00 00, finish:80 01 00 01 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 00 0B 00 01 00 00 00 07 35 34 32 36 36 5F 30 0C 00 02 0B 00 03 00 00 00 08 63 6C 69 63 6B 73 44 42 00 0C 00 03 0C 00 02 0B 00 01 00 00 00 00 0B 00 02 00 00 00 00, reversed:false, count:100)' in /.../lib/thrift/packages/cassandra/cassandra.Cassandra.client.php:219
Stack trace:
#0 /.../lib/thrift/packages/cassandra/cassandra.Cassandra.client.php(219): thrift_protocol_read_binary(Object(TBinaryProtocolAccelerated), '\cassandra\Cass...', false)
#1 /..../lib/thrift/packages/cassandra/cassandra.Cassandra.clien in /.../lib/thrift/packages/cassandra/cassandra.Cassandra.client.php on line 219
TApplicationException: Required field 'reversed' was not found in serialized data! Struct: SliceRange(start:80 01 00 01 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 00 0B 00 01 00 00 00 07 35 34 32 36 36 5F 30 0C 00 02 0B 00 03 00 00 00 08 63 6C 69 63 6B 73 44 42 00 0C 00 03 0C 00 02 0B 00 01 00 00 00 00, finish:80 01 00 01 00 00 00 09 67 65 74 5F 73 6C 69 63 65 00 00 00 00 0B 00 01 00 00 00 07 35 34 32 36 36 5F 30 0C 00 02 0B 00 03 00 00 00 08 63 6C 69 63 6B 73 44 42 00 0C 00 03 0C 00 02 0B 00 01 00 00 00 00 0B 00 02 00 00 00 00, reversed:false, count:100) in /..../lib/thrift/packages/cassandra/cassandra.Cassandra.client.php on line 219
Call Stack:
0.0003 345792 1. {main}() /...php:0
28.9077 2776564 2. phpcassa\ColumnFamily->get() ...php:56
28.9081 2778040 3. phpcassa\ColumnFamily->_get() /....php:290
28.9081 2778120 4. phpcassa\Connection\ConnectionPool->call() /...php:296
Is it my fault?
Hi Tyler,
I thought the error went away. Turned out the error does not happen only on secondary index operations.
That exception probably indicates that you're using the new slicing parameters incorrectly. I recommend you check out this: https://github.com/thobbs/phpcassa/blob/master/examples/column_slices.php
In any case, it's a totally different problem.
Thanks! I have found the error to be a missing new NULL argument by going through the tutorial.
Alright. Wonderful API this is. :-)
While initiating.ColumnFamily object...