public class IsmFormat
extends java.lang.Object
IsmFormat.IsmRecord and IsmFormat.IsmRecordCoder for further details around
the data format. In addition to the data, there is a bloom filter, and multiple indices to allow
for efficient retrieval.
An Ism file is composed of these high level sections (in order):
ScalableBloomFilter for details on encoding format)
IsmFormat.Footer for details on encoding format)
The shard block is composed of multiple copies of the following:
The data block is composed of multiple copies of the following:
IsmFormat.KeyPrefix for details on encoding format)
1225801234 as the seed value.
The data index is composed of N copies of the following:
IsmFormat.KeyPrefix for details on encoding format)
The shard index is composed of a variable length integer encoding representing
the number of shard index records followed by that many shard index records. See IsmFormat.IsmShardCoder for further details as to its encoding scheme.
| Modifier and Type | Class and Description |
|---|---|
static class |
IsmFormat.Footer
The footer stores the relevant information required to locate the index and bloom filter.
|
static class |
IsmFormat.FooterCoder
A
Coder for IsmFormat.Footer. |
static class |
IsmFormat.IsmRecord<V>
A record containing a composite key and either a value or metadata.
|
static class |
IsmFormat.IsmRecordCoder<V>
A
Coder for IsmFormat.IsmRecords. |
static class |
IsmFormat.IsmShard
A shard descriptor containing shard id, the data block offset, and the index offset for the
given shard.
|
static class |
IsmFormat.IsmShardCoder
A coder for
IsmFormat.IsmShards. |
static class |
IsmFormat.KeyPrefix
The prefix used before each key which contains the number of shared and unshared bytes from the
previous key that was read.
|
static class |
IsmFormat.KeyPrefixCoder
A
Coder for IsmFormat.KeyPrefix. |
static class |
IsmFormat.MetadataKeyCoder<K>
A coder for metadata key component.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.beam.sdk.coders.Coder<java.util.List<IsmFormat.IsmShard>> |
ISM_SHARD_INDEX_CODER
A
ListCoder wrapping a IsmFormat.IsmShardCoder used to encode the shard index. |
static int |
SHARD_BITS |
| Constructor and Description |
|---|
IsmFormat() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
getMetadataKey()
An object representing a wild card for a key component.
|
static boolean |
isMetadataKey(java.util.List<?> keyComponents)
Returns true if and only if any of the passed in key components represent a metadata key.
|
static void |
validateCoderIsCompatible(IsmFormat.IsmRecordCoder<?> coder)
Validates that the key portion of the given coder is deterministic.
|
public static final int SHARD_BITS
public static final org.apache.beam.sdk.coders.Coder<java.util.List<IsmFormat.IsmShard>> ISM_SHARD_INDEX_CODER
ListCoder wrapping a IsmFormat.IsmShardCoder used to encode the shard index. See ListCoder for its encoding specification and IsmFormat.IsmShardCoder for its encoding
specification.public static void validateCoderIsCompatible(IsmFormat.IsmRecordCoder<?> coder)
public static boolean isMetadataKey(java.util.List<?> keyComponents)
public static java.lang.Object getMetadataKey()
IsmFormat.MetadataKeyCoder.