Database Reference
In-Depth Information
"response": "null",
"errors": ["InvalidRequestException", "UnavailableException",
"TimedOutException"]
},
//etc...
The JSON format is concise and easy to read. You can see, for example, that there are at least
two kinds of messages, one representing a
get
request and the other representing an
insert
re-
quest. The exceptions possible for each type are packaged with their messages.
Avro Ant Targets
The Cassandra build.xmlile defines two Ant targets that are executed when Cassandra is com-
piled from source, which is made possible by avro-1.2.0-dev.jarin the Cassandra libdirectory.
These targets are shown in the following listing:
<!--
Generate avro code
-->
<target name="
check-avro-generate
">
<uptodate property="avroUpToDate"
srcfile="${interface.dir}/cassandra.avpr"
targetfile="${interface.avro.dir}/org/apache/cassandra/avro/
Cassandra.java" />
<taskdef name="protocol"
classname="org.apache.avro.specific.ProtocolTask">
<classpath refid="cassandra.classpath" />
</taskdef>
<taskdef name="
schema
" classname="org.apache.avro.specific.SchemaTask">
<classpath refid="cassandra.classpath" />
</taskdef>
<taskdef name="
paranamer
"
classname="com.thoughtworks.paranamer.ant.ParanamerGeneratorTask">
<classpath refid="cassandra.classpath" />
</taskdef>
</target>
<target name="
avro-generate
" unless="avroUpToDate"
depends="init,check-avro-generate">
<echo>Generating avro code...</echo>