Package org.kiji.schema.KijiSchemaTable

Examples of org.kiji.schema.KijiSchemaTable.SchemaHashCache


  @Test
  public void testSchemaMD5CacheTwoIdenticalPrimitives() throws Exception {
    final Schema intSchema1 = Schema.create(Schema.Type.INT);
    final Schema intSchema2 = Schema.create(Schema.Type.INT);

    final SchemaHashCache cache = new SchemaHashCache();
    final BytesKey key1 = cache.getHash(intSchema1);
    assertEquals(key1, cache.getHash(intSchema1));
    final BytesKey key2 = cache.getHash(intSchema2);
    assertEquals(key1, key2);
  }
View Full Code Here


        + "  \"type\": \"record\","
        + "  \"doc\": \"Modified documentation\","
        + "  \"fields\": []"
        + "}");

    final SchemaHashCache cache = new SchemaHashCache();
    final BytesKey key1 = cache.getHash(schema1);
    assertEquals(key1, cache.getHash(schema1));

    final BytesKey key1bis = cache.getHash(schema1bis);
    final BytesKey key2 = cache.getHash(schema2);
    assertEquals(key1, key1bis);
    assertFalse(key1.equals(key2));
  }
View Full Code Here

TOP

Related Classes of org.kiji.schema.KijiSchemaTable.SchemaHashCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.