[jira] [Commented] (GORA-530) Reinstate exception throwing at Query#execute()
[ https://issues.apache.org/jira/browse/GORA-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16363111#comment-16363111 ] ASF GitHub Bot commented on GORA-530: - Github user alfonsonishikawa commented on a diff in the pull request: https://github.com/apache/gora/pull/127#discussion_r168014313 --- Diff: gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java --- @@ -159,17 +167,25 @@ public boolean schemaExists() { * @return the Object corresponding to the key or null if it cannot be found */ @Override - public T get(K key, String[] fields) { - -Key recordKey = getAerospikeKey(key); -fields = getFieldsToQuery(fields); + public T get(K key, String[] fields) throws GoraException { -Record record = aerospikeClient - .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); -if (record == null) { - return null; +try { + Key recordKey = getAerospikeKey(key); + fields = getFieldsToQuery(fields); + + Record record = aerospikeClient + .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); + + if (record == null) { +return null; + } + return createPersistentInstance(record, fields); +} catch (GoraException e) { + throw e; --- End diff -- Hi! Yes. Notice that createPersistentInstance has been updated to throw GoraException. Throughout the changes, GoraException is being used as a simple wrapper to have a common interface for all datastores, so as you can see two lines bellow in this diff, any exception (not GoraException) is logged and wrapped. In the case of a catch of a GoraException we can safely assume that it is already logged and wraping other exception (or maybe an actual GoraException but this does not make difference) and we wouldn't want to wrap it again because that would be useless and would hide the exception's parent exception in an indefinite sequence. Maybe it is not the best solution, but I didn't get to any better. If you have any suggestion it will be welcome! > Reinstate exception throwing at Query#execute() > --- > > Key: GORA-530 > URL: https://issues.apache.org/jira/browse/GORA-530 > Project: Apache Gora > Issue Type: Improvement > Components: gora-core >Affects Versions: 0.8 >Reporter: Alfonso Nishikawa >Assignee: Alfonso Nishikawa >Priority: Minor > Labels: query > Fix For: 0.9 > > > When executing a query, the exceptions are being shadowed and the execution > returns {{null}}. > This makes any client to be ignorant of the cause, because it is only logged > into the server. > The objective is to reinstate the exception throwing, where the interface > throws GoraException to make any client aware of the underlying problem. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] gora pull request #127: GORA-530 : Reinstated exception throwing in DataStor...
Github user alfonsonishikawa commented on a diff in the pull request: https://github.com/apache/gora/pull/127#discussion_r168014313 --- Diff: gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java --- @@ -159,17 +167,25 @@ public boolean schemaExists() { * @return the Object corresponding to the key or null if it cannot be found */ @Override - public T get(K key, String[] fields) { - -Key recordKey = getAerospikeKey(key); -fields = getFieldsToQuery(fields); + public T get(K key, String[] fields) throws GoraException { -Record record = aerospikeClient - .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); -if (record == null) { - return null; +try { + Key recordKey = getAerospikeKey(key); + fields = getFieldsToQuery(fields); + + Record record = aerospikeClient + .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); + + if (record == null) { +return null; + } + return createPersistentInstance(record, fields); +} catch (GoraException e) { + throw e; --- End diff -- Hi! Yes. Notice that createPersistentInstance has been updated to throw GoraException. Throughout the changes, GoraException is being used as a simple wrapper to have a common interface for all datastores, so as you can see two lines bellow in this diff, any exception (not GoraException) is logged and wrapped. In the case of a catch of a GoraException we can safely assume that it is already logged and wraping other exception (or maybe an actual GoraException but this does not make difference) and we wouldn't want to wrap it again because that would be useless and would hide the exception's parent exception in an indefinite sequence. Maybe it is not the best solution, but I didn't get to any better. If you have any suggestion it will be welcome! ---
[jira] [Commented] (GORA-531) Upgrade HBase to 1.2.6
[ https://issues.apache.org/jira/browse/GORA-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16363011#comment-16363011 ] ASF GitHub Bot commented on GORA-531: - Github user lewismc commented on the issue: https://github.com/apache/gora/pull/129 +1 > Upgrade HBase to 1.2.6 > -- > > Key: GORA-531 > URL: https://issues.apache.org/jira/browse/GORA-531 > Project: Apache Gora > Issue Type: Improvement > Components: gora-hbase >Reporter: Furkan KAMACI >Assignee: Furkan KAMACI >Priority: Major > Fix For: 0.9 > > > Gora has support for Hbase 1.2.3. We should upgrade it to 1.2.6 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] gora issue #129: GORA-531 Upgrade Hbase version to 1.2.6
Github user lewismc commented on the issue: https://github.com/apache/gora/pull/129 +1 ---
[jira] [Commented] (GORA-531) Upgrade HBase to 1.2.6
[ https://issues.apache.org/jira/browse/GORA-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16363007#comment-16363007 ] ASF GitHub Bot commented on GORA-531: - GitHub user kamaci opened a pull request: https://github.com/apache/gora/pull/129 GORA-531 Upgrade Hbase version to 1.2.6 Hbase version is upgraded to 1.2.6 You can merge this pull request into a Git repository by running: $ git pull https://github.com/kamaci/gora GORA-531 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/gora/pull/129.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #129 commit ff0918d4b8d6e45b0188e6a95ecf83b6ee1de0cb Author: kamaciDate: 2018-02-13T20:41:04Z GORA-531 Upgrade Hbase version to 1.2.6 > Upgrade HBase to 1.2.6 > -- > > Key: GORA-531 > URL: https://issues.apache.org/jira/browse/GORA-531 > Project: Apache Gora > Issue Type: Improvement > Components: gora-hbase >Reporter: Furkan KAMACI >Assignee: Furkan KAMACI >Priority: Major > Fix For: 0.9 > > > Gora has support for Hbase 1.2.3. We should upgrade it to 1.2.6 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] gora pull request #129: GORA-531 Upgrade Hbase version to 1.2.6
GitHub user kamaci opened a pull request: https://github.com/apache/gora/pull/129 GORA-531 Upgrade Hbase version to 1.2.6 Hbase version is upgraded to 1.2.6 You can merge this pull request into a Git repository by running: $ git pull https://github.com/kamaci/gora GORA-531 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/gora/pull/129.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #129 commit ff0918d4b8d6e45b0188e6a95ecf83b6ee1de0cb Author: kamaciDate: 2018-02-13T20:41:04Z GORA-531 Upgrade Hbase version to 1.2.6 ---
[jira] [Created] (GORA-531) Upgrade HBase to 1.2.6
Furkan KAMACI created GORA-531: -- Summary: Upgrade HBase to 1.2.6 Key: GORA-531 URL: https://issues.apache.org/jira/browse/GORA-531 Project: Apache Gora Issue Type: Improvement Components: gora-hbase Reporter: Furkan KAMACI Assignee: Furkan KAMACI Fix For: 0.9 Gora has support for Hbase 1.2.3. We should upgrade it to 1.2.6 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GORA-528) Add Support for Spark 2.2.1
[ https://issues.apache.org/jira/browse/GORA-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16362998#comment-16362998 ] ASF GitHub Bot commented on GORA-528: - Github user lewismc commented on the issue: https://github.com/apache/gora/pull/128 +1 > Add Support for Spark 2.2.1 > --- > > Key: GORA-528 > URL: https://issues.apache.org/jira/browse/GORA-528 > Project: Apache Gora > Issue Type: Improvement > Components: gora-core >Reporter: Furkan KAMACI >Assignee: Furkan KAMACI >Priority: Major > Fix For: 0.9 > > > Add Spark 2.2.1 support for Spark backend. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] gora issue #128: GORA-528 Upgrade Spark version to 2.2.1
Github user lewismc commented on the issue: https://github.com/apache/gora/pull/128 +1 ---
[jira] [Commented] (GORA-530) Reinstate exception throwing at Query#execute()
[ https://issues.apache.org/jira/browse/GORA-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16362243#comment-16362243 ] ASF GitHub Bot commented on GORA-530: - Github user nishadi commented on a diff in the pull request: https://github.com/apache/gora/pull/127#discussion_r167853773 --- Diff: gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java --- @@ -159,17 +167,25 @@ public boolean schemaExists() { * @return the Object corresponding to the key or null if it cannot be found */ @Override - public T get(K key, String[] fields) { - -Key recordKey = getAerospikeKey(key); -fields = getFieldsToQuery(fields); + public T get(K key, String[] fields) throws GoraException { -Record record = aerospikeClient - .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); -if (record == null) { - return null; +try { + Key recordKey = getAerospikeKey(key); + fields = getFieldsToQuery(fields); + + Record record = aerospikeClient + .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); + + if (record == null) { +return null; + } + return createPersistentInstance(record, fields); +} catch (GoraException e) { + throw e; --- End diff -- Hi, Is there any specific reason why we are capturing the GoraException separately? > Reinstate exception throwing at Query#execute() > --- > > Key: GORA-530 > URL: https://issues.apache.org/jira/browse/GORA-530 > Project: Apache Gora > Issue Type: Improvement > Components: gora-core >Affects Versions: 0.8 >Reporter: Alfonso Nishikawa >Assignee: Alfonso Nishikawa >Priority: Minor > Labels: query > Fix For: 0.9 > > > When executing a query, the exceptions are being shadowed and the execution > returns {{null}}. > This makes any client to be ignorant of the cause, because it is only logged > into the server. > The objective is to reinstate the exception throwing, where the interface > throws GoraException to make any client aware of the underlying problem. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] gora pull request #127: GORA-530 : Reinstated exception throwing in DataStor...
Github user nishadi commented on a diff in the pull request: https://github.com/apache/gora/pull/127#discussion_r167853773 --- Diff: gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java --- @@ -159,17 +167,25 @@ public boolean schemaExists() { * @return the Object corresponding to the key or null if it cannot be found */ @Override - public T get(K key, String[] fields) { - -Key recordKey = getAerospikeKey(key); -fields = getFieldsToQuery(fields); + public T get(K key, String[] fields) throws GoraException { -Record record = aerospikeClient - .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); -if (record == null) { - return null; +try { + Key recordKey = getAerospikeKey(key); + fields = getFieldsToQuery(fields); + + Record record = aerospikeClient + .get(aerospikeParameters.getAerospikeMapping().getReadPolicy(), recordKey, fields); + + if (record == null) { +return null; + } + return createPersistentInstance(record, fields); +} catch (GoraException e) { + throw e; --- End diff -- Hi, Is there any specific reason why we are capturing the GoraException separately? ---
[GitHub] gora pull request #128: GORA-528 Upgrade Spark version to 2.2.1
GitHub user kamaci opened a pull request: https://github.com/apache/gora/pull/128 GORA-528 Upgrade Spark version to 2.2.1 Spark version is upgraded to 2.2.1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/kamaci/gora GORA-528 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/gora/pull/128.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #128 commit 28b78fae7a943c51e7c7d5f4a4802d913ef7fd04 Author: kamaciDate: 2018-02-13T12:24:14Z GORA-528 Upgrade Spark version to 2.2.1 ---
[jira] [Commented] (GORA-528) Add Support for Spark 2.2.1
[ https://issues.apache.org/jira/browse/GORA-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16362215#comment-16362215 ] ASF GitHub Bot commented on GORA-528: - GitHub user kamaci opened a pull request: https://github.com/apache/gora/pull/128 GORA-528 Upgrade Spark version to 2.2.1 Spark version is upgraded to 2.2.1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/kamaci/gora GORA-528 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/gora/pull/128.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #128 commit 28b78fae7a943c51e7c7d5f4a4802d913ef7fd04 Author: kamaciDate: 2018-02-13T12:24:14Z GORA-528 Upgrade Spark version to 2.2.1 > Add Support for Spark 2.2.1 > --- > > Key: GORA-528 > URL: https://issues.apache.org/jira/browse/GORA-528 > Project: Apache Gora > Issue Type: Improvement > Components: gora-core >Reporter: Furkan KAMACI >Assignee: Furkan KAMACI >Priority: Major > Fix For: 0.9 > > > Add Spark 2.2.1 support for Spark backend. -- This message was sent by Atlassian JIRA (v7.6.3#76005)