> On Jan. 9, 2016, 1:39 a.m., Amareshwari Sriramadasu wrote: > > lens-examples/src/main/resources/city.yaml, line 1 > > <https://reviews.apache.org/r/41035/diff/10/?file=1184335#file1184335line1> > > > > No more xml ? > > Rajat Khandelwal wrote: > Haven't deleted the xmls. Have added the `toString` representations for > review. Right now they are getting read by test cases for asserts. I'll > delete the yamls in the final version. Though I don't want to cripple the > test cases so want to keep them somewhere. Haven't found an elegant solution > so far.
What testcases are using these files? lens-examples do not have any testcases. - Amareshwari ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41035/#review113588 ----------------------------------------------------------- On Jan. 6, 2016, 12:50 p.m., Rajat Khandelwal wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41035/ > ----------------------------------------------------------- > > (Updated Jan. 6, 2016, 12:50 p.m.) > > > Review request for lens. > > > Bugs: LENS-791 > https://issues.apache.org/jira/browse/LENS-791 > > > Repository: lens > > > Description > ------- > > fixing cli formatting > > > Diffs > ----- > > lens-api/pom.xml 8aa2f67a92d22cc6a807b44bdc7e451d09959768 > lens-api/src/main/java/org/apache/lens/api/APIResult.java > 0cdee0dcbe4b44398aadc7f5be0f6692b91b34e0 > lens-api/src/main/java/org/apache/lens/api/DateTime.java > 3f89fdd17c7c1100a8b4e3f73c711ef67ad87e9f > lens-api/src/main/java/org/apache/lens/api/LensConf.java > ff965d6aabf052371e0b3b4644a5f60d1210be3d > lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java > d4327a6b8fbf669d2b53571bd0a0bf9d6ad698c7 > lens-api/src/main/java/org/apache/lens/api/ToXMLString.java PRE-CREATION > lens-api/src/main/java/org/apache/lens/api/ToYAMLString.java PRE-CREATION > lens-api/src/main/java/org/apache/lens/api/jaxb/LensJAXBContext.java > 85a47ec5df069d7f7a0255c86570dd9a87c5b50f > lens-api/src/main/java/org/apache/lens/api/jaxb/YAMLToStringStrategy.java > PRE-CREATION > lens-api/src/main/java/org/apache/lens/api/query/LensPreparedQuery.java > f5bc35d38518b89894a385397c0bb6b39af0a474 > lens-api/src/main/java/org/apache/lens/api/query/LensQuery.java > 23c4decfe48fdfdb733beb100ad729468237c93c > lens-api/src/main/java/org/apache/lens/api/query/QueryHandle.java > 9f2018460e3de4fd9c631cab5c5bbb7d6393699e > lens-api/src/main/java/org/apache/lens/api/query/QuerySubmitResult.java > f3fb6db20e71caefe9884a8a89e58bdefab9c0be > > lens-api/src/test/java/org/apache/lens/api/jaxb/YAMLToStringStrategyTest.java > PRE-CREATION > lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java > 643772596c4724253333c0688a93ed621b4dba45 > lens-cli/src/main/java/org/apache/lens/cli/commands/LensCRUDCommand.java > a0c05b41650cd8303879c6c370d892c544adf6ca > > lens-cli/src/main/java/org/apache/lens/cli/commands/LensConnectionCommands.java > 0aa51a8eeea2ad3e0b43d7f011c50b83b0ba30e4 > > lens-cli/src/main/java/org/apache/lens/cli/commands/LensDimensionCommands.java > dc8349e322adcb031ef503850e012603f5865088 > lens-cli/src/main/java/org/apache/lens/cli/commands/LensQueryCommands.java > a29600d25d89e73f26102ba609e04b73f4cb7c58 > > lens-cli/src/main/java/org/apache/lens/cli/commands/LogicalTableCrudCommand.java > a04d5c836a31b625e0efcd5509d999d6e483cbb6 > lens-client/src/main/java/org/apache/lens/client/LensClient.java > f7f99c7c20b97e9f2b53c39ee147d5cc682f93dc > lens-client/src/main/java/org/apache/lens/client/LensMetadataClient.java > 4dec1a22d683d2ef40ec3cf7b721911d7eba6991 > lens-examples/src/main/java/org/apache/lens/examples/SampleMetastore.java > 1fbd358d6f5b351275a96122b93364bfd670538e > lens-examples/src/main/resources/city-local-part.yaml PRE-CREATION > lens-examples/src/main/resources/city.yaml PRE-CREATION > lens-examples/src/main/resources/city_subset.yaml PRE-CREATION > lens-examples/src/main/resources/city_table.yaml PRE-CREATION > lens-examples/src/main/resources/customer-local-part.yaml PRE-CREATION > lens-examples/src/main/resources/customer.yaml PRE-CREATION > lens-examples/src/main/resources/customer_table.yaml PRE-CREATION > lens-examples/src/main/resources/db-storage.yaml PRE-CREATION > lens-examples/src/main/resources/dim1-local-part.yaml PRE-CREATION > lens-examples/src/main/resources/dim2-local-part.yaml PRE-CREATION > lens-examples/src/main/resources/dim4-local-part.yaml PRE-CREATION > lens-examples/src/main/resources/dim_table.yaml PRE-CREATION > lens-examples/src/main/resources/dim_table2.yaml PRE-CREATION > lens-examples/src/main/resources/dim_table3.yaml PRE-CREATION > lens-examples/src/main/resources/dim_table4.yaml PRE-CREATION > lens-examples/src/main/resources/example-job.yaml PRE-CREATION > lens-examples/src/main/resources/fact1-local-part1.yaml PRE-CREATION > lens-examples/src/main/resources/fact1-local-part2.yaml PRE-CREATION > lens-examples/src/main/resources/fact1-local-part3.yaml PRE-CREATION > lens-examples/src/main/resources/fact1.xml > c934a6474be8406ff87f07d90148450869d64c87 > lens-examples/src/main/resources/fact1.yaml PRE-CREATION > lens-examples/src/main/resources/fact2-local-part1.yaml PRE-CREATION > lens-examples/src/main/resources/fact2-local-part2.yaml PRE-CREATION > lens-examples/src/main/resources/fact2-local-part3.yaml PRE-CREATION > lens-examples/src/main/resources/fact2.yaml PRE-CREATION > lens-examples/src/main/resources/local-cluster-storage.yaml PRE-CREATION > lens-examples/src/main/resources/local-storage.yaml PRE-CREATION > lens-examples/src/main/resources/product-local-parts.yaml PRE-CREATION > lens-examples/src/main/resources/product.yaml PRE-CREATION > lens-examples/src/main/resources/product_db_table.yaml PRE-CREATION > lens-examples/src/main/resources/product_table.yaml PRE-CREATION > lens-examples/src/main/resources/raw-local-part1.yaml PRE-CREATION > lens-examples/src/main/resources/raw-local-part2.yaml PRE-CREATION > lens-examples/src/main/resources/raw-local-part3.yaml PRE-CREATION > lens-examples/src/main/resources/raw-local-part4.yaml PRE-CREATION > lens-examples/src/main/resources/raw-local-part5.yaml PRE-CREATION > lens-examples/src/main/resources/raw-local-part6.yaml PRE-CREATION > lens-examples/src/main/resources/rawfact.yaml PRE-CREATION > lens-examples/src/main/resources/sales-aggr-continuous-fact.yaml > PRE-CREATION > lens-examples/src/main/resources/sales-aggr-fact1-local-parts.yaml > PRE-CREATION > lens-examples/src/main/resources/sales-aggr-fact1-mydb-parts.yaml > PRE-CREATION > lens-examples/src/main/resources/sales-aggr-fact1.yaml PRE-CREATION > lens-examples/src/main/resources/sales-aggr-fact2-local-parts.yaml > PRE-CREATION > lens-examples/src/main/resources/sales-aggr-fact2-mydb-parts.yaml > PRE-CREATION > lens-examples/src/main/resources/sales-aggr-fact2.yaml PRE-CREATION > lens-examples/src/main/resources/sales-cube.yaml PRE-CREATION > lens-examples/src/main/resources/sales-raw-fact.yaml PRE-CREATION > lens-examples/src/main/resources/sales-raw-local-parts.yaml PRE-CREATION > lens-examples/src/main/resources/sample-cube.yaml PRE-CREATION > lens-examples/src/main/resources/sample-db-only-dimension.yaml PRE-CREATION > lens-examples/src/main/resources/sample-dimension.yaml PRE-CREATION > lens-examples/src/main/resources/sample-dimension2.yaml PRE-CREATION > pom.xml 746204e87d046454fbd0e3f4690e3b220487418c > src/site/apt/admin/config.apt 54f827e8b18b139a6ade8b480881bdf9a7942306 > > Diff: https://reviews.apache.org/r/41035/diff/ > > > Testing > ------- > > ``` > Welcome to Lens Client > lens-shell>describe cube sales > properties: > cube.col.production_city_name.description: City name in which the product > was produced > cube.measure.rating.class: org.apache.lens.cube.metadata.ColumnMeasure > cube.dimension.customer_city_name.type: string > cube.col.profit.displaystring: Profit > cube.dimension.production_city_id.type: int > cube.dimension.customer_city_name.class: > org.apache.lens.cube.metadata.ReferencedDimAtrribute > cube.dimension.production_city_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.measure.line_item_quantity.aggregate: SUM > cube.col.promotion_sales.cost: 0.0 > cube.dimension.delivery_city_id.type: int > cube.timedim.partition.delivery_time: dt > cube.sales.joinchains.list0: > customer_details,product_details,customer_city,delivery_city,production_city > base.sales.expressions.list.size: 1 > cube.dimension.order_id.type: int > cube.measure.max_line_item_price.aggregate: MAX > transient_lastDdlTime: 1450698320 > cube.measure.line_item_product_price.class: > org.apache.lens.cube.metadata.ColumnMeasure > cube.col.profit.type: double > cube.col.promotion_sales.expr: > c3VtKGNhc2Ugd2hlbiBwcm9tb3Rpb25faWQgPSAwIHRoZW4gMCBlbHNlIHN0b3JlX3NhbGVzIGVu > ZCk= > :2015-04-11-18:|c3VtKGNhc2Ugd2hlbiBwcm9tb3Rpb25faWQgPSAtMSB0aGVuIDAgd2hlbiBwcm9tb3Rpb25faWQg > PSAtMSB0aGVuIDAgZWxzZSBzdG9yZV9zYWxlcyBlbmQp > ::2015-04-11-18 > cube.measure.line_item_tax.aggregate: SUM > cube.measure.line_item_tax.type: float > cube.col.delivery_city_name.description: City name to which the product was > delivered > cube.measure.unit_sales.type: bigint > cube.measure.store_sales.class: org.apache.lens.cube.metadata.ColumnMeasure > cube.measure.line_item_quantity.class: > org.apache.lens.cube.metadata.ColumnMeasure > cube.dimension.customer_city_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.dimension.production_city_name.chain.name: production_city > cube.dimension.delivery_city_name.class: > org.apache.lens.cube.metadata.ReferencedDimAtrribute > cube.dimension.delivery_city_name.chain.name: delivery_city > cube.col.max_line_item_discount.displaystring: Maximum Line item discount > base.sales.expressions.list0: profit,promotion_sales > cube.dimension.production_country.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.col.customer_city_name.description: City name to which the customer > belongs > cube.sales.timed.dimensions.list: order_time,delivery_time > cube.measure.line_item_product_price.type: float > cube.col.line_item_product_price.displaystring: Line item product price > cube.joinchain.customer_city.fullchain.1: > sales.customer_id.false,customer.id.false,customer.city_id.false,city.id.false > cube.col.line_item_discount_amount.displaystring: Line item discount > cube.joinchain.customer_city.fullchain.0: > sales.customer_city_id.false,city.id.false > cube.joinchain.customer_city.numchains: 2 > cube.dimension.customer_city_id.type: int > cube.col.profit.expr.base64: true > cube.dimension.production_country.type: string > cube.dimension.customer_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.dimension.customer_id.type: int > cube.measure.max_line_item_price.class: > org.apache.lens.cube.metadata.ColumnMeasure > cube.dimension.delivery_city_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.col.store_cost.displaystring: Store Cost > cube.joinchain.customer_details.numchains: 1 > cube.timedim.relation.order_time: delivery_time+[-20 days,-1 hour] > cube.table.sales.weight: 0.0 > cube.dimension.product_id.type: int > cube.measure.line_item_quantity.type: int > cube.col.max_line_item_price.displaystring: Maximum Line item price > cube.dimension.customer_city_name.chain.column.name: name > cube.joinchain.delivery_city.numchains: 1 > cube.col.customer_city_name.displaystring: Customer City > cube.measure.max_line_item_discount.class: > org.apache.lens.cube.metadata.ColumnMeasure > cube.dimension.order_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.dimension.customer_city_name.chain.name: customer_city > cube.sales.dimensions.list.size: 1 > cube.joinchain.product_details.fullchain.0: > sales.product_id.false,product.id.false > cube.dimension.production_state.type: string > cube.measure.max_line_item_price.type: float > cube.col.store_sales.displaystring: Store Sales > cube.col.delivery_city_name.displaystring: Delivery City > cube.table.type: CUBE > cube.col.promotion_sales.expr.base64: true > cube.col.store_cost.starttime: 2015-02-28-18 > cube.dimension.production_state.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.col.unit_sales.displaystring: Unit Sales > cube.sales.measures.list0: > unit_sales,store_sales,store_cost,line_item_quantity,line_item_product_price,line_item_discount_amount,line_item_tax,max_line_item_price,max_line_item_discount,rating > cube.col.production_state.displaystring: Production State > cube.dimension.order_time.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.measure.unit_sales.format: #,### > cube.col.line_item_tax.displaystring: Line item tax > cube.measure.max_line_item_discount.type: float > cube.dimension.product_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.measure.line_item_product_price.aggregate: SUM > cube.dimension.production_city_name.class: > org.apache.lens.cube.metadata.ReferencedDimAtrribute > cube.col.production_country.description: Country name in which the product > was produced > cube.col.production_city_name.displaystring: Production City > cube.measure.store_sales.format: #,###.## > cube.col.profit.expr: c3RvcmVfc2FsZXMgLSBzdG9yZV9jb3N0 > :: > cube.dimension.delivery_time.type: timestamp > cube.measure.rating.type: float > cube.measure.line_item_tax.class: > org.apache.lens.cube.metadata.ColumnMeasure > cube.measure.unit_sales.class: org.apache.lens.cube.metadata.ColumnMeasure > cube.sales.joinchains.list.size: 1 > cube.joinchain.customer_details.fullchain.0: > sales.customer_id.false,customer.id.false > cube.col.customer_city_id.starttime: 2015-02-28-18 > cube.joinchain.production_city.numchains: 1 > cube.sales.dimensions.list0: > customer_id,product_id,promotion_id,order_id,order_line_number,order_time,delivery_time,customer_city_id,production_city_id,delivery_city_id,customer_city_name,production_location,delivery_city_name > cube.measure.store_cost.type: double > cube.dimension.production_city_name.chain.column.name: name > cube.measure.store_sales.aggregate: SUM > cube.joinchain.product_details.numchains: 1 > cube.measure.rating.aggregate: AVG > cube.dimension.order_line_number.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.col.promotion_sales.type: double > cube.dimension.order_line_number.type: int > cube.dimension.production_location.hierarchy.2: > production_country,org.apache.lens.cube.metadata.BaseDimAttribute > cube.dimension.delivery_city_name.type: string > cube.dimension.production_location.hierarchy.1: > production_state,org.apache.lens.cube.metadata.BaseDimAttribute > cube.dimension.production_location.hierarchy.0: > production_city_name,org.apache.lens.cube.metadata.ReferencedDimAtrribute > cube.dimension.delivery_city_name.chain.column.name: name > cube.joinchain.delivery_city.fullchain.0: > sales.delivery_city_id.false,city.id.false > cube.measure.store_sales.type: double > cube.measure.line_item_discount_amount.aggregate: SUM > cube.dimension.promotion_id.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.col.production_country.displaystring: Production Country > cube.col.profit.cost: 0.0 > cube.measure.line_item_discount_amount.type: float > cube.measure.unit_sales.aggregate: SUM > cube.sales.measures.list.size: 1 > cube.dimension.production_location.class: > org.apache.lens.cube.metadata.HierarchicalDimAttribute > cube.dimension.promotion_id.type: int > cube.measure.max_line_item_discount.aggregate: MAX > cube.measure.line_item_discount_amount.class: > org.apache.lens.cube.metadata.ColumnMeasure > cube.dimension.delivery_time.class: > org.apache.lens.cube.metadata.BaseDimAttribute > cube.measure.store_cost.aggregate: SUM > cube.col.rating.displaystring: Rating > cube.measure.store_cost.class: org.apache.lens.cube.metadata.ColumnMeasure > cube.col.production_state.description: State name in which the product was > produced > cube.col.promotion_sales.displaystring: Promotion sales > cube.joinchain.production_city.fullchain.0: > sales.production_city_id.false,city.id.false > cube.dimension.order_time.type: timestamp > cube.col.line_item_quantity.displaystring: Line item quantity > cube.timedim.partition.order_time: ot > cube.measure.store_cost.format: #,###.00 > cube.dimension.production_city_name.type: string > name: sales > measures: > rating: > displayString: Rating > type: FLOAT > defaultAggr: AVG > line_item_quantity: > displayString: Line item quantity > type: INT > defaultAggr: SUM > store_sales: > displayString: Store Sales > type: DOUBLE > defaultAggr: SUM > formatString: #,###.## > unit_sales: > displayString: Unit Sales > type: BIGINT > defaultAggr: SUM > formatString: #,### > line_item_tax: > displayString: Line item tax > type: FLOAT > defaultAggr: SUM > max_line_item_discount: > displayString: Maximum Line item discount > type: FLOAT > defaultAggr: MAX > store_cost: > displayString: Store Cost > type: DOUBLE > defaultAggr: SUM > formatString: #,###.00 > startTime: 2015-02-28T23:30:00.000+05:30 > max_line_item_price: > displayString: Maximum Line item price > type: FLOAT > defaultAggr: MAX > line_item_discount_amount: > displayString: Line item discount > type: FLOAT > defaultAggr: SUM > line_item_product_price: > displayString: Line item product price > type: FLOAT > defaultAggr: SUM > dimAttributes: > production_location: > hierarchy: > production_city_name: > displayString: Production City > description: City name in which the product was produced > refSpec: > chainRefColumn: > - > chainName: production_city > refCol: name > destTable: city > type: string > joinKey: false > production_state: > displayString: Production State > description: State name in which the product was produced > type: string > joinKey: false > production_country: > displayString: Production Country > description: Country name in which the product was produced > type: string > joinKey: false > joinKey: false > customer_city_name: > displayString: Customer City > description: City name to which the customer belongs > refSpec: > chainRefColumn: > - > chainName: customer_city > refCol: name > destTable: city > type: string > joinKey: false > production_city_id: > type: int > joinKey: false > product_id: > type: int > joinKey: false > order_id: > type: int > joinKey: false > delivery_city_id: > type: int > joinKey: false > delivery_time: > type: timestamp > joinKey: false > order_time: > type: timestamp > joinKey: false > order_line_number: > type: int > joinKey: false > customer_city_id: > type: int > startTime: 2015-02-28T23:30:00.000+05:30 > joinKey: false > promotion_id: > type: int > joinKey: false > delivery_city_name: > displayString: Delivery City > description: City name to which the product was delivered > refSpec: > chainRefColumn: > - > chainName: delivery_city > refCol: name > destTable: city > type: string > joinKey: false > customer_id: > type: int > joinKey: false > expressions: > profit: > displayString: Profit > exprSpec: > - > expr: store_sales - store_cost > type: double > promotion_sales: > displayString: Promotion sales > exprSpec: > - > expr: sum(case when promotion_id = 0 then 0 else store_sales end) > startTime: 2015-04-11T23:30:00.000+05:30 > - > expr: sum(case when promotion_id = -1 then 0 when promotion_id = -1 > then 0 else store_sales end) > endTime: 2015-04-11T23:30:00.000+05:30 > type: double > joinChains: > product_details: > paths: > - > sales.product_id=product.id > destTable: product > production_city: > paths: > - > sales.production_city_id=city.id > destTable: city > customer_details: > paths: > - > sales.customer_id=customer.id > destTable: customer > delivery_city: > paths: > - > sales.delivery_city_id=city.id > destTable: city > customer_city: > paths: > - > sales.customer_city_id=city.id > - > sales.customer_id=customer.id > customer.city_id=city.id > destTable: city > > ``` > > ``` > lens-shell>query details > queryHandle: a186be92-fc1f-4509-9c8b-6ce6f1f7bdbb > userQuery: cube select measure2 from sample_cube where time_range_in(dt, > '2014-06-24-23', '2014-06-25-00') > submittedUser: anonymous > priority: VERY_HIGH > isPersistent: false > selectedDriverName: hive/hive1 > driverQuery: INSERT OVERWRITE DIRECTORY > "file:/tmp/lensreports/hdfsout/a186be92-fc1f-4509-9c8b-6ce6f1f7bdbb" SELECT > sum(( sample_cube . measure2 )) FROM local_fact1 sample_cube WHERE (((( > sample_cube . dt ) = '2014-06-24-23' ))) > status: > Status : SUCCESSFUL > Message : Query is successful! > Progress : 1.0 > Result Available > driverOpHandle: OperationHandle [opType=EXECUTE_STATEMENT, > getHandleIdentifier()=1da0e13e-eb67-484b-931f-1ca5584ac030] > submissionTime: 1452083135606 > launchTime: 1452083141739 > driverStartTime: 1452083139777 > driverFinishTime: 1452083149324 > finishTime: 1452083149336 > closedTime: 0 > > lens-shell> > ``` > > > Thanks, > > Rajat Khandelwal > >
