> On April 1, 2015, 8:38 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java,
> > line 415
> > <https://reviews.apache.org/r/32610/diff/3/?file=911971#file911971line415>
> >
> > We should return null, as it will be handled by caller as expected from
> > props.get(key) than RunTimeException
>
> Rajat Khandelwal wrote:
> Essencially I'm trying to catch the NPE early.
In timeline code itself, null is something that is always handled, because
developers except a proerty not to be set. RuntimeException is something
unexpected and usually not handled by developers. Since this method is
returning a value of a property, it should return null, is not present and not
throw RuntimeException
String rangesStr = MetastoreUtil.getNamedStringValue(properties, "ranges");
if (!Strings.isNullOrEmpty(rangesStr)) {
> On April 1, 2015, 8:38 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java,
> > line 217
> > <https://reviews.apache.org/r/32610/diff/3/?file=911970#file911970line217>
> >
> > Can you pass storageTable in params directly?
>
> Rajat Khandelwal wrote:
> We need both `storageTablename` and `storageTable`. Since the two
> paramaters are completely dependent(and deducible) on the other two
> parameters, it doesn't make sense to pass them separately.
Ok with it as getTable returns cached table. If no caching, this would again
hit metastore for getting the table.
> On April 1, 2015, 8:38 a.m., Amareshwari Sriramadasu wrote:
> > lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java,
> > line 196
> > <https://reviews.apache.org/r/32610/diff/3/?file=911970#file911970line196>
> >
> > Write now, do we know of any exceptions/errors that can cause this?
> > This code block should be something we should not reach
>
> Rajat Khandelwal wrote:
> Any exception here should only be RuntimeException. Timeline was supposed
> to be set correctly but it somehow didn't manage to get set, or was set
> incompletely. In that case instead of saying that I can't load timeline,
> let's load from another source since it's already available.
Sure. Fine with it, deployment needs to be aware of this because getting all
partitions would require more memory at runtime.
- Amareshwari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32610/#review78489
-----------------------------------------------------------
On April 1, 2015, 6:56 a.m., Rajat Khandelwal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32610/
> -----------------------------------------------------------
>
> (Updated April 1, 2015, 6:56 a.m.)
>
>
> Review request for lens.
>
>
> Repository: lens
>
>
> Description
> -------
>
> handle storing of large collection objects in timeline data structures
>
>
> Diffs
> -----
>
>
> lens-cube/src/main/java/org/apache/lens/cube/metadata/CubeMetastoreClient.java
> 1835d2f5f604548126c60592869187c29f0f4392
> lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java
> 0be8e5f2031dad8f175bbd00d3cbfc73695d31db
> lens-cube/src/main/java/org/apache/lens/cube/metadata/TimePartition.java
> b948467e61618695cba5b6fcfdc084d8d26c0c4d
>
> lens-cube/src/main/java/org/apache/lens/cube/metadata/timeline/EndsAndHolesPartitionTimeline.java
> 79e8a62629b6466f42152678c4267e40f003a5a3
>
> lens-cube/src/main/java/org/apache/lens/cube/metadata/timeline/RangesPartitionTimeline.java
> fb2d0a86d773825cd2a8a635c451e9945b122ce8
>
> lens-cube/src/main/java/org/apache/lens/cube/metadata/timeline/StoreAllPartitionTimeline.java
> d6ee0a17aae8d0952fb685997120dbfc778d2530
> lens-cube/src/main/java/org/apache/lens/cube/parse/DateUtil.java
> 1094e4413c1355655de00b04f8a64e507e2270ee
>
> lens-cube/src/test/java/org/apache/lens/cube/metadata/TestTimePartition.java
> 4c98d84e2c55bedd3226c887b6052a5b5cf77145
>
> lens-cube/src/test/java/org/apache/lens/cube/metadata/timeline/TestPartitionTimelines.java
> 50b75e38f9fcd890e96787399d10434cac6f6045
> lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java
> b2ae9b5e8076f1eb22e700bb9e3680346733861a
>
> Diff: https://reviews.apache.org/r/32610/diff/
>
>
> Testing
> -------
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Lens Checkstyle Rules ............................. SUCCESS [2.151s]
> [INFO] Lens .............................................. SUCCESS [1.896s]
> [INFO] Lens API .......................................... SUCCESS [6.175s]
> [INFO] Lens API for server and extensions ................ SUCCESS [6.715s]
> [INFO] Lens Cube ......................................... SUCCESS [2:12.362s]
> [INFO] Lens DB storage ................................... SUCCESS [10.638s]
> [INFO] Lens Query Library ................................ SUCCESS [5.112s]
> [INFO] Lens Hive Driver .................................. SUCCESS [2:31.556s]
> [INFO] Lens Driver for JDBC .............................. SUCCESS [17.345s]
> [INFO] Lens Server ....................................... SUCCESS [6:09.928s]
> [INFO] Lens client ....................................... SUCCESS [20.684s]
> [INFO] Lens CLI .......................................... SUCCESS [2:34.762s]
> [INFO] Lens Examples ..................................... SUCCESS [0.941s]
> [INFO] Lens Distribution ................................. SUCCESS [9.567s]
> [INFO] Lens ML Lib ....................................... SUCCESS [1:01.797s]
> [INFO] Lens ML Ext Distribution .......................... SUCCESS [2.750s]
> [INFO] Lens Regression ................................... SUCCESS [0.525s]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 15:55.802s
> [INFO] Finished at: Mon Mar 30 11:44:12 UTC 2015
> [INFO] Final Memory: 96M/1058M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Thanks,
>
> Rajat Khandelwal
>
>