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 5D7F1200CC5 for ; Tue, 11 Jul 2017 21:18:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5CBB516703F; Tue, 11 Jul 2017 19:18:52 +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 7C79E16703C for ; Tue, 11 Jul 2017 21:18:51 +0200 (CEST) Received: (qmail 82922 invoked by uid 500); 11 Jul 2017 19:18:50 -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 82903 invoked by uid 99); 11 Jul 2017 19:18:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2017 19:18:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5C87F19623C for ; Tue, 11 Jul 2017 19:18:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.396 X-Spam-Level: X-Spam-Status: No, score=-0.396 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_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 2I04URh-EvpQ for ; Tue, 11 Jul 2017 19:18:46 +0000 (UTC) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 8857A62418 for ; Tue, 11 Jul 2017 19:11:45 +0000 (UTC) Received: by mail-oi0-f51.google.com with SMTP id l130so1342449oib.1 for ; Tue, 11 Jul 2017 12:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=LX/uBI+b9Fk2+I1Zv0LWuFibvapiygutwWCYc2dEQIA=; b=UR4FnvTE5mEoWO9wd4QAjXYXq671+McbRDj12UWiiLlCjvVMpe3yKmbJbyFz1j6Jeg VynPA60ELXsXUYWC9jBe4s99sG38oLAUxVz9N89ODAcIrawmQuruwudAwE+d+COwhNI+ 56S3r2itSIV7bym2WsW8PrlZ3Al6Ot3jP1YsT5Fask9i5onS1gDDfBD+FkhxGq6bLe6E jBuO5NaV+aDODGBDcllvvubY43NwKl9dlvhVsq5hUEdQyspHMbpRSb8YzlKtrQK9FKp3 mCIm/Nmd1NhZ4hxqBklQno+VQHSm5pCrBqRoW7GgR+uMzh5aYq5zXYuqzbmnY8wR1qWI igyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=LX/uBI+b9Fk2+I1Zv0LWuFibvapiygutwWCYc2dEQIA=; b=V/JXtYhTzHhl9v5/KE6Xmr6O+S79BKna+4/X9DHkV4+wZK4nNpKuZKTsx/Ajm9sjoz RQCPjthOiekQ3lIiT+DBLo48lnSgjKZjBxS0s6XHM6b82nLeV0LEBwIqEooBjYQujPjD JUmWi2msI0QIS6Y5+efLYS2Zkr1GX5y2KuhVwRIrn65cbGCLtNiqc8voQhUODVXNN4xI do2wwaevP8vq6uoXuygCLP1XbYJUxMSRRJGDSlFMWElN6q3+8AFpcFSmAh8f0/7BHIcx OzPOSoPbYFgUtupF56+3m4cZ603V8ePzAdnET0Lu5Il0JdRvon09uXtyubS4V6fqDoP5 jRVg== X-Gm-Message-State: AIVw112TOM0XHFZ5lkZvfSSl7UZfImKB8vDTGmg/Z++9owgrOrmmqSGf By7AwBBZ4BNpwNnQPtRel4hSmJUxzzSh X-Received: by 10.202.93.2 with SMTP id r2mr952821oib.193.1499800303878; Tue, 11 Jul 2017 12:11:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.165.135 with HTTP; Tue, 11 Jul 2017 12:11:43 -0700 (PDT) In-Reply-To: References: From: S L Date: Tue, 11 Jul 2017 12:11:43 -0700 Message-ID: Subject: Re: Difference between ResultScanner and initTableMapperJob To: user@hbase.apache.org Content-Type: multipart/alternative; boundary="001a113d4bec58ca6b05540f7885" archived-at: Tue, 11 Jul 2017 19:18:52 -0000 --001a113d4bec58ca6b05540f7885 Content-Type: text/plain; charset="UTF-8" Sorry for not being clear. I tried with both versions, first 1.0.1, then 1,2-cdh5.7.2. We are currently running on Cloudera 5.7.2, thus why I used that version of the jar. I had set the timeout to be as short as 30 sec and as long as 2 min but I was still running into the problem. When setting the timeout to 2 min, the job took almost 50 min to "complete". Complete is in quotes because it fails (see pastebin below) Here's a copy of the hadoop output logs via pastebin. The log is 11000 lines so I just pasted up to the first couple exceptions and then pasted the end where it jumps from 80% maps to 100% and from 21% reduce to 100% because Yarn or something killed it. https://pastebin.com/KwriyPn6 http://imgur.com/a/ouPZ5 - screenshot from failed mapreduce job from cloudera manager/Yarn On Mon, Jul 10, 2017 at 8:50 PM, Ted Yu wrote: > bq. for hbase-client/hbase-server version 1.0.1 and 1.2.0-cdh5.7.2. > > You mean the error occurred for both versions or, client is on 1.0.1 and > server is on 1.2.0 ? > > There should be more to the RetriesExhaustedException. > Can you pastebin the full stack trace ? > > Cheers > > On Mon, Jul 10, 2017 at 2:21 PM, S L wrote: > > > I hope someone can tell me what the difference between these two API > calls > > are. I'm getting weird results between the two of them. This is > happening > > for hbase-client/hbase-server version 1.0.1 and 1.2.0-cdh5.7.2. > > > > First off, my rowkeys are in the format hash_name_timestamp > > e.g. 100_servername_1234567890. The hbase table has a TTL of 30 days so > > things older than 30 days should disappear after compaction. > > > > The following is code for using ResultScanner. It doesn't use MapReduce > so > > it takes a very long time to complete. I can't run my job this way > because > > it takes too long. However, for debugging purposes, I don't have any > > problems with this method. It lists all keys for the specified time > range, > > which look valid to me since all the timestamps of the returned keys are > > within the past 30 days and within the specified time range: > > > > Scan scan = new Scan(); > > scan.addColumn(Bytes.toBytes("raw_data"), Bytes.toBytes(fileType)); > > scan.setCaching(500); > > scan.setCacheBlocks(false); > > scan.setTimeRange(start, end); > > > > Connection fConnection = ConnectionFactory.createConnection(conf); > > Table table = fConnection.getTable(TableName.valueOf(tableName)); > > ResultScanner scanner = table.getScanner(scan); > > for (Result result = scanner.next(); result != null; result = > > scanner.next()) { > > System.out.println("Found row: " + Bytes.toString(result.getRow() > > )); > > } > > > > > > The follow code doesn't work but it uses MapReduce, which runs way faster > > than using the ResultScanner way, since it divides things up into 1200 > > maps. The problem is I'm getting rowkeys that should have disappeared > due > > to TTL expiring: > > > > Scan scan = new Scan(); > > scan.addColumn(Bytes.toBytes("raw_data"), Bytes.toBytes(fileType)); > > scan.setCaching(500); > > scan.setCacheBlocks(false); > > scan.setTimeRange(start, end); > > TableMapReduceUtil.initTableMapperJob(tableName, scan, MTTRMapper.class, > > Text.class, IntWritable.class, job); > > > > Here is the error that I get, which eventually kills the whole MR job > later > > because over 25% of the mappers failed. > > > > > Error: org.apache.hadoop.hbase.client.RetriesExhaustedException: > > > Failed after attempts=36, exceptions: Wed Jun 28 13:46:57 PDT 2017, > > > null, java.net.SocketTimeoutException: callTimeout=120000, > > > callDuration=120301: row '65_app129041.iad1.mydomain.com_1476641940' > > > on table 'server_based_data' at region=server_based_data > > > > I'll try to study the code for the hbase-client and hbase-server jars but > > hopefully someone will know offhand what the difference between the > methods > > are and what is causing the initTableMapperJob call to fail. > > > --001a113d4bec58ca6b05540f7885--