@Test public void testSaveToZooKeeper() throws Exception { long now = System.currentTimeMillis(); r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null, now); byte[] zpathFileName = makeZPathFileName(TABLE_ID, ProblemType.FILE_READ, RESOURCE); String path = ZooUtil.getRoot("instance") + Constants.ZPROBLEMS + "/" + Encoding.encodeAsBase64FileName(new Text(zpathFileName)); byte[] encoded = encodeReportData(now, SERVER, null); expect(zoorw.putPersistentData(eq(path), aryEq(encoded), eq(NodeExistsPolicy.OVERWRITE))) .andReturn(true); replay(zoorw); r.saveToZooKeeper(context); verify(zoorw); }
void saveToZooKeeper(ServerContext context) throws IOException, KeeperException, InterruptedException { context.getZooReaderWriter().putPersistentData(getZPath(context.getZooKeeperRoot()), encode(), NodeExistsPolicy.OVERWRITE); }
ProblemReport { void saveToZooKeeper(ServerContext context) throws IOException, KeeperException, InterruptedException { context.getZooReaderWriter().putPersistentData(getZPath(context.getZooKeeperRoot()), encode(), NodeExistsPolicy.OVERWRITE); } }
ProblemReport { void saveToZooKeeper(ServerContext context) throws IOException, KeeperException, InterruptedException { context.getZooReaderWriter().putPersistentData(getZPath(context.getZooKeeperRoot()), encode(), NodeExistsPolicy.OVERWRITE); } ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e, long creationTime);  ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e);  ProblemReport(TableId tableId, ProblemType problemType, String resource, Throwable e); private  ProblemReport(TableId table, ProblemType problemType, String resource, byte[] enc); }
ProblemReport { void saveToZooKeeper(ServerContext context) throws IOException, KeeperException, InterruptedException { context.getZooReaderWriter().putPersistentData(getZPath(context.getZooKeeperRoot()), encode(), NodeExistsPolicy.OVERWRITE); } ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e, long creationTime);  ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e);  ProblemReport(TableId tableId, ProblemType problemType, String resource, Throwable e); private  ProblemReport(TableId table, ProblemType problemType, String resource, byte[] enc); static ProblemReport decodeMetadataEntry(Entry<Key,Value> entry); TableId getTableId(); ProblemType getProblemType(); String getResource(); String getException(); String getServer(); long getTime(); @Override int hashCode(); @Override boolean equals(Object o); }
ProblemReport { void saveToZooKeeper(ServerContext context) throws IOException, KeeperException, InterruptedException { context.getZooReaderWriter().putPersistentData(getZPath(context.getZooKeeperRoot()), encode(), NodeExistsPolicy.OVERWRITE); } ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e, long creationTime);  ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e);  ProblemReport(TableId tableId, ProblemType problemType, String resource, Throwable e); private  ProblemReport(TableId table, ProblemType problemType, String resource, byte[] enc); static ProblemReport decodeMetadataEntry(Entry<Key,Value> entry); TableId getTableId(); ProblemType getProblemType(); String getResource(); String getException(); String getServer(); long getTime(); @Override int hashCode(); @Override boolean equals(Object o);  }