You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by Yash Sharma <ya...@gmail.com> on 2015/05/05 08:23:33 UTC
Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/
-----------------------------------------------------------
Review request for lens.
Repository: lens
Description
-------
NPE when weight is not set in XFactTable object while creating fact table
Diffs
-----
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
lens-server/src/main/java/org/apache/lens/server/metastore/CubeMetastoreServiceImpl.java 1a2b5b5
Diff: https://reviews.apache.org/r/33838/diff/
Testing
-------
Yes.
TestCase:
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Thanks,
Yash Sharma
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 5, 2015, 5:55 p.m., Amareshwari Sriramadasu wrote:
> > lens-server/src/main/java/org/apache/lens/server/metastore/CubeMetastoreServiceImpl.java, line 515
> > <https://reviews.apache.org/r/33838/diff/1/?file=949462#file949462line515>
> >
> > Can we define the default value in cube-0.1.xsd itself?
As suggested by Himanshu - I would be marking the weight field as required. That would avoid bias based on a default value as weight.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82540
-----------------------------------------------------------
On May 5, 2015, 6:23 a.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 5, 2015, 6:23 a.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-server/src/main/java/org/apache/lens/server/metastore/CubeMetastoreServiceImpl.java 1a2b5b5
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82540
-----------------------------------------------------------
lens-server/src/main/java/org/apache/lens/server/metastore/CubeMetastoreServiceImpl.java
<https://reviews.apache.org/r/33838/#comment133280>
Can we define the default value in cube-0.1.xsd itself?
- Amareshwari Sriramadasu
On May 5, 2015, 6:23 a.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 5, 2015, 6:23 a.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-server/src/main/java/org/apache/lens/server/metastore/CubeMetastoreServiceImpl.java 1a2b5b5
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
>
> Yash Sharma wrote:
> @Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
> Adding updated patch for review.
>
> Himanshu Gahlaut wrote:
> In existing code [here](https://github.com/apache/incubator-lens/blob/master/lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java#L71) , there is no schema set for JAXB_UNMARSHALLER instance. This would mean that no validation would happen when fact_without_weight.xml is unmarshalled into XFactTable. A separate jira ticket can be parked to first figure out whether existing code is doing XSD validation before unmarshalling or not. If it is not doing it, then it has be enabled first. [setSchema in UnMarshaller interface](http://docs.oracle.com/javaee/7/api/javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)) is used for setting schema for unmarshalling validation.
>
> If this is getting enabled for the first time, it might not be straight forward to make it work. A separate Jira ticket might help in that case.
>
> Yash Sharma wrote:
> I missed this comment. I will resume working on this today. Thanks
setSchema() is not being used anywhere in code currently so we do not have any restrictions imposed now. Also if its implemented now - how would we like to handle the validation error. Should we raise an exception directly in setEventHandler?
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
No.
Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
```java
@XmlAttribute(name = "weight", required = true)
protected double weight;
```
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/resources/fact_without_weight.xml, line 22
> > <https://reviews.apache.org/r/33838/diff/2/?file=951314#file951314line22>
> >
> > Do you want to name the fact differently? The same name is used in TestLensFactCommands as well, it might conflict with fact created in other test.
Makes Sense.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 6, 2015, 5:18 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 6, 2015, 5:18 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 24d0d64
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
- Amareshwari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 6, 2015, 5:18 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 6, 2015, 5:18 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 24d0d64
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
>
> Yash Sharma wrote:
> @Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
> Adding updated patch for review.
>
> Himanshu Gahlaut wrote:
> In existing code [here](https://github.com/apache/incubator-lens/blob/master/lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java#L71) , there is no schema set for JAXB_UNMARSHALLER instance. This would mean that no validation would happen when fact_without_weight.xml is unmarshalled into XFactTable. A separate jira ticket can be parked to first figure out whether existing code is doing XSD validation before unmarshalling or not. If it is not doing it, then it has be enabled first. [setSchema in UnMarshaller interface](http://docs.oracle.com/javaee/7/api/javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)) is used for setting schema for unmarshalling validation.
>
> If this is getting enabled for the first time, it might not be straight forward to make it work. A separate Jira ticket might help in that case.
I missed this comment. I will resume working on this today. Thanks
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
>
> Yash Sharma wrote:
> @Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
> Adding updated patch for review.
>
> Himanshu Gahlaut wrote:
> In existing code [here](https://github.com/apache/incubator-lens/blob/master/lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java#L71) , there is no schema set for JAXB_UNMARSHALLER instance. This would mean that no validation would happen when fact_without_weight.xml is unmarshalled into XFactTable. A separate jira ticket can be parked to first figure out whether existing code is doing XSD validation before unmarshalling or not. If it is not doing it, then it has be enabled first. [setSchema in UnMarshaller interface](http://docs.oracle.com/javaee/7/api/javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)) is used for setting schema for unmarshalling validation.
>
> If this is getting enabled for the first time, it might not be straight forward to make it work. A separate Jira ticket might help in that case.
>
> Yash Sharma wrote:
> I missed this comment. I will resume working on this today. Thanks
>
> Yash Sharma wrote:
> setSchema() is not being used anywhere in code currently so we do not have any restrictions imposed now. Also if its implemented now - how would we like to handle the validation error. Should we raise an exception directly in setEventHandler?
>
> Himanshu Gahlaut wrote:
> If JAXB itself throws a validation exception, we can display the exception message on lens-cli.
>
> Himanshu Gahlaut wrote:
> Have parked: https://issues.apache.org/jira/browse/LENS-565 We can restart work on this review request after XSD validation is enabled.
Thanks Himanshu.
I am done with the changes on imposing restriction on required weights.
But as a side-effect there are couple of test cases blowing off because of the same restriction.
I am fixing the xml's before I can post the patch.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Himanshu Gahlaut <ga...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
<xs:attribute name="weight">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
- Himanshu
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 6, 2015, 5:18 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 6, 2015, 5:18 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 24d0d64
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Himanshu Gahlaut <ga...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
>
> Yash Sharma wrote:
> @Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
> Adding updated patch for review.
>
> Himanshu Gahlaut wrote:
> In existing code [here](https://github.com/apache/incubator-lens/blob/master/lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java#L71) , there is no schema set for JAXB_UNMARSHALLER instance. This would mean that no validation would happen when fact_without_weight.xml is unmarshalled into XFactTable. A separate jira ticket can be parked to first figure out whether existing code is doing XSD validation before unmarshalling or not. If it is not doing it, then it has be enabled first. [setSchema in UnMarshaller interface](http://docs.oracle.com/javaee/7/api/javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)) is used for setting schema for unmarshalling validation.
>
> If this is getting enabled for the first time, it might not be straight forward to make it work. A separate Jira ticket might help in that case.
>
> Yash Sharma wrote:
> I missed this comment. I will resume working on this today. Thanks
>
> Yash Sharma wrote:
> setSchema() is not being used anywhere in code currently so we do not have any restrictions imposed now. Also if its implemented now - how would we like to handle the validation error. Should we raise an exception directly in setEventHandler?
>
> Himanshu Gahlaut wrote:
> If JAXB itself throws a validation exception, we can display the exception message on lens-cli.
Have parked: https://issues.apache.org/jira/browse/LENS-565 We can restart work on this review request after XSD validation is enabled.
- Himanshu
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Himanshu Gahlaut <ga...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
>
> Yash Sharma wrote:
> @Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
> Adding updated patch for review.
>
> Himanshu Gahlaut wrote:
> In existing code [here](https://github.com/apache/incubator-lens/blob/master/lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java#L71) , there is no schema set for JAXB_UNMARSHALLER instance. This would mean that no validation would happen when fact_without_weight.xml is unmarshalled into XFactTable. A separate jira ticket can be parked to first figure out whether existing code is doing XSD validation before unmarshalling or not. If it is not doing it, then it has be enabled first. [setSchema in UnMarshaller interface](http://docs.oracle.com/javaee/7/api/javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)) is used for setting schema for unmarshalling validation.
>
> If this is getting enabled for the first time, it might not be straight forward to make it work. A separate Jira ticket might help in that case.
>
> Yash Sharma wrote:
> I missed this comment. I will resume working on this today. Thanks
>
> Yash Sharma wrote:
> setSchema() is not being used anywhere in code currently so we do not have any restrictions imposed now. Also if its implemented now - how would we like to handle the validation error. Should we raise an exception directly in setEventHandler?
If JAXB itself throws a validation exception, we can display the exception message on lens-cli.
- Himanshu
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
@Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
Adding updated patch for review.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Himanshu Gahlaut <ga...@gmail.com>.
> On May 7, 2015, 4:57 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 110
> > <https://reviews.apache.org/r/33838/diff/2/?file=951313#file951313line110>
> >
> > Didnt this through an exception because of missing weight?
>
> Yash Sharma wrote:
> No.
> Infact the generated class for XFactTable used weight as primitive and hence it gets the default of 0d.
>
> ```java
> @XmlAttribute(name = "weight", required = true)
> protected double weight;
> ```
>
> Amareshwari Sriramadasu wrote:
> Then, I see making it "required" actually didnt solve the purpose. Because missing value actually made it zero.
> Inthat case I would say we might go with adding default as zero in xsd to be clear, and allow only positive values for weight. Himanshu, thoughts?
>
> Himanshu Gahlaut wrote:
> From perspective of domain objects, putting a checkArgument(weight > 0) in AbstractCubeTable constructor shall help in making sure that domain object CubeFactTable is constructed in valid state.
>
> For XSD and XFactTable, we can try using xs:restriction in XSD. Something as below:
> <xs:attribute name="weight">
> <xs:simpleType>
> <xs:restriction base="xs:double">
> <xs:minExclusive value="0"></xs:minExclusive>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> and then using <xs:attribute ref="weight" use="required"/> in XDimensionTablea nd XFactTable defintion in XSD.
>
>
> For test case, one integration test case which makes sure that FactTable creation gracefully fails when a fact is created with missing weight and one unit test case which ensures that CubeFactTable instance creation throws IllegalArgumentException when it is created with weight <= 0 shall give us sufficient coverage.
>
> Yash Sharma wrote:
> @Himanshu: I am still able to pass my test scenario successfully with the xs:restriction implemented and missing weight attribute. The XFactTable weight still gets initialized with a default value of zero.
> Adding updated patch for review.
In existing code [here](https://github.com/apache/incubator-lens/blob/master/lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java#L71) , there is no schema set for JAXB_UNMARSHALLER instance. This would mean that no validation would happen when fact_without_weight.xml is unmarshalled into XFactTable. A separate jira ticket can be parked to first figure out whether existing code is doing XSD validation before unmarshalling or not. If it is not doing it, then it has be enabled first. [setSchema in UnMarshaller interface](http://docs.oracle.com/javaee/7/api/javax/xml/bind/Unmarshaller.html#setSchema(javax.xml.validation.Schema)) is used for setting schema for unmarshalling validation.
If this is getting enabled for the first time, it might not be straight forward to make it work. A separate Jira ticket might help in that case.
- Himanshu
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
On May 7, 2015, 4:42 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 7, 2015, 4:42 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review82792
-----------------------------------------------------------
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java
<https://reviews.apache.org/r/33838/#comment133610>
Didnt this through an exception because of missing weight?
lens-cli/src/test/resources/fact_without_weight.xml
<https://reviews.apache.org/r/33838/#comment133611>
Do you want to name the fact differently? The same name is used in TestLensFactCommands as well, it might conflict with fact created in other test.
- Amareshwari Sriramadasu
On May 6, 2015, 5:18 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 6, 2015, 5:18 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 24d0d64
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 21, 2015, 11:06 a.m., Amareshwari Sriramadasu wrote:
> > lens-client/src/main/resources/cube-0.1.xsd, line 3
> > <https://reviews.apache.org/r/33838/diff/4/?file=966228#file966228line3>
> >
> > Why are we copying the file into lens-client? We should be using the one from lens-api only.
Implemented.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review84689
-----------------------------------------------------------
On May 21, 2015, 8:17 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 21, 2015, 8:17 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 1918e5c
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review84689
-----------------------------------------------------------
lens-client/src/main/resources/cube-0.1.xsd
<https://reviews.apache.org/r/33838/#comment136039>
Why are we copying the file into lens-client? We should be using the one from lens-api only.
- Amareshwari Sriramadasu
On May 21, 2015, 9:39 a.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 21, 2015, 9:39 a.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/pom.xml adc464a
> lens-api/src/main/resources/cube-0.1.xsd 06f85ee
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 195bd43
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/pom.xml e27a6ce
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java 5e406b5
> lens-client/src/main/resources/cube-0.1.xsd PRE-CREATION
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 116
> > <https://reviews.apache.org/r/33838/diff/5/?file=966975#file966975line116>
> >
> > Creation still not failing?
We ideally should not hit exception since the API only returns status string rather than throwing exception. We can hit exception in case of URISyntaxException.
Have enhanced the testcase to check the api response for 'failed' status and to catch specific exception separately.
Will be posting the new patch soon.
Please review #addFactTable
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 118
> > <https://reviews.apache.org/r/33838/diff/5/?file=966975#file966975line118>
> >
> > If we are failing on exception and no fact is created - what was happening here ?
Same as above. We are not hitting the exception for missing weight.
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/resources/dim-local-storage-element.xml, line 24
> > <https://reviews.apache.org/r/33838/diff/5/?file=966976#file966976line24>
> >
> > Are there is changed required on example schema as well?
> > Can you run sample-metastore and populate-metastore and make sure they are running fine?
I have not checked this. Will check this and post the new patch.
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 70
> > <https://reviews.apache.org/r/33838/diff/5/?file=966975#file966975line70>
> >
> > Cube does not have weight. The name is misleading. Can we name cube_with_no_weight_facts or something else?
Implemented.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review84865
-----------------------------------------------------------
On May 21, 2015, 8:17 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 21, 2015, 8:17 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 1918e5c
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 116
> > <https://reviews.apache.org/r/33838/diff/5/?file=966975#file966975line116>
> >
> > Creation still not failing?
>
> Yash Sharma wrote:
> We ideally should not hit exception since the API only returns status string rather than throwing exception. We can hit exception in case of URISyntaxException.
> Have enhanced the testcase to check the api response for 'failed' status and to catch specific exception separately.
>
> Will be posting the new patch soon.
> Please review #addFactTable
Then lets just throw the exception out since test will fail anyway.
- Amareshwari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review84865
-----------------------------------------------------------
On May 21, 2015, 8:17 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 21, 2015, 8:17 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 1918e5c
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/resources/dim-local-storage-element.xml, line 24
> > <https://reviews.apache.org/r/33838/diff/5/?file=966976#file966976line24>
> >
> > Are there is changed required on example schema as well?
> > Can you run sample-metastore and populate-metastore and make sure they are running fine?
>
> Yash Sharma wrote:
> I have not checked this. Will check this and post the new patch.
Yes it is important to make changes to example xml's. Example classes use LensMetadataClient and running 'sample-metastore' blows up with Unmarshalling error -
```Creating dim table from: dim_table.xml failed, reason:Unmarshalling failed
```
Am able to run the commands with the appropriate changes to xmls.
> On May 22, 2015, 4:53 a.m., Amareshwari Sriramadasu wrote:
> > lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java, line 116
> > <https://reviews.apache.org/r/33838/diff/5/?file=966975#file966975line116>
> >
> > Creation still not failing?
>
> Yash Sharma wrote:
> We ideally should not hit exception since the API only returns status string rather than throwing exception. We can hit exception in case of URISyntaxException.
> Have enhanced the testcase to check the api response for 'failed' status and to catch specific exception separately.
>
> Will be posting the new patch soon.
> Please review #addFactTable
>
> Amareshwari Sriramadasu wrote:
> Then lets just throw the exception out since test will fail anyway.
Sure. Implemented.
- Yash
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review84865
-----------------------------------------------------------
On May 22, 2015, 12:01 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 22, 2015, 12:01 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 1e8d71d
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/cube_with_no_weight_facts.xml PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
> lens-examples/src/main/resources/city_subset.xml 5059e5e
> lens-examples/src/main/resources/customer_table.xml 18c387f
> lens-examples/src/main/resources/dim_table.xml 25367af
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/dim_table3.xml 386c394
> lens-examples/src/main/resources/dim_table4.xml 69e3c50
> lens-examples/src/main/resources/product_db_table.xml d961c44
> lens-examples/src/main/resources/product_table.xml 86a1115
> lens-examples/src/main/resources/sales-aggr-fact1.xml 073052d
> lens-examples/src/main/resources/sales-aggr-fact2.xml 67b7171
> lens-examples/src/main/resources/sales-cube.xml e44141c
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review84865
-----------------------------------------------------------
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java
<https://reviews.apache.org/r/33838/#comment136281>
Cube does not have weight. The name is misleading. Can we name cube_with_no_weight_facts or something else?
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java
<https://reviews.apache.org/r/33838/#comment136280>
Creation still not failing?
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java
<https://reviews.apache.org/r/33838/#comment136283>
If we are failing on exception and no fact is created - what was happening here ?
lens-cli/src/test/resources/dim-local-storage-element.xml
<https://reviews.apache.org/r/33838/#comment136284>
Are there is changed required on example schema as well?
Can you run sample-metastore and populate-metastore and make sure they are running fine?
- Amareshwari Sriramadasu
On May 21, 2015, 8:17 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 21, 2015, 8:17 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 1918e5c
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Amareshwari Sriramadasu <am...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/#review85929
-----------------------------------------------------------
Ship it!
Ship It!
- Amareshwari Sriramadasu
On May 22, 2015, 12:01 p.m., Yash Sharma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33838/
> -----------------------------------------------------------
>
> (Updated May 22, 2015, 12:01 p.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> NPE when weight is not set in XFactTable object while creating fact table
>
>
> Diffs
> -----
>
> lens-api/src/main/resources/cube-0.1.xsd 1e8d71d
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
> lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
> lens-cli/src/test/resources/cube_with_no_weight_facts.xml PRE-CREATION
> lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
> lens-cli/src/test/resources/dim_table.xml 932c975
> lens-cli/src/test/resources/dim_table2.xml 1d6e138
> lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
> lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
> lens-cli/src/test/resources/sample-cube.xml d54bcfb
> lens-cli/src/test/resources/test-dimension.xml d602569
> lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
> lens-examples/src/main/resources/city_subset.xml 5059e5e
> lens-examples/src/main/resources/customer_table.xml 18c387f
> lens-examples/src/main/resources/dim_table.xml 25367af
> lens-examples/src/main/resources/dim_table2.xml eef1513
> lens-examples/src/main/resources/dim_table3.xml 386c394
> lens-examples/src/main/resources/dim_table4.xml 69e3c50
> lens-examples/src/main/resources/product_db_table.xml d961c44
> lens-examples/src/main/resources/product_table.xml 86a1115
> lens-examples/src/main/resources/sales-aggr-fact1.xml 073052d
> lens-examples/src/main/resources/sales-aggr-fact2.xml 67b7171
> lens-examples/src/main/resources/sales-cube.xml e44141c
> lens-examples/src/main/resources/sample-cube.xml 0d97842
>
> Diff: https://reviews.apache.org/r/33838/diff/
>
>
> Testing
> -------
>
> Yes.
> TestCase:
> mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
>
>
> Thanks,
>
> Yash Sharma
>
>
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/
-----------------------------------------------------------
(Updated May 22, 2015, 12:01 p.m.)
Review request for lens.
Changes
-------
Implemented review comments.
Repository: lens
Description
-------
NPE when weight is not set in XFactTable object while creating fact table
Diffs (updated)
-----
lens-api/src/main/resources/cube-0.1.xsd 1e8d71d
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
lens-cli/src/test/resources/cube_with_no_weight_facts.xml PRE-CREATION
lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
lens-cli/src/test/resources/dim_table.xml 932c975
lens-cli/src/test/resources/dim_table2.xml 1d6e138
lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
lens-cli/src/test/resources/sample-cube.xml d54bcfb
lens-cli/src/test/resources/test-dimension.xml d602569
lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
lens-examples/src/main/resources/city_subset.xml 5059e5e
lens-examples/src/main/resources/customer_table.xml 18c387f
lens-examples/src/main/resources/dim_table.xml 25367af
lens-examples/src/main/resources/dim_table2.xml eef1513
lens-examples/src/main/resources/dim_table3.xml 386c394
lens-examples/src/main/resources/dim_table4.xml 69e3c50
lens-examples/src/main/resources/product_db_table.xml d961c44
lens-examples/src/main/resources/product_table.xml 86a1115
lens-examples/src/main/resources/sales-aggr-fact1.xml 073052d
lens-examples/src/main/resources/sales-aggr-fact2.xml 67b7171
lens-examples/src/main/resources/sales-cube.xml e44141c
lens-examples/src/main/resources/sample-cube.xml 0d97842
Diff: https://reviews.apache.org/r/33838/diff/
Testing
-------
Yes.
TestCase:
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Thanks,
Yash Sharma
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/
-----------------------------------------------------------
(Updated May 21, 2015, 8:17 p.m.)
Review request for lens.
Changes
-------
Implemented review comments.
Build without all testcases -
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.089 s]
[INFO] Lens ............................................... SUCCESS [ 2.653 s]
[INFO] Lens API ........................................... SUCCESS [ 18.470 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 19.873 s]
[INFO] Lens Cube .......................................... SUCCESS [ 42.243 s]
[INFO] Lens DB storage .................................... SUCCESS [ 10.607 s]
[INFO] Lens Query Library ................................. SUCCESS [ 14.298 s]
[INFO] Lens Hive Driver ................................... SUCCESS [ 15.961 s]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 17.322 s]
[INFO] Lens Server ........................................ SUCCESS [ 41.133 s]
[INFO] Lens client ........................................ SUCCESS [ 16.587 s]
[INFO] Lens CLI ........................................... SUCCESS [ 14.251 s]
[INFO] Lens Examples ...................................... SUCCESS [ 11.298 s]
[INFO] Lens Distribution .................................. SUCCESS [ 7.951 s]
[INFO] Lens ML Lib ........................................ SUCCESS [ 22.664 s]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [ 4.940 s]
[INFO] Lens Regression .................................... SUCCESS [ 8.293 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:31 min
[INFO] Finished at: 2015-05-22T01:47:25+05:30
[INFO] Final Memory: 147M/394M
[INFO] ------------------------------------------------------------------------
Complete testcase build blocked by https://issues.apache.org/jira/browse/LENS-573
Tested with functionality tests-
mvn test -Dtest=TestLensFactCommands#testFactCommands
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Repository: lens
Description
-------
NPE when weight is not set in XFactTable object while creating fact table
Diffs (updated)
-----
lens-api/src/main/resources/cube-0.1.xsd 1918e5c
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 19979cc
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
lens-cli/src/test/resources/dim_table.xml 932c975
lens-cli/src/test/resources/dim_table2.xml 1d6e138
lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
lens-cli/src/test/resources/sample-cube.xml d54bcfb
lens-cli/src/test/resources/test-dimension.xml d602569
lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java a6651f6
lens-examples/src/main/resources/dim_table2.xml eef1513
lens-examples/src/main/resources/sample-cube.xml 0d97842
Diff: https://reviews.apache.org/r/33838/diff/
Testing
-------
Yes.
TestCase:
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Thanks,
Yash Sharma
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/
-----------------------------------------------------------
(Updated May 21, 2015, 9:39 a.m.)
Review request for lens.
Changes
-------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Lens Checkstyle Rules .............................. SUCCESS [ 2.233 s]
[INFO] Lens ............................................... SUCCESS [ 2.616 s]
[INFO] Lens API ........................................... SUCCESS [ 18.467 s]
[INFO] Lens API for server and extensions ................. SUCCESS [ 19.068 s]
[INFO] Lens Cube .......................................... SUCCESS [02:50 min]
[INFO] Lens DB storage .................................... SUCCESS [ 21.744 s]
[INFO] Lens Query Library ................................. SUCCESS [ 15.964 s]
[INFO] Lens Hive Driver ................................... SUCCESS [02:45 min]
[INFO] Lens Driver for JDBC ............................... SUCCESS [ 35.733 s]
[INFO] Lens Server ........................................ SUCCESS [06:10 min]
[INFO] Lens client ........................................ SUCCESS [ 35.802 s]
[INFO] Lens CLI ........................................... SUCCESS [02:09 min]
[INFO] Lens Examples ...................................... SUCCESS [ 10.650 s]
[INFO] Lens Distribution .................................. SUCCESS [ 8.332 s]
[INFO] Lens ML Lib ........................................ SUCCESS [01:35 min]
[INFO] Lens ML Ext Distribution ........................... SUCCESS [ 2.881 s]
[INFO] Lens Regression .................................... SUCCESS [ 8.230 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:33 min
[INFO] Finished at: 2015-05-21T15:04:30+05:30
[INFO] Final Memory: 120M/366M
[INFO] ------------------------------------------------------------------------
Repository: lens
Description
-------
NPE when weight is not set in XFactTable object while creating fact table
Diffs (updated)
-----
lens-api/pom.xml adc464a
lens-api/src/main/resources/cube-0.1.xsd 06f85ee
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommands.java 195bd43
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
lens-cli/src/test/resources/dim-local-storage-element.xml 5a19cfa
lens-cli/src/test/resources/dim_table.xml 932c975
lens-cli/src/test/resources/dim_table2.xml 1d6e138
lens-cli/src/test/resources/fact-local-storage-element.xml 8ec3b42
lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
lens-cli/src/test/resources/sample-cube-without-wt.xml PRE-CREATION
lens-cli/src/test/resources/sample-cube.xml d54bcfb
lens-cli/src/test/resources/test-dimension.xml d602569
lens-client/pom.xml e27a6ce
lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java 5e406b5
lens-client/src/main/resources/cube-0.1.xsd PRE-CREATION
lens-examples/src/main/resources/dim_table2.xml eef1513
lens-examples/src/main/resources/sample-cube.xml 0d97842
Diff: https://reviews.apache.org/r/33838/diff/
Testing
-------
Yes.
TestCase:
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Thanks,
Yash Sharma
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/
-----------------------------------------------------------
(Updated May 7, 2015, 4:42 p.m.)
Review request for lens.
Changes
-------
Implementing new review comments. Adding xs:restriction.
Repository: lens
Description
-------
NPE when weight is not set in XFactTable object while creating fact table
Diffs (updated)
-----
lens-api/src/main/resources/cube-0.1.xsd 10b1dfa
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
Diff: https://reviews.apache.org/r/33838/diff/
Testing
-------
Yes.
TestCase:
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Thanks,
Yash Sharma
Re: Review Request 33838: LENS-484 : NPE when weight is not set in
XFactTable object while creating fact table
Posted by Yash Sharma <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33838/
-----------------------------------------------------------
(Updated May 6, 2015, 5:18 p.m.)
Review request for lens.
Changes
-------
Making weight as required field.
The patch is not complete. Need mandatory check for -ve testcase scenario.
Repository: lens
Description
-------
NPE when weight is not set in XFactTable object while creating fact table
Diffs (updated)
-----
lens-api/src/main/resources/cube-0.1.xsd 24d0d64
lens-cli/src/test/java/org/apache/lens/cli/TestLensFactCommandsWithMissingWeight.java PRE-CREATION
lens-cli/src/test/resources/fact_without_weight.xml PRE-CREATION
Diff: https://reviews.apache.org/r/33838/diff/
Testing
-------
Yes.
TestCase:
mvn test -Dtest=TestLensFactCommandsWithMissingWeight#testFactCommands
Thanks,
Yash Sharma