@Before public final void setup() throws Exception { mKiji = Kiji.Factory.open(getKijiURI()); mKiji.createTable("user", KijiTableLayouts.getTableLayout(KijiTableLayouts.PAGING_TEST)); mUserTable = mKiji.openTable("user"); mTableReader = mUserTable.openTableReader(); mGarrettId = mUserTable.getEntityId("garrett"); mJulietId = mUserTable.getEntityId("juliet"); final KijiTableWriter writer = mUserTable.openTableWriter(); try { writer.put(mGarrettId, "info", "name", "garrett"); writer.put( mGarrettId, "info", "location", new GregorianCalendar(1984, 9, 9).getTime().getTime(), "Bothell, WA"); writer.put( mGarrettId, "info", "location", new GregorianCalendar(2002, 9, 20).getTime().getTime(), "Seattle, WA"); writer.put( mGarrettId, "info", "location", new GregorianCalendar(2006, 10, 1).getTime().getTime(), "San Jose, CA"); writer.put( mGarrettId, "info", "location", new GregorianCalendar(2008, 9, 1).getTime().getTime(), "New York, NY"); writer.put( mGarrettId, "info", "location", new GregorianCalendar(2010, 10, 3).getTime().getTime(), "San Francisco, CA"); writer.put( mGarrettId, "jobs", "Papa Murphy's Pizza", new GregorianCalendar(1999, 10, 10).getTime().getTime(), "Pizza Maker"); writer.put( mGarrettId, "jobs", "The Catalyst Group", new GregorianCalendar(2004, 9, 10).getTime().getTime(), "Software Developer"); writer.put( mGarrettId, "jobs", "Google", new GregorianCalendar(2006, 6, 26).getTime().getTime(), "Software Engineer"); writer.put( mGarrettId, "jobs", "WibiData", new GregorianCalendar(2010, 10, 4).getTime().getTime(), "MTS"); } finally { writer.close(); } }
@After public void teardown() throws Exception { mTableReader.close(); mUserTable.close(); mKiji.release(); }