private void handleResponses() { try { readResponseResolver_.resolve(new ArrayList<Message>(responses_)); } catch (DigestMismatchException ex) { logger_.info("We should not be coming here under any circumstances ..."); logger_.info(LogUtil.throwableToString(ex)); } }
/** Starts up the analytics context and registers the VM metrics. */ public void start() { // register the vm analytics object with the analytics context to update the data registerUpdater(new VMAnalyticsSource()); init("analyticsContext", DatabaseDescriptor.getGangliaServers()); try { startMonitoring(); } catch (IOException e) { logger_.error(LogUtil.throwableToString(e)); } }
private void handleDigestResponses() { DataInputBuffer bufIn = new DataInputBuffer(); logger_.debug("Handle Digest responses"); for (Message response : responses_) { byte[] body = (byte[]) response.getMessageBody()[0]; bufIn.reset(body, body.length); try { ReadResponseMessage result = ReadResponseMessage.serializer().deserialize(bufIn); byte[] digest = result.digest(); if (!Arrays.equals(row_.digest(), digest)) { doReadRepair(); break; } } catch (IOException ex) { logger_.info(LogUtil.throwableToString(ex)); } } }
public void run() { logger_.debug(" Run the consistency checks for " + columnFamily_); String table = DatabaseDescriptor.getTables().get(0); ReadMessage readMessageDigestOnly = null; if (columnNames_.isEmpty()) { if (start_ >= 0 && count_ < Integer.MAX_VALUE) { readMessageDigestOnly = new ReadMessage(table, row_.key(), columnFamily_, start_, count_); } else { readMessageDigestOnly = new ReadMessage(table, row_.key(), columnFamily_); } } else { readMessageDigestOnly = new ReadMessage(table, row_.key(), columnFamily_, columnNames_); } readMessageDigestOnly.setIsDigestQuery(true); try { Message messageDigestOnly = ReadMessage.makeReadMessage(readMessageDigestOnly); IAsyncCallback digestResponseHandler = new DigestResponseHandler(); MessagingService.getMessagingInstance() .sendRR(messageDigestOnly, replicas_.toArray(new EndPoint[0]), digestResponseHandler); } catch (IOException ex) { logger_.info(LogUtil.throwableToString(ex)); } }
/**