Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E06C81971F for ; Tue, 29 Mar 2016 07:17:35 +0000 (UTC) Received: (qmail 2078 invoked by uid 500); 29 Mar 2016 07:17:31 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 1919 invoked by uid 500); 29 Mar 2016 07:17:31 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 1908 invoked by uid 99); 29 Mar 2016 07:17:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2016 07:17:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 29E6EC031B for ; Tue, 29 Mar 2016 07:17:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id afXFKooO7b4m for ; Tue, 29 Mar 2016 07:17:30 +0000 (UTC) Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 5D1425F234 for ; Tue, 29 Mar 2016 07:17:29 +0000 (UTC) Received: by mail-yw0-f174.google.com with SMTP id h65so8177711ywe.0 for ; Tue, 29 Mar 2016 00:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=Dx/BzqAcMHreHTxpf3JE9Mm70d95COHDvqrSu2aNXw0=; b=vMPfaQa2ZsHYjLkBQBCp8lInWwzxthxiNIOsbZzqwEPoyRL3bFutn1hWN4C0ofFuGg E2CpQpgouS4HauIEXp/m/dh1hysKTS1vK9dtT0cmLP8zjO8ZuivQWCZdSQbA6yzOE3eh FsgQ0Yuv5tdIEHPw8/iSAwrGfmGUOxUt8aADOui0Sq0tnTmW/bedfoo6x7ioa6xGQ585 FxKnOw+Ww1PYXY8LYa3NEoYas+okytEpfj9EqFgH76uYMkMt2rim4qM4eXYMn/KilmFm salw8gbGkadDsr43Q+2eQmGfDB//6zP1QVNXjeFKUOfFU68Wvvh0JvIp2TGvWFMAFAyR Qmew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=Dx/BzqAcMHreHTxpf3JE9Mm70d95COHDvqrSu2aNXw0=; b=DVLgKfD1/0gOA5LSmzjuRWJS3uI7kaEWe4EzDb5vnvrz6+XLNsyP2faxvtqvNK9RcJ rs0v1KcYORfa+/XU4WPFg0THc4VV5NsjYt95DmgwO66ZxwJMXyWAmPJVCVt9c0AGsLaM UpiMvByudNXGGrmcm4J2MwpMW32ViFaixjkoU0Hz/g1zru7k2xD5+UGtt8gjz2uJEleo rRcvwWPuG/hYKw08OTj1oCT4v5dhMfRwx876rM4bUXW/TKxvqoskbpi/HbutjYutbfFe wXdiK1Zfh1WJ2iH5UP2sv3byOVxefrZefD1+Ryg0zSsV6WppYGBdFHE7zlQg6xIh23HV WVyg== X-Gm-Message-State: AD7BkJJmY1Edj9qwTgAz4zcp7KQceWmJhaFg0oJjppWNXBfnn/7NEWoIQYCEU48ZOYgPqA9My38WD5LnKXMf5g== MIME-Version: 1.0 X-Received: by 10.129.29.3 with SMTP id d3mr276475ywd.190.1459235848516; Tue, 29 Mar 2016 00:17:28 -0700 (PDT) Received: by 10.13.234.151 with HTTP; Tue, 29 Mar 2016 00:17:28 -0700 (PDT) Date: Tue, 29 Mar 2016 09:17:28 +0200 Message-ID: Subject: Use ChainMapper with TableMapReduceUtil From: Marko Dinic To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001a114283126519d3052f2ad22b --001a114283126519d3052f2ad22b Content-Type: text/plain; charset=UTF-8 Is it possible to chain multiple mappers when the first mapper in the chain reads from a HBase table? That is, to use ChainMapper with TableMapReduceUtil? I'm trying to perform some transformations on each record retrieved from the HBase, but I'm not able to make it work. Here's a code snipped where are try to use the two: Job job = new Job(hBaseConfig, "Retrieving data from HBase"); job.setJarByClass(DataRetrievalDriver.class); Scan scan = scanCreator.getScan(); TableMapReduceUtil.initTableMapperJob( table, scan, DataRetrievalMapper.class, Text.class, ElementWritable.class, job, true, SaltTableInputFormat.class ); ChainMapper.addMapper(job, TransformMapper.class, Text.class, ElementWritable.class, Text.class, ElementWritable.class, new Configuration()); SequenceFileOutputFormat.setOutputPath(job, new Path("out")); job.setReducerClass(Reducer.class); job.setNumReduceTasks(1); job.waitForCompletion(true); But for some reason this doesn't work. Any help is highly appreciated. Best regards, -- Marko Dinic --001a114283126519d3052f2ad22b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Is it possible to chain = multiple mappers when the first mapper in the chain reads from a HBase tabl= e? That is, to use ChainMapper with TableMapReduceUtil?

I'm trying to perform some transformations on each re= cord retrieved from the HBase, but I'm not able to make it work.

Here's a code snipped where are try to u= se the two:

    Job job =3D new Job(hBaseConfig, "Retrieving data from H=
Base");
    job.setJarByClass(DataRetrievalDriver.class);

    Scan scan =3D scanCreator.getScan();

    TableMapReduceUtil.initTableMapperJob(
            table,
            scan,
            DataRetrievalMapper.class,
            Text.class,
            ElementWritable.class,
            job,
            true,
            SaltTableInputFormat.class
    );

    ChainMapper.addMapper(job, TransformMapper.class, Text.class, ElementWr=
itable.class, Text.class, ElementWritable.class, new Configuration());

    SequenceFileOutputFormat.setOutputPath(job, new Path("out"));

    job.setReducerClass(Reducer.class);
    job.setNumReduceTasks(1);

    job.waitForCompletion(true);
But for some reason this doesn't work.

Any help is highly appreci= ated.

Best regards,

--
Marko Dinic
--001a114283126519d3052f2ad22b--