/** * Fetches a schema entry from the tables given a schema hash. * * @param schemaHash schema hash * @return Avro schema entry, or null if the schema hash does not exist in the table * @throws IOException on I/O error. */ private SchemaTableEntry loadFromHashTable(BytesKey schemaHash) throws IOException { final Get get = new Get(schemaHash.getBytes()); final Result result = mSchemaHashTable.get(get); return result.isEmpty() ? null : decodeSchemaEntry(result.value()); }
/** * Fetches a schema entry from the tables given a schema ID. * * @param schemaId schema ID * @return Avro schema entry, or null if the schema ID does not exist in the table * @throws IOException on I/O error. */ private SchemaTableEntry loadFromIdTable(long schemaId) throws IOException { final Get get = new Get(longToVarInt64(schemaId)); final Result result = mSchemaIdTable.get(get); return result.isEmpty() ? null : decodeSchemaEntry(result.value()); }
SCHEMA_COLUMN_QUALIFIER_BYTES)) { try { final SchemaEntry entry = fromAvroEntry(decodeSchemaEntry(keyValue.getValue())); entries.add(entry); if (!getSchemaHash(entry.getSchema()).equals(entry.getHash())) {
SCHEMA_COLUMN_QUALIFIER_BYTES)) { try { final SchemaEntry entry = fromAvroEntry(decodeSchemaEntry(keyValue.getValue())); entries.add(entry); if (!getSchemaHash(entry.getSchema()).equals(entry.getHash())) {