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 F2714CE68 for ; Mon, 26 May 2014 06:56:00 +0000 (UTC) Received: (qmail 54415 invoked by uid 500); 26 May 2014 06:55:58 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 54346 invoked by uid 500); 26 May 2014 06:55:58 -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 54338 invoked by uid 99); 26 May 2014 06:55:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 06:55:58 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_IMAGE_ONLY_20,HTML_MESSAGE,HTML_SHORT_LINK_IMG_3,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bharathv@cloudera.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 06:55:54 +0000 Received: by mail-ob0-f176.google.com with SMTP id wo20so7574728obc.7 for ; Sun, 25 May 2014 23:55:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=IT1sLqt0+GyzSnO//KC2ImQIV7/pTj2E2dyPDXMfVWw=; b=gS6yRfDX9JQ0bVSr45iRdrJjIMCtL4k++b1sJqi9xUwREkC8nSQ1x3bfrqkdu8JXdW iWcskNQKGAcPokYV97y2FMBTfjKpIaE8kbW/etVUZTpexHrIZDXfOU/lwqZshSEBQmwj Tsr0mOLv2x2XbtmaleBIRXOfLDr6hpfld1630b3Cfw7MgGde6S8Kq+iNEQux1slGlWcB 2mRZJyYpX9TSVGQioV301kdsjaa7l7cRcvtjl9mMXeFSPCN7Ld8e72KkrnYA2WhHKeg/ N9HY8WUWjHOtCpekfVGWi4Qy4rRKlvbopJsM+X9lSCJnz/p9jDt/0eLQpgVwRSN3/njp Tw7A== X-Gm-Message-State: ALoCoQliTSQtCewCy/MJzdlDKRxxZ3Cpq2C0C1VNIf6WhdK7L3KHIVhENh+4nZf/2fHAKccpVYt4 X-Received: by 10.182.58.83 with SMTP id o19mr23128616obq.26.1401087333483; Sun, 25 May 2014 23:55:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.76.195 with HTTP; Sun, 25 May 2014 23:55:13 -0700 (PDT) In-Reply-To: References: From: Bharath Vissapragada Date: Mon, 26 May 2014 12:25:13 +0530 Message-ID: Subject: Re: custom hbase shell commands To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=e89a8f924058cfdc2504fa481034 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f924058cfdc2504fa481034 Content-Type: text/plain; charset=UTF-8 bcc : user@ cc : dev@ During startup shell loads the commands from shell/commands/* [1] and calls appropriate command when invoked [2]. [1] https://github.com/apache/hbase/blob/0.94/src/main/ruby/shell.rb#L42 [2] https://github.com/apache/hbase/blob/0.94/src/main/ruby/shell.rb#L110 On Mon, May 26, 2014 at 12:08 PM, yeshwanth kumar wrote: > hi, > > i am using hbase 0.94.10, Distribution: Apache > i am working on jruby scripts to create custom hbase command. > > I want to know whether I can create a custom hbase command similar to > already available scan, put commands.. I have a sample jruby script, > client.rb that outputs the Row ID and Value by taking Tablename, Family, > Limit as input. I can find the ruby scripts of other default commands like > scan.rb, put.rb, in $HBASE_HOME/src/main/ruby/shell folder. > i don't understand how the shell is designed. > > can someone explain me the architecture of shell, and which file to edit to > create a custom command. > > thanks, > yeshwanth > -- Bharath Vissapragada --e89a8f924058cfdc2504fa481034--