lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Sekiguchi <k...@r.email.ne.jp>
Subject Re: Throttling replication
Date Thu, 02 Sep 2010 22:20:43 GMT
  (10/09/03 5:42), Brandon Evans wrote:
>
>
> On 9/2/10 11:16 AM, Mark wrote:
>> I am using the built in replication. Can you send me a link to the patch
>> so I can give it a try? Thanks
>
> I see my email wasn't very clear.  Sorry to get your hopes up.  The patch I have is only
for the 
> rsync based replication.  Not the built in java based replication.
>
> Basically it allows you to add rsyncd_bwlimit to the scripts.conf file.
>
>
> If you would still like to check out the script, here it is:
>
> http://pastie.org/1134589
>
> ==============================================================================
>
> --- apache-solr-1.4.0.orig/src/scripts/rsyncd-start     2009-10-26 13:27:17.000000000
-0700
> +++ apache-solr-1.4.0/src/scripts/rsyncd-start  2010-05-12 13:34:24.000000000 -0700
> @@ -22,7 +22,7 @@
>  solr_root=$(pwd)
>  cd ${orig_dir}
>
> -unset data_dir solr_port rsyncd_port user verbose debug
> +unset data_dir solr_port rsyncd_port rsyncd_bwlimit user verbose debug
>  . ${solr_root}/bin/scripts-util
>
>  # set up variables
> @@ -40,7 +40,7 @@
>  "
>
>  # parse args
> -while getopts d:p:u:vV OPTION
> +while getopts d:p:b:u:vV OPTION
>  do
>      case $OPTION in
>      d)
> @@ -49,6 +49,9 @@
>      p)
>          rsyncd_port="$OPTARG"
>          ;;
> +    b)
> +        rsyncd_bwlimit="$OPTARG"
> +        ;;
>      u)
>          user="$OPTARG"
>          ;;
> @@ -82,6 +85,12 @@
>      fi
>  fi
>
> +# Set bwlimit to unlimited by default
> +if [[ -z ${rsyncd_bwlimit} ]]
> +then
> +       rsyncd_bwlimit='0'
> +fi
> +
>  # use default value for data_dir if not specified
>  # relative path starts at ${solr_root}
>  if [[ -z ${data_dir} ]]
> @@ -127,7 +136,7 @@
>      comment = Solr
>  EOF
>
> -rsync --daemon --port=${rsyncd_port} --config=${solr_root}/conf/rsyncd.conf
> +rsync --daemon --port=${rsyncd_port} --bwlimit=${rsyncd_bwlimit} 
> --config=${solr_root}/conf/rsyncd.conf
>
>  # first make sure rsyncd is accepting connections
>  i=1
>
This patch looks great!
Can you open a jira issue and contribute the patch?

Koji

-- 
http://www.rondhuit.com/en/


Mime
View raw message