[
https://issues.apache.org/jira/browse/TAJO-1670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627432#comment-14627432
]
ASF GitHub Bot commented on TAJO-1670:
--------------------------------------
Github user jinossy commented on a diff in the pull request:
https://github.com/apache/tajo/pull/621#discussion_r34641447
--- Diff:
tajo-catalog/tajo-catalog-client/src/main/java/org/apache/tajo/catalog/AbstractCatalogClient.java
---
@@ -51,113 +55,132 @@ public AbstractCatalogClient(TajoConf conf) {
this.conf = conf;
}
- abstract CatalogProtocolService.BlockingInterface getStub() throws
ServiceException;
+ abstract BlockingInterface getStub() throws ServiceException;
@Override
public final Boolean createTablespace(final String tablespaceName, final
String tablespaceUri) {
+
try {
- CatalogProtocolService.BlockingInterface stub = getStub();
+ final BlockingInterface stub = getStub();
+ final CreateTablespaceRequest request =
CreateTablespaceRequest.newBuilder()
+ .setTablespaceName(tablespaceName)
+ .setTablespaceUri(tablespaceUri)
+ .build();
- CreateTablespaceRequest.Builder builder =
CreateTablespaceRequest.newBuilder();
- builder.setTablespaceName(tablespaceName);
- builder.setTablespaceUri(tablespaceUri);
- return stub.createTablespace(null, builder.build()).getValue();
- } catch (Exception e) {
- LOG.error(e.getMessage(), e);
- return Boolean.FALSE;
+ return isSuccess(stub.createTablespace(null, request));
+
+ } catch (ServiceException e) {
+ throw new RuntimeException(e);
--- End diff --
I understand. Thank for your description
> Refactor client errors and exceptions
> -------------------------------------
>
> Key: TAJO-1670
> URL: https://issues.apache.org/jira/browse/TAJO-1670
> Project: Tajo
> Issue Type: Sub-task
> Components: Java Client, TajoMaster, Worker
> Reporter: Hyunsik Choi
> Assignee: Hyunsik Choi
> Fix For: 0.11.0
>
>
> The main objective is to refactor the error and exception system in client
> side and its connected parts like TajoMaster.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)