summaryrefslogtreecommitdiff
path: root/qpid/tools/src
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2015-01-02 17:43:14 +0000
committerKim van der Riet <kpvdr@apache.org>2015-01-02 17:43:14 +0000
commit81fd3962fe649940eb64262a260997a2da064dc6 (patch)
treea6a929788da25bb2c4551f9ab921f93a7d7ac63c /qpid/tools/src
parentd3e81de7862f78b15d47df841a1b22ae8cafd37c (diff)
downloadqpid-python-81fd3962fe649940eb64262a260997a2da064dc6.tar.gz
QPID-5671 [linearstore] Add ability to use disk partitions and select per-queue EFPs: WIP, but mostly complete. Needs additional testing. It is now possible to add queues which use a partition other than the broker default by using qpid-config --durable together with --efp--partition-num and/or --efp-pool-file-size
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1649081 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tools/src')
-rwxr-xr-xqpid/tools/src/py/qpid-config23
1 files changed, 20 insertions, 3 deletions
diff --git a/qpid/tools/src/py/qpid-config b/qpid/tools/src/py/qpid-config
index ac93954484..8d38b1a342 100755
--- a/qpid/tools/src/py/qpid-config
+++ b/qpid/tools/src/py/qpid-config
@@ -105,6 +105,8 @@ class Config:
self._if_unused = True
self._fileCount = None
self._fileSize = None
+ self._efp_partition_num = None
+ self._efp_pool_file_size = None
self._maxQueueSize = None
self._maxQueueCount = None
self._limitPolicy = None
@@ -137,6 +139,8 @@ conn_options = {}
FILECOUNT = "qpid.file_count"
FILESIZE = "qpid.file_size"
+EFP_PARTITION_NUM = "qpid.efp_partition_num"
+EFP_POOL_FILE_SIZE = "qpid.efp_pool_file_size"
MAX_QUEUE_SIZE = "qpid.max_size"
MAX_QUEUE_COUNT = "qpid.max_count"
POLICY_TYPE = "qpid.policy_type"
@@ -158,7 +162,8 @@ REPLICATE = "qpid.replicate"
#i.e. the arguments for which there is special processing on add and
#list
SPECIAL_ARGS=[
- FILECOUNT,FILESIZE,MAX_QUEUE_SIZE,MAX_QUEUE_COUNT,POLICY_TYPE,
+ FILECOUNT,FILESIZE,EFP_PARTITION_NUM,EFP_POOL_FILE_SIZE,
+ MAX_QUEUE_SIZE,MAX_QUEUE_COUNT,POLICY_TYPE,
LVQ_KEY,MSG_SEQUENCE,IVE,QUEUE_EVENT_GENERATION,
FLOW_STOP_COUNT,FLOW_RESUME_COUNT,FLOW_STOP_SIZE,FLOW_RESUME_SIZE,
MSG_GROUP_HDR_KEY,SHARED_MSG_GROUP,REPLICATE]
@@ -213,8 +218,10 @@ def OptionsAndArguments(argv):
parser.add_option_group(group2)
group3 = OptionGroup(parser, "Options for Adding Queues")
- group3.add_option("--file-count", action="store", type="int", metavar="<n>", help="Number of files in queue's persistence journal")
- group3.add_option("--file-size", action="store", type="int", metavar="<n>", help="File size in pages (64KiB/page)")
+ group3.add_option("--file-count", action="store", type="int", metavar="<n>", help="[legacystore] Number of files in queue's persistence journal")
+ group3.add_option("--file-size", action="store", type="int", metavar="<n>", help="[legactystore] File size in pages (64KiB/page)")
+ group3.add_option("--efp-partition-num", action="store", type="int", metavar="<n>", help="[linearstore] EFP partition number")
+ group3.add_option("--efp-pool-file-size", action="store", type="int", metavar="<n>", help="[linearstore] EFP file size (KiB)")
group3.add_option("--max-queue-size", action="store", type="int", metavar="<n>", help="Maximum in-memory queue size as bytes")
group3.add_option("--max-queue-count", action="store", type="int", metavar="<n>", help="Maximum in-memory queue size as a number of messages")
group3.add_option("--limit-policy", action="store", choices=["none", "reject", "ring", "ring-strict"], metavar="<policy>", help="Action to take when queue limit is reached")
@@ -294,6 +301,10 @@ def OptionsAndArguments(argv):
config._fileCount = opts.file_count
if opts.file_size is not None:
config._fileSize = opts.file_size
+ if opts.efp_partition_num is not None:
+ config._efp_partition_num = opts.efp_partition_num
+ if opts.efp_pool_file_size is not None:
+ config._efp_pool_file_size = opts.efp_pool_file_size
if opts.max_queue_size is not None:
config._maxQueueSize = opts.max_queue_size
if opts.max_queue_count is not None:
@@ -524,6 +535,8 @@ class BrokerManager:
if q.exclusive: print "excl",
if FILESIZE in args: print "--file-size=%s" % args[FILESIZE],
if FILECOUNT in args: print "--file-count=%s" % args[FILECOUNT],
+ if EFP_PARTITION_NUM in args: print "--efp-partition-num=%s" % args[EFP_PARTITION_NUM],
+ if EFP_POOL_FILE_SIZE in args: print "--efp-pool-file-size=%s" % args[EFP_POOL_FILE_SIZE],
if MAX_QUEUE_SIZE in args: print "--max-queue-size=%s" % args[MAX_QUEUE_SIZE],
if MAX_QUEUE_COUNT in args: print "--max-queue-count=%s" % args[MAX_QUEUE_COUNT],
if POLICY_TYPE in args: print "--limit-policy=%s" % args[POLICY_TYPE].replace("_", "-"),
@@ -606,6 +619,10 @@ class BrokerManager:
declArgs[FILECOUNT] = config._fileCount
if config._fileSize:
declArgs[FILESIZE] = config._fileSize
+ if config._efp_partition_num:
+ declArgs[EFP_PARTITION_NUM] = config._efp_partition_num
+ if config._efp_pool_file_size:
+ declArgs[EFP_POOL_FILE_SIZE] = config._efp_pool_file_size
if config._maxQueueSize is not None:
declArgs[MAX_QUEUE_SIZE] = config._maxQueueSize