You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Ricky Nguyen <ri...@gmail.com> on 2012/03/16 02:51:02 UTC
Review Request: OODT-413: filemgr query throws NPE when some products have
undefined metadata values
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/
-----------------------------------------------------------
Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, and Thomas Bennett.
Summary
-------
filemgr query throws NPE when some products have undefined metadata values
This addresses bug OODT-413.
https://issues.apache.org/jira/browse/OODT-413
Diffs
-----
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1300633
Diff: https://reviews.apache.org/r/4374/diff
Testing
-------
tested at CHLA with command:
./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
Thanks,
Ricky
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Chris Mattmann <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/#review6014
-----------------------------------------------------------
Ship it!
LGTM. Nice catch Ricky -- what about a small unit test for regression?
- Chris
On 2012-03-16 01:51:02, Ricky Nguyen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4374/
> -----------------------------------------------------------
>
> (Updated 2012-03-16 01:51:02)
>
>
> Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, and Thomas Bennett.
>
>
> Summary
> -------
>
> filemgr query throws NPE when some products have undefined metadata values
>
>
> This addresses bug OODT-413.
> https://issues.apache.org/jira/browse/OODT-413
>
>
> Diffs
> -----
>
> trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1300633
>
> Diff: https://reviews.apache.org/r/4374/diff
>
>
> Testing
> -------
>
> tested at CHLA with command:
>
> ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
>
>
> Thanks,
>
> Ricky
>
>
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Chris Mattmann <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/#review6013
-----------------------------------------------------------
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java
<https://reviews.apache.org/r/4374/#comment13008>
+1, looks good. you could do it with short circuit, e.g., reducedMetadata.addMetadata(element, fullMetadata.getAllMetadata(element) != null && fullMetadata.getAllMetadata(element).size() > 0 ? fullMetadata.getAllMetadata(element):Collections.emptyList());
But that's just ugly! :) Yours is much better, +1.
- Chris
On 2012-03-16 01:51:02, Ricky Nguyen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4374/
> -----------------------------------------------------------
>
> (Updated 2012-03-16 01:51:02)
>
>
> Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, and Thomas Bennett.
>
>
> Summary
> -------
>
> filemgr query throws NPE when some products have undefined metadata values
>
>
> This addresses bug OODT-413.
> https://issues.apache.org/jira/browse/OODT-413
>
>
> Diffs
> -----
>
> trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1300633
>
> Diff: https://reviews.apache.org/r/4374/diff
>
>
> Testing
> -------
>
> tested at CHLA with command:
>
> ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
>
>
> Thanks,
>
> Ricky
>
>
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Sheryl John <sh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/#review6019
-----------------------------------------------------------
Ship it!
Unit test looks good too!
- Sheryl
On 2012-03-16 03:18:23, Ricky Nguyen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4374/
> -----------------------------------------------------------
>
> (Updated 2012-03-16 03:18:23)
>
>
> Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, Sheryl John, and Thomas Bennett.
>
>
> Summary
> -------
>
> filemgr query throws NPE when some products have undefined metadata values
>
>
> This addresses bug OODT-413.
> https://issues.apache.org/jira/browse/OODT-413
>
>
> Diffs
> -----
>
> trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1301315
> trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1301315
>
> Diff: https://reviews.apache.org/r/4374/diff
>
>
> Testing
> -------
>
> tested at CHLA with command:
>
> ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
>
>
> Thanks,
>
> Ricky
>
>
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Chris Mattmann <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/#review6017
-----------------------------------------------------------
Ship it!
You da man Ricky. LGTM.
- Chris
On 2012-03-16 03:18:23, Ricky Nguyen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4374/
> -----------------------------------------------------------
>
> (Updated 2012-03-16 03:18:23)
>
>
> Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, Sheryl John, and Thomas Bennett.
>
>
> Summary
> -------
>
> filemgr query throws NPE when some products have undefined metadata values
>
>
> This addresses bug OODT-413.
> https://issues.apache.org/jira/browse/OODT-413
>
>
> Diffs
> -----
>
> trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1301315
> trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1301315
>
> Diff: https://reviews.apache.org/r/4374/diff
>
>
> Testing
> -------
>
> tested at CHLA with command:
>
> ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
>
>
> Thanks,
>
> Ricky
>
>
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by brian Foster <ho...@juno.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/#review6026
-----------------------------------------------------------
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java
<https://reviews.apache.org/r/4374/#comment13010>
What about:
String element = elements.get(i);
if (fullMetadata.containsKey(element) {
reducedMetadata.addMetadata(element, fullMetadata.getAllMetadata(element);
}
also add addMetadata() really should be replaceMetadata()... although in this cause unless the same element is in the elements List more than once addMetadata() will work the same
- brian
On 2012-03-16 03:18:23, Ricky Nguyen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4374/
> -----------------------------------------------------------
>
> (Updated 2012-03-16 03:18:23)
>
>
> Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, Sheryl John, and Thomas Bennett.
>
>
> Summary
> -------
>
> filemgr query throws NPE when some products have undefined metadata values
>
>
> This addresses bug OODT-413.
> https://issues.apache.org/jira/browse/OODT-413
>
>
> Diffs
> -----
>
> trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1301315
> trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1301315
>
> Diff: https://reviews.apache.org/r/4374/diff
>
>
> Testing
> -------
>
> tested at CHLA with command:
>
> ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
>
>
> Thanks,
>
> Ricky
>
>
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Chris Mattmann <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/#review6056
-----------------------------------------------------------
Ship it!
Gotta love that syntactic sugar! LGTM!
- Chris
On 2012-03-16 19:11:34, Ricky Nguyen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4374/
> -----------------------------------------------------------
>
> (Updated 2012-03-16 19:11:34)
>
>
> Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, Sheryl John, and Thomas Bennett.
>
>
> Summary
> -------
>
> filemgr query throws NPE when some products have undefined metadata values
>
>
> This addresses bug OODT-413.
> https://issues.apache.org/jira/browse/OODT-413
>
>
> Diffs
> -----
>
> trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1300633
> trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1300633
>
> Diff: https://reviews.apache.org/r/4374/diff
>
>
> Testing
> -------
>
> tested at CHLA with command:
>
> ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
>
>
> Thanks,
>
> Ricky
>
>
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Ricky Nguyen <ri...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/
-----------------------------------------------------------
(Updated 2012-03-16 19:11:34.840950)
Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, Sheryl John, and Thomas Bennett.
Changes
-------
I agree. reducedMet should equal fullMet for each element in the list, and replaceMetadata() guarantees that.
Also, used list iterator syntactic sugar.
Summary
-------
filemgr query throws NPE when some products have undefined metadata values
This addresses bug OODT-413.
https://issues.apache.org/jira/browse/OODT-413
Diffs (updated)
-----
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1300633
trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1300633
Diff: https://reviews.apache.org/r/4374/diff
Testing
-------
tested at CHLA with command:
./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
Thanks,
Ricky
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Ricky Nguyen <ri...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/
-----------------------------------------------------------
(Updated 2012-03-16 03:18:23.793698)
Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, Sheryl John, and Thomas Bennett.
Summary
-------
filemgr query throws NPE when some products have undefined metadata values
This addresses bug OODT-413.
https://issues.apache.org/jira/browse/OODT-413
Diffs
-----
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1301315
trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1301315
Diff: https://reviews.apache.org/r/4374/diff
Testing
-------
tested at CHLA with command:
./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
Thanks,
Ricky
Re: Review Request: OODT-413: filemgr query throws NPE when some products
have undefined metadata values
Posted by Ricky Nguyen <ri...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4374/
-----------------------------------------------------------
(Updated 2012-03-16 03:04:13.893499)
Review request for oodt, Chris Mattmann, brian Foster, Paul Ramirez, and Thomas Bennett.
Changes
-------
added unit test
Summary
-------
filemgr query throws NPE when some products have undefined metadata values
This addresses bug OODT-413.
https://issues.apache.org/jira/browse/OODT-413
Diffs (updated)
-----
trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 1301315
trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/catalog/TestLuceneCatalog.java 1301315
Diff: https://reviews.apache.org/r/4374/diff
Testing
-------
tested at CHLA with command:
./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
Thanks,
Ricky