RocketMQ: how are the queues of a topic mapped to the master brokers? - rocketmq

As I know, In RocketMq, a "queue" is similar as a "partition" in Kafka.
One topic has multiple queues, also has multiple brokers(master and slave).
But how are the queues are mapped to the masters?
For example, if I have a topic with 3 queues, and 3 masters. The 3 queues are distributed among the 3 masters? or each master has 3 queues?

You can specify the queue numbers When you create topic:
sh mqadmin updateTopic -h
usage: mqadmin updateTopic [-b <arg>] [-c <arg>] [-h] [-n <arg>] [-o <arg>] [-p <arg>] [-r <arg>] [-s <arg>]
-t <arg> [-u <arg>] [-w <arg>]
-b,--brokerAddr <arg> create topic to which broker
-c,--clusterName <arg> create topic to which cluster
-h,--help Print help
-n,--namesrvAddr <arg> Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876
-o,--order <arg> set topic's order(true|false
-p,--perm <arg> set topic's permission(2|4|6), intro[2:W 4:R; 6:RW]
-r,--readQueueNums <arg> set read queue nums
-s,--hasUnitSub <arg> has unit sub (true|false
-t,--topic <arg> topic name
-u,--unit <arg> is unit topic (true|false
-w,--writeQueueNums <arg> set write queue nums
That means you can decide the queue numbers in any broker or cluster.
More details please refer to here.

Related

What circumstances will messages not be consumed or delay consumed in rocketmq cluster?

I have more than five hundred topic in one cluster with six nodes, I create the topic like this :
./mqadmin updateTopic -c MyCluster -n 192.168.1.100:9876 -r 16 -w 16 -t topic1;
./mqadmin updateTopic -c MyCluster -n 192.168.1.100:9876 -r 16 -w 16 -t topic500;
I can send the message without delay ,but I find sometime that the client can not consume the message because the broker do not have consume client.How to fix this bug?
do following check
more than 1 consumer instance started in one machine.
if so , make every consumer instance client id or client name different
consumer instances in this c_fy_core consumer group sub different topic and tags.
if so , make sure all consumer instances in one consumer group sub same topic-and-tags

What are the valid combination of ObjectName and ComponentName in mqsireportproperties command?

I am trying to list out all properties for all objects in IBM Integration Bus.
The mqsireportproperties command takes a combination of 2 parameters
-b ComponentName, the valid values are httplistener, securitycache, cachemanager, pubsub or webadmin
-o ObjectName this can be any value from the list entities returned by AllReportableEntityNames
Where is the documentation that gives us the correct combination of options between these to parameter?
For example this is a valid command
mqsireportproperties TESTNODE_root -o 'HTTPConnector' -b webadmin -a
where as this is not
mqsireportproperties TESTNODE_root -o 'HTTPConnector' -b cachemanager -a
What are the valid combination of ObjectName and ComponentName in mqsireportproperties command?
There is not a centralized view for what you asking for. The IBM Integration Bus documentation sometimes list this by certain types of administration tasks.
The mqsireportproperties documentation by the end has several of examples but do not cover all.

configure SNMP Trap monitoring in Nagios

I am struggling a lot to understand and setup SNMP Trap monitoring using Nagios monitoring tool.
I followed many tutorials and articles over internet but unable to understand below 2 points:
1) Understanding about SNMP Trap monitoring, why we do SNMP trap monitoring ?
2) How do we implement SNMP Trap monitoring using Nagios monitoring tool ?
Any help on above 2 points would be highly appreciated.
Thanks in Advance.
Most network devices keep a database called Management Information Base (MIB). This is used to track information related to hardware including health. To get this information you have to provide an OID or the Object Identifier which is different for different vendors.
Through SNMP you can query any of the OIDs from a device. Let's say you have a Cisco Router and you want to make sure it does not over heat. So you check the OID for temperature every 5-10 minutes and then on Nagios you configure certain limits, for example if the temperature ever increases above 45c then Nagios should send you an alert etc. Similarly you can monitor other OIDs.
So the question is how do you use SNMP with Nagios?
Nagios has a script called check_snmp that does this for you.
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-x privproto] [-X privpasswd]
As you can see you can provide the IP address, OID, your warning and critical thresholds and authentication information etc. Hope this helps.

Invalid job array specification in slurm

