/** {@inheritDoc} */ @Override public synchronized SchemaEntry getSchemaEntry(long schemaId) throws IOException { final State state = mState.get(); Preconditions.checkState(state == State.OPEN, "Cannot get schema entry from SchemaTable instance in state %s.", state); final SchemaEntry existingEntry = mSchemaIdMap.get(schemaId); if (existingEntry != null) { return existingEntry; } // On a lookup miss from the local schema cache, check to see if we can get the schema // from the original HBase table, cache it locally, and return it. final SchemaTableEntry avroEntry = loadFromIdTable(schemaId); if (avroEntry == null) { return null; } return storeInMemory(avroEntry); }