Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-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 7848911329 for ; Sat, 19 Jul 2014 16:09:09 +0000 (UTC) Received: (qmail 24521 invoked by uid 500); 19 Jul 2014 16:09:09 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 24439 invoked by uid 500); 19 Jul 2014 16:09:09 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 24422 invoked by uid 99); 19 Jul 2014 16:09:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jul 2014 16:09:09 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.223.178 as permitted sender) Received: from [209.85.223.178] (HELO mail-ie0-f178.google.com) (209.85.223.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jul 2014 16:09:04 +0000 Received: by mail-ie0-f178.google.com with SMTP id tp5so5573344ieb.37 for ; Sat, 19 Jul 2014 09:08:44 -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=7sr4Lz57K3RCNkM9+QmeO4vdDWaito4r5NZRWzxREOo=; b=YHcdyHHq6SV1OR3Jm0+QGX2jx7Bg9Oc6+r4sRsAJT32lhxZpt2xq7uJ5/60EsMzJev wIoe3siP3LfqmEvr/4Bruvuj+DhuseVcUbRRUf5k1hFqGDx3S+1590yy+J4xYaZhDTXY oq5H08SZFJzWW7lkk8/YftRcqvyY42jSkiikHJsZIxxPdYpl6/PL5gjWVwRYOWziALLJ DMOZ/alx1539zTJm0WbuvN2F9qM+tQIyxSRH+m0Kya00FuHYP+NUnx2B1h8YXp21gjgR nV+36XWeqlQ+4K1qnSZT6cKOMQ4L/B7Qm9JgP+JeAxFhwpqN0NrifG/h7D4TNdnt5mud QY2g== X-Gm-Message-State: ALoCoQmoyLbpZU4kadBGFWtr7RwwMxMa12+9tcrdTKV2NBZcequkLaiXgOiEYwxvE5qNbP4hXurS X-Received: by 10.50.43.167 with SMTP id x7mr22184694igl.36.1405786124019; Sat, 19 Jul 2014 09:08:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.138.233 with HTTP; Sat, 19 Jul 2014 09:08:23 -0700 (PDT) In-Reply-To: <1405315358851-4030458.post@n3.nabble.com> References: <1405315358851-4030458.post@n3.nabble.com> From: Harsh J Date: Sat, 19 Jul 2014 21:38:23 +0530 Message-ID: Subject: Re: Error when trying to convert a local datafile to plain text with Avro Tools To: "user@avro apache. org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Its useful to have plaintext data in compressed avro files in HDFS for MR/etc. processing, since the container format allows splitting. The feature of 'totext'/'from'text' was added originally via AVRO-567. You may instead be looking for the avro (avrocat) tool? You can obtain it by installing the Python 'avro' package (easy_install avro, or pip install avro) and by then running the 'avro' command. It allows configurable forms of text transformation from regular Avro schema files. On Mon, Jul 14, 2014 at 10:52 AM, julianpeeters wrote: > Hi, > > I'm exploring the human-readable avro options in the avro-tools jar, namely > `tojson` and `totext`. > > `tojson` works fine, but I try `totext` with: > > `$ java -jar avro-tools-1.7.6.jar totext twitter.avro twitter.txt`, > > then twitter.txt is empty and I get this error: > > Jul 13, 2014 8:41:19 PM org.apache.hadoop.util.NativeCodeLoader > WARNING: Unable to load native-hadoop library for your platform... using > builtin-java classes where applicable > Avro file is not generic text schema > > > What am I doing wrong? > > Thanks for looking, > -Julian > > PS (Looking into the source, it looks like this error is thrown when the > schema in the datafile is not equal to the string "\"bytes"\", but I have a > hard time understanding why the datafile's schema would ever be that.) > > > > > > -- > View this message in context: http://apache-avro.679487.n3.nabble.com/Error-when-trying-to-convert-a-local-datafile-to-plain-text-with-Avro-Tools-tp4030458.html > Sent from the Avro - Users mailing list archive at Nabble.com. -- Harsh J