final byte[] region = regions.get(i).getRegionInfo().getRegionName(); RegionCoprocessorServiceExec exec = new RegionCoprocessorServiceExec(region, rowKey, methodDescriptor, request); execs.add(exec); execsByRow.put(rowKey, exec);
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } return compareTo((RegionCoprocessorServiceExec) obj) == 0; }
@Override public int compareTo(Row o) { int res = Bytes.compareTo(this.getRow(), o.getRow()); if ((o instanceof RegionCoprocessorServiceExec) && res == 0) { RegionCoprocessorServiceExec exec = (RegionCoprocessorServiceExec) o; res = method.getFullName().compareTo(exec.getMethod().getFullName()); if (res == 0) { res = Bytes.compareTo(request.toByteArray(), exec.getRequest().toByteArray()); } } return res; }
@Override public int hashCode() { return Objects.hashCode(Bytes.hashCode(this.getRow()), method.getFullName(), request); }
@Override public int hashCode() { return Objects.hashCode(Bytes.hashCode(this.getRow()), method.getFullName(), request); }
exec.getRequest().toByteArray()); if (cpBuilder == null) { cpBuilder = ClientProtos.CoprocessorServiceCall.newBuilder(); cpBuilder.setRow(UnsafeByteOperations.unsafeWrap(exec.getRow())) .setServiceName(exec.getMethod().getService().getFullName()) .setMethodName(exec.getMethod().getName()) .setRequest(value))); } else if (row instanceof RowMutations) {
@Override public int hashCode() { return Objects.hashCode(Bytes.hashCode(this.getRow()), method.getFullName(), request); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } return compareTo((RegionCoprocessorServiceExec) obj) == 0; }
final byte[] region = regions.get(i).getRegionInfo().getRegionName(); RegionCoprocessorServiceExec exec = new RegionCoprocessorServiceExec(region, rowKey, methodDescriptor, request); execs.add(exec); execsByRow.put(rowKey, exec);
exec.getRequest().toByteArray()); if (cpBuilder == null) { cpBuilder = ClientProtos.CoprocessorServiceCall.newBuilder(); cpBuilder.setRow(UnsafeByteOperations.unsafeWrap(exec.getRow())) .setServiceName(exec.getMethod().getService().getFullName()) .setMethodName(exec.getMethod().getName()) .setRequest(value))); } else if (row instanceof RowMutations) {
@Override public int hashCode() { return Objects.hashCode(Bytes.hashCode(this.getRow()), method.getFullName(), request); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } return compareTo((RegionCoprocessorServiceExec) obj) == 0; }
final byte[] region = regions.get(i).getRegionInfo().getRegionName(); RegionCoprocessorServiceExec exec = new RegionCoprocessorServiceExec(region, rowKey, methodDescriptor, request); execs.add(exec); execsByRow.put(rowKey, exec);
@Override public int compareTo(Row o) { int res = Bytes.compareTo(this.getRow(), o.getRow()); if ((o instanceof RegionCoprocessorServiceExec) && res == 0) { RegionCoprocessorServiceExec exec = (RegionCoprocessorServiceExec) o; res = method.getFullName().compareTo(exec.getMethod().getFullName()); if (res == 0) { res = Bytes.compareTo(request.toByteArray(), exec.getRequest().toByteArray()); } } return res; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Row other = (Row) obj; return compareTo(other) == 0; } }
final byte[] region = regions.get(i).getRegionInfo().getRegionName(); RegionCoprocessorServiceExec exec = new RegionCoprocessorServiceExec(region, rowKey, methodDescriptor, request); execs.add(exec); execsByRow.put(rowKey, exec);
exec.getRequest().toByteArray()); if (cpBuilder == null) { cpBuilder = ClientProtos.CoprocessorServiceCall.newBuilder(); cpBuilder.setRow(UnsafeByteOperations.unsafeWrap(exec.getRow())) .setServiceName(exec.getMethod().getService().getFullName()) .setMethodName(exec.getMethod().getName()) .setRequest(value))); } else if (row instanceof RowMutations) {
exec.getRequest().toByteArray()); if (cpBuilder == null) { cpBuilder = ClientProtos.CoprocessorServiceCall.newBuilder(); cpBuilder.setRow(UnsafeByteOperations.unsafeWrap(exec.getRow())) .setServiceName(exec.getMethod().getService().getFullName()) .setMethodName(exec.getMethod().getName()) .setRequest(value))); } else if (row instanceof RowMutations) {
@Override public int compareTo(Row o) { int res = Bytes.compareTo(this.getRow(), o.getRow()); if ((o instanceof RegionCoprocessorServiceExec) && res == 0) { RegionCoprocessorServiceExec exec = (RegionCoprocessorServiceExec) o; res = method.getFullName().compareTo(exec.getMethod().getFullName()); if (res == 0) { res = Bytes.compareTo(request.toByteArray(), exec.getRequest().toByteArray()); } } return res; }
@Override public int compareTo(Row o) { int res = Bytes.compareTo(this.getRow(), o.getRow()); if ((o instanceof RegionCoprocessorServiceExec) && res == 0) { RegionCoprocessorServiceExec exec = (RegionCoprocessorServiceExec) o; res = method.getFullName().compareTo(exec.getMethod().getFullName()); if (res == 0) { res = Bytes.compareTo(request.toByteArray(), exec.getRequest().toByteArray()); } } return res; }