I am submitting a toy array job in slurm. My command line is
$ sbatch -p development -t 0:30:0 -n 1 -a 1-2 j1
where j1 is script:
#!/bin/bash
echo job id is $SLURM_JOB_ID
echo array job id is $SLURM_ARRAY_JOB_ID
echo task id id $SLURM_ARRAY_TASK_ID
When I submit this, I get an error:
--> Verifying valid submit host (login1)...OK
--> Verifying valid jobname...OK
--> Enforcing max jobs per user...OK
--> Verifying availability of your home dir (/home1/03400/myname)...OK
--> Verifying availability of your work dir (/work/03400/myname)...OK
--> Verifying availability of your scratch dir (/scratch/03400/myname)...OK
--> Verifying valid ssh keys...OK
--> Verifying access to desired queue (development)...OK
--> Verifying job request is within current queue limits...OK
--> Checking available allocation (PRJ-1234)...OK
sbatch: error: Batch job submission failed: Invalid job array specification
The same job works fine without the array specification:
$ sbatch -p development -t 0:30:0 -n 1 j1
This post is a bit old, but in case it happens for other people, I have had the same issue but the accepted answer did not suggest what was the problem in my case.
This error (sbatch: error: Batch job submission failed: Invalid job array specification) can also be raised when the array size is too large.
From https://slurm.schedmd.com/slurm.conf.html
MaxArraySize
The maximum job array size. The maximum job array task index value will be one less than MaxArraySize to allow for an index value of zero. Configure MaxArraySize to 0 in order to disable job array use. The value may not exceed 4000001. The value of MaxJobCount should be much larger than MaxArraySize. The default value is 1001.
To check the value, the slurm.conf file should be accessible by all slurm users (still according to 1) and may be found somewhere near /etc/slurm.conf (see https://slurm.schedmd.com/slurm.conf.html#lbAM, in my case I found it at path /etc/slurm/slurm.conf).
The syntax for your array specification is correct. But the printout you paste is not standard Slurm, I guess you are working on Stampede ; they have their own sbatch wrapper.
What you could do is use the -vvv option to sbatch to see exactly what Slurm sees:
$ sbatch -vvv -p development -t 0:30:0 -n 1 -a 1-2 j1 |& grep array
This should return
sbatch: array : 1-2
and if it does not it means the information is somehow lost somewhere.
What you can try is remove the array specification from the submission command line and insert it in the submission script, like this:
$ sbatch -p development -t 0:30:0 -n 1 j1
with j1 being
#!/bin/bash
#SBATCH -a 1-2
echo job id is $SLURM_JOB_ID
echo array job id is $SLURM_ARRAY_JOB_ID
echo task id id $SLURM_ARRAY_TASK_ID
The next step is to contact the system administrators with the information you will get from running the above tests and ask for help.

What does /p mean in set /p?

What does /p stand for in set /p=? I know that / enables a switch, and I'm fairly sure that I know /a is for arithmetic. I've heard numerous rumours, some saying /p is for prompt, others stating it stands for print. The only reason I slightly doubt it is prompt is because in many cases it does not ask for a prompt, yet prints on the screen, such as
<nul set /p=This will not generate a new line
But what I want to know is: Do we really know what it stands for?
The /P switch allows you to set the value of a variable to a line of input entered by the user. Displays the specified promptString before reading the line of input. The promptString can be empty.
Two ways I've used it... first:
SET /P variable=
When batch file reaches this point (when left blank) it will halt and wait for user input. Input then becomes variable.
And second:
SET /P variable=<%temp%\filename.txt
Will set variable to contents (the first line) of the txt file. This method won't work unless the /P is included. Both tested on Windows 8.1 Pro, but it's the same on 7 and 10.
For future reference, you can get help for any command by using the /? switch, which should explain what switches do what.
According to the set /? screen, the format for set /p is SET /P variable=[promptString] which would indicate that the p in /p is "prompt." It just prints in your example because <nul passes in a nul character which immediately ends the prompt so it just acts like it's printing. It's still technically prompting for input, it's just immediately receiving it.
NOTE: The answers below this point are for a previous version of the question.
/L in for /L generates a List of numbers.
From ping /?:
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only. This setting has been deprecated
and has no effect on the type of service field in the IP Header).
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along host-list (IPv4-only).
-k host-list Strict source route along host-list (IPv4-only).
-w timeout Timeout in milliseconds to wait for each reply.
-R Use routing header to test reverse route also (IPv6-only).
-S srcaddr Source address to use.
-4 Force using IPv4.
-6 Force using IPv6.

Resources