Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-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 4CAA9E3AA for ; Fri, 22 Feb 2013 06:04:23 +0000 (UTC) Received: (qmail 50879 invoked by uid 500); 22 Feb 2013 06:04:19 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 50704 invoked by uid 500); 22 Feb 2013 06:04:13 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 50653 invoked by uid 99); 22 Feb 2013 06:04:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2013 06:04:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harsh@cloudera.com designates 209.85.210.182 as permitted sender) Received: from [209.85.210.182] (HELO mail-ia0-f182.google.com) (209.85.210.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2013 06:04:06 +0000 Received: by mail-ia0-f182.google.com with SMTP id k38so255551iah.41 for ; Thu, 21 Feb 2013 22:03:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=1i4Z2Ndo1EVH0D68BY+rROt2W9HEZWTT5swrOsnf7PY=; b=CUCVci18eKN2ElLJAfFXreBgItd88QSfVA0JweTV5JV0leiXsQBkYfk1brEu9dFvZ3 i/BFGhgq7T66ZuDGbWk/VFARw/rGE69TYcdKBXBM2d4WiHkPDTdZRHdp458dBkQYdEZt qNn2QqeJyzK0AOhMMb/Kfhk2m5CR3C1cRphwa6987hcYj6sY0Q6WjPKPnQ4koP1zo6Ch m7gjBZw7e1nVVnMMJFJzZouHDN1RzE16EILIwZ3E+ZwLJCh40a3QJt4PtZSWcrhfW/yR UqQj5aUkgEMTmPfFecE9r451bZS0hOsuYB93ZKbb+6feDe2ZccGobZKr6nUl+mhZySrs ZV0A== X-Received: by 10.50.135.100 with SMTP id pr4mr13908341igb.37.1361513025106; Thu, 21 Feb 2013 22:03:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.104.229 with HTTP; Thu, 21 Feb 2013 22:03:25 -0800 (PST) In-Reply-To: <9730F6F1-4942-4837-9C24-B9A0A4B3F698@gmail.com> References: <20cf3071cd6276fc1b04d644acc3@google.com> <9730F6F1-4942-4837-9C24-B9A0A4B3F698@gmail.com> From: Harsh J Date: Fri, 22 Feb 2013 11:33:25 +0530 Message-ID: Subject: Re: Locks in HDFS To: "cdh-user@cloudera.org" Cc: "common-user@hadoop.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmfwYTfPms82Yu2mIpO2yiS2yOiDpQ6ddtW7h07zzqSshB0vRtWivfsr58unNHNd2zUdv1r X-Virus-Checked: Checked by ClamAV on apache.org HDFS does not have such a client-side feature, but your applications can use Apache Zookeeper to coordinate and implement this on their own - it can be used to achieve distributed locking. While at ZooKeeper, also checkout https://github.com/Netflix/curator which makes using it for common needs very easy. On Fri, Feb 22, 2013 at 5:17 AM, abhishek wrote: > >> Hello, > >> How can I impose read lock, for a file in HDFS >> >> So that only one user (or) one application , can access file in hdfs at any point of time. >> >> Regards >> Abhi > > -- > > > -- Harsh J