FAQ
What license is KijiSchema under?
KijiSchema is under the Apache License, Version 2.0
How do I add Kiji and its dependencies to my application's classpath?
Like hadoop
, the kiji
binary supports a jar
operation. If your program is
packaged as a single jar and you want to run it with Kiji on the classpath, you
can run:
$ kiji jar myapp.jar com.myorg.MyApp [args...]
If your application constructs a more complex classpath, then you can also add
Kiji to your application's classpath explicitly. Like hadoop
and hbase
, the
kiji
binary has a classpath
command which will print a string that you can
use directly in your $CLASSPATH
environment variable or on the java
command
line as the -cp
option. For example:
$ java -cp myapp.jar:`kiji classpath` com.myorg.MyApp
I'm confident that I'm writing data to my Kiji table correctly. Why don't I see the new cells when I try to read them back?
Check the retention policy for the cells in the locality group you are writing to. The locality groups of your Kiji table are configured in your table's layout. See Managing Data for details.
In particular, check to make sure the timestamps of the new cells you are
writing are in milliseconds, and that they fall within the bounds of your
locality group's ttl_seconds
setting.
How do I specify the schema of a column in my Kiji table?
Kiji uses Avro for data type definitions and serialization within cells of Kiji
tables. Avro can define simple types like "int"
and "string"
as well as
complex record types, composed of scalars or other records, arrays, maps, etc.
Every column (or map-type family) in Kiji has a type (or «schema» in Avro
parlance) associated with it.
For primitives types like, eg. "int"
, use the following in your column layout
descriptor:
column_schema: {type: "INLINE", value = '"int"'}
For complex record types, you may instead specify a generated record class:
column_schema: {type: "CLASS", value = "org.package.GeneratedRecordClass"}
You can write Avro schemas .avsc
or .avdl
files. These can be compiled into
Java classes that represent the record type. This makes working with these
objects easier in your mapper and reducers. For complete information on Avro,
visit http://avro.apache.org.
See Managing Data for more details on Kiji cell schemas.
How does data in Kiji map to Java types?
Kiji uses Avro for data type management and serialization. Each cell of typed
data has an associated Avro schema. When reading or writing data from Kiji, the
Java type must be compatible with the Avro schema. For example, if a Kiji
column has the Avro schema "string"
, data read from cells of the column will
implement the Java CharSequence interface. For
record schemas that have been compiled into Java classes using the Avro
compiler, the Java type corresponding to the schema is the compiled class.
The full list of mappings between Avro schemas and Java types are documented in the Avro Java API documentation. See the package documentation for org.apache.avro.specific and org.apache.avro.generic.
Are there restrictions on the characters I use in table names, family names, and column names?
Yes. All table names, column family names, and column qualifier
names may only contain numbers, letters and underscores
([A-Za-z_][A-Za-z0-9_]*
). However, the qualifiers of a map-type column family
may contain any printable characters.
KijiSchema User Guide
- What is KijiSchema?
- Data Model
- Managing Data
- Accessing Data
- For Administrators
- Kiji Security
- DDL Shell Reference
- Command-Line Tool Reference
- FAQ