@Override public boolean equals(Object o) { if (o instanceof TermDocIdWritable) { TermDocIdWritable tuple = (TermDocIdWritable) o; return (__documentId.equals(tuple.getDocumentId()) && __term.equals(tuple.getTerm())); } return false; }
public boolean equals(Object obj) { boolean isEqual = false; if (obj instanceof TextLong) { TextLong other = (TextLong) obj; isEqual = first.equals(other.first) && second.equals(other.second); } return isEqual; }
public void run() { for (int i = 0; i < count; i++) { try { LongWritable param = new LongWritable(RANDOM.nextLong()); LongWritable value = (LongWritable) client.call(param, server, null, null); if (!param.equals(value)) { LOG.fatal("Call failed!"); failed = true; break; } } catch (Exception e) { LOG.fatal("Caught: " + StringUtils.stringifyException(e)); failed = true; } } }