TabletLocation tl = tabLocator.locateTablet(split, false, false, credentials);
if (tl == null) {
if (!Tables.exists(instance, tableId))
throw new TableNotFoundException(tableId, tableName, null);
else if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
throw new TableOfflineException(instance, tableId);
continue;
}
try {
TabletClientService.Client client = ThriftUtil.getTServerClient(tl.tablet_location, instance.getConfiguration());
try {
OpTimer opTimer = null;
if (log.isTraceEnabled())
opTimer = new OpTimer(log, Level.TRACE).start("Splitting tablet " + tl.tablet_extent + " on " + tl.tablet_location + " at " + split);
client.splitTablet(Tracer.traceInfo(), credentials, tl.tablet_extent.toThrift(), TextUtil.getByteBuffer(split));
// just split it, might as well invalidate it in the cache
tabLocator.invalidateCache(tl.tablet_extent);
if (opTimer != null)
opTimer.stop("Split tablet in %DURATION%");
} finally {
ThriftUtil.returnClient(client);
}
} catch (TApplicationException tae) {
throw new AccumuloServerException(tl.tablet_location, tae);
} catch (TTransportException e) {
tabLocator.invalidateCache(tl.tablet_location);
continue;
} catch (ThriftSecurityException e) {
Tables.clearCache(instance);
if (!Tables.exists(instance, tableId))
throw new TableNotFoundException(tableId, tableName, null);
throw new AccumuloSecurityException(e.user, e.code, e);
} catch (NotServingTabletException e) {
tabLocator.invalidateCache(tl.tablet_extent);
continue;
} catch (TException e) {