accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request #243: ACCUMULO-4619 fix split hanging on Error
Date Wed, 05 Apr 2017 19:16:14 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/243#discussion_r110004090
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
---
    @@ -389,14 +389,17 @@ public void addSplits(String tableName, SortedSet<Text> partitionKeys)
throws Ta
             if (exception.get() != null) {
               executor.shutdownNow();
               Throwable excep = exception.get();
    -          if (excep instanceof TableNotFoundException)
    -            throw (TableNotFoundException) excep;
    -          else if (excep instanceof AccumuloException)
    -            throw (AccumuloException) excep;
    -          else if (excep instanceof AccumuloSecurityException)
    -            throw (AccumuloSecurityException) excep;
    +          if (excep instanceof TableNotFoundException) {
    +            TableNotFoundException tnfe = (TableNotFoundException) excep;
    +            throw new TableNotFoundException(tableId, tableName, "Table not found by
background thread", tnfe);
    +          } else if (excep instanceof AccumuloSecurityException) {
    +            // base == background accumulo security exception
    +            AccumuloSecurityException base = (AccumuloSecurityException) excep;
    +            throw new AccumuloSecurityException(base.getUser(), base.asThriftException().getCode(),
base.getTableInfo(), excep);
    +          } else if (excep instanceof Error)
    +            throw new Error(excep);
    --- End diff --
    
    Thats the case I was rambling about earlier.  Because if the user prints this stack trace,
they will not see the code path that called TablerOps.addSplits().  They will just see the
stack trace for some background thread that TablerOps.addSplits() created.  So if your code
has multiple places that call  TablerOps.addSplits(), then you may not know which one triggered
the exception.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message