mirror of https://github.com/apache/cassandra
upgrade avro to 1.4.0 devel snapshot
* upgraded jars * replace some use of Utf8 for java.lang.CharSequence * actually start http server by invoking start() Patch by eevans git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@987199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c8b5171dd3
commit
f93ebf4fa0
|
|
@ -202,7 +202,7 @@
|
|||
<!-- Generate json schema from genavro IDL -->
|
||||
<java classname="org.apache.avro.tool.Main" fork="true">
|
||||
<classpath refid="cassandra.classpath" />
|
||||
<arg value="genavro" />
|
||||
<arg value="idl" />
|
||||
<arg value="@{inputfile}" />
|
||||
<arg value="@{outputdir}/cassandra.avpr" />
|
||||
</java>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -133,6 +133,7 @@ public class CassandraDaemon extends org.apache.cassandra.service.AbstractCassan
|
|||
Mx4jTool.maybeLoad();
|
||||
// FIXME: This isn't actually binding to listenAddr (it should).
|
||||
server = new HttpServer(responder, listenPort);
|
||||
server.start();
|
||||
}
|
||||
|
||||
/** hook for JSVC */
|
||||
|
|
|
|||
|
|
@ -453,9 +453,9 @@ public class CassandraServer implements Cassandra {
|
|||
for (MutationsMapEntry pair: mutationMap)
|
||||
{
|
||||
AvroValidation.validateKey(pair.key.array());
|
||||
Map<Utf8, GenericArray<Mutation>> cfToMutations = pair.mutations;
|
||||
Map<CharSequence, GenericArray<Mutation>> cfToMutations = pair.mutations;
|
||||
|
||||
for (Map.Entry<Utf8, GenericArray<Mutation>> cfMutations : cfToMutations.entrySet())
|
||||
for (Map.Entry<CharSequence, GenericArray<Mutation>> cfMutations : cfToMutations.entrySet())
|
||||
{
|
||||
String cfName = cfMutations.getKey().toString();
|
||||
|
||||
|
|
@ -493,11 +493,11 @@ public class CassandraServer implements Cassandra {
|
|||
}
|
||||
|
||||
// FIXME: This is copypasta from o.a.c.db.RowMutation, (RowMutation.getRowMutation uses Thrift types directly).
|
||||
private static RowMutation getRowMutationFromMutations(String keyspace, byte[] key, Map<Utf8, GenericArray<Mutation>> cfMap)
|
||||
private static RowMutation getRowMutationFromMutations(String keyspace, byte[] key, Map<CharSequence, GenericArray<Mutation>> cfMap)
|
||||
{
|
||||
RowMutation rm = new RowMutation(keyspace, key);
|
||||
|
||||
for (Map.Entry<Utf8, GenericArray<Mutation>> entry : cfMap.entrySet())
|
||||
for (Map.Entry<CharSequence, GenericArray<Mutation>> entry : cfMap.entrySet())
|
||||
{
|
||||
String cfName = entry.getKey().toString();
|
||||
|
||||
|
|
@ -563,7 +563,7 @@ public class CassandraServer implements Cassandra {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Void set_keyspace(Utf8 keyspace) throws InvalidRequestException
|
||||
public Void set_keyspace(CharSequence keyspace) throws InvalidRequestException
|
||||
{
|
||||
String keyspaceStr = keyspace.toString();
|
||||
|
||||
|
|
@ -638,7 +638,7 @@ public class CassandraServer implements Cassandra {
|
|||
if (ksDef.strategy_options != null && !ksDef.strategy_options.isEmpty())
|
||||
{
|
||||
strategyOptions = new HashMap<String, String>();
|
||||
for (Map.Entry<Utf8, Utf8> option : ksDef.strategy_options.entrySet())
|
||||
for (Map.Entry<CharSequence, CharSequence> option : ksDef.strategy_options.entrySet())
|
||||
{
|
||||
strategyOptions.put(option.getKey().toString(), option.getValue().toString());
|
||||
}
|
||||
|
|
@ -678,11 +678,11 @@ public class CassandraServer implements Cassandra {
|
|||
}
|
||||
|
||||
@Override
|
||||
public GenericArray<Utf8> describe_keyspaces() throws AvroRemoteException
|
||||
public GenericArray<CharSequence> describe_keyspaces() throws AvroRemoteException
|
||||
{
|
||||
Set<String> keyspaces = DatabaseDescriptor.getTables();
|
||||
Schema schema = Schema.createArray(Schema.create(Schema.Type.STRING));
|
||||
GenericArray<Utf8> avroResults = new GenericData.Array<Utf8>(keyspaces.size(), schema);
|
||||
GenericArray<CharSequence> avroResults = new GenericData.Array<CharSequence>(keyspaces.size(), schema);
|
||||
|
||||
for (String ksp : keyspaces)
|
||||
avroResults.add(new Utf8(ksp));
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public final class KSMetaData
|
|||
ks.strategy_class = new Utf8(strategyClass.getName());
|
||||
if (strategyOptions != null)
|
||||
{
|
||||
ks.strategy_options = new HashMap<Utf8, Utf8>();
|
||||
ks.strategy_options = new HashMap<CharSequence, CharSequence>();
|
||||
for (Map.Entry<String, String> e : strategyOptions.entrySet())
|
||||
{
|
||||
ks.strategy_options.put(new Utf8(e.getKey()), new Utf8(e.getValue()));
|
||||
|
|
@ -106,7 +106,7 @@ public final class KSMetaData
|
|||
if (ks.strategy_options != null)
|
||||
{
|
||||
strategyOptions = new HashMap<String, String>();
|
||||
for (Map.Entry<Utf8, Utf8> e : ks.strategy_options.entrySet())
|
||||
for (Map.Entry<CharSequence, CharSequence> e : ks.strategy_options.entrySet())
|
||||
{
|
||||
strategyOptions.put(e.getKey().toString(), e.getValue().toString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue