From 9189c30122c0f4205a175ae8657c8ea59cf7a20b Mon Sep 17 00:00:00 2001 From: Brian Chan Date: Fri, 11 May 2012 18:20:47 -0700 Subject: [PATCH] LPS-27277 Source formatting --- benchmarks/benchmarks.properties | 63 ++++++++-------- benchmarks/build.xml | 42 +++++------ .../samplesqlbuilder/SampleSQLBuilder.java | 72 +++++++++---------- sql/build-parent.xml | 41 +++++------ 4 files changed, 111 insertions(+), 107 deletions(-) diff --git a/benchmarks/benchmarks.properties b/benchmarks/benchmarks.properties index 3a75e71d7cfde8..dbd73cc93b85c2 100644 --- a/benchmarks/benchmarks.properties +++ b/benchmarks/benchmarks.properties @@ -9,16 +9,6 @@ ## Sample SQL ## - # - # Specify the directory to output the generated SQL files. - # - sample.sql.output.dir=. - - # - # Specify whether the output should be merged into a single SQL file. - # - sample.sql.output.merge=true - # # Specify the database type of the generated SQL files. # @@ -40,102 +30,115 @@ # # Specify the number of comments to generate per blogs entry. # - sample.sql.blogs.entry.comment.count=10 + sample.sql.max.blogs.entry.comment.count=10 # # Specify the number of blogs entries to generate per community. # - sample.sql.blogs.entry.count=10 + sample.sql.max.blogs.entry.count=10 # # Specify the number of records to generate per dynamic data lists record # set. # - sample.sql.ddl.record.count=10 + sample.sql.max.ddl.record.count=10 # # Specify the number of dynamic data lists record sets to generate per # community. # - sample.sql.ddl.record.set.count=1 + sample.sql.max.ddl.record.set.count=1 # # Specify the number of file entries to generate per document library # folder. # - sample.sql.dl.file.entry.count=10 + sample.sql.max.dl.file.entry.count=10 # # Specify the size of the generated document library file entries. # - sample.sql.dl.file.entry.size=10240 + sample.sql.max.dl.file.entry.size=10240 # # Specify the number of document library folders to generate per depth in a # community. # - sample.sql.dl.folder.count=10 + sample.sql.max.dl.folder.count=10 # # Specify the depth of document library folders to generate per community. # - sample.sql.dl.folder.depth=3 + sample.sql.max.dl.folder.depth=3 # # Specify the number of sites to generate. # - sample.sql.group.count=10 + sample.sql.max.group.count=10 # # Specify the number of journal articles to generate per community. # - sample.sql.journal.article.count=6 + sample.sql.max.journal.article.count=6 # # Specify the size of the generated journal articles. # - sample.sql.journal.article.size=30 + sample.sql.max.journal.article.size=30 # # Specify the number of message boards categories to generate per community. # - sample.sql.mb.category.count=10 + sample.sql.max.mb.category.count=10 # # Specify the number of messages to generate per message boards thread. # - sample.sql.mb.message.count=10 + sample.sql.max.mb.message.count=10 # # Specify the number of threads to generate per message boards category. # - sample.sql.mb.thread.count=10 + sample.sql.max.mb.thread.count=10 # # Specify the number of users to generate per community. # - sample.sql.user.count=10 + sample.sql.max.user.count=10 # # All generated users are associated with the Guest community. Set this # property to specify how many generated sites a user will be associated # with. # - sample.sql.user.to.group.count=2 + sample.sql.max.user.to.group.count=2 # # Specify the number of wiki nodes to generate per community. # - sample.sql.wiki.node.count=10 + sample.sql.max.wiki.node.count=10 # # Specify the number of comments to generate per wiki page. # - sample.sql.wiki.page.comment.count=10 + sample.sql.max.wiki.page.comment.count=10 # # Specify the number of pages to generate per wiki node. # - sample.sql.wiki.page.count=10 + sample.sql.max.wiki.page.count=10 + + # + # Specify the optimize buffer size. + # + sample.sql.optimize.buffer.size=8192 + + # + # Specify the directory to output the generated SQL files. + # + sample.sql.output.dir=. - sample.sql.optimize.buffer.size=8192 \ No newline at end of file + # + # Specify whether the output should be merged into a single SQL file. + # + sample.sql.output.merge=true \ No newline at end of file diff --git a/benchmarks/build.xml b/benchmarks/build.xml index 4693d15e3dc818..74fc22d37f1be5 100644 --- a/benchmarks/build.xml +++ b/benchmarks/build.xml @@ -16,29 +16,29 @@ > - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java index fd3097ed4d57a7..d8022e22367250 100644 --- a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java +++ b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/SampleSQLBuilder.java @@ -80,77 +80,75 @@ public static void main(String[] args) { InitUtil.initWithSpring(); String baseDir = arguments.get("sample.sql.base.dir"); - String outputDir = arguments.get("sample.sql.output.dir"); - boolean outputMerge = GetterUtil.getBoolean( - arguments.get("sample.sql.output.merge")); String dbType = arguments.get("sample.sql.db.type"); int maxBlogsEntryCommentCount = GetterUtil.getInteger( - arguments.get("sample.sql.blogs.entry.comment.count")); + arguments.get("sample.sql.max.blogs.entry.comment.count")); int maxBlogsEntryCount = GetterUtil.getInteger( - arguments.get("sample.sql.blogs.entry.count")); + arguments.get("sample.sql.max.blogs.entry.count")); int maxDDLRecordCount = GetterUtil.getInteger( - arguments.get("sample.sql.ddl.record.count")); + arguments.get("sample.sql.max.ddl.record.count")); int maxDDLRecordSetCount = GetterUtil.getInteger( - arguments.get("sample.sql.ddl.record.set.count")); + arguments.get("sample.sql.max.ddl.record.set.count")); int maxDLFileEntryCount = GetterUtil.getInteger( - arguments.get("sample.sql.dl.file.entry.count")); + arguments.get("sample.sql.max.dl.file.entry.count")); int maxDLFileEntrySize = GetterUtil.getInteger( - arguments.get("sample.sql.dl.file.entry.size")); + arguments.get("sample.sql.max.dl.file.entry.size")); int maxDLFolderCount = GetterUtil.getInteger( - arguments.get("sample.sql.dl.folder.count")); + arguments.get("sample.sql.max.dl.folder.count")); int maxDLFolderDepth = GetterUtil.getInteger( - arguments.get("sample.sql.dl.folder.depth")); + arguments.get("sample.sql.max.dl.folder.depth")); int maxGroupCount = GetterUtil.getInteger( - arguments.get("sample.sql.group.count")); + arguments.get("sample.sql.max.group.count")); int maxJournalArticleCount = GetterUtil.getInteger( - arguments.get("sample.sql.journal.article.count")); + arguments.get("sample.sql.max.journal.article.count")); int maxJournalArticleSize = GetterUtil.getInteger( - arguments.get("sample.sql.journal.article.size")); + arguments.get("sample.sql.max.journal.article.size")); int maxMBCategoryCount = GetterUtil.getInteger( - arguments.get("sample.sql.mb.category.count")); + arguments.get("sample.sql.max.mb.category.count")); int maxMBMessageCount = GetterUtil.getInteger( - arguments.get("sample.sql.mb.message.count")); + arguments.get("sample.sql.max.mb.message.count")); int maxMBThreadCount = GetterUtil.getInteger( - arguments.get("sample.sql.mb.thread.count")); + arguments.get("sample.sql.max.mb.thread.count")); int maxUserCount = GetterUtil.getInteger( - arguments.get("sample.sql.user.count")); + arguments.get("sample.sql.max.user.count")); int maxUserToGroupCount = GetterUtil.getInteger( - arguments.get("sample.sql.user.to.group.count")); + arguments.get("sample.sql.max.user.to.group.count")); int maxWikiNodeCount = GetterUtil.getInteger( - arguments.get("sample.sql.wiki.node.count")); + arguments.get("sample.sql.max.wiki.node.count")); int maxWikiPageCommentCount = GetterUtil.getInteger( - arguments.get("sample.sql.wiki.page.comment.count")); + arguments.get("sample.sql.max.wiki.page.comment.count")); int maxWikiPageCount = GetterUtil.getInteger( - arguments.get("sample.sql.wiki.page.count")); + arguments.get("sample.sql.max.wiki.page.count")); int optimizeBufferSize = GetterUtil.getInteger( arguments.get("sample.sql.optimize.buffer.size")); + String outputDir = arguments.get("sample.sql.output.dir"); + boolean outputMerge = GetterUtil.getBoolean( + arguments.get("sample.sql.output.merge")); new SampleSQLBuilder( - arguments, baseDir, outputDir, outputMerge, dbType, - maxBlogsEntryCommentCount, maxBlogsEntryCount, maxDDLRecordCount, - maxDDLRecordSetCount, maxDLFileEntryCount, maxDLFileEntrySize, - maxDLFolderCount, maxDLFolderDepth, maxGroupCount, - maxJournalArticleCount, maxJournalArticleSize, maxMBCategoryCount, - maxMBMessageCount, maxMBThreadCount, maxUserCount, - maxUserToGroupCount, maxWikiNodeCount, maxWikiPageCommentCount, - maxWikiPageCount, optimizeBufferSize); + arguments, baseDir, dbType, maxBlogsEntryCommentCount, + maxBlogsEntryCount, maxDDLRecordCount, maxDDLRecordSetCount, + maxDLFileEntryCount, maxDLFileEntrySize, maxDLFolderCount, + maxDLFolderDepth, maxGroupCount, maxJournalArticleCount, + maxJournalArticleSize, maxMBCategoryCount, maxMBMessageCount, + maxMBThreadCount, maxUserCount, maxUserToGroupCount, + maxWikiNodeCount, maxWikiPageCommentCount, maxWikiPageCount, + optimizeBufferSize, outputDir, outputMerge); } public SampleSQLBuilder( - Map arguments, String baseDir, String outputDir, - boolean outputMerge, String dbType, int maxBlogsEntryCommentCount, - int maxBlogsEntryCount, int maxDDLRecordCount, int maxDDLRecordSetCount, + Map arguments, String baseDir, String dbType, + int maxBlogsEntryCommentCount, int maxBlogsEntryCount, + int maxDDLRecordCount, int maxDDLRecordSetCount, int maxDLFileEntryCount, int maxDLFileEntrySize, int maxDLFolderCount, int maxDLFolderDepth, int maxGroupCount, int maxJournalArticleCount, int maxJournalArticleSize, int maxMBCategoryCount, int maxMBMessageCount, int maxMBThreadCount, int maxUserCount, int maxUserToGroupCount, int maxWikiNodeCount, int maxWikiPageCommentCount, int maxWikiPageCount, - int optimizeBufferSize) { + int optimizeBufferSize, String outputDir, boolean outputMerge) { try { - _outputDir = outputDir; - _outputMerge = outputMerge; _dbType = dbType; _maxBlogsEntryCommentCount = maxBlogsEntryCommentCount; _maxBlogsEntryCount = maxBlogsEntryCount; @@ -171,6 +169,8 @@ public SampleSQLBuilder( _maxWikiPageCommentCount = maxWikiPageCommentCount; _maxWikiPageCount = maxWikiPageCount; _optimizeBufferSize = optimizeBufferSize; + _outputDir = outputDir; + _outputMerge = outputMerge; int totalMThreadCount = maxMBCategoryCount * maxMBThreadCount; int totalMBMessageCount = totalMThreadCount * maxMBMessageCount; diff --git a/sql/build-parent.xml b/sql/build-parent.xml index 91709f52040a11..e92a42abc587ab 100644 --- a/sql/build-parent.xml +++ b/sql/build-parent.xml @@ -158,28 +158,29 @@ + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - -