Comments (2)
Ok, I think I found it - libgenthrift/cassandra_types.cpp. I took the warning at the top in the comments to heart, but I couldn't resist :)
ColumnPath::write function at (or near) line 687. For both this->super_column and this->column I added the .c_str() to return the character array rather than writing the string struct. The new function should look as follows:
uint32_t ColumnPath::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ColumnPath");
xfer += oprot->writeFieldBegin("column_family", ::apache::thrift::protocol::T_STRING, 3);
xfer += oprot->writeString(this->column_family);
xfer += oprot->writeFieldEnd();
if (this->__isset.super_column) {
xfer += oprot->writeFieldBegin("super_column", ::apache::thrift::protocol::T_STRING, 4);
xfer += oprot->writeBinary(this->super_column.c_str());
xfer += oprot->writeFieldEnd();
}
if (this->__isset.column) {
xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 5);
xfer += oprot->writeBinary(this->column.c_str());
xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
I haven't thoroughly tested this, but I AM able to add a column (or super column) with TimeUUID name. I hope this receives everyone well.
from libcassandra.
Ok, disregard my comment/changes earlier. I was not assigning my strings properly in C++ to accomodate TimeUUID's. Here is the proper way (in C++) to assign a TimeUUID to a string and have it get added successfully into Cassandra:
uuid_t uu;
string suu;
uuid_generate_time(uu);
suu.assign((char *)uu, 16);
key_space->insertColumn(row_key, cf, suu, col, val);
Hope that helps someone else in the future. Sorry for any confusion with my earlier posts.
from libcassandra.
Related Issues (19)
- make warnings => errors regarding variadic macros... HOT 5
- Creating ColumnFamily and Column through C++ code HOT 2
- Creating Column and their datatype dynamically in libcassandra HOT 1
- Compilation Issue on Mac OSX HOT 1
- using getcount() showing "predicate column_names and slice_range may not both be null" HOT 1
- Assigning columnNames to SlicePredicate
- ColumnType as Integer doesn't accept Integer data
- TException : No more data to read. HOT 2
- Build errors with gcc 4.5.2 and thrift 0.6.0 HOT 4
- surprised by the signature for Keyspace::insertSuperColumn()... HOT 5
- configure warns of problems with assert.h
- Compilation errors.
- Catch TTransportException and rethrow an UnavailableExpception HOT 2
- Bug in removing super column HOT 3
- Memory leaks in cassandra.cc
- Build broken? HOT 7
- Unable to remove an entire row specified by a key HOT 1
- Using factory->create() on an endpoint that is down, causes a memroy leak HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcassandra.