public synchronized void register(long workerId, List<Long> totalBytesOnTiers,
List<Long> usedBytesOnTiers, Map<Long, List<Long>> currentBlocksOnTiers) throws IOException {
int retry = 0;
while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) {
connect();
try {
mClient.workerRegister(workerId, totalBytesOnTiers, usedBytesOnTiers, currentBlocksOnTiers);
return;
} catch (TException e) {
LOG.error(e.getMessage(), e);
mConnected = false;
}
}
throw new IOException("Failed after " + retry + " retries.");
}
}