Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1E958200B3B for ; Mon, 11 Jul 2016 10:26:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1D2BA160A62; Mon, 11 Jul 2016 08:26:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 65E3B160A78 for ; Mon, 11 Jul 2016 10:26:12 +0200 (CEST) Received: (qmail 13133 invoked by uid 500); 11 Jul 2016 08:26:11 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 13052 invoked by uid 99); 11 Jul 2016 08:26:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2016 08:26:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 41F662C02A5 for ; Mon, 11 Jul 2016 08:26:11 +0000 (UTC) Date: Mon, 11 Jul 2016 08:26:11 +0000 (UTC) From: "Yu Li (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16183) Correct errors in example program of coprocessor in Ref Guide MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 11 Jul 2016 08:26:13 -0000 [ https://issues.apache.org/jira/browse/HBASE-16183?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D153= 70365#comment-15370365 ]=20 Yu Li commented on HBASE-16183: ------------------------------- Ever tried "More->Attach Files"? Or any special problem? > Correct errors in example program of coprocessor in Ref Guide > ------------------------------------------------------------- > > Key: HBASE-16183 > URL: https://issues.apache.org/jira/browse/HBASE-16183 > Project: HBase > Issue Type: Bug > Components: documentation > Reporter: Xiang Li > Assignee: Xiang Li > Priority: Minor > Attachments: HBASE-16183.patch > > > 1. In Section 89.3.3 > change > {code} > String path =3D "hdfs://:/user//coprocessor.= jar"; > {code} > into > {code} > Path path =3D new Path("hdfs://bdavm1506.svl.ibm.com:8020/user/hbase/copr= ocessor.jar"); > {code} > Reason: > The second parameter of HTableDescriptor.addCoprocessor() is org.apache= .hadoop.fs.Path, not String. > See http://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/HTableDe= scriptor.html > 2. In Section 89.3.3 > change > {code} > HBaseAdmin admin =3D new HBaseAdmin(conf); > {code} > into > {code} > Connection connection =3D ConnectionFactory.createConnection(conf); > Admin admin =3D connection.getAdmin(); > {code} > Reason: > HBASE-12083 makes new HBaseAdmin() deprecated and the instance of Admin= is supposed to get from Connection.getAdmin() > Also see http://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/cli= ent/HBaseAdmin.html > 3. In section 90.1 > change > {code} > public void preGetOp(final ObserverContext e, final Get get, final List r= esults) > {code} > into > {code} > public void preGetOp(final ObserverContext = e, final Get get, final List results) > {code} > change > {code} > List kvs =3D new ArrayList(results.size()); > {code} > into > {code} > List kvs =3D new ArrayList(results.size()); > {code} > change > {code} > public RegionScanner preScannerOpen(final ObserverContext e, final Scan s= can, > {code} > into > {code} > preScannerOpen(final ObserverContext e, fin= al Scan scan=EF=BC=8C > {code} > change > {code} > public boolean postScannerNext(final ObserverContext e, final InternalSca= nner s, final List results, final int limit, final boolean hasMore) throws = IOException { > {code} > into > {code} > public boolean postScannerNext(final ObserverContext e, final InternalScanner s, final List results, final int= limit, final boolean hasMore) throws IOException { > {code} > change > {code} > Iterator iterator =3D results.iterator(); > {code} > into > {code} > Iterator iterator =3D results.iterator(); > {code} > Reason: > Generic > 4. In section 90.1 > change > {code} > preGet(e, get, kvs); > {code} > into > {code} > super.preGetOp(e, get, kvs); > {code} > Reason: > There is not a function called preGet() provided by BaseRegionObserver = or its super class/interface. I believe we need to call preGetOp() of the s= uper class of RegionObserverExample here. > 5. In section 90.1 > change > {code} > kvs.add(KeyValueUtil.ensureKeyValue(c)); > {code} > into > {code} > kvs.add(c); > {code} > Reason: > KeyValueUtil.ensureKeyValue() is deprecated. > See http://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/KeyValue= Util.html > and https://issues.apache.org/jira/browse/HBASE-12079 -- This message was sent by Atlassian JIRA (v6.3.4#6332)