Repository: phoenix Updated Branches: refs/heads/4.5-HBase-0.98 a7621e533 -> 1a851591c
PHOENIX-2227 Adding comments to test_scenario.xml to explain new features added. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/1a851591 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1a851591 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1a851591 Branch: refs/heads/4.5-HBase-0.98 Commit: 1a851591c649744d32ed0beab817636d75285fd7 Parents: b715e5d Author: Jan <jferna...@salesforce.com> Authored: Fri Sep 4 13:17:32 2015 -0700 Committer: Cody Marcel <cmar...@cmarcel-wsl1.internal.salesforce.com> Committed: Thu Sep 10 13:15:50 2015 -0700 ---------------------------------------------------------------------- .../src/test/resources/scenario/test_scenario.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/1a851591/phoenix-pherf/src/test/resources/scenario/test_scenario.xml ---------------------------------------------------------------------- diff --git a/phoenix-pherf/src/test/resources/scenario/test_scenario.xml b/phoenix-pherf/src/test/resources/scenario/test_scenario.xml index 735e690..50a603e 100644 --- a/phoenix-pherf/src/test/resources/scenario/test_scenario.xml +++ b/phoenix-pherf/src/test/resources/scenario/test_scenario.xml @@ -220,10 +220,23 @@ <query id="q4" statement="select sum(SOME_INT) from PHERF.TEST_TABLE"/> </querySet> </scenario> - <!-- Test writing to a Multi-tenant View --> + <!-- To configure a Write Workload to write to a tenant specific view users need to + specify the tenantId attribute on the scenario, specifying the tenant they + want to write data for as the attribute value. This tells Pherf to take out a + tenant-specific connection for executing the write workload. + The name of the tenant specific view to write to can then be specified as the value of + the tablename attribute. This assumes the tenant specific view has been created. To + dynamically create the view see comments below with regard to the ddl attribute. + --> <scenario tableName="PHERF.TEST_VIEW" tenantId="abcdefghijklmno" rowCount="100" name="testMTWriteScenario"> </scenario> - <!-- Test scenario DDL --> + <!-- Scenario level DDL that is dynamically executed before the Write Workload is run. + This pattern is really useful when you want to write data to multi-tenant view and the tenant id is + tightly bound to the scenario. In such cases you can't create the view through the data model flow. + The value of the tableName attribute is name of the view that is dynamically created based on the DDL + in the ddl attribute. Queries accessing the View will need to manually make sure Pherf was run with the -l option at + least once. + --> <scenario tableName="PHERF.TEST_MT_VIEW" tenantId="abcdefghijklmno" ddl="CREATE VIEW IF NOT EXISTS PHERF.TEST_MT_VIEW (field1 VARCHAR) AS SELECT * FROM PHERF.TEST_MULTI_TENANT_TABLE" rowCount="100" name="testMTDdlWriteScenario">