[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16628613#comment-16628613 ] ASF GitHub Bot commented on KYLIN-3587: --- shaofengshi closed pull request #256: KYLIN-3587 Including tableID in IllegalStateException messages URL: https://github.com/apache/kylin/pull/256 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java b/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java index bad9773929..77bad37acb 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java @@ -303,7 +303,7 @@ public ProjectInstance addTableDescToProject(String[] tableIdentities, String pr for (String tableId : tableIdentities) { TableDesc table = metaMgr.getTableDesc(tableId, projectName); if (table == null) { -throw new IllegalStateException("Cannot find table '" + table + "' in metadata manager"); +throw new IllegalStateException("Cannot find table '" + tableId + "' in metadata manager"); } projectInstance.addTable(table.getIdentity()); } @@ -312,13 +312,13 @@ public ProjectInstance addTableDescToProject(String[] tableIdentities, String pr } } -public void removeTableDescFromProject(String tableIdentities, String projectName) throws IOException { +public void removeTableDescFromProject(String tableId, String projectName) throws IOException { try (AutoLock lock = prjMapLock.lockForWrite()) { TableMetadataManager metaMgr = getTableManager(); ProjectInstance projectInstance = getProject(projectName); -TableDesc table = metaMgr.getTableDesc(tableIdentities, projectName); +TableDesc table = metaMgr.getTableDesc(tableId, projectName); if (table == null) { -throw new IllegalStateException("Cannot find table '" + table + "' in metadata manager"); +throw new IllegalStateException("Cannot find table '" + tableId + "' in metadata manager"); } projectInstance.removeTable(table.getIdentity()); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16628614#comment-16628614 ] ASF subversion and git services commented on KYLIN-3587: Commit c8610e21f4158ac400485bdab21ab59dc586 in kylin's branch refs/heads/master from [~yichen.zhou] [ https://gitbox.apache.org/repos/asf?p=kylin.git;h=c8610e2 ] KYLIN-3587 Including tableID in IllegalStateException messages > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627677#comment-16627677 ] ASF GitHub Bot commented on KYLIN-3587: --- coveralls commented on issue #256: KYLIN-3587 Including tableID in IllegalStateException messages URL: https://github.com/apache/kylin/pull/256#issuecomment-424429996 ## Pull Request Test Coverage Report for [Build 3656](https://coveralls.io/builds/19181941) * **0** of **3** **(0.0%)** changed or added relevant lines in **1** file are covered. * No unchanged relevant lines lost coverage. * Overall coverage increased (+**0.003%**) to **23.125%** --- | Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | | :-|--||---: | | [core-metadata/src/main/java/org/apache/kylin/metadata/project/ProjectManager.java](https://coveralls.io/builds/19181941/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmetadata%2Fproject%2FProjectManager.java#L306) | 0 | 3 | 0.0% | Totals | [![Coverage Status](https://coveralls.io/builds/19181941/badge)](https://coveralls.io/builds/19181941) | | :-- | --: | | Change from base [Build 3650](https://coveralls.io/builds/19173507): | 0.003% | | Covered Lines: | 16159 | | Relevant Lines: | 69878 | --- # - [Coveralls](https://coveralls.io) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627595#comment-16627595 ] ASF GitHub Bot commented on KYLIN-3587: --- codecov-io commented on issue #256: KYLIN-3587 Including tableID in IllegalStateException messages URL: https://github.com/apache/kylin/pull/256#issuecomment-424412121 # [Codecov](https://codecov.io/gh/apache/kylin/pull/256?src=pr=h1) Report > Merging [#256](https://codecov.io/gh/apache/kylin/pull/256?src=pr=desc) into [master](https://codecov.io/gh/apache/kylin/commit/34fd447c2f8b1852c530168e344d24f6efce4a3c?src=pr=desc) will **increase** coverage by `<.01%`. > The diff coverage is `0%`. [![Impacted file tree graph](https://codecov.io/gh/apache/kylin/pull/256/graphs/tree.svg?width=650=JawVgbgsVo=150=pr)](https://codecov.io/gh/apache/kylin/pull/256?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #256 +/- ## + Coverage 21.11% 21.11% +<.01% + Complexity 4404 4403 -1 Files 1087 1087 Lines 6987869878 Branches 1010310103 + Hits 1475614758 +2 + Misses5372353721 -2 Partials 1399 1399 ``` | [Impacted Files](https://codecov.io/gh/apache/kylin/pull/256?src=pr=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [.../apache/kylin/metadata/project/ProjectManager.java](https://codecov.io/gh/apache/kylin/pull/256/diff?src=pr=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWV0YWRhdGEvcHJvamVjdC9Qcm9qZWN0TWFuYWdlci5qYXZh) | `10.52% <0%> (ø)` | `7 <0> (ø)` | :arrow_down: | | [...a/org/apache/kylin/dict/Number2BytesConverter.java](https://codecov.io/gh/apache/kylin/pull/256/diff?src=pr=tree#diff-Y29yZS1kaWN0aW9uYXJ5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9kaWN0L051bWJlcjJCeXRlc0NvbnZlcnRlci5qYXZh) | `81.74% <0%> (-0.8%)` | `17% <0%> (-1%)` | | | [.../apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://codecov.io/gh/apache/kylin/pull/256/diff?src=pr=tree#diff-Y29yZS1jdWJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9jdWJlL2N1Ym9pZC9UcmVlQ3Vib2lkU2NoZWR1bGVyLmphdmE=) | `66.15% <0%> (+2.3%)` | `0% <0%> (ø)` | :arrow_down: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/kylin/pull/256?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/kylin/pull/256?src=pr=footer). Last update [34fd447...4c2ddde](https://codecov.io/gh/apache/kylin/pull/256?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627567#comment-16627567 ] ASF GitHub Bot commented on KYLIN-3587: --- ZhouYC627 opened a new pull request #256: KYLIN-3587 Including tableID in IllegalStateException messages URL: https://github.com/apache/kylin/pull/256 https://issues.apache.org/jira/browse/KYLIN-3587 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627569#comment-16627569 ] ASF GitHub Bot commented on KYLIN-3587: --- asfgit commented on issue #256: KYLIN-3587 Including tableID in IllegalStateException messages URL: https://github.com/apache/kylin/pull/256#issuecomment-424403997 Can one of the admins verify this patch? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16627568#comment-16627568 ] ASF GitHub Bot commented on KYLIN-3587: --- asfgit commented on issue #256: KYLIN-3587 Including tableID in IllegalStateException messages URL: https://github.com/apache/kylin/pull/256#issuecomment-424404000 Can one of the admins verify this patch? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (KYLIN-3587) Null value is used in IllegalStateException message
[ https://issues.apache.org/jira/browse/KYLIN-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626654#comment-16626654 ] Yichen Zhou commented on KYLIN-3587: I will fix this. > Null value is used in IllegalStateException message > --- > > Key: KYLIN-3587 > URL: https://issues.apache.org/jira/browse/KYLIN-3587 > Project: Kylin > Issue Type: Bug >Reporter: Ted Yu >Assignee: Yichen Zhou >Priority: Minor > > In ProjectManager : > {code} > TableDesc table = metaMgr.getTableDesc(tableId, projectName); > if (table == null) { > throw new IllegalStateException("Cannot find table '" + > table + "' in metadata manager"); > {code} > Since table is null, the exception message is not helpful. > It seems including tableId in the message is better. -- This message was sent by Atlassian JIRA (v7.6.3#76005)