Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B43CAC155 for ; Wed, 26 Jun 2013 07:04:29 +0000 (UTC) Received: (qmail 66946 invoked by uid 500); 26 Jun 2013 07:04:26 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 66351 invoked by uid 500); 26 Jun 2013 07:04:19 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 66339 invoked by uid 99); 26 Jun 2013 07:04:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 07:04:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,HTML_OBFUSCATE_05_10,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of madhukar@easility.com) Received: from [209.85.128.194] (HELO mail-ve0-f194.google.com) (209.85.128.194) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 07:04:11 +0000 Received: by mail-ve0-f194.google.com with SMTP id m1so4235188ves.5 for ; Wed, 26 Jun 2013 00:03:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=fUurm4jVBHTMY4ydWgN46PxZd2sH5cpqevXJxY0wDyI=; b=AxlLE1zCZ14ZCK3/T6gXUPcr0zj1aIv2/UF4jakv5MDK5F5US6I4UH0IziFO2ZsDkf 1FjkdkRW3btOHB2NYfIe5cjeo3e1Oll2D4BjZJD6KF7Aho/avuqJ98e++bnfpyXd4ozW Fb8cBhRLh9mG+et9p36Bchddupqyb08AtZdzhB6k7SxoiZH6yvY1VmentHTmHPXGl1l0 yIoTym2uwI26jLTyqG744LvlLdcTx4upvBeviT0xL2Xa0iQzlBRkoYdFFYAOMTitmzga zN7zcRIoqpV8Wd07Q9bFVPfnJzvxyREvkoGCniCyLvTn2l4IOFELpvbVbNaAWMPYAWoV XPJA== MIME-Version: 1.0 X-Received: by 10.220.181.69 with SMTP id bx5mr1178411vcb.71.1372230210561; Wed, 26 Jun 2013 00:03:30 -0700 (PDT) Received: by 10.58.244.106 with HTTP; Wed, 26 Jun 2013 00:03:30 -0700 (PDT) X-Originating-IP: [210.212.85.60] Date: Wed, 26 Jun 2013 12:33:30 +0530 Message-ID: Subject: HBase: Filters not working for negative integers From: Madhukar Pandey To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a1132f30c403cef04e0093ec7 X-Gm-Message-State: ALoCoQkQyha6Cn7ZLdY9FlA8toNfPv18R4Y9EcnBbs8XSvz1ZpzzUAEHCLhCxb281VqgTpW3zAMe X-Virus-Checked: Checked by ClamAV on apache.org --001a1132f30c403cef04e0093ec7 Content-Type: text/plain; charset=ISO-8859-1 We have implemented QualifierFilter as well as ValueFilter (using BinaryComparator) of Hbase successfully and they are working fine for most of our cases. However they are failing in cases like number > -10 or number < -10 Please note that number = -10 is working perfectly fine. Also, number > 10 and number < 10 are also working fine. If you want to see the code, please check following links: 1. QWe have implemented QualifierFilter as well as ValueFilter (using BinaryComparator) of Hbase successfully and they are working fine for most of our cases. However they are failing in cases like number > -10 or number < -10 Please note that number = -10 is working perfectly fine. Also, number > 10 and number < 10 are also working fine. If you want to see the code, please check following links: 1. QualifierFilter - Relevant lines are 126-142 2. Value Filter - Relevant lines are 107-128 As per this blog, this can be an issue with serialization if we want to store negative values for rowkeys and we should write our own serializers for comparison. So we wanted to know: 1. Is it really necessary to write our own serializer in this case? 2. If yes, how? Any example would be great help.ualifierFilter - Relevant lines are 126-142 2. Value Filter - Relevant lines are 107-128 As per this blog , this can be an issue with serialization if we want to store negative values for rowkeys and we should write our own serializers for comparison. So we wanted to know: 1. Is it really necessary to write our own serializer in this case? 2. If yes, how? Any example would be great help. --001a1132f30c403cef04e0093ec7--