/** * Hashes an Avro schema. * * @param schema Avro schema to hash. * @return the schema hash. */ public BytesKey getHash(Schema schema) { final BytesKey hash = mCache.get(schema); if (null != hash) { return hash; } final BytesKey newHash = new BytesKey(hashSchema(schema)); mCache.put(schema, newHash); return newHash; } }
/** {@inheritDoc} */ @Override public BytesKey getSchemaHash(Schema schema) { return mHashCache.getHash(schema); }
/** {@inheritDoc} */ @Override public BytesKey getSchemaHash(Schema schema) { return mHashCache.getHash(schema); }