Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-120376

Provide a more easy way to import the data build by SampleSQLBuilder into database

    Details

      Description

      Add an easy way to import the data build by SampleSQLbuilder into a database

      An example for Mysql:

      1>Create a property file named "benchmarks.${user.name}.properties" put it under ${PortalSource}/benchmarks to override these properties in benchmarks.properties 

      For example, 

      Set these properties in the property file:

      sample.sql.db.type=mysql
      sample.sql.output.dir=.
      sample.sql.output.merge=true
      sample.sql.db.time.zone=GMT
      sample.sql.output.csv.file.names=assetPublisher,blog,company,cTLayout,documentLibrary,dynamicDataList,layout,fragment,mbThread,repository,user,wiki
      sample.sql.script=com/liferay/portal/tools/sample/sql/builder/dependencies/sample.ftl

      sample.sql.max.group.count=1
      sample.sql.max.journal.article.count=1
      sample.sql.max.journal.article.page.count=2
      sample.sql.max.journal.article.size=120
      sample.sql.max.journal.article.version.count=1
      sample.sql.max.user.count=10
      sample.sql.max.user.to.group.count=1
      sample.sql.optimize.buffer.size=8192

      3>Run "ant build-sample-sql " under ${PortalSource}/benchmarks

      4>Create a database in Mysql and import the sql file named as sample-data-mysql.sql under ${PortalSource}/benchmarks into the db.

      Note:
      when start portal with the data SampleSQLBuilder generated, these properties need be setted in portal-ext.properties
      1>passwords.encryption.algorithm=NONE
      2>After Mysql 5.7, need assign "serverTimezone" in property "jdbc.default.url" for example"jdbc.default.url=jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false&serverTimezone=Asia/Shanghai"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shuyang.zhou Shuyang Zhou
              Reporter:
              lily.chi Lily Chi
              Engineering Assignee:
              Lily Chi
              Recent user:
              Lily Chi
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package