HBASE-13789 ForeignException should not be sent to the client
This commit is contained in:
parent
32f4a6ad8f
commit
02af4b066f
|
@ -37,6 +37,7 @@ import org.apache.hadoop.hbase.ServerName;
|
|||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.UnknownRegionException;
|
||||
import org.apache.hadoop.hbase.MetaTableAccessor;
|
||||
import org.apache.hadoop.hbase.errorhandling.ForeignException;
|
||||
import org.apache.hadoop.hbase.exceptions.MergeRegionException;
|
||||
import org.apache.hadoop.hbase.exceptions.UnknownProtocolException;
|
||||
import org.apache.hadoop.hbase.ipc.QosPriority;
|
||||
|
@ -667,6 +668,8 @@ public class MasterRpcServices extends RSRpcServices
|
|||
long waitTime = SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME;
|
||||
return ExecProcedureResponse.newBuilder().setExpectedTimeout(
|
||||
waitTime).build();
|
||||
} catch (ForeignException e) {
|
||||
throw new ServiceException(e.getCause());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
|
@ -900,6 +903,8 @@ public class MasterRpcServices extends RSRpcServices
|
|||
boolean done = mpm.isProcedureDone(desc);
|
||||
builder.setDone(done);
|
||||
return builder.build();
|
||||
} catch (ForeignException e) {
|
||||
throw new ServiceException(e.getCause());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
|
@ -925,6 +930,8 @@ public class MasterRpcServices extends RSRpcServices
|
|||
boolean done = master.snapshotManager.isRestoreDone(snapshot);
|
||||
builder.setDone(done);
|
||||
return builder.build();
|
||||
} catch (ForeignException e) {
|
||||
throw new ServiceException(e.getCause());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
|
@ -948,6 +955,8 @@ public class MasterRpcServices extends RSRpcServices
|
|||
boolean done = master.snapshotManager.isSnapshotDone(request.getSnapshot());
|
||||
builder.setDone(done);
|
||||
return builder.build();
|
||||
} catch (ForeignException e) {
|
||||
throw new ServiceException(e.getCause());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
|
@ -1160,6 +1169,8 @@ public class MasterRpcServices extends RSRpcServices
|
|||
SnapshotDescription reqSnapshot = request.getSnapshot();
|
||||
master.snapshotManager.restoreSnapshot(reqSnapshot);
|
||||
return RestoreSnapshotResponse.newBuilder().build();
|
||||
} catch (ForeignException e) {
|
||||
throw new ServiceException(e.getCause());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
|
@ -1219,6 +1230,8 @@ public class MasterRpcServices extends RSRpcServices
|
|||
long waitTime = SnapshotDescriptionUtils.getMaxMasterTimeout(master.getConfiguration(),
|
||||
snapshot.getType(), SnapshotDescriptionUtils.DEFAULT_MAX_WAIT_TIME);
|
||||
return SnapshotResponse.newBuilder().setExpectedTimeout(waitTime).build();
|
||||
} catch (ForeignException e) {
|
||||
throw new ServiceException(e.getCause());
|
||||
} catch (IOException e) {
|
||||
throw new ServiceException(e);
|
||||
}
|
||||
|
@ -1341,7 +1354,7 @@ public class MasterRpcServices extends RSRpcServices
|
|||
response.setEnabled(master.isBalancerOn());
|
||||
return response.build();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SetQuotaResponse setQuota(RpcController c, SetQuotaRequest req) throws ServiceException {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue