Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA7C9F4C2 for ; Thu, 2 May 2013 15:35:32 +0000 (UTC) Received: (qmail 10924 invoked by uid 500); 2 May 2013 15:35:31 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 10864 invoked by uid 500); 2 May 2013 15:35:31 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 10856 invoked by uid 99); 2 May 2013 15:35:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 15:35:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cernoso@gmail.com designates 209.85.210.180 as permitted sender) Received: from [209.85.210.180] (HELO mail-ia0-f180.google.com) (209.85.210.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 15:35:24 +0000 Received: by mail-ia0-f180.google.com with SMTP id 21so278365iay.25 for ; Thu, 02 May 2013 08:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=5DsxrW8JPN0nMjWf2kxvTGM29lrBpYxXUfsjL4aJOKM=; b=HrQA3Nhrk45ZeKwewllVk8qIQjiItaAru5cxF39M4zwceVnfcoBM80TTOErpz+TlYt IY5rH1tunIh8F6XxBUixuu+PCd2s6DHX3jngT7Z/FnXtkyLK5sM7dOF9C3jHshLV51TS Mx/BhA2SQfnYE+eVi9+agTn/Q7SRhFVpnvfw4DEnJhoudu+wlTww+VuBoX9KHEE15Izs 4I9ZeQnJhz1o4i28cu8Jp5E6ulbM2aTR2B94GiUCAdh3xzFEb2RATZ1irKOpDv4vasrN chtnqVpfrukn5DWk2lFLw3HcuEIYeQVyWwJUmWH7X15UULJjt3vls/kiD9Ie82d06tiA m9MA== MIME-Version: 1.0 X-Received: by 10.50.37.236 with SMTP id b12mr15235913igk.42.1367508903326; Thu, 02 May 2013 08:35:03 -0700 (PDT) Received: by 10.42.62.200 with HTTP; Thu, 2 May 2013 08:35:03 -0700 (PDT) Date: Thu, 2 May 2013 17:35:03 +0200 Message-ID: Subject: Extending Ec2Snitch for custom availability zone format From: =?UTF-8?B?T25kxZllaiDEjGVybm/FoQ==?= To: dev@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d044788d968faf404dbbdfa60 X-Virus-Checked: Checked by ClamAV on apache.org --f46d044788d968faf404dbbdfa60 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, We use Cassandra in mixed Ec2/OpenStack environment. Unfortunately due to decisions made long ago the OpenStack availability zone name obtainable through http://169.254.169.254/latest/meta-data/placement/availability-zone= is not compatible with Cassandra's parsing in o.a.c.locator.Ec2Snitch - the format uses dot instead of minus as field separator. Currently I manage my own fork of Cassandra's snitches, which is error prone. I thought I might patch Cassandra so that it understands custom formats: - make the format a regex configurable in cassandra.yaml with defaults (option not set at all) set to current implementation - make it easy - presume three groups (us-east-1a, openstack.something-computenode and the like) where the first two groups form datacenter name and the last one the rack (plus keeping CASSANDRA-4026 functionality in place) For users not configuring the regex nothing will change, others, like me, will have the option to parse different availability zone names. What do you think? Does it have a chance being accepted? regards, ond=C5=99ej =C4=8Derno=C5=A1 --f46d044788d968faf404dbbdfa60--